aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/base.html.jinja
blob: 8b8be4bd6e00c0077d69238c5f2498f79e48a9e7 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{#
SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0

Proxy web UI base page template.

This file is part of Hydrilla&Haketilo.

Copyright (C) 2022 Wojtek Kosior

Dual licensed under
* GNU General Public License v3.0 or later and
* Creative Commons Attribution Share Alike 4.0 International.

You can choose to use either of these licenses or both.


I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
-#}
<!DOCTYPE html>
<html>
  <head>
    {% block head %}
      <title>
        {% block title required %}{% endblock %}
        -
        _('web_ui.base.title.haketilo_proxy')
      </title>
      <style>
        {% block style %}
          body {
              color: #444;
              margin: 0;
          }

          #main {
              max-width: 750px;
              margin: auto;
          }

          a {
              text-decoration: inherit;
              color: inherit;
          }

          .inline-form {
              display: inline-flex;
              padding: 0;
              margin: 0;
          }

          .inline-form > * {
              flex: 1 1 0;
          }

          .small-print {
              font-size: 80%;
              color: #555;
          }

          .error-note {
              display: block;
              border-left: 5px solid #a33;
              background-color: #fcc;
          }

          .green-button, .red-button, .blue-button {
                  border: none;
                  border-radius: 2px;
                  color: white;
                  text-align: center;
                  text-decoration: none;
                  display: inline-block;
                  padding: 5px 10px;
                  -moz-user-select: none;
                  user-select: none;
                  cursor: pointer;
                  font: 400 0.9em sans-serif;
                  margin: 2px;
          }

          .green-button {
              background-color: #4caf50;
          }

          .red-button {
              background-color: #af504c;
          }

          .red-button {
              background-color: #504caf;
          }

          .disabled-button {
                  background-color: #aaa;
                  cursor: default;
          }

          .button-bordering-right {
              margin-right: 0;
              border-radius: 2px 0 0 2px;
              border-right: 1px solid #65A065;
          }

          .button-bordering-left {
              margin-left: 0;
              border-radius: 0 2px 2px 0;
              border-left: 1px solid #65A065;
          }

          .button-bordering-left.button-bordering-right {
              border-radius: 0;
          }

          .button-row {
              display: flex;
          }

          .button-row > * {
              flex: 1 1 0;
          }

          .hide {
              display: none !important;
          }

          ul#nav {
              -moz-user-select: none;
              user-select: none;
              background-color: #e0e0e0;
              margin: 0;
              border-bottom: 2px solid #444;
          }

          ul#nav > li {
              list-style-type: none;
              background-color: #70af70;
              font-size: 115%;
              padding: 10px;
              display: inline-block;
              cursor: pointer;
              margin: 5px 0 0 0;
          }

          ul#nav > li:hover {
              box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
          }

          ul#nav > li.nav-active {
              background-color: #65A065;
              color: #222;
              box-shadow: none;
              cursor: default;
          }

          ul#item_list > li > a:only-child {
              display: block;
          }
        {% endblock %}
    </style>
    {% endblock %}
  </head>
  <body>
    {% set active_endpoint = get_current_endpoint() %}
    {%
      set navigation_bar = [
          ('home',                 _('web_ui.base.nav.home')),
          ('items.packages',       _('web_ui.base.nav.packages')),
          ('items.libraries',      _('web_ui.base.nav.libraries')),
          ('repos.repos',          _('web_ui.base.nav.repos')),
          ('items.load_from_disk', _('web_ui.base.nav.load'))
      ]
    %}
    <ul id="nav">
      {% for endpoint, label in navigation_bar %}
        {% if endpoint == active_endpoint %}
          <li class="nav-active">{{ label }}</li>
        {% else %}
          <li><a href="{{ url_for(endpoint) }}">{{ label }}</a></li>
        {% endif %}
      {% endfor %}
    </ul>
    <div id="main">{% block main required %}{% endblock %}</div>
  </body>
</html>