aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/base.html.jinja
blob: eb9680f0d0d5de3927aa0769f28c612754dd5f4d (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
{#
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;
          }

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

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

          .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')),
          ('packages.packages',       _('web_ui.base.nav.packages')),
          ('repos.repos',             _('web_ui.base.nav.repos')),
          ('packages.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 %}
	</li>
      {%- endfor %}
    </ul>
    <div id="main">{% block main required %}{% endblock %}</div>
  </body>
</html>