{% extends "root.html" %}
{% import "_avatar.html" as ui %}
{% block inner %}
<div class="space-y-4 text-left">
<div class="text-sm opacity-70">
<a href="/" class="link link-hover">Categories</a>
{% for a in ancestors %} / <a href="/c/{{ a.slug }}" class="link link-hover">{{ a.name }}</a>{% endfor %}
/ {{ category.name }}
</div>
<div class="flex items-center justify-between gap-3">
<h1 class="text-3xl font-bold flex items-center gap-2">
<span class="size-6 rounded-full border border-base-300" style="background: {{ category_widget_bg }}"></span>
{{ category.name }}
</h1>
{% if user %}
<div class="flex items-center gap-2 shrink-0">
{% include "forum/_watch_button.html" %}
<a href="/c/{{ category.slug }}/new" class="btn btn-primary btn-sm">
<i class="fas fa-plus mr-1"></i> New Topic
</a>
</div>
{% endif %}
</div>
{% if category.description %}<p class="opacity-70">{{ category.description }}</p>{% endif %}
<div class="flex flex-wrap items-center justify-between gap-2">
<div class="flex flex-wrap gap-2">
{% for s in subcategories %}
<a href="/c/{{ s.slug }}" class="badge badge-outline gap-1 py-3">
<span class="size-3 rounded-full border border-base-300" style="background: {{ s.widget_bg }}"></span>{{ s.name }}
</a>
{% endfor %}
</div>
<div role="tablist" class="tabs tabs-bordered w-fit">
{% for opt in ["latest", "top", "hot", "bottom"] %}
<a role="tab" class="tab {% if current_sort == opt %}tab-active{% endif %}"
href="/c/{{ category.slug }}?sort={{ opt }}">{{ opt | capitalize }}</a>
{% endfor %}
</div>
</div>
{% if topics|length == 0 %}
<p class="opacity-70">No topics yet.{% if user %} Be the first to post one.{% endif %}</p>
{% else %}
{% include "forum/_topic_list.html" %}
{% endif %}
</div>
{% endblock %}
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions running · Badges · Packages
⭐
Log in to mark this repository.
1.9 KiB · text
History
2264215