Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eleventy dsfr update #8

Merged
merged 41 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0fc6d71
gh-1 migrate code.gouv.fr website
May 9, 2023
d02b09c
gh-1 add deployment to preproduction
Apr 13, 2023
e283384
resources cleanup
Jun 5, 2023
121b1c8
some styling
Jun 6, 2023
38fb84b
add breadcrumb
Jun 6, 2023
9008231
_includes/components/footer.njk: Fix a11y declaration
bzg Jun 7, 2023
8365dce
content/fr/legal/index.md: Delete phone number
bzg Jun 7, 2023
5f7448a
content/fr/legal/index.md: Minor fixes
bzg Jun 7, 2023
a1d0ab4
README.md: Fix links
bzg Jun 7, 2023
2a777cd
_includes/layouts/base.njk: Add tracking script
bzg Jun 7, 2023
10e807d
add missing links
Jun 6, 2023
376eb58
remove useless property
Jun 6, 2023
581b53b
code formatting
Jun 6, 2023
82bf551
fix repo url
Jun 6, 2023
8be3d27
refactor images
Jun 7, 2023
bfd24b5
update ateliers
Jun 8, 2023
1ee4be7
refactor navigation + add "communs" in menu
Jun 9, 2023
1f30243
merge card components
Jun 9, 2023
cd056d1
remove useless cookie tracker js files and update code
Jun 12, 2023
03224e3
add catala "atelier" video
Jun 12, 2023
068901d
add pagefind and search capability
Jun 12, 2023
13b6bd5
update CI for pagefind
Jun 12, 2023
1eb45e6
update README
Jun 13, 2023
cc54a99
remove useless and outdated comments
Jun 13, 2023
2970d90
add ospo post
Jun 14, 2023
2612eb2
add quote component
Jun 15, 2023
a695fa2
fix image sizes
Jun 15, 2023
ce5d313
update ospo post
Jun 15, 2023
8373409
remove Onyxia from FabLibre
bzg Jun 15, 2023
fad075d
fix quote component (typo)
Jun 15, 2023
9431940
fix image shortcode
Jun 15, 2023
53a5ab3
add quote markdown container
Jun 15, 2023
e90a26a
use quote markdown syntax
Jun 15, 2023
1deb410
definition-ospo.md: Small fix
bzg Jun 15, 2023
c24d7a1
add callout markdown container and update md files
Jun 15, 2023
b51c0b0
bluehats_22.md: Add newsletter
bzg Jun 15, 2023
13f61ee
add breaking space in ospo post
Jun 15, 2023
aa317cd
update gazette 22
Jun 15, 2023
9f171c1
try adding some spaces
bzg Jun 16, 2023
ab97887
fix previous commit
bzg Jun 16, 2023
d39508c
contribute to eleventy-dsfr from codegouv-website
Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 DINUM/Etalab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions LICENSES/LICENSE.MIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 DINUM/Etalab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions _data/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
footer_content_description: `Lorem [...] elit ut.`
}
17 changes: 11 additions & 6 deletions _data/i18n/en/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
module.exports = {
about: "About",
accessibility: "Accessibility",
back_to_top: "Back to Top",
blog: "Blog",
close: "Close",
copy: "Copy",
copied: "Copied!",
dark_theme: "Dark Theme",
display_params: "Display Parameters",
filter_by_tag: "Filter by Tag:",
filtered_by: "Filtered by",
first_page: "First page",
follow_us: "Follow Us",
footer_content_description: "Lorem [...] elit ut.",
follow_us_description: "Follow Us",
fully_compliant: "Fully compliant",
home: "Home",
lang_name: "English",
Expand All @@ -24,13 +28,14 @@ module.exports = {
pick_theme: "Pick a Theme.",
previous_page: "Previous page",
published_on: "Published on",
results: "results",
see_breadcrumb: "See Breadcrumb",
see_more: "See More",
select_lang: "Select Language",
service_id: "Intitulé <br>officiel",
service_name: "Nom de l’entité (ministère, secrétariat d‘état, gouvernement)",
site_description: "baseline - précisions sur l‘organisation",
share: "Share",
share_by_email: "Share by Email",
share_link_on: "Share link on",
sitemap: "Sitemap",
site_title: "Nom du site / service",
subscribe: "Subscribe",
subscribe_newsletter: "Subscribe",
system: "System",
Expand Down
21 changes: 13 additions & 8 deletions _data/i18n/fr/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
module.exports = {
about: "À propos",
accessibility: "Accessibilité",
back_to_top: "Haut de page",
blog: "Blog",
close: "Fermer",
copy: "Copier dans le presse-papier",
copied: "Copié !",
dark_theme: "Thème sombre",
display_params: "Paramètres d\'affichage",
display_params: "Paramètres d'affichage",
filter_by_tag: "Filtrer par catégorie :",
filtered_by: "Filtré par",
first_page: "Première page",
follow_us: "Suivez-nous <br> sur les réseaux sociaux",
footer_content_description: "Lorem [...] elit ut.",
follow_us_description: "Suivez-nous <br> sur nos réseaux",
fully_compliant: "Totalement conforme",
home: "Accueil",
lang_name: "Français",
Expand All @@ -24,14 +28,15 @@ module.exports = {
pick_theme: "Choisissez un thème pour personnaliser l’apparence du site.",
previous_page: "Page précédente",
published_on: "Publié le",
results: "résultats",
see_breadcrumb: "Voir le fil d’Ariane",
see_more: "En savoir plus",
select_lang: "Sélectionner une langue",
service_id: "Intitulé <br>officiel",
service_name: "Nom de l’entité (ministère, secrétariat d‘état, gouvernement)",
site_description: "baseline - précisions sur l‘organisation",
share: "Partager",
share_by_email: "Partager par email",
share_link_on: "Partage d'un lien sur",
sitemap: "Plan du site",
site_title: "Nom du site / service",
subscribe: "S\'abonner",
subscribe: "S'abonner",
subscribe_newsletter: "Abonnez-vous à notre lettre d’information",
system: "Système",
tags: "Catégories",
Expand Down
45 changes: 26 additions & 19 deletions _data/metadata.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
module.exports = {
"title": "TITRE DU SITE",
"url": "https://url_du_site.gouv.fr/",
"newsletter": {
"url": "",
"title": "",
"description": ""
},
"facebook_url": "",
"twitter_url": "",
"instagram_url": "",
"linkedin_url": "",
"youtube_url": "",
"language": "fr",
"description": "DESCRIPTION DU SITE",
"author": {
"name": "NOM DU SERVICE",
"email": "contact@nom_du_service.gouv.fr",
"url": "https://url_du_service.gouv.fr/"
}
title: "Nom du site / service",
url: "https://url_du_site.gouv.fr/",
newsletter: [
{
url: "",
title: "",
description: ""
}
],
facebook_url: "",
mastodon_url: "",
twitter_url: "",
instagram_url: "",
linkedin_url: "",
youtube_url: "",
peertube_url: "",
github_url: "",
sourcehut_url: "",
language: "fr",
description: "baseline - précisions sur l‘organisation",
author: {
name: "Nom du service",
email: "contact@nom_du_service.gouv.fr",
url: "https://url_du_service.gouv.fr/"
},
service: "Nom de l’entité (ministère, secrétariat d‘état, gouvernement)"
}
25 changes: 12 additions & 13 deletions _includes/components/accordionsgroup.njk
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{# Mandatory variable `accordionItems { title: string, content: string }[]` to make it work #}
<div class="fr-accordions-group">
{% for accordionItem in accordionItems %}
<section class="fr-accordion">
<h3 class="fr-accordion__title">
<button class="fr-accordion__btn" aria-expanded="false"
aria-controls="accordion-{{ loop.index }}">{{ accordionItem.title }}
</button>
</h3>
<div class="fr-collapse" id="accordion-{{ loop.index }}">
{{ accordionItem.content | safe }}
</div>
</section>
{% endfor %}
{% for accordionItem in accordionItems %}
<section class="fr-accordion">
<h3 class="fr-accordion__title">
<button class="fr-accordion__btn" aria-expanded="false" aria-controls="accordion-{{ loop.index }}">
{{ accordionItem.title }}
</button>
</h3>
<div class="fr-collapse" id="accordion-{{ loop.index }}">
{{ accordionItem.content | safe }}
</div>
</section>
{% endfor %}
</div>
3 changes: 3 additions & 0 deletions _includes/components/back_to_top.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a class="fr-grid-row fr-grid-row--right fr-link fr-icon-arrow-up-fill fr-link--icon-left" href="#top">
{{ "back_to_top" | i18n }}
</a>
27 changes: 13 additions & 14 deletions _includes/components/breadcrumb.njk
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{# Works with eleventyNavigation or mandatory variable `segments: { url: string, title: string }[]` to make it work #}
{% if eleventyNavigation %}
{% set segments = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key) %}
{% set segments = collections.all | filterCollectionLang | eleventyNavigationBreadcrumb(eleventyNavigation.key) %}
{% endif %}
<nav role="navigation" class="fr-breadcrumb" aria-label="{{ "you_are_here" | i18n }}:">
<button class="fr-breadcrumb__button" aria-expanded="false"
aria-controls="breadcrumb-1">{{ "see_breadcrumb" | i18n }}
</button>
<div class="fr-collapse" id="breadcrumb-1">
<ol class="fr-breadcrumb__list">
<li><a class="fr-breadcrumb__link" href="{{ "/" | locale_url }}">{{ "home" | i18n }}</a></li>
{% for segment in segments %}
<li><a class="fr-breadcrumb__link" href="{{ segment.url | locale_url }}">{{ segment.title }}</a></li>
{% endfor %}
<li><a class="fr-breadcrumb__link" aria-current="page">{{ title }}</a></li>
</ol>
</div>
<button class="fr-breadcrumb__button" aria-expanded="false" aria-controls="breadcrumb-1">
{{ "see_breadcrumb" | i18n }}
</button>
<div class="fr-collapse" id="breadcrumb-1">
<ol class="fr-breadcrumb__list">
<li><a class="fr-breadcrumb__link" href="{{ "/" | locale_url }}">{{ "home" | i18n }}</a></li>
{% for segment in segments %}
<li><a class="fr-breadcrumb__link" href="{{ segment.url | locale_url }}">{{ segment.title }}</a></li>
{% endfor %}
<li><a class="fr-breadcrumb__link" aria-current="page">{{ title }}</a></li>
</ol>
</div>
</nav>
11 changes: 11 additions & 0 deletions _includes/components/callout.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="fr-callout">
<h3 class="fr-callout__title">{{ callout.title }}</h3>
<p class="fr-callout__text">
{{ callout.description | safe }}
</p>
{% if callout.link %}
<a class="fr-btn" href="{{ callout.link.url }}">
{{ callout.link.title }}
</a>
{% endif %}
</div>
22 changes: 0 additions & 22 deletions _includes/components/card-horizontal.njk

This file was deleted.

67 changes: 49 additions & 18 deletions _includes/components/card.njk
Original file line number Diff line number Diff line change
@@ -1,22 +1,53 @@
{# Mandatory variable `card { url: string, title: string, description: string, tags: string[], date: string, imagePath: string, imageAlt: string }` to make it work #}
<div class="fr-card fr-enlarge-link">
<div class="fr-card__body">
<div class="fr-card__content">
<h3 class="fr-card__title"><a href="{{ card.url | locale_url }}">{{ card.title }}</a></h3>
<p class="fr-card__desc">{{ card.description }}</p>
<div class="fr-card__start">
{% set tags = card.tags %}
{% include "components/taggroup-disabled.njk" %}
<p class="fr-card__detail fr-icon-time-fill">
<time class="postlist-date"
datetime="{{ card.date | htmlDateString }}">{{ card.date | readableDate("LLLL yyyy") }}</time>
</p>
</div>
</div>
<div class="fr-card{% if not card.externalUrl %} fr-enlarge-link{% endif %}{% if card.orientation == 'horizontal' %} fr-card--horizontal-tier{% endif %}">
<div class="fr-card__body">
<div class="fr-card__content">
{% set cardUrl = card.url | locale_url or card.externalUrl %}
<h3 class="fr-card__title">
{% if not card.externalUrl %}
<a href="{{ cardUrl }}">
{{ card.title }}
</a>
{% else %}{{ card.title }}
{% endif %}
</h3>
<p class="fr-card__desc">{{ card.description | safe }}</p>
<div class="fr-card__start">
{% if card.tags %}
{% set tags = card.tags %}
{% include "components/taggroup-disabled.njk" %}
{% endif %}
{% if card.date %}
<p class="fr-card__detail fr-icon-time-fill">
<time class="postlist-date" datetime="{{ card.date | htmlDateString }}">
{{ card.date | readableDate }}
</time>
</p>
{% endif %}
</div>
</div>
<div class="fr-card__footer">
{% if card.externalUrl %}
<ul class="fr-links-group">
<li>
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" href="{{ card.externalUrl }}"
title="{{ card.title }} - {{ "new_window" | i18n }}" target="_blank">
{{ card.urlDescription or "see_more" | i18n }}
</a>
</li>
</ul>
{% endif %}
</div>
</div>
<div class="fr-card__header">
{% if card.badges %}
<ul class="fr-badges-group">
{% for badge in card.badges %}
<li><p class="fr-badge fr-badge--green-emeraude">{{ badge }}</p></li>
{% endfor %}
</ul>
{% endif %}
{% if card.imagePath %}
<div class="fr-card__header">
<div class="fr-card__img">{% image card.imagePath, card.imageAlt %}</div>
</div>
<div class="fr-card__img">{% image card.imagePath, card.imageAlt %}</div>
{% endif %}
</div>
</div>
Loading