2022-08-29 04:01:11 +00:00
{{define "title"}}{{.Thread.Title}} - {{.Forum.Title}}{{end}}
2022-08-24 05:55:19 +00:00
{{define "content"}}
< div class = "block" >
< section class = "hero is-light is-success" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
2022-08-25 04:17:34 +00:00
< a href = "/f/{{.Forum.Fragment}}" class = "has-text-light" >
< span class = "icon mr-4" > < i class = "fa fa-comments" > < / i > < / span >
< span > {{.Forum.Title}}< / span >
< / a >
2022-08-24 05:55:19 +00:00
< / h1 >
< / div >
< / div >
< / section >
< / div >
{{$Root := .}}
< div class = "block px-4" >
< div class = "columns" >
< div class = "column" >
< nav class = "breadcrumb" aria-label = "breadcrumbs" >
< ul >
< li > < a href = "/forum" > Forums< / a > < / li >
< li > < a href = "/f/{{.Forum.Fragment}}" > {{.Forum.Title}}< / a > < / Li >
< li class = "is-active" >
< a href = "{{.Request.URL.Path}}" aria-current = "page" > {{or .Thread.Title "Untitled Thread"}}< / a >
< / li >
< / ul >
< / nav >
< / div >
< div class = "column is-narrow" >
2022-08-25 04:17:34 +00:00
{{if not .Thread.NoReply}}
2022-08-24 05:55:19 +00:00
< a href = "/forum/post?to={{.Forum.Fragment}}&thread={{.Thread.ID}}" class = "button is-link" >
< span class = "icon" > < i class = "fa fa-reply" > < / i > < / span >
< span > Add Reply< / span >
< / a >
2022-08-25 04:17:34 +00:00
{{end}}
2022-08-24 05:55:19 +00:00
< / div >
< / div >
< / div >
2022-08-25 04:17:34 +00:00
< h1 class = "title px-4" >
{{if .Thread.Pinned}}< sup class = "fa fa-thumbtack has-text-success mr-2 is-size-5" title = "Pinned" > < / sup > {{end}}
{{or .Thread.Title "Untitled Thread"}}
< / h1 >
< div class = "px-4" >
{{if .Thread.Pinned}}
< span class = "tag is-success is-light mr-2" >
< span class = "icon" > < i class = "fa fa-thumbtack" > < / i > < / span >
< span > Pinned< / span >
< / span >
{{end}}
{{if .Thread.Explicit}}
< span class = "tag is-danger is-light mr-2" >
< span class = "icon" > < i class = "fa fa-fire" > < / i > < / span >
< span > NSFW< / span >
< / span >
{{end}}
{{if .Thread.NoReply}}
< span class = "tag is-warning is-light mr-2" title = "This thread can not be replied to." >
< span class = "icon" > < i class = "fa fa-ban" > < / i > < / span >
< span > No Reply< / span >
< / span >
{{end}}
2022-08-31 05:13:57 +00:00
< span class = "tag is-grey is-light mr-2" title = "This thread can not be replied to." >
< span class = "icon" > < i class = "fa fa-eye" > < / i > < / span >
< span > {{.Thread.Views}} View{{PluralizeU64 .Thread.Views}}< / span >
< / span >
< em title = "{{.Thread.UpdatedAt.Format " 2006-01-02 15:04:05 " } } " >
Updated {{SincePrettyCoarse .Thread.UpdatedAt}} ago
< / em >
2022-08-25 04:17:34 +00:00
< / div >
2022-08-24 05:55:19 +00:00
2022-08-27 18:42:48 +00:00
< p class = "block p-4 mb-0" >
2022-08-24 05:55:19 +00:00
Found < strong > {{.Pager.Total}}< / strong > post{{Pluralize64 .Pager.Total}} on this thread
(page {{.Pager.Page}} of {{.Pager.Pages}}).
< / p >
2022-08-27 18:42:48 +00:00
< p class = "block px-4 mb-4" >
< a href = "/comments/subscription?table_name=threads&table_id={{.Thread.ID}}&next={{UrlEncode .Request.URL.String}}&subscribe={{if not .IsSubscribed}}true{{else}}false{{end}}" >
< span class = "icon" > < i class = "fa fa-bell{{if not .IsSubscribed}}-slash{{end}}" > < / i > < / span >
< span >
{{if .IsSubscribed}}
Disable notifications about this thread
{{else}}
Enable notifications about this thread
{{end}}
< / span >
< / a >
< / p >
2022-08-24 05:55:19 +00:00
< div class = "block p-2" >
< nav class = "pagination" role = "navigation" aria-label = "pagination" >
< a class = "pagination-previous{{if not .Pager.HasPrevious}} is-disabled{{end}}" title = "Previous"
href="{{.Request.URL.Path}}?page={{.Pager.Previous}}">Previous< / a >
< a class = "pagination-next{{if not .Pager.HasNext}} is-disabled{{end}}" title = "Next"
href="{{.Request.URL.Path}}?page={{.Pager.Next}}">Next page< / a >
< ul class = "pagination-list" >
{{$Root := .}}
{{range .Pager.Iter}}
< li >
< a class = "pagination-link{{if .IsCurrent}} is-current{{end}}"
aria-label="Page {{.Page}}"
href="{{$Root.Request.URL.Path}}?page={{.Page}}">
{{.Page}}
< / a >
< / li >
{{end}}
< / ul >
< / nav >
< / div >
{{$Root := .}}
< div class = "block p-2" >
{{range .Comments}}
2022-09-01 05:58:32 +00:00
< div class = "box has-background-link-light" >
2022-08-24 05:55:19 +00:00
< div class = "columns" >
< div class = "column is-2 has-text-centered" >
< div >
< a href = "/u/{{.User.Username}}" >
2022-09-09 04:42:20 +00:00
{{template "avatar-96x96" .User}}
2022-08-24 05:55:19 +00:00
< / a >
< / div >
< a href = "/u/{{.User.Username}}" > {{.User.Username}}< / a >
{{if .User.IsAdmin}}
< div class = "is-size-7 mt-1" >
2022-08-31 05:13:57 +00:00
< span class = "tag is-danger is-light" >
2022-08-24 05:55:19 +00:00
< span class = "icon" > < i class = "fa fa-gavel" > < / i > < / span >
< span > Admin< / span >
< / span >
< / div >
{{end}}
< / div >
< div class = "column content" >
{{ToMarkdown .Message}}
2022-08-29 03:56:26 +00:00
{{if .IsEdited}}
2022-08-27 02:50:33 +00:00
< div class = "mt-4" >
< em title = "{{.UpdatedAt.Format " 2006-01-02 15:04:05 " } } " >
< small > Edited {{SincePrettyCoarse .UpdatedAt}} ago< / small >
< / em >
< / div >
{{end}}
2022-08-24 05:55:19 +00:00
< hr class = "has-background-grey mb-2" >
2022-08-25 04:17:34 +00:00
< div class = "columns is-mobile is-multiline is-size-7 mb-0" >
2022-08-24 05:55:19 +00:00
< div class = "column is-narrow" >
< span title = "{{.CreatedAt.Format " 2006-01-02 15:04:05 " } } " >
{{SincePrettyCoarse .CreatedAt}} ago
< / span >
< / div >
2022-08-25 04:17:34 +00:00
2022-08-30 03:00:15 +00:00
< div class = "column is-narrow" >
{{$Like := $Root.LikeMap.Get .ID}}
< a href = "#" class = "has-text-dark nonshy-like-button"
data-table-name="comments" data-table-id="{{.ID}}"
title="Like">
< span class = "icon{{if $Like.UserLikes}} has-text-danger{{end}}" > < i class = "fa fa-heart" > < / i > < / span >
< span class = "nonshy-likes" >
Like
{{if gt $Like.Count 0}}
({{$Like.Count}})
{{end}}
< / span >
< / a >
< / div >
2022-08-24 05:55:19 +00:00
< div class = "column is-narrow" >
< a href = "/contact?intent=report&subject=report.comment&id={{.ID}}" class = "has-text-dark" >
< span class = "icon" > < i class = "fa fa-flag" > < / i > < / span >
< span > Report< / span >
< / a >
< / div >
2022-08-25 04:17:34 +00:00
{{if not $Root.Thread.NoReply}}
2022-08-24 05:55:19 +00:00
< div class = "column is-narrow" >
< a href = "/forum/post?to={{$Root.Forum.Fragment}}&thread={{$Root.Thread.ID}}"e={{.ID}}" class = "has-text-dark" >
< span class = "icon" > < i class = "fa fa-quote-right" > < / i > < / span >
< span > Quote< / span >
< / a >
< / div >
< div class = "column is-narrow" >
< a href = "/forum/post?to={{$Root.Forum.Fragment}}&thread={{$Root.Thread.ID}}" class = "has-text-dark" >
< span class = "icon" > < i class = "fa fa-reply" > < / i > < / span >
< span > Reply< / span >
< / a >
< / div >
2022-08-25 04:17:34 +00:00
{{end}}
2022-08-24 05:55:19 +00:00
{{if or $Root.CurrentUser.IsAdmin (eq $Root.CurrentUser.ID .User.ID)}}
< div class = "column is-narrow" >
< a href = "/forum/post?to={{$Root.Forum.Fragment}}&thread={{$Root.Thread.ID}}&edit={{.ID}}" class = "has-text-dark" >
< span class = "icon" > < i class = "fa fa-edit" > < / i > < / span >
< span > Edit< / span >
< / a >
< / div >
< div class = "column is-narrow" >
< a href = "/forum/post?to={{$Root.Forum.Fragment}}&thread={{$Root.Thread.ID}}&edit={{.ID}}&delete=true" onclick = "return confirm('Are you sure you want to delete this comment?')" class = "has-text-dark" >
< span class = "icon" > < i class = "fa fa-trash" > < / i > < / span >
< span > Delete< / span >
< / a >
< / div >
{{end}}
< / div >
2022-08-25 04:17:34 +00:00
{{if $Root.CurrentUser.IsAdmin}}
< div >
< span class = "tag is-primary is-light" >
< span class = "icon" > < i class = "fa fa-database" > < / i > < / span >
< span > ID: {{.ID}}< / span >
< / span >
< / div >
{{end}}
2022-08-24 05:55:19 +00:00
< / div >
< / div >
< / div >
{{end}}
< / div >
2022-08-25 04:17:34 +00:00
{{if .Thread.NoReply}}
< div class = "block notification is-warning is-light" >
< i class = "fa fa-ban pr-2" > < / i >
This thread is not accepting any new replies.
< / div >
{{else}}
< div class = "block p-2 has-text-right" >
< a href = "/forum/post?to={{.Forum.Fragment}}&thread={{.Thread.ID}}" class = "button is-link" >
< span class = "icon" > < i class = "fa fa-reply" > < / i > < / span >
< span > Add Reply< / span >
< / a >
< / div >
{{end}}
2022-08-24 05:55:19 +00:00
{{end}}