Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
580 commits
Select commit Hold shift + click to select a range
686b30c
Edited with TinaCMS
hrenaud Jun 5, 2025
b76ab99
Edited with TinaCMS
hrenaud Jun 5, 2025
c67770b
Edited with TinaCMS
hrenaud Jun 5, 2025
935d5bd
Edited with TinaCMS
hrenaud Jun 6, 2025
7ef6a4f
Edited with TinaCMS
hrenaud Jun 6, 2025
c8c987a
Edited with TinaCMS
hrenaud Jun 6, 2025
7166c7f
Edited with TinaCMS
hrenaud Jun 6, 2025
d285cf6
Edited with TinaCMS
hrenaud Jun 6, 2025
cc8e85a
Edited with TinaCMS
hrenaud Jun 6, 2025
094289c
Edited with TinaCMS
hrenaud Jun 6, 2025
6147a5a
Edited with TinaCMS
hrenaud Jun 6, 2025
79ffb84
Edited with TinaCMS
hrenaud Jun 6, 2025
18ca295
Edited with TinaCMS
hrenaud Jun 6, 2025
7319b98
Edited with TinaCMS
hrenaud Jun 6, 2025
362ab95
Edited with TinaCMS
hrenaud Jun 6, 2025
5e9f661
Edited with TinaCMS
hrenaud Jun 6, 2025
39ebfa4
Edited with TinaCMS
hrenaud Jun 6, 2025
1c41895
Edited with TinaCMS
hrenaud Jun 6, 2025
95b5721
Edited with TinaCMS
hrenaud Jun 6, 2025
69457bb
Edited with TinaCMS
hrenaud Jun 6, 2025
4520acc
Edited with TinaCMS
hrenaud Jun 6, 2025
db6845b
Edited with TinaCMS
hrenaud Jun 6, 2025
dac7f4b
Edited with TinaCMS
hrenaud Jun 9, 2025
7c8ce46
Edited with TinaCMS
hrenaud Jun 9, 2025
7090bce
Edited with TinaCMS
hrenaud Jun 9, 2025
757f89c
Edited with TinaCMS
hrenaud Jun 9, 2025
cb8b4f3
Edited with TinaCMS
hrenaud Jun 9, 2025
1d7bb43
Edited with TinaCMS
hrenaud Jun 9, 2025
afbacb1
Edited with TinaCMS
hrenaud Jun 9, 2025
254e454
Edited with TinaCMS
hrenaud Jun 9, 2025
9d3e102
Edited with TinaCMS
hrenaud Jun 9, 2025
8d4755c
Edited with TinaCMS
hrenaud Jun 9, 2025
093ea2f
Edited with TinaCMS
hrenaud Jun 9, 2025
6cd116b
Edited with TinaCMS
hrenaud Jun 9, 2025
1c66ca1
Edited with TinaCMS
hrenaud Jun 9, 2025
e1474fd
Edited with TinaCMS
hrenaud Jun 9, 2025
2cd10fd
Edited with TinaCMS
hrenaud Jun 9, 2025
fdc9cfc
Edited with TinaCMS
hrenaud Jun 9, 2025
bffeda8
Edited with TinaCMS
hrenaud Jun 9, 2025
ac4918d
Edited with TinaCMS
hrenaud Jun 9, 2025
1cfc8bb
Edited with TinaCMS
hrenaud Jun 9, 2025
5b5f82a
Edited with TinaCMS
hrenaud Jun 9, 2025
5a68220
Edited with TinaCMS
hrenaud Jun 9, 2025
61dc5dc
Edited with TinaCMS
hrenaud Jun 9, 2025
d12aed6
Edited with TinaCMS
hrenaud Jun 9, 2025
36ac561
Edited with TinaCMS
hrenaud Jun 9, 2025
b2f7748
Edited with TinaCMS
hrenaud Jun 9, 2025
3ffd686
Edited with TinaCMS
hrenaud Jun 9, 2025
07cb22b
Edited with TinaCMS
hrenaud Jun 9, 2025
a999e2a
Edited with TinaCMS
hrenaud Jun 9, 2025
9da997f
Edited with TinaCMS
hrenaud Jun 9, 2025
e430e50
Edited with TinaCMS
hrenaud Jun 9, 2025
eac3307
Edited with TinaCMS
hrenaud Jun 9, 2025
341c929
Edited with TinaCMS
hrenaud Jun 9, 2025
3cd53cc
Edited with TinaCMS
hrenaud Jun 9, 2025
e503e1c
Edited with TinaCMS
hrenaud Jun 9, 2025
5395378
Edited with TinaCMS
hrenaud Jun 9, 2025
35f3a6e
Edited with TinaCMS
hrenaud Jun 9, 2025
8fbb272
Edited with TinaCMS
hrenaud Jun 9, 2025
1abd09d
Edited with TinaCMS
hrenaud Jun 9, 2025
2a4604a
Edited with TinaCMS
hrenaud Jun 9, 2025
d6b9d22
Edited with TinaCMS
hrenaud Jun 9, 2025
d8ca317
Edited with TinaCMS
hrenaud Jun 9, 2025
32f6ec1
Edited with TinaCMS
hrenaud Jun 9, 2025
f712dd8
Edited with TinaCMS
hrenaud Jun 9, 2025
0911ba8
Edited with TinaCMS
hrenaud Jun 9, 2025
4c81fa6
Edited with TinaCMS
hrenaud Jun 9, 2025
5383ff5
Edited with TinaCMS
hrenaud Jun 9, 2025
7717060
Edited with TinaCMS
hrenaud Jun 9, 2025
57051c6
Edited with TinaCMS
hrenaud Jun 9, 2025
9e7190b
Edited with TinaCMS
hrenaud Jun 9, 2025
9355d76
Edited with TinaCMS
hrenaud Jun 9, 2025
d1873ce
fix: enable scope/périmètre for RWP
hrenaud Jun 14, 2025
e710add
feat: add Github workflow
hrenaud Jun 14, 2025
5ab96e1
doc: update Readme (FR/EN/ES)
hrenaud Jun 14, 2025
029e4e8
Edited with TinaCMS
hrenaud Jun 15, 2025
123ebec
Edited with TinaCMS
hrenaud Jun 15, 2025
1805d9d
Edited with TinaCMS
hrenaud Jun 15, 2025
1c0fe89
Edited with TinaCMS
hrenaud Jun 15, 2025
0b61979
Edited with TinaCMS
hrenaud Jun 15, 2025
b211264
Edited with TinaCMS
hrenaud Jun 15, 2025
ba20df8
Edited with TinaCMS
hrenaud Jun 15, 2025
70bb845
Edited with TinaCMS
hrenaud Jun 15, 2025
9cc41ce
Edited with TinaCMS
hrenaud Jun 15, 2025
97278b3
Edited with TinaCMS
hrenaud Jun 15, 2025
b04a5ca
Edited with TinaCMS
hrenaud Jun 15, 2025
8b52f41
Edited with TinaCMS
hrenaud Jun 15, 2025
0047d2f
Edited with TinaCMS
hrenaud Jun 15, 2025
7e7f5e8
Edited with TinaCMS
hrenaud Jun 15, 2025
52bf2bb
Edited with TinaCMS
hrenaud Jun 15, 2025
ce32266
Edited with TinaCMS
hrenaud Jun 15, 2025
c51f61e
Edited with TinaCMS
hrenaud Jun 15, 2025
5f81598
Edited with TinaCMS
hrenaud Jun 15, 2025
d6c0894
Edited with TinaCMS
hrenaud Jun 15, 2025
03adad1
Edited with TinaCMS
hrenaud Jun 15, 2025
f0c8a29
Edited with TinaCMS
hrenaud Jun 15, 2025
031d9d1
Edited with TinaCMS
hrenaud Jun 16, 2025
935a953
Edited with TinaCMS
hrenaud Jun 16, 2025
b676b06
Edited with TinaCMS
hrenaud Jun 16, 2025
3bf0392
Edited with TinaCMS
hrenaud Jun 16, 2025
376d2c7
Edited with TinaCMS
hrenaud Jun 16, 2025
53ecbc3
Edited with TinaCMS
hrenaud Jun 16, 2025
26357b8
Edited with TinaCMS
hrenaud Jun 16, 2025
557731f
Edited with TinaCMS
hrenaud Jun 16, 2025
0f0307a
Edited with TinaCMS
hrenaud Jun 16, 2025
c1779ec
Edited with TinaCMS
hrenaud Jun 16, 2025
e3c08a0
Edited with TinaCMS
hrenaud Jun 16, 2025
50d2ced
Edited with TinaCMS
hrenaud Jun 16, 2025
48b5e75
Edited with TinaCMS
hrenaud Jun 16, 2025
4af9747
Edited with TinaCMS
hrenaud Jun 16, 2025
7a3a5ff
Edited with TinaCMS
hrenaud Jun 16, 2025
c283954
Edited with TinaCMS
hrenaud Jun 16, 2025
875574b
Edited with TinaCMS
hrenaud Jun 16, 2025
389fd2f
Edited with TinaCMS
hrenaud Jun 16, 2025
f3d6d3a
Edited with TinaCMS
hrenaud Jun 16, 2025
9641568
Edited with TinaCMS
hrenaud Jun 16, 2025
163783c
Edited with TinaCMS
hrenaud Jun 16, 2025
afe4bce
Edited with TinaCMS
hrenaud Jun 16, 2025
ff904e7
Edited with TinaCMS
hrenaud Jun 16, 2025
76b1486
fix: footer copyright
hrenaud Jun 18, 2025
2e37f4e
fix: better lifecycle steps
hrenaud Jun 18, 2025
c4d4d64
fix: text size
hrenaud Jun 18, 2025
5d7805c
fix: mise à jour de la version de l'action de cache dans le workflow …
hrenaud Jun 19, 2025
a19e292
Merge branch 'main' into feat/cms
hrenaud Jun 19, 2025
9278d96
feat: ajout de l'action pnpm pour la configuration de la version 10 d…
hrenaud Jun 19, 2025
109eb3d
fix: suppression de la configuration de la version 10 de pnpm dans le…
hrenaud Jun 19, 2025
2362bbd
Merge branch 'main' into feat/cms
hrenaud Jun 19, 2025
b62193b
feat(layout): ajoute les auteurs dans les métadonnées
hrenaud Jun 20, 2025
56cb871
chore: ajoute des règles pour les messages de commit selon Convention…
hrenaud Jun 20, 2025
9ea2792
chore: suppression des règles de commit selon Conventional Commits
hrenaud Jun 25, 2025
99ad53a
feat(admin): ajout d'un fichier .htaccess pour redirection conditionn…
hrenaud Jun 25, 2025
b30d5bd
fix(admin): correction de la condition de redirection dans le fichier…
hrenaud Jun 25, 2025
fd6fcef
Merge branch 'main' into feat/cms
hrenaud Jun 25, 2025
1fa94f7
fix(footer): mise à jour du lien vers le site de l'association Green IT
hrenaud Jun 25, 2025
36ee200
Edited with TinaCMS
hrenaud Jun 27, 2025
59a7b5c
Edited with TinaCMS
hrenaud Jun 27, 2025
ff7bbc9
Edited with TinaCMS
hrenaud Jun 27, 2025
9ba3911
Edited with TinaCMS
hrenaud Jun 27, 2025
57b4ac1
Edited with TinaCMS
hrenaud Jun 27, 2025
1551e1c
Edited with TinaCMS
hrenaud Jun 27, 2025
1ae3130
Edited with TinaCMS
hrenaud Jun 27, 2025
2d5d2f0
Edited with TinaCMS
hrenaud Jun 27, 2025
55bfc99
Edited with TinaCMS
hrenaud Jun 27, 2025
848b59c
Edited with TinaCMS
hrenaud Jun 27, 2025
620232c
Edited with TinaCMS
hrenaud Jun 27, 2025
2431c6c
Edited with TinaCMS
hrenaud Jun 27, 2025
dd548bb
Edited with TinaCMS
hrenaud Jun 27, 2025
f025c51
Edited with TinaCMS
hrenaud Jun 27, 2025
f9b102a
Edited with TinaCMS
hrenaud Jun 27, 2025
5d4cdec
Edited with TinaCMS
hrenaud Jun 27, 2025
a9036f9
Merge github.com:cnumr/best-practices into feat/cms
hrenaud Jul 5, 2025
86fb3b3
doc: add dev documentation
hrenaud Jul 5, 2025
fd2fc8b
fix: lecture d'une variable d'environnement inacessible
hrenaud Jul 5, 2025
dafa4b1
feat: ajout d'un lien vers les personas dans le composant MetaCard et…
hrenaud Jul 5, 2025
b53016c
doc: ajout de la variable d'environnement NEXT_PUBLIC_REPO_URL dans l…
hrenaud Jul 5, 2025
f9a549b
doc: ajout de la variable d'environnement NEXT_PUBLIC_REPO_URL dans l…
hrenaud Jul 5, 2025
8ae6fed
feat: mise à jour de la configuration pour gérer `REF_HOME` le site r…
hrenaud Jul 5, 2025
416215f
feat: mise à jour du composant Footer pour afficher le nom du site en…
hrenaud Jul 5, 2025
8554438
feat: dynamisation de la navigation géré par la configuration central…
hrenaud Jul 5, 2025
2139f5e
fix: correction de la traduction pour "Site web fièrement réalisé par…
hrenaud Jul 5, 2025
84ab5f6
chore: suppression du fichier de configuration GitHub Actions pour la…
hrenaud Jul 5, 2025
c01860f
chore: ajout d'un fichier .gitignore pour ignorer les fichiers fiches_*
hrenaud Jul 5, 2025
f6ebb08
fix: suppression de l'affichage de l'URL du dépôt et de l'état de la …
hrenaud Jul 5, 2025
762019f
Mise à jour des ids en FR et EN - Création des fichiers ES (#564)
rlemaire Jul 5, 2025
e21e7a4
choer: supprimer le fichier package-lock.json pour nettoyer les dépen…
hrenaud Jul 5, 2025
db1ef56
feat: ajout de nouvelles dépendances pour la documentation Swagger da…
hrenaud Jul 5, 2025
13d965c
refactor: réorganisation des imports dans le fichier de configuration…
hrenaud Jul 5, 2025
4736c4b
feat: ajout de nouvelles fonctionnalités API pour la gestion des fich…
hrenaud Jul 5, 2025
7014652
fix: amélioration de la validation des versions en excluant les IDs m…
hrenaud Jul 5, 2025
4789081
fix: revert
hrenaud Jul 5, 2025
61c5592
feat: ajout de la correspondance RGESN dans les composants FicheCard,…
hrenaud Jul 6, 2025
145bb3e
fix: ajout d'un script pour gérer l'affichage du menu dans le composa…
hrenaud Aug 13, 2025
b3adcd1
Merge branches 'feat/cms' and 'main' of github.com:cnumr/best-practic…
hrenaud Aug 13, 2025
f48df19
fix: suppression d'un bloc de code commenté dans le composant Header
hrenaud Aug 13, 2025
f7c4a42
fix: ajout de la gestion du menu dans le composant Header avec un eff…
hrenaud Aug 19, 2025
34de007
refactor: amélioration de la structure et de la lisibilité du composa…
hrenaud Aug 19, 2025
f18d8aa
style: ajout de styles pour les listes dans le fichier globals.css, i…
hrenaud Aug 19, 2025
76aa049
style: amélioration de la lisibilité et de la structure des fichiers …
hrenaud Aug 19, 2025
0e048a2
Merge branch 'main' into feat/cms
hrenaud Aug 19, 2025
54cbe51
Merge branches 'feat/cms' and 'main' of github.com:cnumr/best-practic…
hrenaud Aug 19, 2025
8898643
style: ajout d'un conteneur <div> pour le rendu de TinaMarkdown dans …
hrenaud Aug 19, 2025
6cee8f3
fix(footer): correction du lien vers les mentions légales pour inclur…
hrenaud Aug 19, 2025
657a9f9
Merge branch 'main' of github.com:cnumr/best-practices into feat/cms
hrenaud Aug 19, 2025
660d0b1
style: amélioration de la lisibilité des mentions légales en réorgani…
hrenaud Aug 19, 2025
835ee9b
Merge branch 'main' of github.com:cnumr/best-practices into feat/cms
hrenaud Aug 19, 2025
fdcfc3a
style: ajustement de l'espacement dans le composant InputSearch pour …
hrenaud Aug 19, 2025
690175b
fix(header): suppression d'un script JavaScript pour la gestion du me…
hrenaud Aug 19, 2025
d02f375
Merge branch 'main' of github.com:cnumr/best-practices into feat/cms
hrenaud Aug 19, 2025
3e9077d
Edited with TinaCMS
hrenaud Aug 21, 2025
66ff14c
Edited with TinaCMS
hrenaud Aug 21, 2025
ca070eb
Edited with TinaCMS
hrenaud Aug 21, 2025
0e3d6e5
Edited with TinaCMS
hrenaud Aug 21, 2025
6e01ee7
Edited with TinaCMS
hrenaud Aug 21, 2025
e93d48a
Edited with TinaCMS
hrenaud Aug 21, 2025
a6788a0
feat(Card): ajout d'un affichage conditionnel pour le champ RGESN dan…
hrenaud Aug 22, 2025
1d08938
Merge branch 'feat/cms' of github.com:cnumr/best-practices into feat/cms
hrenaud Aug 22, 2025
89e19f2
style: mise à jour des styles des listes dans globals.css pour amélio…
hrenaud Aug 22, 2025
229e884
Edited with TinaCMS
hrenaud Sep 5, 2025
91cbef5
Edited with TinaCMS
hrenaud Sep 5, 2025
2021904
Edited with TinaCMS
hrenaud Sep 5, 2025
a81b875
Edited with TinaCMS
hrenaud Sep 5, 2025
2ddc88a
Edited with TinaCMS
hrenaud Sep 5, 2025
9c212a2
Edited with TinaCMS
hrenaud Sep 5, 2025
3052b8d
Edited with TinaCMS
hrenaud Sep 5, 2025
5d6fdb3
Edited with TinaCMS
hrenaud Sep 5, 2025
e8478bc
Edited with TinaCMS
hrenaud Sep 8, 2025
bf4e954
Edited with TinaCMS
hrenaud Sep 8, 2025
ba0042a
Edited with TinaCMS
hrenaud Sep 8, 2025
246e18a
Edited with TinaCMS
hrenaud Sep 9, 2025
e8aa636
Edited with TinaCMS
hrenaud Sep 9, 2025
58df808
Edited with TinaCMS
hrenaud Sep 9, 2025
58c4b3b
Correction des ids suite au décalage en v5 de "Eviter d'utiliser des …
rlemaire Sep 20, 2025
7a0d547
Alignement des ids refs et noms de fichiers sur les ids v5. (#589)
rlemaire Sep 20, 2025
7ada601
Amélioration de la gestion des scopes dans les composants FicheCard e…
hrenaud Sep 21, 2025
e1452c6
Ajout de la gestion des filtres pour les tiers dans les composants Fi…
hrenaud Sep 21, 2025
0f3354e
Ajout d'une vérification dans la fonction slugify pour gérer les vale…
hrenaud Sep 21, 2025
ee3e0b5
Ajout de la propriété 'tiers' dans plusieurs fichiers MDX pour spécif…
hrenaud Sep 21, 2025
286b623
Edited with TinaCMS
hrenaud Sep 22, 2025
c8d851c
Edited with TinaCMS
hrenaud Sep 22, 2025
b9e52b6
Edited with TinaCMS
hrenaud Sep 22, 2025
9dad36d
Edited with TinaCMS
hrenaud Sep 22, 2025
f792ac2
Edited with TinaCMS
hrenaud Sep 22, 2025
9612762
Edited with TinaCMS
hrenaud Sep 22, 2025
d102cc0
Edited with TinaCMS
hrenaud Sep 22, 2025
8814359
Edited with TinaCMS
hrenaud Sep 22, 2025
c252765
Edited with TinaCMS
hrenaud Sep 22, 2025
2768e8b
Edited with TinaCMS
hrenaud Sep 22, 2025
c79adcf
Edited with TinaCMS
hrenaud Sep 22, 2025
2faeed2
Ajout de la gestion des fonctionnalités 'lifecycle', 'saved_resources…
hrenaud Sep 26, 2025
841e481
Merge branch 'feat/cms' of github.com:cnumr/best-practices into feat/cms
hrenaud Sep 26, 2025
c93f774
Correction des attributs SVG dans le composant FicheCard : remplaceme…
hrenaud Sep 26, 2025
919846e
Edited with TinaCMS
hrenaud Oct 3, 2025
f856cc9
Edited with TinaCMS
hrenaud Oct 3, 2025
13979b7
Edited with TinaCMS
hrenaud Oct 3, 2025
3018079
Edited with TinaCMS
hrenaud Oct 3, 2025
181ad1e
Edited with TinaCMS
hrenaud Oct 3, 2025
66750be
Edited with TinaCMS
hrenaud Oct 3, 2025
52d635a
Edited with TinaCMS
hrenaud Oct 3, 2025
0210903
Edited with TinaCMS
hrenaud Oct 3, 2025
f2af328
Edited with TinaCMS
hrenaud Oct 3, 2025
a1fdb74
Edited with TinaCMS
hrenaud Oct 3, 2025
d433c37
Edited with TinaCMS
hrenaud Oct 3, 2025
bdf92fb
Suppression du fichier package-lock.json.
hrenaud Oct 4, 2025
2b7626c
Ajout d'un tri numérique dans la fonction de tri des valeurs dans Fic…
hrenaud Oct 4, 2025
f2a2c5b
Update package.json scripts and add mongodb as a dependency to fix er…
hrenaud Oct 9, 2025
eead798
feat: mise à jour des locales pour la configuration i18n en limitant …
hrenaud Oct 10, 2025
11b1fd3
feat: ajout de la configuration Remark pour la validation des fichier…
hrenaud Oct 10, 2025
80b13ae
Remove home.md file, which contained initial setup information and li…
hrenaud Oct 10, 2025
2fa8617
feat: ajout de 'refID' comme clé de recherche dans le composant Input…
hrenaud Oct 10, 2025
f0683c8
feat: ajout d'un fichier de configuration des options de publication
hrenaud Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "next/core-web-vitals",
"extends": ["next/core-web-vitals", "plugin:mdx/recommended"],
"settings": {
"mdx/code-blocks": true,
},
"rules": {
"react-hooks/rules-of-hooks": "warn",
},
Expand Down
10 changes: 10 additions & 0 deletions .md.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["next/core-web-vitals", "plugin:mdx/recommended"],
"settings": {
"mdx/code-blocks": true,
},
"rules": {
"react-hooks/rules-of-hooks": "warn",
"react/jsx-no-undef": "warn",
},
}
27 changes: 27 additions & 0 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import remarkFrontmatter from 'remark-frontmatter';
import remarkLintFrontmatterSchema from 'remark-lint-frontmatter-schema';

const remarkConfig = {
plugins: [
remarkFrontmatter,
[
remarkLintFrontmatterSchema,
{
schemas: {
'./content/fiche.schema.yaml': ['./src/content/fiches/**/*.{md,mdx}'],
'./content/lexique.schema.yaml': [
'./src/content/lexique/**/*.{md,mdx}',
],
'./content/personas.schema.yaml': [
'./src/content/personas/**/*.{md,mdx}',
],
'./content/home.schema.yaml': ['./src/content/home/**/*.{md,mdx}'],
'./content/default.schema.yaml': [
'./src/content/mentionsLegales/**/*.{md,mdx}',
],
},
},
],
],
};
export default remarkConfig;
37 changes: 30 additions & 7 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,43 @@

/**** LIST ****/
.content ul,
.markdown-content ul {
.markdown-content ul,
.content ol,
.markdown-content ol {
@apply list-none break-words;
-webkit-hyphens: auto;
hyphens: auto;
}
.content ul,
.content ol,
.markdown-content ul,
.markdown-content ol {
@apply ml-8;
}
/* ONLY FOR THE FIRST UL */
.content > ul,
.markdown-content > ul {
@apply ml-0;
}
.content > ol,
.markdown-content > ol {
@apply ml-10;
}
.content li,
.markdown-content li {
@apply mb-2 list-none before:relative before:top-[0.4rem] before:float-left before:mr-2 before:inline-block before:h-3.5 before:w-3.5 before:rounded-full before:rounded-tr-3xl before:bg-primary before:content-[''];
ul {
@apply ml-8;
li {
@apply mb-2 list-none before:relative before:top-[0.4rem] before:float-left before:mr-2 before:inline-block before:h-3.5 before:w-3.5 before:rounded-full before:rounded-tr-3xl before:border-2 before:border-primary before:bg-transparent before:content-[''];
}
}
}
.content li li,
.markdown-content li li {
@apply before:border-2 before:border-primary before:bg-transparent;
}
.content ol,
.markdown-content ol {
@apply list-decimal break-words;
}
.content ol li,
.markdown-content ol li {
@apply list-decimal before:-left-10 before:-mr-5;
}
main .noliststyle li {
@apply ml-0 list-none;
Expand Down
176 changes: 157 additions & 19 deletions components/pages/fiche/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,142 @@ export const FicheCard: FunctionComponent<FicheCardProps> = ({
return fiche[`${meta}`]?.replace(regexp, ' ') || 'TBD';
}

const getScope = () => {
if (getRefConfig().featuresEnabled.scope === true) {
return { 'data-scope': slugify(fiche.scope || '') };
const getDataFilters = () => {
let filters = {};
if (getRefConfig().featuresEnabled.lifecycle) {
filters = {
...filters,
'data-lifecycle': slugify(fiche.lifecycle),
};
}
if (getRefConfig().featuresEnabled.scope) {
filters = {
...filters,
'data-scope': fiche.scope.map((scope) => slugify(scope)).join(', '),
};
}
if (getRefConfig().featuresEnabled.tiers) {
filters = {
...filters,
'data-tiers': slugify(fiche.tiers),
};
}
if (getRefConfig().featuresEnabled.lifecycle) {
filters = {
...filters,
'data-saved_resources': fiche.saved_resources
.map((saved_resources) => slugify(saved_resources))
.join(', '),
};
}
if (getRefConfig().featuresEnabled.moe) {
filters = {
...filters,
'data-moe': fiche.moe,
};
}
if (getRefConfig().featuresEnabled.priority_implementation) {
filters = {
...filters,
'data-priority_implementation': fiche.priority_implementation,
};
}
if (getRefConfig().featuresEnabled.environmental_impact) {
filters = {
...filters,
'data-environmental_impact': fiche.environmental_impact,
};
}
return filters;
};
const getMetas = () => {
const metas: string[] = [];
if (
getRefConfig().featuresEnabled.priority_implementation === MESURE_ON_5
) {
metas.push(
t("Priorité d'implémentation") + ': ' + fiche[`priority_implementation`]
);
}
if (
getRefConfig().featuresEnabled.priority_implementation === MESURE_ON_3
) {
metas.push(
t("Priorité d'implémentation") +
': ' +
t(fiche[`priority_implementation`])
);
}
if (getRefConfig().featuresEnabled.environmental_impact === MESURE_ON_5) {
metas.push(
t('Impact environnemental') + ': ' + fiche[`environmental_impact`]
);
}
if (getRefConfig().featuresEnabled.environmental_impact === MESURE_ON_3) {
metas.push(
t('Impact environnemental') +
': ' +
t(cleanImpact('environmental_impact'))
);
}
if (getRefConfig().featuresEnabled.lifecycle) {
metas.push(t('lifecycle') + ': ' + t(fiche.lifecycle));
}
if (getRefConfig().featuresEnabled.tiers) {
metas.push(t('tiers') + ': ' + t(fiche.tiers));
}
if (getRefConfig().featuresEnabled.rgesnField) {
metas.push(t('Correspondance RGESN') + ': ' + fiche.rgesn || `-`);
}
if (getRefConfig().featuresEnabled.moe) {
metas.push(t('moe') + ': ' + fiche.moe);
}
if (getRefConfig().featuresEnabled.saved_resources) {
metas.push(
t('saved_resources') +
': ' +
fiche.saved_resources
.map((saved_resources) => t(saved_resources))
.join(`, `)
);
}
if (getRefConfig().featuresEnabled.scope) {
metas.push(
t('scope') + ': ' + fiche.scope.map((scope) => t(scope)).join(`, `)
);
}
return metas.join(`\n`);
};
return (
<div
className="mb-0 mt-0 flex h-full flex-col justify-between gap-8 text-lg font-bold text-neutral"
data-lifecycle={slugify(fiche.lifecycle)}
{...getScope()}
data-saved_resources={slugify(fiche.saved_resources.join(' '))}>
{...getDataFilters()}>
<h2 className="m-0 flex flex-col items-start gap-2 text-lg font-bold text-neutral md:col-span-1 md:row-span-2 lg:flex-row">
<span className="badge mr-2 whitespace-nowrap border-primary bg-primary">
<span className="badge mr-2 flex-none whitespace-nowrap border-primary bg-primary">
{REF_NAME}
{fiche.refID}
</span>
<span>{fiche.title}</span>
<span className="flex-auto">{fiche.title}</span>
<button
role="img"
title={getMetas()}
className="size-6 flex-none text-primary">
<svg
stroke="currentColor"
fill="none"
strokeWidth="2"
viewBox="0 0 24 24"
aria-hidden="true"
height="200px"
width="200px"
xmlns="http://www.w3.org/2000/svg"
className="size-6">
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</button>
</h2>
<div className="flex w-full flex-col gap-2">
<div className="flex flex-row items-center justify-start gap-2">
Expand Down Expand Up @@ -114,7 +233,7 @@ export const FicheCard: FunctionComponent<FicheCardProps> = ({
fiche[`environmental_impact`]
)}`}
className="text-base">
{`${t('Impact environnemental')} : ${
{`${t('Impact environnemental')}: ${
fiche[`environmental_impact`]
}`}
</span>
Expand All @@ -124,21 +243,40 @@ export const FicheCard: FunctionComponent<FicheCardProps> = ({
<span
title={t('lifecycle')}
className="badge border-primary text-xs text-neutral">
{t('lifecycle')}:{' '}
{isStringInUi(lang, fiche.lifecycle) && t(fiche.lifecycle)}
</span>
{getRefConfig().featuresEnabled.scope === true && (
<span
title={t('scope')}
className="badge border-primary text-xs text-neutral">
{isStringInUi(lang, fiche.scope) && t(fiche.scope)}
</span>
<>
{fiche.scope.map((scope) => (
<span
title={t('scope')}
className="badge border-primary text-xs text-neutral"
key={scope}>
{t('scope')}: {isStringInUi(lang, scope) && t(scope)}
</span>
))}
</>
)}
{getRefConfig().featuresEnabled.tiers === true && (
<>
<span
title={t('tiers')}
className="badge border-primary text-xs text-neutral"
key={fiche.tiers}>
{t('tiers')}:{' '}
{isStringInUi(lang, fiche.tiers) && t(fiche.tiers)}
</span>
</>
)}
</div>
<div className="flex flex-row items-center justify-start gap-2 text-base text-primary">
<span className="">
{t('Correspondance RGESN')}: {fiche.rgesn || `-`}
</span>
</div>
{getRefConfig().featuresEnabled.rgesnField === true && (
<div className="flex flex-row items-center justify-start gap-2 text-base text-primary">
<span className="">
{t('Correspondance RGESN')}: {fiche.rgesn || `-`}
</span>
</div>
)}
</div>
</div>
);
Expand Down
Loading