feat(faq): breadcrumb

This commit is contained in:
Colin Darie 2024-03-12 17:18:18 +01:00
parent 7a5cb7dbd2
commit d855c94fbf
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
6 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,13 @@
%nav.fr-breadcrumb{ role: "navigation", 'aria-label': t('you_are_here', scope: [:layouts, :breadcrumb]) }
%button.fr-breadcrumb__button{ 'aria-expanded' => "false", 'aria-controls' => "breadcrumb-1" }
= t('show', scope: [:layouts, :breadcrumb])
.fr-collapse#breadcrumb-1
%ol.fr-breadcrumb__list
%li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link'
%li
%a.fr-breadcrumb__link{ **(defined?(faq_title) ? { href: faq_index_path } : { "aria-current": "page" }) }= t('faq', scope: [:layouts, :breadcrumb])
- if defined?(faq_title)
%li
%a.fr-breadcrumb__link{ 'aria-current' => "page" }= faq_title

View file

@ -1,6 +1,7 @@
- content_for(:title, t('.meta_title'))
.fr-container.fr-my-4w
= render partial: "breadcrumb"
.fr-grid-row
.fr-col-12.fr-col-md-10
%h1= t('.title', app_name: Current.application_name)

View file

@ -1,9 +1,12 @@
- content_for(:title, @metadata[:title])
.fr-container.fr-my-4w
.fr-grid-row
.fr-col-12.fr-col-md-4
= render partial: "sidebar", locals: { faqs: @siblings, current: @metadata }
.fr-col-12.fr-col-md-8.fr-py-12v
.fr-col-12.fr-col-md-8
= render partial: "breadcrumb", locals: { faq_title: "#{t(:short_name, scope: [:faq, :categories, @metadata[:category]])} : #{@metadata[:title]}" }
.markdown-content
= @renderer.render(@content).html_safe

View file

@ -6,12 +6,15 @@ fr:
sidebar_button: Dans cette Foire Aux Questions
categories:
usager:
short_name: Usager
name: Usager (dépôt dun dossier)
description: Aide pour les usagers sur la soumission et le suivi des dossiers, incluant la résolution des problèmes courants.
instructeur:
short_name: Instructeur
name: Instructeur (traitement des dossiers)
description: À destination des instructeurs sur laccès et la gestion des dossiers.
administrateur:
short_name: Administrateur
name: Administrateur (création dun formulaire)
description: Informations pour les administrateurs sur la configuration de la plateforme ou la création de démarches.
subcategories:

View file

@ -16,3 +16,4 @@ en:
more_info_on_test: "For more information on test stage"
go_to_FAQ: "read FAQ"
url_FAQ: "https://faq.demarches-simplifiees.fr/category/49-comment-tester-ma-demarche"
faq: Frequently Asked Questions

View file

@ -16,3 +16,4 @@ fr:
more_info_on_test: "Pour plus dinformation sur la phase de test"
go_to_FAQ: "consulter la FAQ"
url_FAQ: "https://faq.demarches-simplifiees.fr/category/49-comment-tester-ma-demarche"
faq: Foire aux Questions