added and refined templates
This commit is contained in:
parent
75e969200e
commit
102de4ff8f
29
theme/templates/article.html
Normal file
29
theme/templates/article.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}{{ article.title }} - {{ SITENAME }}{% endblock %}
|
||||||
|
{% block metadesc %}{% if article.summary %}{{ article.summary|e }}{% else %}An Article in {{ SITETAG }}: {{
|
||||||
|
article.title }}{% endif
|
||||||
|
%}{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block container_body %}
|
||||||
|
{% block container_header %}
|
||||||
|
{% endblock container_header %}
|
||||||
|
<article>
|
||||||
|
{% block content_header %}
|
||||||
|
<header>
|
||||||
|
<h3>{{ article.title }}</h3>
|
||||||
|
</header>
|
||||||
|
{% endblock content_header %}
|
||||||
|
|
||||||
|
{% block content_body %}
|
||||||
|
{{ article.content }}
|
||||||
|
{% endblock content_body %}
|
||||||
|
|
||||||
|
{% block content_footer %}
|
||||||
|
<footer>ISBN: Bla</footer>
|
||||||
|
{% endblock content_footer %}
|
||||||
|
</article>
|
||||||
|
{% endblock container_body %}
|
||||||
|
|
||||||
|
{% block container_footer %}
|
||||||
|
{% endblock container_footer %}
|
||||||
@ -3,7 +3,11 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="description" content="{% block metadesc %}{{ DEFAULT_METADESC|e }}{% endblock %}" />
|
||||||
|
<meta name="author" content="{{ AUTHOR }}" />
|
||||||
|
<meta name="generator" content="Pelican" />
|
||||||
<meta name="color-scheme" content="light dark" />
|
<meta name="color-scheme" content="light dark" />
|
||||||
{% for css in STYLESHEET_FILES %}
|
{% for css in STYLESHEET_FILES %}
|
||||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ css }}" />
|
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ css }}" />
|
||||||
@ -19,18 +23,16 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="container">
|
<main class="container">
|
||||||
{% block container_header %}
|
<div id="main-content" role="document">
|
||||||
{% endblock %}
|
<div id="main-header" class="shadow">
|
||||||
|
|
||||||
{% block content_header %}
|
{% block content_header %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
</div>
|
||||||
{% block content_body %}
|
{% block content_body %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content_footer %}
|
{% block content_footer %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
</div>
|
||||||
{% block container_footer %}
|
|
||||||
{% endblock %}
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer id="site-footer">{% include "includes/footer.html" %}</footer>
|
<footer id="site-footer">{% include "includes/footer.html" %}</footer>
|
||||||
|
|||||||
33
theme/templates/cards.html
Normal file
33
theme/templates/cards.html
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{% extends "page.html" %}
|
||||||
|
{% block title %} {{ super() }} {% endblock %}
|
||||||
|
{% block metadesc %} {{ super() }} {% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block content_header %} {{ super() }} {% endblock content_header %}
|
||||||
|
|
||||||
|
{% block content_body %}
|
||||||
|
{% set selector_value = page.card_selector_value if page.card_selector_value is defined else page.title %}
|
||||||
|
<section class="cards">
|
||||||
|
{% for article in articles if article[page.card_selector_key] == selector_value %}
|
||||||
|
<article class="card">
|
||||||
|
<header class="article-header">
|
||||||
|
<h3><a href="{{ article.url }}" title="{{ article.title }}">{{ article.title }}</a></h3>
|
||||||
|
</header>
|
||||||
|
<div class="article-body">
|
||||||
|
{% if article.titelbild %}
|
||||||
|
<a href="{{ article.url }}" title="{{ article.title }}"><img alt='Titelbild zu "{{ article.title }}"'
|
||||||
|
src="{{ article.titelbild }}" /></a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if article.summary %}
|
||||||
|
<p>{{ article.summary }}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{% endfor %}
|
||||||
|
</section>
|
||||||
|
{% endblock content_body %}
|
||||||
|
|
||||||
|
{% block content_footer %}
|
||||||
|
{% endblock content_footer %}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<ul>
|
<ul class="shadow">
|
||||||
{% for title, link in MENUITEMS %}
|
{% for title, link in MENUITEMS %}
|
||||||
{% if link == url %}
|
{% if link == url %}
|
||||||
<li aria-current="page">
|
<li aria-current="page">
|
||||||
|
|||||||
16
theme/templates/page.html
Normal file
16
theme/templates/page.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}{{ page.title }} - {{ SITENAME }}{% endblock %}
|
||||||
|
{% block metadesc %}{% if page.summary %}{{ page.summary|e }}{% else %}A Page in {{ SITETAG }}: {{ page.title }}{% endif
|
||||||
|
%}{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block content_header %}
|
||||||
|
<h1>{{ page.title }}</h1>
|
||||||
|
{% endblock content_header %}
|
||||||
|
|
||||||
|
{% block content_body %}
|
||||||
|
{{ page.content }}
|
||||||
|
{% endblock content_body %}
|
||||||
|
|
||||||
|
{% block content_footer %}
|
||||||
|
{% endblock content_footer %}
|
||||||
Loading…
Reference in New Issue
Block a user