gestioCOF/gestioncof/cms/templates/cofcms/cof_directory_page.html

43 lines
1.6 KiB
HTML

{% extends "cofcms/base_aside.html" %}
{% load wagtailimages_tags cofcms_tags %}
{% block aside %}
<h2>Accès rapide</h2>
<ul>
{% for entry in page.entries %}
<li><a href="#{{ entry.slug }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
{% endblock %}
{% block content %}
<section class="intro">
<h1>{{ page.title }}</h1>
<div>{{ page.introduction|safe }}</div>
</section>
<section class="directory">
{% for entry in page.entries %}
<article class="entry" id="{{ entry.slug }}">
<h2>{{ entry.title }}</h2>
{% if entry.image %}
{% image entry.image width-400 class="entry-img" %}
{% endif %}
<div class="desc">{{ entry.body|safe }}</div>
{% if entry.links %}
<ul class="links">
{% for block in entry.links %}
<li>
{% if block.block_type == "lien" %}
<a href="{{ block.value.url }}">{{ block.value.texte }}</a>
{% else %}
{{ block.value.texte }} : <button data-mref="{{ block.value.email|obfuscate_mail }}" class="mail-contact">Afficher l'adresse mail</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</article>
{% endfor %}
</section>
{% endblock %}