~cytrogen/srht-deploy

ref: 6b7b1351f3bd75526788ceec9164562787bd89ae srht-deploy/meta-custom/templates/tabs.html -rw-r--r-- 904 bytes
6b7b1351 — Cytrogen 修复 README 里的 Markdown 格式错误 9 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 %}