diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 14:44:10 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 14:44:10 +0200 |
commit | e0a989555b6bef9173088da9e0b980338a88ce0c (patch) | |
tree | 3e35bc65664e881d62cf14970d482884b80289f7 /theme/bulma/templates/partial | |
parent | 3b3c4db1bdd29b46a23051fc5427197ce2831764 (diff) |
Swiched the theme to bulma-css
Diffstat (limited to 'theme/bulma/templates/partial')
-rw-r--r-- | theme/bulma/templates/partial/cc_license.html | 31 | ||||
-rw-r--r-- | theme/bulma/templates/partial/copyright.html | 10 | ||||
-rw-r--r-- | theme/bulma/templates/partial/footer.html | 7 | ||||
-rw-r--r-- | theme/bulma/templates/partial/nav.html | 17 | ||||
-rw-r--r-- | theme/bulma/templates/partial/pagination.html | 14 | ||||
-rw-r--r-- | theme/bulma/templates/partial/sidebar.html | 78 | ||||
-rw-r--r-- | theme/bulma/templates/partial/translations.html | 10 |
7 files changed, 167 insertions, 0 deletions
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 @@ +<p> + {% 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='<a rel="license" href="{}" target="_blank">{}</a>'.format(cc_url, cc_name)|safe) }} +</p> +{% include "partial/flex.html" %} +<p> + {% if CC_LICENSE['icon'] != False %} + <a rel="license" + href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/" + target="_blank"> + <img alt="Creative Commons License" + title="Creative Commons License" + style="border-width:0" + {% if CC_LICENSE['local_icons'] %} + src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/cc/{{ CC_LICENSE['slug'] }}.png" + {% else %} + src="https://i.creativecommons.org/l/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/80x15.png" + {% endif %} + width="80" + height="15"/> + </a> + {% endif %} + {% if STATUSCAKE %} + {% include "partial/statuscake.html" %} + {% endif %} +</p> 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 @@ +<p>© {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }}</p> +<p> +{{ + _('Built with %(pelican_url)s', + pelican_url='<a href="http://getpelican.com" target="_blank">Pelican</a>') +}} +</p> +{% 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 @@ +<footer class="has-text-centered is-size-6"> + {% if CC_LICENSE %} + {% include "partial/cc_license.html" %} + {% else %} + {% include "partial/copyright.html" %} + {% endif %} +</footer> 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 %} +<nav class="column is-3"> + <a href="{{ SITEURL }}/">{{ _('Home') }}</a> + + {% for title, link in MENUITEMS %} + <a href="{{ link }}">{{ _(title) }}</a> + {% endfor %} + + {% if FEED_ALL_ATOM %} + <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">{{ _('Atom') }}</a> + {% endif %} + + {% if FEED_ALL_RSS %} + <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">{{ _('RSS') }}</a> + {% endif %} +</nav> +{% 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 %} + <div class="pagination mt-6"> + {% if articles_page.has_next() %} + <a class="pagination-previous" href="{{ SITEURL }}/{{ articles_next_page.url }}"> + <i class="fa fa-angle-left"></i> {{ _('Older Posts') }} + </a> + {% endif %} + {% if articles_page.has_previous() %} + <a class="pagination-next" href="{{ SITEURL }}/{{ articles_previous_page.url }}"> + {{ _('Newer Posts') }} <i class="fa fa-angle-right"></i> + </a> + {% endif %} + </div> +{% 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 @@ +<aside> + <div> + <a href="{{ SITEURL }}/"> + {% if SITELOGO %} + <img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}"> + {% else %} + <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.webp" alt="{{ SITETITLE }}" title="{{ SITETITLE }}"> + {% endif %} + </a> + + <div> + <p class="title is-1"> + <a href="{{ SITEURL }}/">{{ SITETITLE }}</a> + </p> + {% if SITESUBTITLE %} + <p class="subtitle">{{ SITESUBTITLE }}</p> + {% endif %} + </div> + + {% if (pages and DISPLAY_PAGES_ON_MENU) or LINKS %} + <nav class="content"> + <ul class="list"> + {# Open links in new window depending on the LINKS_IN_NEW_TAB setting #} + {% macro get_target(link) -%} + {%- if LINKS_IN_NEW_TAB in ('all', true) -%} + _blank + {%- elif LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL) -%} + _blank + {%- else -%} + _self + {%- endif -%} + {%- endmacro %} + + {% if PAGES_SORT_ATTRIBUTE -%} + {% set pages = pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %} + {%- endif %} + + {% if DISPLAY_PAGES_ON_MENU %} + {% for page in pages %} + <li> + <a target="{{ get_target(SITEURL) }}" + href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}"> + {{ page.title }} + </a> + </li> + {% endfor %} + {% endif %} + + {% for name, link in LINKS %} + <li> + <a target="{{ get_target(link) }}" href="{{ link }}" >{{ name }}</a> + </li> + {% endfor %} + </ul> + </nav> + {% endif %} + + {% if SOCIAL %} + {% set solid = ['at', 'envelope', 'mailbox', 'rss'] %} + {% set relme = ['at', 'envelope', 'mailbox', 'mastodon'] %} + <ul class="social"> + {% for name, link in SOCIAL %} + <li> + <a class="sc-{{ name }}" + {% if name in relme %}rel="me"{% endif %} + href="{{ link }}" + target="_blank"> + <i class="{% if name in solid %}fa-solid{% else %}fa{% endif %} fa-{{ name }}"></i> + </a> + </li> + {% endfor %} + </ul> + {% endif %} + + <button class="button is-ghost is-medium theme-switch"><i class="fa fa-adjust" aria-hidden="true" onclick="modeSwitcher()"></i></button> + </div> + +</aside> 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 %} + <div class="translations"> + <a class="active" href="{{ SITEURL }}/{{ article.url }}">{{article.lang}}</a> + {% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> + {% endfor %} + </div> + {% endif %} +{% endmacro %} |