summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2021-09-04 21:38:06 +0200
committerVincent Douillet <vincent@vdouillet.fr>2021-09-04 21:38:06 +0200
commite78dd2f6212bfbd293b98e4278ead77d5ab70984 (patch)
tree014b9fcafd4f49875eedd24f48b55f25825fef06 /templates
Initial commit
Diffstat (limited to 'templates')
-rw-r--r--templates/article.html60
-rw-r--r--templates/base.html64
-rw-r--r--templates/index.html20
3 files changed, 144 insertions, 0 deletions
diff --git a/templates/article.html b/templates/article.html
new file mode 100644
index 0000000..0ecb737
--- /dev/null
+++ b/templates/article.html
@@ -0,0 +1,60 @@
+{% extends "base.html" %}
+{% block html_lang %}{{ article.lang }}{% endblock %}
+
+{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %}
+
+{% block head %}
+ {{ super() }}
+
+ {% import 'translations.html' as translations with context %}
+ {% if translations.entry_hreflang(article) %}
+ {{ translations.entry_hreflang(article) }}
+ {% endif %}
+
+ {% if article.description %}
+ <meta name="description" content="{{article.description}}" />
+ {% endif %}
+
+ {% for tag in article.tags %}
+ <meta name="tags" content="{{tag}}" />
+ {% endfor %}
+
+{% endblock %}
+
+{% block content %}
+<section id="content" class="body">
+ <header>
+ <h2 class="entry-title">
+ <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+ title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
+ {% import 'translations.html' as translations with context %}
+ {{ translations.translations_for(article) }}
+ </header>
+ <footer class="post-info">
+ Publié le
+ <time class="published" datetime="{{ article.date }}">
+ {{ article.locale_date }}
+ </time>
+ {% if article.modified %}
+ et modifié le
+ <time class="modified" datetime="{{ article.modified.isoformat() }}">
+ {{ article.locale_modified }}
+ </time>
+ {% endif %}
+ {% if article.category %}
+ dans la catégorie <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
+ {% endif %}
+ {% if article.tags %}
+ <div class="tags">
+ Tags:
+ {% for tag in article.tags %}
+ <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </footer><!-- /.post-info -->
+ <div class="entry-content">
+ {{ article.content }}
+ </div><!-- /.entry-content -->
+</section>
+{% endblock %}
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..efb4fca
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
+<head>
+ {% block head %}
+ <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
+ <meta charset="utf-8" />
+ {% if FEED_ALL_ATOM %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
+ {% endif %}
+ {% if FEED_ALL_RSS %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
+ {% endif %}
+ {% if FEED_ATOM %}
+ <link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
+ {% endif %}
+ {% if FEED_RSS %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
+ {% endif %}
+ {% if CATEGORY_FEED_ATOM and category %}
+ <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM|format(category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
+ {% endif %}
+ {% if CATEGORY_FEED_RSS and category %}
+ <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_RSS|format(category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
+ {% endif %}
+ {% if TAG_FEED_ATOM and tag %}
+ <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_ATOM|format(tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
+ {% endif %}
+ {% if TAG_FEED_RSS and tag %}
+ <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_RSS|format(tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
+ {% endif %}
+ <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
+ {% endblock head %}
+</head>
+
+<body id="index" class="home">
+ <header id="banner" class="body">
+ <h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>
+ <h2 id="sitesubtitle">{{ SITESUBTITLE }}</h2>
+ </header><!-- /#banner -->
+ <nav id="menu"><ul>
+ {% for title, link in MENUITEMS %}
+ <li><a href="{{ link }}">{{ title }}</a></li>
+ {% endfor %}
+ {% if DISPLAY_CATEGORIES_ON_MENU %}
+ {% for cat, null in categories %}
+ <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
+ {% endfor %}
+ {% endif %}
+ {% 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 %}
+ </ul></nav><!-- /#menu -->
+ <hr />
+ {% block content %}
+ {% endblock %}
+
+ <hr />
+ <footer id="contentinfo" class="body copyright">
+ Copyright &#169; Vincent Douillet. Licence <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png" /></a>
+ </footer><!-- /#contentinfo -->
+</body>
+</html>
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..a020bb1
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,20 @@
+{% extends "base.html" %}
+{% block content %}
+<section id="content">
+{% block content_title %}
+{% endblock %}
+
+{% for article in articles_page.object_list %}
+ <article class="hentry">
+ <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
+ <div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->
+ <footer class="post-info">
+ <time class="published" datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time>
+ </footer><!-- /.post-info -->
+ </article>
+{% endfor %}
+{% if articles_page.has_other_pages() %}
+ {% include 'pagination.html' %}
+{% endif %}
+</section><!-- /#content -->
+{% endblock content %}