-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontent.html.twig
34 lines (28 loc) · 1.56 KB
/
content.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% extends 'base.html.twig' %}
{% block title %}
{{ 'Content page'|trans }}
{% endblock %}
{% block body %}
{% set contents = resources('/api/front/contents', {itemsPerPage:3}) %}
{% set contentsFiltered = contents|map((c) => ({
title: c.i18ns.title,
date: c.createdAt|date("d/m/Y"),
url: '#',
img: {url: '/legacy-image-library/category_image_'~c.id~'/full/%5E*!386,280/0/default.webp', alt: c.i18ns.title}
})) %}
{% include '@components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig' with {title: attr('content', 'title'), description: attr('content', 'chapo') } %}
<div class="px-[25px] lg:pr-[225px] lg:pl-[250px] xl:pr-[325px] xl:pl-[350px] flex gap-[173px] mt-[25px] lg:mt-[54px] mb-[80px] lg:mb-[120px]">
<article class="wysiwyg">
{{ attr('content', 'description') }}
{{ component('Flexy:Components:Blocks', {item_type: 'content', item_id: attr('content', 'id')}) }}
</article>
<aside class="hidden lg:block w-[340px]">
{% include '@components/Molecules/Shortcut/Shortcut.html.twig' with {customText: "Section title" | trans} %}
{% include '@components/Molecules/Shortcut/Shortcut.html.twig' with {customText: "Section title" | trans} %}
{% include '@components/Molecules/Shortcut/Shortcut.html.twig' with {customText: "Section title" | trans} %}
</aside>
</div>
<div class="bg-theme-lighter">
{% include '@components/Layout/SimilarContent/SimilarContent.html.twig' with {title: "On the same topic" | trans, button: {label: "See all news" | trans, href: "/" }, similarContents: contentsFiltered} %}
</div>
{% endblock %}