e47450d372
You can now switch between themes in the Control Panel. The Alternate Post Layout teased in various screenshots and bits of inaccessible code is now the Tempra Conflux theme, while the original post layout is the Tempa Simple theme. Dramatically increased the speed at which the static files are served. Added a benchmark for static files. Eliminated the name parameter in various custom page structs. Added the TopicsPage struct for the /topics/ route. Added the ForumPage struct for the /forum/{id} route. Added the ForumsPage struct for the /forums/ route. The static file route now serves 404s when a file doesn't exist instead of nearly crashing the server. Reduced the number of unnecessary allocations on some of the routes. Added gradients to Tempra Conflux. Added position: sticky; to the userinfo blocks in Tempra Conflux. Added a notice on the generated template files.
58 lines
4.5 KiB
HTML
58 lines
4.5 KiB
HTML
{{template "header.html" . }}
|
|
<div class="rowblock">
|
|
<form action='/topic/edit/submit/{{.Topic.ID}}' method="post">
|
|
<div class="rowitem"{{ if .Topic.Sticky }} style="background-color: #FFFFEA;"{{else if .Topic.Is_Closed}} style="background-color: #eaeaea;"{{end}}>
|
|
<a class='topic_name hide_on_edit'>{{.Topic.Title}}</a>
|
|
<span class='username hide_on_micro topic_status_e topic_status_{{.Topic.Status}} hide_on_edit' style="font-weight:normal;float: right;">{{.Topic.Status}}</span>
|
|
<span class="username hide_on_micro" style="border-right: 0;font-weight: normal;float: right;">Status</span>
|
|
{{if .CurrentUser.Is_Mod}}
|
|
<a href='/topic/edit/{{.Topic.ID}}' class="username hide_on_edit open_edit" style="font-weight: normal;margin-left: 6px;">Edit</a>
|
|
<a href='/topic/delete/submit/{{.Topic.ID}}' class="username" style="font-weight: normal;">Delete</a>
|
|
{{ if .Topic.Sticky }}<a href='/topic/unstick/submit/{{.Topic.ID}}' class="username" style="font-weight: normal;">Unpin</a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}' class="username" style="font-weight: normal;">Pin</a>{{end}}
|
|
|
|
<input class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" />
|
|
<select name="topic_status" class='show_on_edit topic_status_input' style='float: right;'>
|
|
<option>open</option>
|
|
<option>shut</option>
|
|
</select>
|
|
<button name="topic-button" class="formbutton show_on_edit submit_edit">Update</button>
|
|
{{end}}
|
|
<a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="username report_item" style="font-weight: normal;">Report</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="rowblock post_container">
|
|
<div class="rowitem passive editable_parent post_item" style="border-bottom: none;{{ if .Topic.Avatar }}background-image: url({{ .Topic.Avatar }}), url(/static/white-dot.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat: no-repeat, repeat-y;background-size: 128px;padding-left: 136px;{{.Topic.Css}}{{end}}">
|
|
<p class="hide_on_edit topic_content user_content" style="margin: 0;padding: 0;">{{.Topic.Content}}</p>
|
|
<textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea>
|
|
<br /><br />
|
|
<a href="/user/{{.Topic.CreatedBy}}" class="username real_username">{{.Topic.CreatedByName}}</a>
|
|
{{if .Topic.Tag}}<a class="username hide_on_micro" style="float: right;">{{.Topic.Tag}}</a>{{else if .Topic.URLName}}<a href="{{.Topic.URL}}" class="username" style="color: #505050;float: right;">{{.Topic.URLName}}</a>
|
|
<a class="username" style="color: #505050;float: right;border-right: 0;">{{.Topic.URLPrefix}}</a>{{end}}
|
|
</div>
|
|
</div><br />
|
|
<div class="rowblock post_container" style="overflow: hidden;">{{range .ItemList}}
|
|
<div class="rowitem passive deletable_block editable_parent post_item" style="{{ if .Avatar }}background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;background-repeat: no-repeat, repeat-y;background-size: 128px;padding-left: 136px;{{.Css}}{{end}}">
|
|
<p class="editable_block user_content" style="margin: 0;padding: 0;">{{.ContentHtml}}</p><br /><br />
|
|
<a href="/user/{{.CreatedBy}}" class="username real_username">{{.CreatedByName}}</a>
|
|
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}" class="mod_button"><button class="username edit_item">Edit</button></a>{{end}}
|
|
{{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}" class="mod_button"><button class="username delete_item">Delete</button></a>{{end}}
|
|
<a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="mod_button"><button class="username report_item">Report</button></a>
|
|
{{if .Tag}}<a class="username hide_on_micro" style="float: right;">{{.Tag}}</a>{{else if .URLName}}<a href="{{.URL}}" class="username hide_on_mobile" style="color: #505050;float: right;" rel="nofollow">{{.URLName}}</a>
|
|
<a class="username hide_on_mobile" style="color: #505050;float: right;border-right: 0;">{{.URLPrefix}}</a>{{end}}
|
|
</div>
|
|
{{end}}</div>
|
|
{{if .CurrentUser.Perms.CreateReply}}
|
|
<div class="rowblock">
|
|
<form action="/reply/create/" method="post">
|
|
<input name="tid" value='{{.Topic.ID}}' type="hidden" />
|
|
<div class="formrow">
|
|
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem"><button name="reply-button" class="formbutton">Create Reply</button></div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{end}}
|
|
{{template "footer.html" . }} |