2024-08-21 02:31:56 +00:00
|
|
|
<!--
|
|
|
|
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>
|
2024-08-21 04:26:53 +00:00
|
|
|
<li {{if eq .CurrentForumTab "browse" }}class="is-active"{{end}}>
|
|
|
|
<a href="/forum/browse">
|
|
|
|
Browse
|
|
|
|
</a>
|
|
|
|
</li>
|
2024-08-21 02:31:56 +00:00
|
|
|
<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}}
|