diff --git a/_data/menus.yml b/_data/menus.yml deleted file mode 100644 index a277a6558be9d91b02de02cbcf45cbd93f464e76..0000000000000000000000000000000000000000 --- a/_data/menus.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -footer: -- title: À propos de Luminy.org - url: about.md - weight: 1 -- title: Poèmes - url: poemes/ - weight: 1 - -ccl: - - title: "Activités" - url: "/ccl/activites/" - identifier: ccl-activites - - title: "L'association" - url: "/ccl/" - identifier: ccl-l-asso - - # - title: "Concerts et festivals" - # url: /ccl/activites/concerts/ - # - title: "Toukouleur" - # url: /ccl/activites/toukouleur/ - # - title: "Les jeudis du CCL" - # url: /ccl/activites/jeudis/ - # - title: "Campus propre" - # url: /ccl/activites/campus-propre/ - # - title: "Projections" - # url: /ccl/activites/projections/ - # - title: "Ateliers et animation" - # url: /ccl/activites/ateliers/ - # - title: "Projets" - # url: /ccl/activites/projets/ -# - title: "L'association" - # url: "/ccl/" - # children: - # - title: "Qui sommes-nous ?" - # url: /ccl/l-asso/presentation-longue/ - # - title: "Adhérer" - # url: /ccl/l-asso/adherer/ - # - title: "Statuts" - # url: /ccl/l-asso/statuts/ - # - title: "Contacts" - # url: /ccl/l-asso/contacts/ diff --git a/_includes/author-profile.html b/_includes/author-profile.html index 884f2627755585b0ae6790acd89809c20171dfd1..9ef529cef00d1ae321f54fb12f9e2521f77c6501 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -1,9 +1,5 @@ <!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} --> -{% unless page.author %} - {% assign author = page.url | split: "/" %} - {% assign author = author[1] %} -{% endunless %} -{% assign author = site.data.authors.authors | where: "prefix", author | first %} +{% assign author = site.data.authors.authors | where: "prefix", site.author | first %} <div itemscope itemtype="https://schema.org/Person"> diff --git a/_includes/nav_list b/_includes/nav_list index 55d8c7deafae568dbd1e9deb3d6d4e37ead08b76..940c90ca8437e221606a0bb3a6f45663c942d903 100644 --- a/_includes/nav_list +++ b/_includes/nav_list @@ -1,4 +1,4 @@ -{% assign navigation = site.data.navigation.navs | where: "name", include.nav | map: "nav" | first %} +{% assign navigation = site.data.navigation.nav %} <nav class="nav__list"> {% if page.sidebar.title %}<h3 class="nav__title" style="padding-left: 0;">{{ page.sidebar.title }}</h3>{% endif %} diff --git a/_includes/page__hero.html.bak b/_includes/page__hero.html.bak new file mode 100644 index 0000000000000000000000000000000000000000..98bff72aa29e1825277857b5d678e09485a3203e --- /dev/null +++ b/_includes/page__hero.html.bak @@ -0,0 +1,72 @@ +{% if page.header.image contains "://" %} + {% capture img_path %}{{ page.header.image }}{% endcapture %} +{% else %} + {% capture img_path %}{{ page.header.image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.cta_url contains "://" %} + {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} +{% else %} + {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_image contains "://" %} + {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} +{% elsif page.header.overlay_image %} + {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_filter contains "rgba" %} + {% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %} +{% elsif page.header.overlay_filter %} + {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} +{% endif %} + +{% if page.header.image_description %} + {% assign image_description = page.header.image_description %} +{% else %} + {% assign image_description = page.title %} +{% endif %} + +{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %} + +<div class="page__hero{% if page.header.overlay_color or page.header.overlay_image %}--overlay{% endif %}" + style="{% if page.header.overlay_color %}background-color: {{ page.header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}), {% endif %}url('{{ overlay_img_path }}');{% endif %}" +> + {% if page.header.overlay_color or page.header.overlay_image %} + <div class="wrapper"> + <h1 id="page-title" class="page__title" itemprop="headline"> + {% if paginator and site.paginate_show_page_num %} + {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} + {% else %} + {{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }} + {% endif %} + </h1> + {% if page.header.show_overlay_excerpt != false and page.excerpt %} + <p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p> + {% endif %} + {% if page.read_time %} + <p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p> + {% endif %} + {% if page.header.cta_url %} + <p><a href="{{ cta_path }}" class="btn btn--light-outline btn--large">{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p> + {% endif %} + {% if page.header.actions %} + <p> + {% for action in page.header.actions %} + {% if action.url contains "://" %} + {% assign url = action.url %} + {% else %} + {% assign url = action.url | relative_url %} + {% endif %} + <a href="{{ url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a> + {% endfor %} + {% endif %} + </div> + {% else %} + <img src="{{ img_path }}" alt="{{ image_description }}" class="page__hero-image"> + {% endif %} + {% if page.header.caption %} + <span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span> + {% endif %} +</div> diff --git a/_includes/seo.html b/_includes/seo.html index f4415d3730cbd7f1822c0b368ef8f41e5b274be9..5e6e147de6f8b012a5315f0f3170e7c95db7fec6 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -26,9 +26,7 @@ {%- endif -%} <!-- don't use page.author even if it is set, find author based on url --> -{% assign author = page.url | split: "/" %} -{% assign author = author[1] %} -{% assign author = site.data.authors.authors | where: "prefix", author | first %} +{% assign author = site.data.authors.authors | where: "prefix", site.author | first %} {%- if author.twitter -%} {%- assign author_twitter = author.twitter | replace: "@", "" -%} diff --git a/_layouts/single.html b/_layouts/single.html index 81915e93dea637c87ba3686e94d6d5f3f044d037..f6a9d8728e32b6f2449e8861fe9b327da440de10 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -2,11 +2,7 @@ layout: default --- -{% unless page.author %} - {% assign author = page.url | split: "/" %} - {% assign author = author[1] %} -{% endunless %} -{% assign author = site.data.authors.authors | where: "prefix", author | first %} +{% assign author = site.data.authors.authors | where: "prefix", site.author | first %} {% if page.has_header %} {% include page__hero.html %}