From e78dd2f6212bfbd293b98e4278ead77d5ab70984 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Sat, 4 Sep 2021 21:38:06 +0200 Subject: Initial commit --- README.md | 3 ++ static/css/style.css | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ templates/article.html | 60 ++++++++++++++++++++++++++++++++++++ templates/base.html | 64 ++++++++++++++++++++++++++++++++++++++ templates/index.html | 20 ++++++++++++ 5 files changed, 231 insertions(+) create mode 100644 README.md create mode 100644 static/css/style.css create mode 100644 templates/article.html create mode 100644 templates/base.html create mode 100644 templates/index.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..47a578e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# pelican-minimal + +Minimal theme for the pelican static site generator base on the default "simple" theme. diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..2e26b99 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,84 @@ +body { + margin: auto; + padding: 0 2%; + max-width: 60em; + font-family: Arial, sans-serif; +} + +a { + color: #1f15aa; +} + +a:visited { + color: #752d77; +} + +#banner a:link, +#banner a:visited, +#banner a:hover, +#menu a:link, +#menu a:visited, +#menu a:hover, +header a, +header a:visited, +header a:hover { + color: black; + text-decoration: none; +} + +footer.post-info, +footer.copyright { + font-size: 0.8em; + color: #595959; +} + +footer.copyright { + text-align: center; +} + +#menu ul { + list-style: none; + padding-left: 0; +} + +#menu li { + display: inline; +} + +#menu li + li::before { + content: " | "; +} + +@media(prefers-color-scheme: light) { + html { + background: #efeee3; + } +} + +@media(prefers-color-scheme: dark) { + html { + background: #232323; + color: lightgrey; + } + a { + color: #7d74ff; + } + a:visited { + color: #b369b5; + } + #banner a:link, + #banner a:visited, + #banner a:hover, + #menu a:link, + #menu a:visited, + #menu a:hover, + header a, + header a:visited, + header a:hover { + color: lightgrey; + } + footer.post-info, + footer.copyright { + color: #b0b0b0; + } +} 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 %} + + {% endif %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+
+

+ {{ article.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+
+ Publié le + + {% if article.modified %} + et modifié le + + {% endif %} + {% if article.category %} + dans la catégorie {{ article.category }} + {% endif %} + {% if article.tags %} +
+ Tags: + {% for tag in article.tags %} + {{ tag }} + {% endfor %} +
+ {% endif %} +
+
+ {{ article.content }} +
+
+{% 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 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + + {% endblock head %} + + + + + +
+ {% block content %} + {% endblock %} + +
+ + + 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 %} +
+{% block content_title %} +{% endblock %} + +{% for article in articles_page.object_list %} + +{% endfor %} +{% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} +{% endif %} +
+{% endblock content %} -- cgit v1.2.3