<style> p { margin: 0; display: block; } input { color: black; } textarea { color: black; box-sizing: border-box; max-width: 100%; min-width: 100%; height: 150px; margin-bottom: 1em; } .comment-section {
display: flex; flex-direction: column; width: 100%; border-top: 1px solid lightgrey; margin-top: 2em;
} .comment-block {
display: flex; flex-direction: row; width: 100%; margin-bottom: 1em;
} .block-ident {
width: 20px;
} .block-details {
border-top: 1px solid #dddddd; display: flex; flex-direction: column; flex-grow: 1;
} .details-header {
padding: 0.5em 0 0.5em 0; font-size: .8em;
} .details-text {
padding: .5em; background-color: #f5f5f5; font-size: .9em;
} .details-footer {
display: none; flex-direction: row; justify-content: flex-end; align-items: baseline;
} .is-user-.show($account.uuid) {
display: flex;
} .if($account.is-domain-admin, true) .is-admin {
display: flex;
} .end() .if($account.is-moderator, true) .is-moderator {
display: flex;
} .end() .small-button {
background-color: #e8e8e8; border: 0; margin-top: 2px; margin-left: 4px; font-size: .8em; color: darkblue;
} .comment-input {
border-top: 1px solid #dddddd; width: 100%; padding-top: 1em;
} .input-form {
display: flex; flex-direction: column;
} .input-form-button {
margin-top: 1em;
} .grey-text { color: lightgrey; } .small-grey { color: grey; font-size: .8em; } </style>
<div class=“comment-section”>
<p style="margin: 1em 0 1em 0;">Comments:</p>
.if($info.has-comments, false)
<p style="margin-top: 2em;">There are no comments yet</p>
.else()
.cached($request.comment-section-identifier, $info.afterstamp) .for(comments, $request.comment-section-identifier) .if($info.comment-removed, true) <div class="comment-block"> <p>This comment has been removed.</p> </div> .else() <div class="comment-block"> <div class="block-ident"></div> <form class="block-details" method="post"> <div class="details-header"> <p>(.show($info.ind)) .show($info.dname)<span class="grey-text"> wrote on .show($info.ftimp).if($account.name, equal, $info.aname) edit: .show($info.ftime).end():</span></p> </div> <div class="details-text"> <p>.show($info.html)</p> </div> <div class="details-footer is-admin is-moderator is-user-.show($info.auuid)"> <input type="hidden" name="next-url" value=".show($service.relative-resource-path)"> <input type="hidden" name="comment-account-id" value=".show($info.auuid)"> <input type="hidden" name="comment-original-timestamp" value=".show($info.timp)"> <input type="hidden" name="comment-text" value=".show($info.orig)"> <input type="hidden" name="comment-section-identifier" value=".show($request.comment-section-identifier)"> <input class="small-button" type="submit" name="edit-button" value="Edit/Remove" formAction="/command/edit-comment"> </div> </form> </div> .end(if-comment-removed) .end(for-comments) .end(cached)
.end() .if($info.comments-enabled, true)
<div class="comment-input"> <form class="input-form" action="/command/post-comment" method="post"> <textarea name="comment-text" placeholder="Your comments"></textarea> <p class="small-grey">Use [i]..[/i] for italic, [b]..[/b] for bold. Links will not be clickable.</p> .if($account.name, nil) <p class="small-grey">Anonymous comments need approval by a moderator and cannot be edited or deleted. New users will have their first few posts moderated.</p> <p class="small-grey"><a href="/pages/login.sf.html">Login first</a> to enable editing and removal of comments.</p> <input class="input-form-button" type="text" name="display-name" placeholder="Anonymous"> .end() <input type="hidden" name="next-url" value=".show($service.relative-resource-path)"> <input type="hidden" name="comment-section-identifier" value=".show($request.comment-section-identifier)"> <input class="input-form-button" type="submit" value="Submit"> </form> </div>
.else()
<div> <p>Anonymous comments are not allowed, please login to comment.</p> </div>
.end() </div>