From 0323bbd5b929b55c4031974b43559ce773440723 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 1 Feb 2022 18:35:47 +0100 Subject: Custom template for applications page --- content/pages/applications/applications.rst | 64 +--------------------------- content/pages/css_merger/css_merger.rst | 6 +++ content/pages/demo.rst | 7 +++ content/pages/graph-editor/graph-editor.rst | 14 +++++- content/pages/script.it/script.rst | 11 +++++ content/pages/tengwar/tengtelc.ttf | Bin 0 -> 265152 bytes content/pages/tengwar/tengwar.rst | 28 ++++++++++++ pelicanconf.py | 4 +- theme/custom/applications.html | 22 ++++++++++ theme/custom/base.html | 54 ++++++++++------------- theme/custom/custom.css | 9 +--- 11 files changed, 115 insertions(+), 104 deletions(-) create mode 100755 content/pages/tengwar/tengtelc.ttf create mode 100644 theme/custom/applications.html diff --git a/content/pages/applications/applications.rst b/content/pages/applications/applications.rst index 6849619..54c7988 100755 --- a/content/pages/applications/applications.rst +++ b/content/pages/applications/applications.rst @@ -4,24 +4,10 @@ Applications ============ -.. raw:: html - - - +:template: applications :save_as: pages/applications/index.html :url: pages/applications/ -.. role:: tengwar - .. note:: Voir la charte_ que je m’engage de suivre quant aux applications présentes @@ -29,51 +15,3 @@ Applications .. _charte: {filename}/pages/charte.rst#applications-en-ligne -`Transcription en Tengwar`__ ----------------------------- - -Prendre un mot de la langue française et le changer d’alphabet. -Comme ce que fait tecendil_ mais en français :) - -.. class:: - :center: - - :tengwar:`riU qr&iR 13V1uR 5# ajaG5#6 jL jl5% 3`B 23ViÙ` - -.. _tecendil: https://tecendil.com/ -.. __: {filename}/pages/tengwar/tengwar.rst - - -`Fusion de CSS`__ ------------------ - -Outil de fusion de CSS en ligne. Je l’utilise dans ce blog pour surcharger le -thème par défaut (dans une version exécutable). - -.. __: {filename}/pages/css_merger/css_merger.rst#css-merger - -`Ardoise calligraphique`__ --------------------------- - -Application javascript pour dessiner dans le navigateur avec le même rendu -qu'une plume. - -.. image:: {static}/pages/applications/calligraphie.svg - :align: center - :target: {filename}/pages/script.it/script.rst#ardoise-calligraphique - -.. __: {filename}/pages/script.it/script.rst#ardoise-calligraphique - - -`Graphviz en ligne`__ ---------------------- - -Application javascript pour représenter des graphes - -.. image:: {static}/resources/viz.js/example.svg - :align: center - :target: {filename}/pages/graph-editor/graph-editor.rst#graph-editor - -.. __: {filename}/pages/graph-editor/graph-editor.rst#graph-editor - - diff --git a/content/pages/css_merger/css_merger.rst b/content/pages/css_merger/css_merger.rst index 14d818c..c23e498 100755 --- a/content/pages/css_merger/css_merger.rst +++ b/content/pages/css_merger/css_merger.rst @@ -7,6 +7,12 @@ Fusion de CSS :status: hidden :save_as: pages/css_merger/index.html :url: pages/css_merger/ +:tags: application +:date: 2021-02 +:summary: + + Outil de fusion de CSS en ligne. Je l’utilise dans ce blog pour surcharger le + thème par défaut (dans une version exécutable). Chargez les fichiers à fusionner : diff --git a/content/pages/demo.rst b/content/pages/demo.rst index f20103d..c4ac2f7 100644 --- a/content/pages/demo.rst +++ b/content/pages/demo.rst @@ -32,6 +32,13 @@ aliquet enim tortor at auctor. α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ) +.. math:: + + \text{Gain}(S, A) = \text{Entropie}(S) - \sum_{v \in \text{valeurs}(A)} + \frac{|S_v|}{|S|} \text{Entropie}(S_v) + + + .. Previous text .. |replace| replace:: replace diff --git a/content/pages/graph-editor/graph-editor.rst b/content/pages/graph-editor/graph-editor.rst index 34462e4..233a61a 100755 --- a/content/pages/graph-editor/graph-editor.rst +++ b/content/pages/graph-editor/graph-editor.rst @@ -1,10 +1,20 @@ -Graph editor -============ +Graphviz en ligne +================= :status: hidden :save_as: pages/graph-editor/index.html :url: pages/graph-editor/ +:tags: application +:date: 2020-12 +:summary: + + Application javascript pour représenter des graphes + + .. image:: {static}/resources/viz.js/example.svg + :align: center + :target: {filename}/pages/graph-editor/graph-editor.rst#graph-editor + .. raw:: html diff --git a/content/pages/script.it/script.rst b/content/pages/script.it/script.rst index d211bce..b0f515f 100755 --- a/content/pages/script.it/script.rst +++ b/content/pages/script.it/script.rst @@ -7,6 +7,17 @@ Ardoise calligraphique :status: hidden :save_as: pages/script.it/index.html :url: pages/script.it/ +:tags: application +:date: 2021-01 +:summary: + + Application javascript pour dessiner dans le navigateur avec le même rendu + qu'une plume. + + .. image:: {static}/pages/applications/calligraphie.svg + :align: center + :target: {filename}/pages/script.it/script.rst#ardoise-calligraphique + .. raw:: html diff --git a/content/pages/tengwar/tengtelc.ttf b/content/pages/tengwar/tengtelc.ttf new file mode 100755 index 0000000..0fe1b6f Binary files /dev/null and b/content/pages/tengwar/tengtelc.ttf differ diff --git a/content/pages/tengwar/tengwar.rst b/content/pages/tengwar/tengwar.rst index eacfa27..9808b3f 100644 --- a/content/pages/tengwar/tengwar.rst +++ b/content/pages/tengwar/tengwar.rst @@ -5,9 +5,37 @@ Écrire les tengwar ================== +.. role:: tengwar + :status: hidden :save_as: pages/tengwar/index.html :url: pages/tengwar/ +:tags: application +:date: 2021-09 +:summary: + + .. raw:: html + + + + Prendre un mot de la langue française et le changer d’alphabet. + Comme ce que fait tecendil_ mais en français :) + + .. class:: + :center: + + :tengwar:`riU qr&iR 13V1uR 5# ajaG5#6 jL jl5% 3`B 23ViÙ` + + .. _tecendil: https://tecendil.com/ .. raw:: html diff --git a/pelicanconf.py b/pelicanconf.py index b467220..9026f97 100755 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -44,13 +44,15 @@ MAIN_MENU=False COPYRIGHT_NAME="Sébastien Dailly" DISABLE_URL_HASH=True + + THEME_TEMPLATES_OVERRIDES = \ [ 'theme/custom' ] LINKS= ( ("Git", "http://git.chimrod.com") , ) -HOME_HIDE_TAGS=False +HOME_HIDE_TAGS=True I18N_TEMPLATES_LANG = "fr_FR" LOCALE="fr_FR" diff --git a/theme/custom/applications.html b/theme/custom/applications.html new file mode 100644 index 0000000..eb0124b --- /dev/null +++ b/theme/custom/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/custom/base.html b/theme/custom/base.html index 829cc1f..debd12b 100755 --- a/theme/custom/base.html +++ b/theme/custom/base.html @@ -3,7 +3,6 @@ {{ msg % kwargs }} {%- endmacro -%} {% endif %} - @@ -47,7 +46,7 @@ {% else %} - + {% endif %} {# DARK THEME STYLES #} @@ -92,11 +91,6 @@ {% endif %} {% if PLUGINS and 'tipue_search' in PLUGINS %} - - - - - {% endif %} @@ -141,19 +135,22 @@ {% endif %} - {% if REL_CANONICAL %} - {% if page %} - - {% elif article %} - - {% elif page_name == 'index' and not articles_previous_page %} - - {% elif author or category or tag or page_name == 'index' %} - - {% else %} - + {% if not PLUGINS or 'seo' not in PLUGINS %} + {% if REL_CANONICAL %} + {% if page %} + + {% elif article %} + + {% elif page_name == 'index' and not articles_previous_page %} + + {% elif author or category or tag or page_name == 'index' %} + + {% else %} + + {% endif %} {% endif %} - {% endif %} + {% endif %} + {% block meta %} @@ -174,6 +171,9 @@ {% if GOOGLE_TAG_MANAGER %} {% include "partial/gtm.html" %} {% endif %} + {% if MICROSOFT_CLARITY %} + {% include "partial/clarity.html" %} + {% endif %} {% if GOOGLE_TAG_MANAGER %} @@ -181,7 +181,7 @@ {% endif %}