~cytrogen/srht-deploy

ref: 098f0ded66b5f614ec99f0d3efb89b3a5b1bc0f6 srht-deploy/meta-custom/base-templates/layout.html -rw-r--r-- 1.7 KiB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% block title %}
    <title>{{domain}}</title>
    {% endblock %}
    {% block favicon %}
    <link rel="icon" type="image/svg+xml" href="/static/logo.svg" />
    <link rel="icon" type="image/png" href="/static/logo.png" sizes="any" />
    {% endblock favicon %}
    {% if app.debug %}
    <link rel="stylesheet" href="/static/main.css">
    {% else %}
    <link rel="stylesheet" href="/{{static_resource("static/main.min.css")}}">
    {% endif %}
    {% if page and page != 1 %}
    <link rel="prev" href="?page={{ page - 1 }}{{ coalesce_search_terms() }}" />
    {% endif %}
    {% if page and page != total_pages %}
    <link rel="next" href="?page={{ page + 1 }}{{ coalesce_search_terms() }}" />
    {% endif %}
    {% block head %}
    {% endblock %}
  </head>
  <body>
    {% block environment %}
    {% if environment != "production" or
      (current_user and current_user.user_type.value == 'admin' )%}
    <div style="
        {% if environment == "production" %}
        background: #cc0022;
        {% else %}
        background: #228800;
        {% endif %}
        color: white; font-weight: bold; width: 100%; text-align: center">
      {{environment.upper()}} ENVIRONMENT
    </div>
    {% endif %}
    {% endblock %}
    {% block nav %}
    <nav class="container navbar navbar-light navbar-expand-sm">
      {% include 'nav.html' %}
    </nav>
    {% endblock %}
    {% block body %}
    <div class="container">
      {% block content %}{% endblock %}
    </div>
    {% endblock %}
    {% block modal %}{% endblock %}
    {% block scripts %}{% endblock %}
  </body>
</html>