Code du site
https://militant.es/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
{% extends "index.html" %} |
|
|
|
{% block title %} {{ section.title }} {% endblock title %} |
|
|
|
{% block content %} |
|
|
|
{# ===== section content ===== #} |
|
{{ section.content | safe }} |
|
|
|
{# ===== news feed ===== #} |
|
{% if not section.extra.disable_feed %} |
|
{% for article in section.pages %} |
|
<br/> |
|
<a href="{{ article.permalink }}"><strong>{{ article.title }}</strong></a> <span>{{ article.date }}</span> |
|
{% if article.description %}<p>{{ article.description }}</p>{% endif %} |
|
<hr/> |
|
{% endfor %} |
|
{% endif %} |
|
|
|
{# ===== asset indexing ===== #} |
|
{% if not section.extra.disable_assets %} |
|
{% for asset in section.assets | sort() | reverse %} |
|
{%- if asset is matching("[.](jpg|png|jpeg)$") -%} |
|
{%- set resized_asset = resize_image(path=asset, width=240, height=240, op="fit_height") -%} |
|
<a href="{{ get_url(path=asset) }}"><img src="{{ resized_asset.url }}"/></a> |
|
{%- elif asset is matching("[.](svg)$") -%} |
|
<a href="{{ get_url(path=asset) }}"><img style="width:240px; height:240px;" src="{{ get_url(path=asset) }}"/></a> |
|
{% else %} |
|
{# nothing, will list assets later #} |
|
{%- endif -%} |
|
{% endfor %} |
|
<br/> |
|
<ul> |
|
{% for asset in section.assets | sort() | reverse %} |
|
{%- if asset is matching("[.](jpg|png|svg|jpeg)$") -%} |
|
{# nothing, already listed before #} |
|
{% else %} |
|
<li><a href="{{ get_url(path=asset) }}">{{asset}}</a></li> |
|
{%- endif -%} |
|
{% endfor %} |
|
</ul> |
|
{% endif %} |
|
|
|
{% endblock content %}
|
|
|