aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-11-28 23:52:40 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-11-28 23:58:31 +0100
commitb2845952da634202be913fdf0e68e6cb55b67d80 (patch)
tree4815312c6bb33da58eab7fd87dbe07f1639bb686 /templates/base.html
downloadmoeka-b2845952da634202be913fdf0e68e6cb55b67d80.tar.gz
moeka-b2845952da634202be913fdf0e68e6cb55b67d80.tar.bz2
moeka-b2845952da634202be913fdf0e68e6cb55b67d80.zip
Initial commit
Diffstat (limited to 'templates/base.html')
-rw-r--r--templates/base.html130
1 files changed, 130 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..c759e7a
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,130 @@
+{% macro feed(path, feed_name, type) %}
+{% if path %}
+<link href="{{ SITEURL }}/{{ path }}" type="application/{{ type }}+xml" rel="alternate" title="{{ SITENAME }} {{feed_name }}">
+{% endif %}
+{% endmacro -%}
+
+{%- macro logo(name) -%}
+<div class="social-icon">
+ <img class="social-icon" src="{{ SITEURL }}/theme/images/logos/{{ name }}" alt="Logo {{ name }}">
+</div>
+{%- endmacro -%}
+
+<!DOCTYPE html>
+<html lang="{{ DEFAULT_LANG }}">
+{#
+ # Moeka Pelican Theme
+ # Copyright (C) 2023 Daniel Schadt
+ #
+ # This program is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation, either version 3 of the License, or
+ # (at your option) any later version.
+ #
+ # This program 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
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
+ #}
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
+
+ {# Feeds! #}
+ {{ feed(FEED_ALL_ATOM, "Full Atom Feed", "atom") }}
+ {{ feed(FEED_ALL_RSS, "Full RSS Feed", "rss") }}
+
+ {% if FAVICON %}
+ <link rel="icon" href="{{ SITEURL }}/{{ FAVICON }}">
+ {% endif %}
+
+ <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/main.css">
+ <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/monokai.css">
+ </head>
+ <body>
+ {# The site/side menu #}
+ <div id="openSideBanner">
+ <a id="hamburgerMenu" href="#sideBanner"><img src="{{ SITEURL }}/theme/images/hamburger.svg"></a>
+ </div>
+ <div role="banner" id="sideBanner">
+ <a id="hideMenu" href="#"><img src="{{ SITEURL }}/theme/images/hamburger.svg"></a>
+ <header>
+ <div id="mainTitle">
+ <a href="{{ SITEURL }}">{{ SITENAME }}</a>
+ </div>
+
+ <nav id="menu">
+ <ul>
+ {% if DISPLAY_PAGES_ON_MENU %}
+ {% for p in pages %}
+ <li {% if p == page -%} class="active" {%- endif %}>
+ <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
+ </li>
+ {% endfor %}
+ {% endif %}
+
+ {% for link_title, link in MENUITEMS %}
+ <li>
+ <a href="{{ link }}">{{ link_title }}</a>
+ </li>
+ {% endfor %}
+
+ {% if DISPLAY_CATEGORIES_ON_MENU %}
+ {% for cat, _ in categories %}
+ <li {% if cat == category -%} class="active" {%-endif%}>
+ <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat.name }}</a>
+ </li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </nav>
+ </header>
+ </div>
+
+ {# Main content #}
+ <div id="mainArea" role="main">
+ {% block content %}
+ {% endblock %}
+ </div>
+
+ {# Footer #}
+ <footer>
+ <div class="icons">
+ {% if GITHUB %}
+ <a href="{{ GITHUB }}" target="_blank">{{ logo("GitHub.svg") }}</a>
+ {% endif %}
+
+ {% if GITLAB %}
+ <a href="{{ GITLAB }}" target="_blank">{{ logo("GitLab.svg") }}</a>
+ {% endif %}
+
+ {% if CODEBERG %}
+ <a href="{{ CODEBERG }}" target="_blank">{{ logo("Codeberg.svg") }}</a>
+ {% endif %}
+
+ {% if MASTODON %}
+ <a href="{{ MASTODON }}" target="_blank">{{ logo("Mastodon.svg") }}</a>
+ {% endif %}
+ </div>
+
+ <p>&copy; {{ AUTHOR }}</p>
+ {% if CONTENT_LICENCE %}
+ <p id="licenceLine">
+ {% if CONTENT_LICENCE.startswith("CC-BY-SA") %}
+ <img src="{{ SITEURL }}/theme/images/cc/cc.svg" class="cc-icon" alt="CC">
+ <img src="{{ SITEURL }}/theme/images/cc/by.svg" class="cc-icon" alt="BY">
+ <img src="{{ SITEURL }}/theme/images/cc/sa.svg" class="cc-icon" alt="SA">
+ {% endif %}
+ The text of this website is licensed under {{ CONTENT_LICENCE }}.
+ </p>
+ {% endif %}
+ {% if ATTRIBUTION %}
+ <p>Pelican Theme <a href="https://codeberg.org/dunj3/moeka">moeka</a>, available under the GPL.</p>
+ {% endif %}
+ </footer>
+ </body>
+</html>