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

Rework page d'accueil #4679

Merged
merged 45 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c1c9f9f
feat: rework page d'accueil
Shamzic Oct 25, 2024
af53256
refactor: amélioration de la section "Comment ça marche?"
Shamzic Oct 29, 2024
28d179d
fix: test 2e2 home-page
Shamzic Oct 29, 2024
489465d
feat: divise la page Home en sections
Shamzic Dec 13, 2024
e341e50
feat: ajoute une section faq
Shamzic Dec 13, 2024
30487fb
refactor: home / hero-section
Shamzic Dec 13, 2024
f555fb1
refactor: home page
Shamzic Dec 13, 2024
8a5e3e2
refactor: déplace et refacto du bouton d'accès à la liste des aides
Shamzic Dec 13, 2024
56b94bb
refactor: hero-section
Shamzic Dec 13, 2024
4fe60cb
feat: ajoute les liens des partenaires
Shamzic Dec 13, 2024
aa9be83
fix: accessibilité - axe
Shamzic Dec 13, 2024
c3aa72b
fix: lint
Shamzic Dec 13, 2024
328392e
style: améliore le dégradé du titre de la hero-section
Shamzic Dec 13, 2024
2b7306b
style: supprime les bullet points des balises <li>
Shamzic Dec 13, 2024
e6ad79d
feat: ajoute la recherche par mot clef dans la liste des aides via un…
Shamzic Dec 13, 2024
265c269
refactor: et => et/ou
Shamzic Dec 18, 2024
fb02ca1
feat: cache certaines sections de la page d'accueil dans l'iframe
Shamzic Jan 1, 2025
f1012e4
refactor: label bouton d'accès à la liste des aides
Shamzic Jan 1, 2025
7455e81
refactor: label et contenu dans la section "service public"
Shamzic Jan 1, 2025
1c69ddb
refactor: suppr. sous-descriptif section "comment ça marche ?"
Shamzic Jan 1, 2025
f95eaf3
feat: ajoute du lazy loading sur les images de la section "partenaires"
Shamzic Jan 1, 2025
08c3790
refactor: optimisation images section partenaires - utilisation exten…
Shamzic Jan 2, 2025
13b422d
refactor: découpage logo jeunes.gouv.fr
Shamzic Jan 2, 2025
b0635cb
test suppression section partenaires
Shamzic Jan 2, 2025
5c66f09
test sans le gif de présentation
Shamzic Jan 2, 2025
dcf1c01
test sans le gif de présentation et sans la section partenaires
Shamzic Jan 2, 2025
48cd02a
chore: réactive les sections partenaires et showcase
Shamzic Jan 7, 2025
a6bb42f
feat: ajoute lien vers page confidentialité + ajout back-button (conf…
Shamzic Jan 7, 2025
3f14e7c
refactor: mise à jour liens (features-section.vue)
Shamzic Jan 7, 2025
f23292c
refactor: mise à jour liens (features-section.vue)
Shamzic Jan 7, 2025
138ce10
refactor: contenu (features-section.vue)
Shamzic Jan 7, 2025
97f1e0a
refactor: contenu (features-section.vue)
Shamzic Jan 7, 2025
d7678de
refactor: Ajoute les liens vers la CSS et l'aide Départ 18-25 (showca…
Shamzic Jan 7, 2025
2430c92
refactor: ordre des liens (showcase page d'accueil)
Shamzic Jan 7, 2025
788118c
refactor: accessibilité liens (showcase page d'accueil)
Shamzic Jan 7, 2025
bac20e2
refactor: réintroduit le terme "service public" (features-section.vue)
Shamzic Jan 7, 2025
c4c8671
refactor: retire le point d'accompagnement dans le section "Comment ç…
Shamzic Jan 8, 2025
734935d
refactor: met à jour la section des partenaires
Shamzic Jan 8, 2025
0e08c84
refactor: met à jour des logos section des partenaires
Shamzic Jan 8, 2025
1d680ea
refactor: renommage méthode (rebase avec main)
Shamzic Jan 13, 2025
7aee756
refactor: formations -> formation
Shamzic Jan 13, 2025
b882132
refactor: réordonner les logos des partenaires
Shamzic Jan 13, 2025
eda3c19
refactor: amélioration images JPEG (partenaires)
Shamzic Jan 13, 2025
851e850
chore: désactive les partenaires liés à des communes
Shamzic Jan 28, 2025
5f1a86b
refactor: désactive partenaire rdv service-public et ajoute un commen…
Shamzic Jan 28, 2025
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
4 changes: 1 addition & 3 deletions cypress/utils/navigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ const goHome = () => {
.invoke("attr", "content")
.should("match", /\d+ aides/i)

cy.get('[data-testid="home-hero-content"]')
.invoke("text")
.should("contain", "aides")
cy.get('[data-testid="home-page"]').invoke("text").should("contain", "aides")

cy.get('[data-testid="new-simulation"]').click()
}
Expand Down
Binary file added public/img/partners/bordeaux-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/bordeaux-metropole.webp
Binary file not shown.
Binary file added public/img/partners/cc-pays-chataigneraie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/cc-pays-chataigneraie.webp
Binary file not shown.
Binary file added public/img/partners/covoiturage.beta.gouv.fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/covoiturage.beta.gouv.fr.webp
Binary file not shown.
Binary file added public/img/partners/demarches-simplifiees.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/demarches-simplifiees.webp
Binary file not shown.
Binary file added public/img/partners/domifa.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/domifa.webp
Binary file not shown.
Binary file added public/img/partners/etudiant.gouv.fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/etudiant.gouv.fr.webp
Binary file not shown.
Binary file added public/img/partners/jeunes.gouv.fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/jeunes.gouv.fr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/jeunes.gouv.fr.webp
Binary file not shown.
Binary file added public/img/partners/mesaidesvelo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/mesaidesvelo.webp
Binary file not shown.
Binary file added public/img/partners/montpellier-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/montpellier-metropole.webp
Binary file not shown.
Binary file added public/img/partners/openfisca.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/openfisca.webp
Binary file not shown.
Binary file added public/img/partners/rdv-service-public.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/rdv-service-public.webp
Binary file not shown.
Binary file added public/img/partners/toulon-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/toulon-metropole.webp
Binary file not shown.
Binary file added public/img/partners/ville-aubervilliers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/ville-aubervilliers.webp
Binary file not shown.
Binary file added public/img/partners/ville-vannes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/partners/ville-vannes.webp
Binary file not shown.
63 changes: 63 additions & 0 deletions src/components/home/benefits-showcase-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<template>
<div class="fr-background-alt--grey fr-py-6w fr-mt-6w">
<div class="fr-container">
<h2 class="fr-h3 fr-mb-4w">
Ne passez à côté d'aucune aide financière
</h2>
<div class="fr-grid-row fr-grid-row--gutters">
<div class="fr-col-12 fr-col-md-6">
<img
src="https://betagouv.github.io/aides-jeunes-files/public/resultats_simulation.gif"
alt="Capture d'écran de la page de résultats"
class="fr-responsive-img fr-mb-2w"
/>
</div>
<div class="fr-col-12 fr-col-md-6">
<ul class="fr-list fr-list--no-bullet">
<li
v-for="(aide, index) in aides"
:key="`aide-${index}`"
class="fr-mb-2w"
>
<a
:href="aide.link"
target="_blank"
rel="noopener"
:title="`${aide.name} - Nouvelle fenêtre`"
class="fr-link fr-fi-arrow-right-line fr-link--icon-right"
>
{{ aide.name }}
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
const aides = [
{
name: "Départ 18-25",
link: "/aides/depart1825_montant_maximum",
},
{ name: "Pass Sport", link: "/aides/pass_sport" },
{
name: "Bourse sur critères sociaux",
link: "/aides/bourse_criteres_sociaux",
},
{ name: "Prime d'Activité", link: "/aides/ppa" },
{ name: "Revenu de solidarité active (RSA)", link: "/aides/rsa" },
{
name: "Complémentaire santé solidaire (CSS)",
link: "/aides/css_participation_forfaitaire",
},
{
name: "Allocations familiales",
link: "/aides?keyword=allocations+familiales",
},
{ name: "Aides covoiturage", link: "/aides?keyword=covoiturage" },
{ name: "Aides vélo", link: "/aides?keyword=vélo" },
]
</script>
51 changes: 51 additions & 0 deletions src/components/home/features-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<template>
<div class="fr-background-alt--grey fr-py-4w fr-mt-4w">
<div class="fr-container">
<div class="fr-grid-row fr-grid-row--gutters">
<div
v-for="(feature, index) in features"
:key="`feature-${index}`"
class="fr-col-12 fr-col-md-4"
>
<div class="fr-card fr-card--no-border">
<div class="fr-card__body">
<div class="fr-card__content">
<div class="fr-card__title">
<span
:class="['fr-icon-' + feature.icon, 'fr-icon--lg']"
aria-hidden="true"
></span>
{{ feature.title }}
</div>
<p class="fr-card__desc" v-html="feature.description"></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
const features = [
{
icon: "timer-line",
title: "Rapide et gratuit",
description:
"Obtenez une estimation de vos aides gratuitement en <b>moins de 5 minutes</b>.",
},
{
icon: "lock-line",
title: "Service public",
description:
"Vos données personnelles sont protégées et ne sont jamais utilisées à des fins commerciales, conformément à notre <a title='Confidentialité' href='/confidentialite'>politique de confidentialité</a>.",
},
{
icon: "team-line",
title: "Complet",
description:
"Les informations sur les aides sont mises à jour et vérifiées quotidiennement par <a title='Notre équipe - Nouvelle fenêtre' rel='noopener' target='_blank' href='https://beta.gouv.fr/startups/aides.jeunes.html#equipe'>notre équipe</a>.",
},
]
</script>
113 changes: 113 additions & 0 deletions src/components/home/hero-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<script setup lang="ts">
import { ref, computed } from "vue"
import { EventAction, EventCategory } from "@lib/enums/event.js"
import { useStore } from "@/stores/index.js"
import { useRoute, useRouter } from "vue-router"

const store = useStore()
const route = useRoute()
const router = useRouter()
const context = process.env.VITE_CONTEXT
const benefitsNumber = process.env.VITE_BENEFIT_COUNT

const hasExistingSituation = computed(() => store.passSanityCheck)

const aideDomains = ref([
"logement",
"santé",
"famille",
"transports",
"études",
"formation",
"travail",
"loisirs",
"vacances",
])

const eventActionResume = EventAction.ReprendreMaSimulation
const eventCategoryHome = EventCategory.Home

const ctaLabel = computed(() =>
hasExistingSituation.value
? "Commencer une nouvelle simulation"
: "Je commence ma simulation"
)

function newSituation() {
store.clear(route.query.external_id as string)
next()
}

function next() {
store.setOpenFiscaParameters()
if (context !== "production") {
store.verifyOpenfiscaBenefitVariables()
}
router.push({ name: "simulation" })
}
</script>

<template>
<div class="fr-container">
<div class="fr-grid-row fr-grid-row--gutters fr-grid-row--middle">
<div class="fr-col-12 fr-col-md-6 fr-mt-2w">
<h1 class="fr-h3 fr-mb-3w">
<span class="aj-hero-highlight d-block">
Évaluez vos droits à {{ benefitsNumber }} aides
</span>
<br class="fr-hidden fr-unhidden-sm" />
en quelques clics.
</h1>
<p class="fr-text--md fr-mb-3w">
Découvrez toutes les aides financières auxquelles vous avez droit en
matière de
<b
>{{ aideDomains.slice(0, -1).join(", ") }} et
{{ aideDomains[aideDomains.length - 1] }}</b
>.
</p>
<p class="fr-text--xs fr-mb-2w fr-text--disabled">
Avant de démarrer la simulation, pensez à vous munir de vos ressources
et/ou de celles de vos parents si vous êtes encore à leur charge.
</p>
<div class="fr-btns-group fr-btns-group--inline-md">
<button
v-if="hasExistingSituation"
v-analytics="{
action: eventActionResume,
category: eventCategoryHome,
}"
class="fr-btn"
@click="next"
>
Reprendre ma simulation
</button>
<button
v-analytics="{ action: ctaLabel, category: eventCategoryHome }"
class="fr-btn fr-btn--lg"
:class="hasExistingSituation ? 'fr-btn--secondary' : ''"
data-testid="new-simulation"
@click="newSituation"
>
{{ ctaLabel }}
</button>
</div>
<div>
<router-link
class="fr-text--sm fr-link fr-fi-arrow-right-line fr-link--icon-right"
to="/aides"
>
Accéder à la liste des aides
</router-link>
</div>
</div>
<div class="fr-col-12 fr-col-md-6 fr-hidden fr-unhidden-md fr-mt-2w">
<img
src="@/assets/images/home_illustration.png"
class="aj-hero-image"
alt="Illustration du simulateur d'aides"
/>
</div>
</div>
</div>
</template>
35 changes: 35 additions & 0 deletions src/components/home/how-it-works-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div class="fr-container fr-mt-8w">
<div class="fr-grid-row fr-grid-row--center">
<div class="fr-col-12">
<h2 class="fr-h3 fr-mb-4w">Comment ça marche ?</h2>
<div class="aj-home-steps">
<div
v-for="(step, index) in steps"
:key="`steps-${index}`"
class="aj-home-step"
>
<div class="aj-home-step__number">{{ index + 1 }}</div>
<div>
<h3 class="fr-text--lg">{{ step.title }}</h3>
</div>
</div>
</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
const steps = [
{
title: "Je commence une simulation",
},
{
title: "Je découvre mes aides",
},
{
title: "Je fais mes demandes",
},
]
</script>
117 changes: 117 additions & 0 deletions src/components/home/partners-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<template>
<div class="fr-container fr-my-8w">
<h2 class="fr-h3 fr-mb-4w fr-text--center">Nos partenaires</h2>
<span class="aj-partners">
<a
v-for="partner in partners"
:key="partner.id"
:href="partner.link"
target="_blank"
rel="noopener noreferrer"
class="aj-partner-link"
>
<picture>
<source
:srcset="getImagePath(partner.id, 'webp')"
type="image/webp"
/>
<source :srcset="getImagePath(partner.id, 'jpg')" type="image/jpeg" />
<img
:src="getImagePath(partner.id, 'jpg')"
:alt="partner.name"
class="aj-partner-logo"
loading="lazy"
width="200"
height="100"
/>
</picture>
</a>
</span>
</div>
</template>

<script setup lang="ts">
const getImagePath = (id: string, format: "webp" | "jpg") =>
`/img/partners/${id}.${format}`

interface Partner {
id: string
name: string
link: string
}

const partners: Partner[] = [
// In maintenance mode, some partners are not available anymore
// however, it is still possible to show them again later.
{
id: "openfisca",
name: "OpenFisca",
link: "https://openfisca.org/fr/",
},
{
id: "demarches-simplifiees",
name: "Démarches Simplifiées",
link: "https://demarches-simplifiees.fr/",
},
// {
// id: "rdv-service-public",
// name: "RDV Service Public",
// link: "https://rdv.anct.gouv.fr/",
// },
{
id: "domifa",
name: "Domifa",
link: "https://domifa.fabrique.social.gouv.fr/",
},
{
id: "mesaidesvelo",
name: "Mesaidesvelo.fr",
link: "https://mesaidesvelo.fr/",
},
// {
// id: "cc-pays-chataigneraie",
// name: "Communauté de communes du Pays de la Châtaigneraie",
// link: "https://www.paysdelachataigneraie.fr/",
// },
// {
// id: "bordeaux-metropole",
// name: "Bordeaux",
// link: "https://www.bordeaux-metropole.fr/",
// },
// {
// id: "montpellier-metropole",
// name: "Montpellier",
// link: "https://www.montpellier3m.fr/",
// },
// {
// id: "toulon-metropole",
// name: "Toulon",
// link: "https://metropoletpm.fr/",
// },
// {
// id: "ville-aubervilliers",
// name: "Aubervilliers",
// link: "https://www.aubervilliers.fr/",
// },
// {
// id: "ville-vannes",
// name: "Vannes",
// link: "https://www.mairie-vannes.fr/",
// },
{
id: "covoiturage.beta.gouv.fr",
name: "covoiturage.beta.gouv.fr",
link: "https://covoiturage.beta.gouv.fr/",
},
{
id: "jeunes.gouv.fr",
name: "jeunes.gouv.fr",
link: "https://jeunes.gouv.fr/",
},
{
id: "etudiant.gouv.fr",
name: "étudiants.gouv.fr",
link: "https://etudiants.gouv.fr/",
},
]
</script>
Loading
Loading