diff --git a/themes/minimunit/README.md b/themes/minimunit/README.md new file mode 100644 index 0000000..d67983b --- /dev/null +++ b/themes/minimunit/README.md @@ -0,0 +1,9 @@ +# Minimo Pelican theme + +Minimo รจ un tema per Pelican con archivio per data, categorie, tag e feed RSS. + +Testato con [Pelican 3.7.1](https://docs.getpelican.com/en/3.7.1/) + +**Screenshot** + +![screenshot](screenshot.png) diff --git a/themes/minimunit/screenshot.png b/themes/minimunit/screenshot.png new file mode 100644 index 0000000..2ebff82 Binary files /dev/null and b/themes/minimunit/screenshot.png differ diff --git a/themes/minimunit/static/css/style.css b/themes/minimunit/static/css/style.css new file mode 100644 index 0000000..a3cc998 --- /dev/null +++ b/themes/minimunit/static/css/style.css @@ -0,0 +1,47 @@ +body { + font-family: "Courier New", Courier, monospace + font-size: 100%; + background-color: #F4F4E8; + color: #333333; + min-width: 400px; + min-height: 200px; + margin: 2% 2%; + padding:0; + height:98%;; + margin-left: 33%; + margin-right: 33%; +} + +.sitebanner { + position: relative; + top: 20px; +} + +.siteimage { + float: left; + width: 120px; +} + +a:link { color: #003399; text-decoration: none; } +a:visited { color: #336699; text-decoration: none; } +a:hover { color: #003399; background: #ff8c19; text-decoration: none; } + +h1 a { color: inherit !important } +h2 a { color: inherit !important } +h3 a { color: inherit !important } +h4 a { color: inherit !important } +h5 a { color: inherit !important } +h6 a { color: inherit !important } + +#menu li { + display: inline; +} + +#post-list { + margin-bottom: 1em; + margin-top: 1em; +} + +pre { + margin: 2em 1em 2em 4em; +} diff --git a/themes/minimunit/templates/archives.html b/themes/minimunit/templates/archives.html new file mode 100644 index 0000000..7b9b10d --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/article.html b/themes/minimunit/templates/article.html new file mode 100644 index 0000000..2055670 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/article_infos.html b/themes/minimunit/templates/article_infos.html new file mode 100644 index 0000000..72d253b --- /dev/null +++ b/themes/minimunit/templates/article_infos.html @@ -0,0 +1,25 @@ + diff --git a/themes/minimunit/templates/author.html b/themes/minimunit/templates/author.html new file mode 100644 index 0000000..e5db843 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/base.html b/themes/minimunit/templates/base.html new file mode 100644 index 0000000..bf95073 --- /dev/null +++ b/themes/minimunit/templates/base.html @@ -0,0 +1,82 @@ + + + + {% 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/minimunit/templates/categories.html b/themes/minimunit/templates/categories.html new file mode 100644 index 0000000..2ec2f33 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/category.html b/themes/minimunit/templates/category.html new file mode 100644 index 0000000..d38824e --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/index.html b/themes/minimunit/templates/index.html new file mode 100644 index 0000000..d325ad1 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/page.html b/themes/minimunit/templates/page.html new file mode 100644 index 0000000..6ff8139 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/tag.html b/themes/minimunit/templates/tag.html new file mode 100644 index 0000000..293c64e --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/tags.html b/themes/minimunit/templates/tags.html new file mode 100644 index 0000000..b81ff60 --- /dev/null +++ b/themes/minimunit/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/minimunit/templates/translations.html b/themes/minimunit/templates/translations.html new file mode 100644 index 0000000..75ed375 --- /dev/null +++ b/themes/minimunit/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 %} +