From e0a989555b6bef9173088da9e0b980338a88ce0c Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 19 Jun 2024 14:44:10 +0200 Subject: Swiched the theme to bulma-css --- theme/bulma/templates/applications.html | 22 +++++++ theme/bulma/templates/article.html | 50 ++++++++++++++++ theme/bulma/templates/base.html | 71 ++++++++++++++++++++++ theme/bulma/templates/index.html | 50 ++++++++++++++++ theme/bulma/templates/page.html | 29 +++++++++ theme/bulma/templates/partial/cc_license.html | 31 ++++++++++ theme/bulma/templates/partial/copyright.html | 10 ++++ theme/bulma/templates/partial/footer.html | 7 +++ theme/bulma/templates/partial/nav.html | 17 ++++++ theme/bulma/templates/partial/pagination.html | 14 +++++ theme/bulma/templates/partial/sidebar.html | 78 +++++++++++++++++++++++++ theme/bulma/templates/partial/translations.html | 10 ++++ 12 files changed, 389 insertions(+) create mode 100644 theme/bulma/templates/applications.html create mode 100644 theme/bulma/templates/article.html create mode 100644 theme/bulma/templates/base.html create mode 100644 theme/bulma/templates/index.html create mode 100644 theme/bulma/templates/page.html create mode 100644 theme/bulma/templates/partial/cc_license.html create mode 100644 theme/bulma/templates/partial/copyright.html create mode 100644 theme/bulma/templates/partial/footer.html create mode 100644 theme/bulma/templates/partial/nav.html create mode 100644 theme/bulma/templates/partial/pagination.html create mode 100644 theme/bulma/templates/partial/sidebar.html create mode 100644 theme/bulma/templates/partial/translations.html (limited to 'theme/bulma/templates') diff --git a/theme/bulma/templates/applications.html b/theme/bulma/templates/applications.html new file mode 100644 index 0000000..8713d38 --- /dev/null +++ b/theme/bulma/templates/applications.html @@ -0,0 +1,22 @@ +{% extends "page.html" %} + +{% block after_content %} +{% for page in hidden_pages|selectattr("date")|sort(reverse=true,attribute="date") %} +{% for tag in page.tags if "application" == tag.name %} +

{{ page.title }}

+
+ {% if summarise or page.metadata['summary'] or SUMMARY_MAX_LENGTH %} + {% if page.featured_image %} + + {% endif %} + {{ page.summary }} + {% endif %} +
+{% endfor %} + {% if not loop.last %} +
+ {% endif %} +{% endfor %} +{{ super() }} + +{% endblock %} diff --git a/theme/bulma/templates/article.html b/theme/bulma/templates/article.html new file mode 100644 index 0000000..bc78ec9 --- /dev/null +++ b/theme/bulma/templates/article.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% 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) }} +
+
+ {{ _('Posted on %(when)s in %(category)s', + when=article.locale_date, + category='%s'|format(SITEURL, article.category.url, article.category)|safe) }} + {% if article.tags %} +
+ Tags: + {% for tag in article.tags %} + {{ tag }} + {% endfor %} +
+ {% endif %} +
+
+ {{ article.content }} +
+
+{% endblock %} diff --git a/theme/bulma/templates/base.html b/theme/bulma/templates/base.html new file mode 100644 index 0000000..6b281d6 --- /dev/null +++ b/theme/bulma/templates/base.html @@ -0,0 +1,71 @@ + + + + {% block head %} + + + + {% 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 %} + + + + + {{ SITENAME }}{% block title %}{% endblock %} + + + +
+
+ {% include "partial/sidebar.html" %} + {% include "partial/nav.html" %} +
+
+ {% block content %} + {% endblock %} + {% include "partial/footer.html" %} +
+
+ + diff --git a/theme/bulma/templates/index.html b/theme/bulma/templates/index.html new file mode 100644 index 0000000..36cb150 --- /dev/null +++ b/theme/bulma/templates/index.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} + +{% block content %} + +{% for article in articles_page.object_list %} +
+
+

{{ article.title }}

+

+ {{ _('Posted on %(when)s in %(category)s', + when=article.locale_date, + category='%s'|format(SITEURL, article.category.url, article.category)|safe) }} + + {% if article.tags and not HOME_HIDE_TAGS %} + • {{ _('Tagged with') }} + {% for tag in article.tags %} + {{ tag }}{% if not loop.last %},{% endif %} + {% endfor %} + {% endif %} + + {% if PLUGINS and 'post_stats' in PLUGINS %} + • {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }} + {% endif %} +

