2022-08-24 05:55:19 +00:00
|
|
|
{{define "title"}}Forums{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="block">
|
|
|
|
<section class="hero is-light is-success">
|
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="level">
|
|
|
|
<div class="level-left">
|
|
|
|
<h1 class="title">
|
|
|
|
<span class="icon mr-4"><i class="fa fa-comments"></i></span>
|
|
|
|
<span>Forums</span>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
{{if .CurrentUser.IsAdmin}}
|
|
|
|
<div class="level-right">
|
|
|
|
<div>
|
|
|
|
<a href="/forum/admin" class="button is-small has-text-danger">
|
2023-08-30 07:08:20 +00:00
|
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
2022-08-26 02:58:43 +00:00
|
|
|
<span>Manage Forums</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{$Root := .}}
|
2022-08-31 05:13:57 +00:00
|
|
|
|
|
|
|
<div class="block p-4 mb-0">
|
|
|
|
<div class="tabs is-boxed">
|
|
|
|
<ul>
|
|
|
|
<li class="is-active">
|
|
|
|
<a href="/forum">
|
|
|
|
Categories
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="/forum/newest">
|
|
|
|
Newest
|
|
|
|
</a>
|
|
|
|
</li>
|
2024-01-07 00:44:05 +00:00
|
|
|
<li>
|
|
|
|
<a href="/forum/search">
|
|
|
|
<i class="fa fa-search mr-2"></i> Search
|
|
|
|
</a>
|
|
|
|
</li>
|
2022-08-31 05:13:57 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-08-24 05:55:19 +00:00
|
|
|
{{range .Categories}}
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="block p-4">
|
2022-08-24 05:55:19 +00:00
|
|
|
<h1 class="title">{{.Category}}</h1>
|
|
|
|
|
|
|
|
{{if eq (len .Forums) 0}}
|
2022-08-25 04:17:34 +00:00
|
|
|
<em>
|
|
|
|
There are no forums under this category.
|
|
|
|
{{if not $Root.CurrentUser.Explicit}}Your content filters (non-explicit) may be hiding some forums.{{end}}
|
|
|
|
</em>
|
2022-08-24 05:55:19 +00:00
|
|
|
{{else}}
|
|
|
|
{{range .Forums}}
|
|
|
|
{{$Stats := $Root.ForumMap.Get .ID}}
|
2022-09-01 05:58:32 +00:00
|
|
|
<div class="card block has-background-primary-light">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div class="card-content">
|
|
|
|
<div class="columns">
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column is-3 pt-0 pb-1">
|
2022-08-24 05:55:19 +00:00
|
|
|
|
2022-08-26 02:58:43 +00:00
|
|
|
<h2 class="is-size-4">
|
2023-05-24 03:04:17 +00:00
|
|
|
{{if .InnerCircle}}<img src="/static/img/circle-24.png" width="20" height="20" class="mr-1">{{end}}
|
2022-08-26 02:58:43 +00:00
|
|
|
<strong><a href="/f/{{.Fragment}}">{{.Title}}</a></strong>
|
|
|
|
</h2>
|
2022-08-24 05:55:19 +00:00
|
|
|
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="content mb-1">
|
2022-08-24 05:55:19 +00:00
|
|
|
{{if .Description}}
|
|
|
|
{{ToMarkdown .Description}}
|
|
|
|
{{else}}
|
|
|
|
<em>No description</em>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{{if .Explicit}}
|
|
|
|
<span class="tag is-danger is-light">
|
|
|
|
<span class="icon"><i class="fa fa-fire"></i></span>
|
2022-08-25 04:17:34 +00:00
|
|
|
<span>Explicit</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .Privileged}}
|
|
|
|
<span class="tag is-warning is-light">
|
2023-08-30 07:08:20 +00:00
|
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
2022-08-25 04:17:34 +00:00
|
|
|
<span>Privileged</span>
|
2022-08-24 05:55:19 +00:00
|
|
|
</span>
|
|
|
|
{{end}}
|
2022-10-21 04:02:30 +00:00
|
|
|
|
|
|
|
{{if .PermitPhotos}}
|
|
|
|
<span class="tag is-grey">
|
|
|
|
<span class="icon"><i class="fa fa-camera"></i></span>
|
|
|
|
<span>Photos</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column py-1">
|
2022-09-01 05:58:32 +00:00
|
|
|
<div class="box has-background-success-light">
|
|
|
|
<h2 class="subtitle mb-1">Latest Post</h2>
|
2022-08-25 04:17:34 +00:00
|
|
|
{{if $Stats.RecentThread}}
|
2024-01-06 06:25:05 +00:00
|
|
|
<a href="/go/comment?id={{$Stats.RecentPost.ID}}">
|
2022-08-25 04:17:34 +00:00
|
|
|
<strong>{{$Stats.RecentThread.Title}}</strong>
|
|
|
|
</a>
|
|
|
|
<em>by {{$Stats.RecentThread.Comment.User.Username}}</em>
|
|
|
|
<div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<em>
|
|
|
|
{{if and $Stats.RecentPost (not (eq $Stats.RecentPost.ID $Stats.RecentThread.CommentID))}}
|
|
|
|
<small>Last comment by {{$Stats.RecentPost.User.Username}}</small>
|
|
|
|
{{end}}
|
|
|
|
<small title="{{$Stats.RecentThread.UpdatedAt.Format "2006-01-02 15:04:05"}}">{{SincePrettyCoarse $Stats.RecentThread.UpdatedAt}} ago</small>
|
|
|
|
</em>
|
2022-08-25 04:17:34 +00:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<em>No posts found.</em>
|
|
|
|
{{end}}
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column is-3 py-1">
|
|
|
|
<div class="columns is-mobile is-gapless">
|
|
|
|
<div class="column has-text-centered mr-1">
|
2022-09-01 05:58:32 +00:00
|
|
|
<div class="box has-background-warning-light p-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<p class="is-size-7">Topics</p>
|
|
|
|
{{if $Stats}}
|
|
|
|
{{$Stats.Threads}}
|
|
|
|
{{else}}
|
|
|
|
err
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column has-text-centered mx-1">
|
2022-09-01 05:58:32 +00:00
|
|
|
<div class="box has-background-warning-light p-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<p class="is-size-7">Posts</p>
|
|
|
|
{{if $Stats}}
|
|
|
|
{{$Stats.Posts}}
|
|
|
|
{{else}}
|
|
|
|
err
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column has-text-centered ml-1">
|
2022-09-01 05:58:32 +00:00
|
|
|
<div class="box has-background-warning-light p-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<p class="is-size-7">Users</p>
|
|
|
|
{{if $Stats}}
|
|
|
|
{{$Stats.Users}}
|
|
|
|
{{else}}
|
|
|
|
err
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2022-08-25 04:17:34 +00:00
|
|
|
</div>
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}<!-- range .Categories -->
|
|
|
|
|
|
|
|
{{end}}
|