Improve Newest Forum page
This commit is contained in:
parent
500456c05e
commit
c8d7b891c1
|
@ -82,6 +82,18 @@
|
|||
<h2 class="is-size-4 pt-0">
|
||||
<a href="/forum/thread/{{.ThreadID}}" class="has-text-dark has-text-weight-bold">
|
||||
{{.Thread.Title}}
|
||||
|
||||
{{if .Thread.Pinned}}
|
||||
<sup class="has-text-success fa fa-thumbtack is-size-6 ml-1"></sup>
|
||||
{{end}}
|
||||
|
||||
{{if .Thread.Explicit}}
|
||||
<sup class="has-text-danger fa fa-fire is-size-6 ml-1"></sup>
|
||||
{{end}}
|
||||
|
||||
{{if .Thread.NoReply}}
|
||||
<sup class="has-text-warning-dark fa fa-ban is-size-6 ml-1"></sup>
|
||||
{{end}}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
@ -89,29 +101,62 @@
|
|||
{{TrimEllipses .Thread.Comment.Message 256}}
|
||||
</a>
|
||||
|
||||
<div class="is-size-7 is-italic is-grey">
|
||||
by {{.Thread.Comment.User.Username}}
|
||||
<div class="is-size-7 is-italic is-grey pt-1">
|
||||
{{if eq .Comment.ID .Thread.CommentID}}new {{end}}thread by {{.Thread.Comment.User.Username}}
|
||||
in <a href="/f/{{.Forum.Fragment}}">
|
||||
{{.Forum.Title}}
|
||||
|
||||
{{if .Forum.Privileged}}
|
||||
<small class="has-text-warning-dark fa fa-gavel"></small>
|
||||
{{end}}
|
||||
|
||||
{{if .Forum.Explicit}}
|
||||
<small class="has-text-danger fa fa-fire"></small>
|
||||
{{end}}
|
||||
</a>
|
||||
–
|
||||
{{SincePrettyCoarse .Thread.Comment.UpdatedAt}} ago
|
||||
</div>
|
||||
|
||||
<hr class="has-background-grey my-2">
|
||||
|
||||
<h2 class="is-size-5 pt-0">
|
||||
<a href="/forum/thread/{{.ThreadID}}?page=-1" class="has-text-dark">Latest Post</a>
|
||||
</h2>
|
||||
|
||||
<!-- If a reply to a thread, show the reply too -->
|
||||
{{if ne .Comment.ID .Thread.CommentID}}
|
||||
<a href="/forum/thread/{{.ThreadID}}?page=-1" class="is-size-7 has-text-dark">
|
||||
{{TrimEllipses .Comment.Message 256}}
|
||||
</a>
|
||||
{{end}}
|
||||
<hr class="has-background-grey my-2">
|
||||
|
||||
<div class="is-size-7 is-italic is-grey">
|
||||
by {{.Comment.User.Username}}
|
||||
–
|
||||
{{SincePrettyCoarse .Comment.UpdatedAt}} ago
|
||||
</div>
|
||||
<div class="columns is-gapless mb-0">
|
||||
<div class="column is-narrow">
|
||||
<a href="/forum/thread/{{.ThreadID}}?page=-1" class="has-text-grey">
|
||||
<h2 class="is-size-5 py-0 is-italic has-text-grey">
|
||||
<span class="icon"><i class="fa fa-reply"></i></span>
|
||||
Comment added by
|
||||
</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow mx-2">
|
||||
<a href="/u/{{.Comment.User.Username}}">
|
||||
<figure class="image is-32x32 is-inline-block">
|
||||
{{if .Comment.User.ProfilePhoto.ID}}
|
||||
<img src="{{PhotoURL .Comment.User.ProfilePhoto.CroppedFilename}}" class="is-rounded">
|
||||
{{else}}
|
||||
<img src="/static/photos/shy.png" class="is-rounded">
|
||||
{{end}}
|
||||
</figure>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<h2 class="is-size-5 py-0">
|
||||
<a href="/u/{{.Comment.User.Username}}" class="has-text-dark">{{.Comment.User.Username}}</a>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="/forum/thread/{{.ThreadID}}?page=-1" class="has-text-dark">
|
||||
{{TrimEllipses .Comment.Message 256}}
|
||||
</a>
|
||||
|
||||
<div class="is-size-7 is-italic is-grey mt-1">
|
||||
{{SincePrettyCoarse .Comment.UpdatedAt}} ago
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user