From 8d8844fbbf0e8aa83b1a80296383c6cd69c4adcb Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Fri, 21 Aug 2020 21:30:17 +0200 Subject: [PATCH] =?UTF-8?q?tmp=20auteur=20/=20=C3=A9quipe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/wiki/about/equipe/cgeek.md | 2 +- content/wiki/about/equipe/elois.md | 8 ++++++-- templates/authors/content.html | 3 +++ templates/authors/page.html | 7 +++++++ templates/authors/single.html | 7 ++----- templates/custom/equipe.html | 5 ++--- 6 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 templates/authors/content.html create mode 100644 templates/authors/page.html diff --git a/content/wiki/about/equipe/cgeek.md b/content/wiki/about/equipe/cgeek.md index 26fcb15..f244c74 100644 --- a/content/wiki/about/equipe/cgeek.md +++ b/content/wiki/about/equipe/cgeek.md @@ -1,6 +1,6 @@ +++ title = "Cédric Moreau" -description = "Cédric Moreau est le développeur de Duniter" +description = "Cédric Moreau est le développeur original du logiciel Duniter" [extra] avatar = "cgeek.png" diff --git a/content/wiki/about/equipe/elois.md b/content/wiki/about/equipe/elois.md index 6466eaa..00cbf01 100644 --- a/content/wiki/about/equipe/elois.md +++ b/content/wiki/about/equipe/elois.md @@ -1,6 +1,10 @@ +++ -description = "Elois est le développeur de Dunitrust" +title = "Elois" +description = "Elois est le développeur principal de Dunitrust, il travaille en ce moment sur l'oxydation de Dunitrust" +template = "authors/page.html" [extra] avatar = "elois.jpeg" -+++ \ No newline at end of file ++++ + +Elois est le développeur principal de Dunitrust, il travaille en ce moment sur l'oxydation de Dunitrust !!!! \ No newline at end of file diff --git a/templates/authors/content.html b/templates/authors/content.html new file mode 100644 index 0000000..7758403 --- /dev/null +++ b/templates/authors/content.html @@ -0,0 +1,3 @@ +<h1>{{page.title}}</h1> +{% if page.extra.avatar %}<img src="/equipe/{{ page.extra.avatar }}"/>{% endif %} +{{ page.content | safe }} diff --git a/templates/authors/page.html b/templates/authors/page.html new file mode 100644 index 0000000..328a784 --- /dev/null +++ b/templates/authors/page.html @@ -0,0 +1,7 @@ +{% extends "page.html" %} + +{% block content %} +<main class="page w3-container w3-content w3-padding-64"> + {% include "authors/content.html" %} +</main> +{% endblock content %} diff --git a/templates/authors/single.html b/templates/authors/single.html index 58ee24e..20df438 100644 --- a/templates/authors/single.html +++ b/templates/authors/single.html @@ -5,11 +5,8 @@ {% block content %} <main id="accueil" class="page w3-container w3-content w3-padding-64"> {% set page = get_page(path="wiki/about/equipe/" ~ term.name ~ ".md") %} - {% set data = page.extra %} - <h1>{{term.name}}</h1> - {% if data.avatar %}<img src="/equipe/{{ data.avatar }}"/>{% endif %} - {% if page.description %}<p>{{ page.description }}</p>{% endif %} - <h2>Lire ses articles sur ce site</h2> + {% include "authors/content.html" %} + <h2>Articles sur ce site ({{term.name}})</h2> {%- for page in term.pages -%} <a href="{{page.permalink}}"> {{page.title}} </a><br> {%- endfor -%} diff --git a/templates/custom/equipe.html b/templates/custom/equipe.html index 067bd1e..ab3e7e6 100644 --- a/templates/custom/equipe.html +++ b/templates/custom/equipe.html @@ -14,9 +14,8 @@ {% for person in section.extra.authors %} <div class="person"> {% set page = get_page(path="wiki/about/equipe/" ~ person ~ ".md") %} - {% set data = page.extra %} - <img src="{% if data.avatar %}/equipe/{{ data.avatar }}{% endif %}"/> - <h3>{{ person }}</h3> + <img src="{% if page.extra.avatar %}/equipe/{{ page.extra.avatar }}{% endif %}"/> + <a href="{{ '/wiki/about/equipe/' ~ person }}"><h3>{{ person }}</h3></a> <p>{{ page.description }}</p> </div> {% endfor %} -- GitLab