+
+
+ {% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %} + {% if article.featured_image %} + + {% endif %} +
{{ article.summary }}
+ {% if article.content != article.summary %} +
+ + {{ _('Continue reading') }} + + {% endif %} + {% else %} + {{ article.content }} + {% endif %} +
+ {% if not loop.last %} +
+ {% endif %} +
+{% endfor %} + +{% include "partial/pagination.html" %} +{% endblock %} diff --git a/theme/bulma/templates/page.html b/theme/bulma/templates/page.html new file mode 100644 index 0000000..a4eacf8 --- /dev/null +++ b/theme/bulma/templates/page.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} + +{% block meta %} +{{ super() }} + +{% if page.translations -%} + +{% for p in page.translations %} + +{% endfor %} +{% endif %} +{% endblock %} + +{% block title %} – {{ page.title|striptags|escape }}{% endblock %} + +{% block content %} +
+
+ {% import 'partial/translations.html' as translations with context %} + {{ translations.translations_for(page) }} +

{{ page.title }}

+
+
+ {% block before_content %}{% endblock %} + {% block page_content %}{{ page.content }}{% endblock %} + {% block after_content %}{% endblock %} +
+
+{% endblock %} diff --git a/theme/bulma/templates/partial/cc_license.html b/theme/bulma/templates/partial/cc_license.html new file mode 100644 index 0000000..756cc49 --- /dev/null +++ b/theme/bulma/templates/partial/cc_license.html @@ -0,0 +1,31 @@ +

+ {% set cc_slug = CC_LICENSE['slug'] %} + {% set cc_name = CC_LICENSE['name'] %} + {% set cc_version = CC_LICENSE['version'] %} + {% set cc_lang = CC_LICENSE['language'] or "en_US" %} + {% set cc_url = "http://creativecommons.org/licenses/{}/{}/deed.{}".format(cc_slug, cc_version, cc_lang) %} + © {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }} - {{ _('This work is licensed under a %(cc)s', + cc='{}'.format(cc_url, cc_name)|safe) }} +

+{% include "partial/flex.html" %} +

+ {% if CC_LICENSE['icon'] != False %} + + Creative Commons License + + {% endif %} + {% if STATUSCAKE %} + {% include "partial/statuscake.html" %} + {% endif %} +

diff --git a/theme/bulma/templates/partial/copyright.html b/theme/bulma/templates/partial/copyright.html new file mode 100644 index 0000000..9fecc4e --- /dev/null +++ b/theme/bulma/templates/partial/copyright.html @@ -0,0 +1,10 @@ +

© {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }}

+

+{{ + _('Built with %(pelican_url)s', + pelican_url='Pelican') +}} +

+{% if STATUSCAKE %} + {% include "partial/statuscake.html" %} +{% endif %} diff --git a/theme/bulma/templates/partial/footer.html b/theme/bulma/templates/partial/footer.html new file mode 100644 index 0000000..8a2309c --- /dev/null +++ b/theme/bulma/templates/partial/footer.html @@ -0,0 +1,7 @@ + diff --git a/theme/bulma/templates/partial/nav.html b/theme/bulma/templates/partial/nav.html new file mode 100644 index 0000000..a037522 --- /dev/null +++ b/theme/bulma/templates/partial/nav.html @@ -0,0 +1,17 @@ +{% if MAIN_MENU %} + +{% endif %} diff --git a/theme/bulma/templates/partial/pagination.html b/theme/bulma/templates/partial/pagination.html new file mode 100644 index 0000000..05dfc8c --- /dev/null +++ b/theme/bulma/templates/partial/pagination.html @@ -0,0 +1,14 @@ +{% if DEFAULT_PAGINATION %} + +{% endif %} diff --git a/theme/bulma/templates/partial/sidebar.html b/theme/bulma/templates/partial/sidebar.html new file mode 100644 index 0000000..75ebaf1 --- /dev/null +++ b/theme/bulma/templates/partial/sidebar.html @@ -0,0 +1,78 @@ + diff --git a/theme/bulma/templates/partial/translations.html b/theme/bulma/templates/partial/translations.html new file mode 100644 index 0000000..9c5e4fd --- /dev/null +++ b/theme/bulma/templates/partial/translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} + {% if article.translations %} +
+ {{article.lang}} + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +
+ {% endif %} +{% endmacro %} -- cgit v1.2.3