eb85b2e090
* Add "Browse" tab to the forums to view them all. * Text search * Show all, official, community, or "My List" forums. * Add a Follow/Unfollow button into the header bar of forums to add it to "My List" * On the Categories page, a special "My List" category appears at the top if the user follows categories, with their follows in alphabetical order. * On the Categories & Browse pages: forums you follow will have a green bookmark icon by their name. Permissions: * The forum owner is able to Delete comments by others, but not Edit. Notes: * Currently a max limit of 100 follow forums (no pagination yet).
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<!--
|
|
Reusable Forums tab bar.
|
|
|
|
Usage: [[ForumTabs .]]
|
|
|
|
Variables that your template should set:
|
|
|
|
- CurrentForumTab (string): one of categories, newest, search.
|
|
-->
|
|
{{define "ForumTabs"}}
|
|
<div class="block p-4 mb-0">
|
|
<div class="tabs is-boxed">
|
|
<ul>
|
|
<li {{if or (eq .CurrentForumTab "categories") (not .CurrentForumTab) }}class="is-active"{{end}}>
|
|
<a href="/forum">
|
|
Categories
|
|
</a>
|
|
</li>
|
|
<li {{if eq .CurrentForumTab "browse" }}class="is-active"{{end}}>
|
|
<a href="/forum/browse">
|
|
Browse
|
|
</a>
|
|
</li>
|
|
<li {{if eq .CurrentForumTab "newest" }}class="is-active"{{end}}>
|
|
<a href="/forum/newest">
|
|
Newest
|
|
</a>
|
|
</li>
|
|
<li {{if eq .CurrentForumTab "search" }}class="is-active"{{end}}>
|
|
<a href="/forum/search">
|
|
<i class="fa fa-search mr-2"></i> Search
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{{end}}
|