24 lines
994 B
HTML
24 lines
994 B
HTML
{% extends 'base.html' %}
|
|
{% block content %}
|
|
|
|
<h1>{{ resource.title }}</h1>
|
|
{# 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 page in section.pages %}
|
|
{% set translatedPage = page.translations | filter(attribute='lang', value=lang) | first %}
|
|
{% if translatedPage %}
|
|
{% set page = get_page(path=translatedPage.path) %}
|
|
{% endif %}
|
|
<div class="news_date"> <a href="{{ page.path | safe }}">{{ page.date | date(format='%B %e, %Y') }}</a> </div>
|
|
<div class="news_content_image">
|
|
{% if page.content %}
|
|
<div class="news_content">{{ page.content | safe }}</div>
|
|
{% endif %}
|
|
{% for photo in page.assets %}
|
|
<img class="news_image" src="{{ page.path | safe }}{{ photo | split(pat='/') | last }}" />
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock content %}
|