aboutsummaryrefslogtreecommitdiff
path: root/src/pydrilla/templates/base.html
blob: 6e7887e83926f3f33405f922945265cfcc4df5fb (about) (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
{# SPDX-License-Identifier: CC-BY-NC-SA-4.0

Base HTML page template.

This file is part of Hydrilla

Copyright (C) 2021 Wojtek Kosior

This file is free cultural work: you can redistribute it with or
without modification under the terms of the Creative Commons
Attribution Share Alike 4.0 International as published by the
Creative Commons Corporation.

This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Creative Commons Attribution Share Alike 4.0 International
License for more details.


I, Wojtek Kosior, thereby promise not to sue for violation of this
file's license. Although I request that you do not make use this code
in a proprietary program, I am not going to enforce this in court.
#}

{% macro link_for(endpoint, text) -%}
  <a href="{{ url_for(endpoint, **kwargs) }}"
     {{ caller() if caller is defined }}>
     {{ text }}
  </a>
{%- endmacro %}

<!DOCTYPE html>
<html>
  <head>
    {% block head %}
      <meta http-equiv="Content-Security-Policy" content="script-src 'none';">
      <style>
	{% block styles %}
	  html, body, div, h1, h2, h3, h4, h5, h6 {
	    margin: 0;
	    padding: 0;
	  }

	  * {
	    color: #444;
	  }

	  aside {
	    display: inline-block;
            border-left: 0.2em solid #e44;
            background-color: #edc;
            padding: 0.2em;
	  }

	  .nav {
	    background-color: #ddd;
	  }

	  .nav>*:hover {
	    background-color: #999;
	  }

	  .nav>* {
	    display: inline-block;
	    padding: 1em;
	  }

	  .nav a {
 	    text-decoration: none;
	  }

	  .home_link {
  	    font-weight: bold;
	    font-size: 1.5em;
	    padding: 0.5em;
	  }
	{% endblock %}
      </style>
      <title>{% block title %}{{ _('hydrilla') }}{% endblock %}</title>
    {% endblock %}
  </head>
  <body>
    {% block body %}
      <div class="nav">
	{% call link_for('bp.index', _('hydrilla')) %}
	  class="home_link"
	{% endcall %}
      </div>
      {% block content %}
      {% endblock %}
    {% endblock %}
  </body>
</html>