From a58709fea11f8ff1ea21a382db58fcbafe055d67 Mon Sep 17 00:00:00 2001 From: User Identifier Date: Tue, 20 Oct 2020 22:47:41 +0200 Subject: [PATCH] 2017 base --- pelicanconf.py | 2 +- themes/2017/static/css/style.css | 161 +++++++++++++++++++++++ themes/2017/templates/archives.html | 42 ++++++ themes/2017/templates/article.html | 28 ++++ themes/2017/templates/article_infos.html | 25 ++++ themes/2017/templates/author.html | 5 + themes/2017/templates/base.html | 83 ++++++++++++ themes/2017/templates/categories.html | 19 +++ themes/2017/templates/category.html | 6 + themes/2017/templates/index.html | 74 +++++++++++ themes/2017/templates/page.html | 15 +++ themes/2017/templates/tag.html | 6 + themes/2017/templates/tags.html | 19 +++ themes/2017/templates/translations.html | 10 ++ 14 files changed, 494 insertions(+), 1 deletion(-) create mode 100644 themes/2017/static/css/style.css create mode 100644 themes/2017/templates/archives.html create mode 100644 themes/2017/templates/article.html create mode 100644 themes/2017/templates/article_infos.html create mode 100644 themes/2017/templates/author.html create mode 100644 themes/2017/templates/base.html create mode 100644 themes/2017/templates/categories.html create mode 100644 themes/2017/templates/category.html create mode 100644 themes/2017/templates/index.html create mode 100644 themes/2017/templates/page.html create mode 100644 themes/2017/templates/tag.html create mode 100644 themes/2017/templates/tags.html create mode 100644 themes/2017/templates/translations.html diff --git a/pelicanconf.py b/pelicanconf.py index 30d048a..4c9eb69 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -64,7 +64,7 @@ MARKDOWN = { WITH_FUTURE_DATES = False -THEME = 'themes/minimunit' +THEME = 'themes/2017' SLUGIFY_SOURCE = 'title' PAGE_URL = '{slug}/index.html' diff --git a/themes/2017/static/css/style.css b/themes/2017/static/css/style.css new file mode 100644 index 0000000..b08e9be --- /dev/null +++ b/themes/2017/static/css/style.css @@ -0,0 +1,161 @@ +/*@import url('../fonts/fantastique-sans/stylesheet.css');*/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * GENERAL * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +html { + box-sizing: border-box; + font-family: 'Fantasque Sans Mono', monospace; + text-transform: lowercase; +} + +*, *:before, *:after { + box-sizing: inherit; +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * PAGE * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +body { + width: 100%; + padding: 2rem 1rem; +} + +@media (min-width: 426px) { + body { + width: 40vw; + margin: 2rem auto; + padding: 0; + } +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * TEXT * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +h1 { + margin: 0; + font-size: 4rem; +} + +p, li { + font-size: 1.3rem; +} + +a { + text-decoration: none; + color: inherit; +} + +a:hover { + font-weight: bold; +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * HEADER * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +header { + width: 100%; + margin: 2rem auto 2rem auto; +} + +header > img, +header > h1 { + display: inline-block; + vertical-align: middle; +} + +header > img { + width: 4rem; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * NAVBAR * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +nav { + margin-bottom: 2rem; +} + +nav > ul { + display: block; + margin: 0; + padding: 0; + list-style: none; +} + +nav > ul > li { + display: inline-block; + margin-right: 0.8rem; + color: #378ab4; +} + +nav > ul > li:before { + content: "+"; + margin-right: 0.3rem; + color: #000000; +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * SECTION * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +section { + width: 100%; + margin: 2rem auto; +} + +section:last-child { + margin-bottom: 0; +} + +section > p { + margin: 0; +} + +section > p > span { + padding: 0.1rem 0; + background: #000000; + box-shadow: 0 0 0 #000000, 0 0 0 #000000; + color: #ffffff; +} + +section > p:first-child > span { + background: #378ab4; + box-shadow: 0 0 0 #378ab4, 0 0 0 #378ab4; +} + +section > img { + width: 100%; + height: auto; +} +.sitebanner { + position: relative; + top: 20px; +} + +.siteimage { + float: left; + width: 120px; +} + +#menu li { + display: inline; +} + +#post-list { + margin-bottom: 1em; + margin-top: 1em; +} + +#banner { + height: 85px; +} diff --git a/themes/2017/templates/archives.html b/themes/2017/templates/archives.html new file mode 100644 index 0000000..7b9b10d --- /dev/null +++ b/themes/2017/templates/archives.html @@ -0,0 +1,42 @@ +{% extends "index.html" %} +{% block title %}Archivio {{ SITENAME }}{% endblock %} +{% block ogtitle %}Archivio {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/archives.html{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/archives.html{%endblock%} + +{% block content %} +
+
+

{% block content_title %}Archivio per data{% endblock %}

+ + {% for article in dates %} + {% set this_year = article.date.strftime('%Y') %} + + {% if this_year != prev_year %} +
+
{{ this_year }}
+
+ {% endif %} + {% if this_year != prev_year or this_month != prev_month %} +
+
{{ this_month }}
+
+ {% endif %} +
+ {% if this_month != prev_month or this_day != prev_day %} +
+ {{ this_day }} +
+ {% endif %} +
+
{{ article.title }} {{ article.category }}
+
+
+ {% set prev_year = this_year %} + {% set prev_month = this_month %} + {% set prev_day = this_day %} + {% endfor %} +
+
+{% endblock %} + diff --git a/themes/2017/templates/article.html b/themes/2017/templates/article.html new file mode 100644 index 0000000..2055670 --- /dev/null +++ b/themes/2017/templates/article.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block title %}{{ article.title|striptags }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ article.title|striptags }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ article.url }}{%endblock%} +{% block ogtype %}article{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ article.url }}{%endblock%} + +{% block content %} + +
+
+
+
+

+ {{ article.title}}

+
+ +
+ {% include 'article_infos.html' %} + {{ article.content }} +
+ +
+
+
+{% endblock %} diff --git a/themes/2017/templates/article_infos.html b/themes/2017/templates/article_infos.html new file mode 100644 index 0000000..e7dfe51 --- /dev/null +++ b/themes/2017/templates/article_infos.html @@ -0,0 +1,25 @@ + diff --git a/themes/2017/templates/author.html b/themes/2017/templates/author.html new file mode 100644 index 0000000..e5db843 --- /dev/null +++ b/themes/2017/templates/author.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ author }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ author.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ author.url }}{%endblock%} diff --git a/themes/2017/templates/base.html b/themes/2017/templates/base.html new file mode 100644 index 0000000..344ccdc --- /dev/null +++ b/themes/2017/templates/base.html @@ -0,0 +1,83 @@ + + + + {% 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/themes/2017/templates/categories.html b/themes/2017/templates/categories.html new file mode 100644 index 0000000..2ec2f33 --- /dev/null +++ b/themes/2017/templates/categories.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} +{% block title %}Categorie di {{ SITENAME }}{% endblock %} +{% block ogtitle %}Categorie di {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/categories.html{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/categories.html{%endblock%} + +{% block content %} +
+
+

{% block content_title %}Categorie {% endblock %}

+ +
+ {% for category, articles in categories %} +
{{ category }} ({{ articles|count }})
+ {% endfor %} +
+
+
+{% endblock %} diff --git a/themes/2017/templates/category.html b/themes/2017/templates/category.html new file mode 100644 index 0000000..d38824e --- /dev/null +++ b/themes/2017/templates/category.html @@ -0,0 +1,6 @@ +{% extends "archives.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %} +{% block content_title %} Ricerca per categoria: {{ category }}{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ category }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ category.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ category.url }}{%endblock%} diff --git a/themes/2017/templates/index.html b/themes/2017/templates/index.html new file mode 100644 index 0000000..d325ad1 --- /dev/null +++ b/themes/2017/templates/index.html @@ -0,0 +1,74 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block ogtitle %}{{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}{%endblock%} + +{% block content %} +
+ {% if articles %} + {% for article in articles_page.object_list %} + {% if loop.length > 0 %} + {% if loop.first %} +
+
    + {% endif %} + + {% if loop.last %} +
+ {% if loop.last and (articles_page.has_previous() + or not articles_page.has_previous() and loop.length > 1) %} + {% include 'pagination.html' %} + {% endif %} +
+ {% endif %} + {% endif %} + {% endfor %} + {% else %} +
+

Pages

+ {% for page in PAGES %} +
  • {{ page.title }}
  • + {% endfor %} +
    + {% endif %} +
    +{% endblock content %} + +{% if LINKS %} +
    +

    Links

    + +
    +{% endif %} +{% if TAG_CLOUD_STEPS %} +
    +

    Tags

    + +
    +{% endif %} + diff --git a/themes/2017/templates/page.html b/themes/2017/templates/page.html new file mode 100644 index 0000000..10852e1 --- /dev/null +++ b/themes/2017/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ page.title|striptags }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ page.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ page.url }}{%endblock%} + +{% block content %} +
    +

    {{ page.title }}

    + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + {{ page.content }} +
    +{% endblock %} + diff --git a/themes/2017/templates/tag.html b/themes/2017/templates/tag.html new file mode 100644 index 0000000..293c64e --- /dev/null +++ b/themes/2017/templates/tag.html @@ -0,0 +1,6 @@ +{% extends "archives.html" %} +{% block title %}{{ SITENAME }} - {{ tag }} | {{ SITENAME }}{% endblock %} +{% block content_title %}Ricerca per tag: "{{ tag }}"{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ tag }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%} diff --git a/themes/2017/templates/tags.html b/themes/2017/templates/tags.html new file mode 100644 index 0000000..b81ff60 --- /dev/null +++ b/themes/2017/templates/tags.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} +{% block title %}Tags in {{ SITENAME }}{% endblock %} +{% block ogtitle %}Tags in {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/tags.html{%endblock%}%} +{% block canonicalurl %}{{ SITEURL }}/tags.html{%endblock%} + +{% block content %} +
    +
    +

    {% block content_title %}Tags{% endblock %}

    + +
    + {% for tag, articles in tags|sort %} +
    {{ tag }} ({{ articles|count }})
    + {% endfor %} +
    +
    +
    +{% endblock %} diff --git a/themes/2017/templates/translations.html b/themes/2017/templates/translations.html new file mode 100644 index 0000000..75ed375 --- /dev/null +++ b/themes/2017/templates/translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} +{% if article.translations %} +
    +Translations: + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} +{% endmacro %} +