-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #583 from dnum-mi/develop
Develop
- Loading branch information
Showing
9 changed files
with
208 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
export type TitleTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' |
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
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
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,61 @@ | ||
import DsfrErrorPage from './DsfrErrorPage.vue' | ||
|
||
export default { | ||
component: DsfrErrorPage, | ||
title: 'Composants/DsfrErrorPage', | ||
argTypes: { | ||
title: { | ||
control: 'text', | ||
description: 'Conséquence de l\'erreur rencontrée.', | ||
}, | ||
subtitle: { | ||
control: 'text', | ||
description: 'Code d\'erreur HTTP à l\'origine de l\'erreur rencontrée.', | ||
}, | ||
description: { | ||
control: 'text', | ||
description: 'Description de l\'erreur et formule d\'excuses à l\'utilisateur.', | ||
}, | ||
help: { | ||
control: 'text', | ||
description: 'Accompagnement de l\'utilisateur qui se retrouve confronté à l\'erreur.', | ||
}, | ||
buttons: { | ||
control: 'object', | ||
description: 'Tableau d\'objets contenant les props des boutons d\'actions sur la page.', | ||
}, | ||
} | ||
} | ||
|
||
export const PageErreur404 = (args) => ({ | ||
components: { DsfrErrorPage }, | ||
data () { | ||
return args | ||
}, | ||
template: ` | ||
<DsfrErrorPage | ||
:title="title" | ||
:subtitle="subtitle" | ||
:description="description" | ||
:help="help" | ||
:buttons="buttons" | ||
/> | ||
`, | ||
|
||
}) | ||
|
||
PageErreur404.args = { | ||
title: "Page non trouvée, ne paniquez pas", | ||
subtitle: "Erreur 404 !", | ||
description: "La page que vous recherchez n'existe pas ou l'url est erronée.", | ||
help: "Bonne chance !", | ||
buttons: [{ | ||
label: 'Page d\'accueil', | ||
link: 'https://www.systeme-de-design.gouv.fr/', | ||
}, | ||
{ | ||
label: 'Contactez-nous', | ||
secondary: true, | ||
link: 'https://www.systeme-de-design.gouv.fr/', | ||
},], | ||
} |
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,81 @@ | ||
<script lang="ts" setup> | ||
import { type DsfrButtonProps } from '../DsfrButton/DsfrButton.vue' | ||
import DsfrButtonGroup from '../DsfrButton/DsfrButtonGroup.vue' | ||
withDefaults(defineProps<{ | ||
title?: string | ||
subtitle?: string | ||
description?: string | ||
help?: string | ||
buttons: DsfrButtonProps[] | ||
}>(), { | ||
title: 'Page non trouvée', | ||
subtitle: 'Erreur 404', | ||
description: 'La page que vous cherchez est introuvable. Excusez-nous pour la gêne occasionnée.', | ||
help: 'Si vous avez tapé l\'adresse web dans le navigateur, vérifiez qu\'elle est correcte. La page n\'est peut être plus disponible.', | ||
buttons: () => [], | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="fr-container flex"> | ||
<div class="half"> | ||
<h1 class="font-25">{{ title }}</h1> | ||
<span class="block mt-15 mb-15">{{ subtitle }}</span> | ||
<p class="font-125">{{ description }}</p> | ||
<p>{{ help }}</p> | ||
<DsfrButtonGroup | ||
v-if="buttons?.length" | ||
:buttons="buttons" | ||
inline-layout-when="always" | ||
/> | ||
</div> | ||
<div class="half self-center text-center"> | ||
<img | ||
class="error-img" | ||
src="../../assets/img/technical-error.png" | ||
> | ||
</div> | ||
</div> | ||
</template> | ||
<style scoped> | ||
.flex { | ||
display: flex; | ||
} | ||
.block { | ||
display: flex; | ||
} | ||
.half { | ||
max-width: 50%; | ||
width: 50%; | ||
} | ||
.self-center { | ||
align-self: center; | ||
} | ||
.text-center { | ||
text-align: center; | ||
} | ||
.mt-15 { | ||
margin-top: 1.5rem; | ||
} | ||
.mb-15 { | ||
margin-bottom: 1.5rem; | ||
} | ||
.font-125 { | ||
font-size: 1.25rem; | ||
} | ||
.font-25 { | ||
font-size: 2.5rem; | ||
} | ||
</style> |
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
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
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