-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use variants for fullwidth teaser and headlines with image legend.
- Loading branch information
1 parent
f7003aa
commit 1da0d50
Showing
6 changed files
with
96 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
assets/components/organisms/fullwidth-teaser/fullwidth-teaser-legend.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="fullwidth-teaser"> | ||
|
||
<figure class="cover"> | ||
{% include '@atoms/picture/picture-fullwidth-teaser.twig' %} | ||
<figcaption> | ||
{% include '@atoms/popover/popover.twig' %} | ||
</figcaption> | ||
</figure> | ||
|
||
<div class="fullwidth-teaser-text"> | ||
|
||
<div class="fullwidth-teaser-header"> | ||
<div class="fullwidth-teaser-title"> | ||
<h3> | ||
{% if not title %}{% set title %}Évaluer la durabilité dans le domaine spatial{% endset %}{% endif %} | ||
{{title}} | ||
</h3> | ||
</div> | ||
<a href="#" aria-label="En savoir plus sur {{title}}" class="btn btn-primary triangle-outer-bottom-right d-none d-xl-block"> | ||
En savoir plus | ||
{% include '@atoms/icon/icon.twig' with {icon: 'icon-chevron-right'} %} | ||
</a> | ||
</div> | ||
|
||
<div class="fullwidth-teaser-content"> | ||
<p> | ||
{% if not content %} | ||
{% set content %}Le nouveau Space Sustainability Rating accueilli par eSpace, le centre spatial de l’EPFL, encourage le secteur de l’espace à concevoir et à mettre en œuvre des missions spatiales durables et responsables — montrant ainsi la voie pour assurer à long terme une approche durable de l’environnement spatial.{% endset %} | ||
{% endif %} | ||
{{content}} | ||
</p> | ||
</div> | ||
|
||
<div class="fullwidth-teaser-footer"> | ||
<a href="#" aria-label="En savoir plus sur Tech Transfer" class="btn btn-primary btn-block d-xl-none">En savoir plus</a> | ||
</div> | ||
</div> | ||
</div> |
7 changes: 1 addition & 6 deletions
7
assets/components/organisms/fullwidth-teaser/fullwidth-teaser.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
assets/components/organisms/fullwidth-teaser/fullwidth-teaser.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
assets/components/organisms/headlines/headlines-legend.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{% macro card_link(card) %} | ||
<a href="#" class="card link-trapeze-horizontal"> | ||
<div class="card-body"> | ||
<h3 class="card-title">{{ card.title }}</h3> | ||
<div class="card-info"> | ||
{% if card.date %} | ||
<span class="card-info-date"> | ||
<time datetime="DATETIME HERE">{{ card.date }}</time> | ||
</span> | ||
{% endif %} | ||
{% for item in card.info %} | ||
<span>{{ item }}</span> | ||
{% endfor %} | ||
</div> | ||
<p>{{ card.content }}</p> | ||
</div> | ||
</a> | ||
{% endmacro %} | ||
{% import _self as macros %} | ||
|
||
{% set bottomlink = bottomlink|default(true) %} | ||
|
||
{# The intro fullwidth teaser #} | ||
{% include '@organisms/fullwidth-teaser/fullwidth-teaser-horizontal.twig' with { has_image_legend: true } %} | ||
|
||
{# First teasers #} | ||
<div class="container pb-5 offset-xl-top pt-5 pt-xl-0"> | ||
<div class="row"> | ||
<div class="col-lg-10 offset-lg-1"> | ||
<div class="row mb-4"> | ||
{% for card in homepage.section_one.cards %} | ||
<div class="col-md-6 d-flex"> | ||
{{ macros.card_link(card) }} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% if bottomlink %} | ||
<p class="text-center"> | ||
<a href="#">{{ homepage.section_one.readmore }}</a> | ||
</p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
title: Headlines | ||
name: headlines | ||
variants: | ||
- name: legend | ||
title: Headlines with image legend |