From ab00a0efa1321b9e560648a76743f5c80adb9e51 Mon Sep 17 00:00:00 2001 From: dmitry Date: Sun, 4 Feb 2024 20:30:27 +0200 Subject: [PATCH] f --- content/news/2021-05-06/6/index.md | 1 + templates/news.html | 88 +++++++++++++++++++----------- 2 files changed, 56 insertions(+), 33 deletions(-) diff --git a/content/news/2021-05-06/6/index.md b/content/news/2021-05-06/6/index.md index a0c726cd..08c7a6e6 100644 --- a/content/news/2021-05-06/6/index.md +++ b/content/news/2021-05-06/6/index.md @@ -1,5 +1,6 @@ --- title: "No more trackers according to the latest Exodus Privacy Report!" +description: test date: 2021-05-06T07:20:28+00:00 slug: "no-more-trackers-according-to-the-latest-exodus-privacy-report" --- diff --git a/templates/news.html b/templates/news.html index 8def7a38..a6f037f8 100644 --- a/templates/news.html +++ b/templates/news.html @@ -12,45 +12,67 @@ {% block content %}

{{ resource.title }}

-{# Iterate and use en sections by default and use localized versions only if they are present #} -{% set enNewsSectionTranslation = section.translations | filter(attribute='lang', value='en') | first %} -{% set enNewsSection = get_section(path=enNewsSectionTranslation.path) %} -{% for sectionStr in enNewsSection.subsections | sort | reverse %} -{% set section = get_section(path=sectionStr) %} -{% for page in section.pages %} -{% set translatedPage = page.translations | filter(attribute='lang', value=lang) | first %} -{% if translatedPage %} + {# Iterate and use en sections by default and use localized versions only if they are present #} + {% set enNewsSectionTranslation = section.translations | filter(attribute='lang', value='en') | first %} + {% set enNewsSection = get_section(path=enNewsSectionTranslation.path) %} - {# set page = get_page(path=translatedPage.path) #} -{% endif %} - - - - -{# Display wide images below the text instead of to the right. #} -{% set_global noflex = '' %} -{% for photo in page.assets %} - {% set meta = get_image_metadata(path=photo) %} - {% if meta.width > meta.height %} - {% set_global noflex = '_noflex' %} - {% break %} + {% for sectionStr in enNewsSection.subsections | sort | reverse %} + {% set section = get_section(path=sectionStr) %} + {% for page in section.pages %} + {% set translatedPage = page.translations | filter(attribute='lang', value=lang) | first %} + {% if translatedPage %} + {# set page = get_page(path=translatedPage.path) #} {% endif %} -{% endfor %} -
-{% if page.content %} -
{{ page.content | safe }}
-{% endif %} - -{% for photo in page.assets | sort %} - -{% endfor %} - +
-
+ + {# Display wide images below the text instead of to the right. #} + {% set_global noflex = '' %} + {% for photo in page.assets %} + {% set meta = get_image_metadata(path=photo) %} + {% if meta.width > meta.height %} + {% set_global noflex = '_noflex' %} + {% break %} + {% endif %} + {% endfor %} + +
+ {% if page.title %} +
+ title: + {{ page.title | safe }} +
+ {% endif %} + {% if page.description %} +
+ description: + {{ page.description | safe }}
+ {% endif %} -
+ + {% for photo in page.assets | sort %} + + + {% endfor %} + + + {% endfor %} {% endfor %}