Skip to content

Commit

Permalink
indents and adds container around body page
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucien Mollard authored and Lucien Mollard committed Jan 24, 2025
1 parent 7f9de16 commit d95f77f
Showing 1 changed file with 95 additions and 93 deletions.
188 changes: 95 additions & 93 deletions numerique_gouv/templates/numerique_gouv/blog_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,115 +5,117 @@
{% include "content_manager/blocks/head.html" with stream=page.body %}

{% block content %}
{% include "content_manager/blocks/heading.html" %}
{% include "content_manager/blocks/messages.html" %}
{% include "content_manager/blocks/heading.html" %}
{% include "content_manager/blocks/messages.html" %}

<div class="fr-container fr-pt-4w">
{% include "content_manager/blocks/breadcrumbs.html" %}
{% if not page.header_with_title %}
<h1>
{{ page.title }}
</h1>
{% endif %}
<div class="fr-container fr-pt-4w">
{% include "content_manager/blocks/breadcrumbs.html" %}
{% if not page.header_with_title %}
<h1>
{{ page.title }}
</h1>
{% endif %}

{% if current_category.description %}
{{ current_category.description|richtext }}
{% endif %}
{% if current_category.description %}
{{ current_category.description|richtext }}
{% endif %}


{% if page.show_filters %}
<div class="fr-grid-row fr-grid-row--gutters fr-mb-3w">
<div class="fr-col fr-col-md-4 fr-col-12">
<nav class="fr-sidemenu fr-sidemenu--sticky-full-height fr-mb-0-5v">
<div class="fr-sidemenu__inner">
<button class="fr-sidemenu__btn"
hidden
aria-controls="fr-sidemenu-wrapper-{{ page.slug }}"
aria-expanded="false">{% translate "Filters" %}</button>
<div class="fr-collapse" id="fr-sidemenu-wrapper-{{ page.slug }}">
<h2 class="fr-sidemenu__title fr-h6" id="fr-sidemenu-title">{% translate "Filters" %}</h2>
{% if major_areas %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter by major area" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for major_area in major_areas %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter major_area=major_area %}"
{% if major_area.id == current_major_area.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ major_area }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if page_tags %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter by page tag" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for page_tag in page_tags %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter page_tag=page_tag %}"
{% if page_tag.id == current_page_tag.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ page_tag }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if organizations %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter organization" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for organization in organizations %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter organization=organization %}"
{% if organization.id == current_organization.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ organization }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% if page.show_filters %}
<div class="fr-grid-row fr-grid-row--gutters fr-mb-3w">
<div class="fr-col fr-col-md-4 fr-col-12">
<nav class="fr-sidemenu fr-sidemenu--sticky-full-height fr-mb-0-5v">
<div class="fr-sidemenu__inner">
<button class="fr-sidemenu__btn"
hidden
aria-controls="fr-sidemenu-wrapper-{{ page.slug }}"
aria-expanded="false">{% translate "Filters" %}</button>
<div class="fr-collapse" id="fr-sidemenu-wrapper-{{ page.slug }}">
<h2 class="fr-sidemenu__title fr-h6" id="fr-sidemenu-title">{% translate "Filters" %}</h2>
{% if major_areas %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter by major area" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for major_area in major_areas %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter major_area=major_area %}"
{% if major_area.id == current_major_area.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ major_area }}
</a>
</li>
{% endfor %}
</ul>
</div>
</nav>
</div>

<div class="fr-col fr-col-md-8 fr-col-12">
<div class="fr-grid-row fr-grid-row--gutters">
{% for subpage in posts %}
<div class="fr-col-12 fr-col-md-6">
{% include "numerique_gouv/blocks/card_vertical.html" with page=subpage %}
</div>
{% endfor %}
{% endif %}
{% if page_tags %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter by page tag" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for page_tag in page_tags %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter page_tag=page_tag %}"
{% if page_tag.id == current_page_tag.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ page_tag }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if organizations %}
<div class="fr-my-3w">
<h3 class="fr-text--lg">{% translate "Filter organization" %}</h3>
<ul class="fr-tags-group fr-mt-2w">
{% for organization in organizations %}
<li>
<a class="fr-tag"
href="{% pageurl page %}{% toggle_url_filter organization=organization %}"
{% if organization.id == current_organization.id %}aria-pressed="true"{% else %}aria-pressed="false"{% endif %}>
{{ organization }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% if posts.paginator.num_pages > 1 %}
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
{% endif %}
{% include "blog/blocks/feeds.html" %}
</div>
</div>
{% else %}
</nav>
</div>

<div class="fr-col fr-col-md-8 fr-col-12">
<div class="fr-grid-row fr-grid-row--gutters">
{% for subpage in posts %}
<div class="fr-col-12 fr-col-md-6">
{% include "numerique_gouv/blocks/card_vertical.html" with page=subpage %}
</div>
<div class="fr-col-12 fr-col-md-6">
{% include "numerique_gouv/blocks/card_vertical.html" with page=subpage %}
</div>
{% endfor %}
</div>
{% if posts.paginator.num_pages > 1 %}
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
{% endif %}
{% include "blog/blocks/feeds.html" %}
{% endif %}
</div>
</div>
{% else %}
<div class="fr-grid-row fr-grid-row--gutters">
{% for subpage in posts %}
<div class="fr-col-12 fr-col-md-6">
{% include "numerique_gouv/blocks/card_vertical.html" with page=subpage %}
</div>
{% endfor %}
</div>
{% if posts.paginator.num_pages > 1 %}
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
{% endif %}
{% include "blog/blocks/feeds.html" %}
{% endif %}
</div>

<div class="fr-container">
{{ page.body }}
</div>
{% endblock content %}

0 comments on commit d95f77f

Please sign in to comment.