aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/server/templates
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-08 15:29:49 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-09 15:34:46 +0100
commit6676b4ed90e19e2fd6ee5f4242cf85f64db145d8 (patch)
tree42b45c6ed731abeab85e160b020bc57cab638fff /src/hydrilla/server/templates
parent67631e6c5db6739f7a57958d222e5af7ebc364b0 (diff)
downloadhaketilo-hydrilla-6676b4ed90e19e2fd6ee5f4242cf85f64db145d8.tar.gz
haketilo-hydrilla-6676b4ed90e19e2fd6ee5f4242cf85f64db145d8.zip
rework Hydrilla to use a separate tool for building its source packages
* Hydrilla now depends on "Hydrilla builder" developed at: https://git.koszko.org/hydrilla-builder/ * Hydrilla repository is now REUSE-compliant * The debian packaging is temporarily not tested and likely to be broken * JSON schemas are now in use (through 'jsonschema' Python library) * This is not yet a release and some minor changes to the API on-fisk format are going to occur before that
Diffstat (limited to 'src/hydrilla/server/templates')
-rw-r--r--src/hydrilla/server/templates/base.html122
-rw-r--r--src/hydrilla/server/templates/index.html30
2 files changed, 152 insertions, 0 deletions
diff --git a/src/hydrilla/server/templates/base.html b/src/hydrilla/server/templates/base.html
new file mode 100644
index 0000000..f95ce54
--- /dev/null
+++ b/src/hydrilla/server/templates/base.html
@@ -0,0 +1,122 @@
+{# SPDX-License-Identifier: CC-BY-SA-4.0 OR AGPL-3.0-or-later
+
+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;
+ }
+
+ .content {
+ margin: auto;
+ margin-top: 2em;
+ margin-bottom: 2em;
+ max-width: 700px;
+ padding-left: 1em;
+ padding-right: 1em;
+ border-left: 1px #999 solid;
+ border-right: 1px #999 solid;
+ }
+
+ .footer {
+ font-size: 0.8em;
+ padding: 1em;
+ border-top: 1px #777 solid;
+ text-align: center;
+ }
+ {% 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>
+
+ <div class="content">
+ {% block content %}
+ {% endblock %}
+ </div>
+
+ <div class="footer">
+ Copyright &copy; Wojtek Kosior.
+ <br>
+ This page was generated by Hydrilla which is free/libre software.
+ You can get a copy <a href="{{ hydrilla_project_url|e }}">here</a>.
+ </div>
+ {% endblock %}
+ </body>
+</html>
diff --git a/src/hydrilla/server/templates/index.html b/src/hydrilla/server/templates/index.html
new file mode 100644
index 0000000..3063239
--- /dev/null
+++ b/src/hydrilla/server/templates/index.html
@@ -0,0 +1,30 @@
+{# SPDX-License-Identifier: CC-BY-SA-4.0 OR AGPL-3.0-or-later
+
+HTML index 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.
+#}
+
+{% extends 'base.html' %}
+{% block content %}
+ {{ super() }}
+ <h2>{{ _('hydrilla_welcome') }}</h2>
+{% endblock %}