mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
Add Zola templates
This commit is contained in:
committed by
Vincent Breitmoser
parent
34b9b2733a
commit
a44fbbed5e
@@ -9,3 +9,6 @@ base_url = "https://keys.openpgp.org"
|
|||||||
generate_feeds = true
|
generate_feeds = true
|
||||||
feed_filenames = ["atom.xml"]
|
feed_filenames = ["atom.xml"]
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
menu = [
|
||||||
|
]
|
||||||
|
19
templates/base.html
Normal file
19
templates/base.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="{{lang}}">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<link rel="stylesheet" href="{{ get_url(path="site.css") }}?v=19" type="text/css">
|
||||||
|
<link rel="alternate" href="/atom.xml" type="application/atom+xml" title="keys.openpgp.org newsfeed" />
|
||||||
|
<title>{{config.title}}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="card">
|
||||||
|
<h1><a class="brand" href="/">{{config.title}}</a></h1>
|
||||||
|
{% block content %}{% endblock content %}
|
||||||
|
<div class="spacer"></div>
|
||||||
|
</div>
|
||||||
|
<div class="attribution">
|
||||||
|
<p>Background image retrieved from <a href="https://www.toptal.com/designers/subtlepatterns/subtle-grey/">Subtle Patterns</a> under CC BY-SA 3.0</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
8
templates/page.html
Normal file
8
templates/page.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="about {%- if page %} {{ page.slug }}{%- endif -%}">
|
||||||
|
{% include "partials/menu.html" %}
|
||||||
|
{% if page %}{{ page.content | safe }}{% elif section %}{{ section.content | safe }}{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
15
templates/partials/menu.html
Normal file
15
templates/partials/menu.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<center><h2>
|
||||||
|
{%- for item in config.extra.menu -%}
|
||||||
|
{%- if item is ending_with("_index.md") -%}
|
||||||
|
{%- set item = get_section(path=item, metadata_only=true) -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- set item = get_page(path=item) -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{% if not loop.first %} | {% endif -%}
|
||||||
|
{% if item.path == current_path -%}
|
||||||
|
{{ item.title }}
|
||||||
|
{%- else -%}
|
||||||
|
<a href="{{ item.permalink | safe }}">{{ item.title }}</a>
|
||||||
|
{%- endif %}
|
||||||
|
{% endfor %}</h2>
|
||||||
|
</center>
|
1
templates/shortcodes/brand.html
Normal file
1
templates/shortcodes/brand.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<span class="brand">{{ name | default(value=config.title) }}</span>
|
Reference in New Issue
Block a user