~cytrogen/srht-deploy

ref: 098f0ded66b5f614ec99f0d3efb89b3a5b1bc0f6 srht-deploy/meta-custom/templates/tabs.html -rw-r--r-- 904 bytes
098f0ded — Cytrogen 初始提交:sourcehut Docker Compose 自托管部署 10 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% macro link(path, title, cls="") %}
<a
  class="nav-link {% if request.path.startswith(path) %}active{% endif %} {{cls}}"
  href="{{ path }}">{{ title }}</a>
{% endmacro %}

<li class="nav-item">
  {{ link("/profile", "个人资料") }}
</li>
<li class="nav-item">
  {{ link("/security", "安全") }}
</li>
<li class="nav-item">
  {{ link("/keys", "密钥") }}
</li>
<li class="nav-item">
  {{ link("/privacy", "隐私") }}
</li>
<li class="nav-item">
  {{ link("/oauth2", "OAuth") }}
</li>
{% if cfg("meta.sr.ht::billing", "enabled") == "yes" %}
<li class="nav-item">
  {% if current_user.user_type == UserType.active_non_paying %}
  {{ link("/billing/initial", "账单") }}
  {% else %}
  {{ link("/billing", "账单") }}
  {% endif %}
</li>
{% endif %}
{% if current_user.user_type == UserType.admin %}
<li class="nav-item">
  {{link("/users", "用户管理", cls="text-danger")}}
</li>
{% endif %}