Skip to content

Commit

Permalink
Ajuste aux évolutions côté AJ
Browse files Browse the repository at this point in the history
  • Loading branch information
guillett committed May 9, 2024
1 parent a65666a commit 2d6c7fb
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 314 deletions.
File renamed without changes
File renamed without changes
133 changes: 20 additions & 113 deletions src/components/1j1s/navigation-1j1s.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
class="fr-nav__item"
:class="{ 'fr-nav__item--right': element?.alignRight }"
>
<a
<router-link
:aria-current="element.active || null"
v-if="!element.children"
:to="element.link"
class="fr-nav__link"
:href="`${domain}${element.link}`"
:aria-current="element.active || null"
:title="element.active ? 'Onglet actif' : null"
>{{ element.label }}</a
>
{{ element.label }}
</router-link>
<button
v-if="element.children"
:aria-current="element.active || null"
Expand Down Expand Up @@ -54,12 +54,13 @@
:data-submenu="!category.link"
>
<h2 class="fr-mega-menu__category">
<a
<router-link
v-if="category.link"
:to="subelement.link"
class="fr-nav__link"
:href="`${domain}${category.link}`"
>{{ category.label }}</a
>
{{ subcategory.label }}
</router-link>
<span v-else class="fr-nav__link">{{ category.label }}</span>
</h2>
<p v-if="category.legend" class="fr-p-2w">{{
Expand All @@ -69,12 +70,11 @@
<li
v-for="subcategory in category.children"
:key="subcategory.label"
><a
:href="`${domain}${subcategory.link}`"
class="fr-nav__link"
>{{ subcategory.label }}</a
></li
>
<router-link :to="subelement.link" class="fr-nav__link">
{{ subcategory.label }}
</router-link>
</li>
</ul>
</div>
</div>
Expand All @@ -92,13 +92,9 @@
:key="subelement.label"
class="fr-nav__item"
>
<a
class="fr-nav__link"
:href="`${domain}${subelement.link}`"
:aria-current="subelement.active || null"
:title="subelement.active ? 'Sous-onglet actif' : null"
>{{ subelement.label }}</a
>
<router-link :to="subelement.link" class="fr-nav__link">
{{ subelement.label }}
</router-link>
</li>
</ul>
</div>
Expand All @@ -117,102 +113,13 @@ function escapeKeyHandler(event) {
event.target.previousSibling.setAttribute("aria-expanded", false)
}
}
const domain = "https://www.1jeune1solution.gouv.fr"
const navigation = [
{ label: "Accueil", link: "/" },
{
label: "Offres",
children: [
{ label: "Emplois", link: "/emplois" },
{ label: "Stages", link: "/stages" },
{ label: "Contrats d’alternance", link: "/apprentissage" },
{ label: "Jobs étudiants", link: "/jobs-etudiants" },
{ label: "Expérience en Europe", link: "/europe" },
],
},
{
label: "Formations et orientation",
children: [
{ label: "Formations initiales", link: "/formations-initiales" },
{
label: "Formations en apprentissage",
link: "/formations/apprentissage",
},
{ label: "Découvrir les métiers", link: "/decouvrir-les-metiers" },
{ label: "Participer à des évènements", link: "/evenements" },
{
label: "Découvrir et trouver sa voie avec l’apprentissage",
link: "/choisir-apprentissage",
},
],
},
{
label: "Engagement",
children: [
{ label: "Bénévolat", link: "/benevolat" },
{ label: "Service civique", link: "/service-civique" },
],
},
{
label: "Logement",
children: [
{ label: "Annonces", link: "/logements/annonces" },
{
label: "Aides financières au logement",
link: "/logements/aides-logement",
},
{ label: "Découvrir tous nos conseils", link: "/logements/conseils" },
],
},
{
label: "Accompagnement",
children: [
{ label: "Contrat Engagement Jeune", link: "/contrat-engagement-jeune" },
{ label: "Échanger avec un mentor", link: "/mentorat" },
{
label: "Trouver une structure d'accompagnement",
link: "/accompagnement",
},
{
label: "Entreprendre : financements, aides et accompagnements",
link: "/entreprendre",
},
],
},
{
label: "Aides et outils",
active: true,
children: [
{ label: "Mes aides financières", link: "/mes-aides", active: true },
{ label: "Je crée son CV personnalisé", link: "/creer-mon-cv" },
],
},
{
label: "Je suis employeur",
alignRight: true,
label: "Menu",
children: [
{
label: "Rejoindre la mobilisation",
link: "/les-entreprises-s-engagent",
legend: "Découvrez des services faits pour vous !",
},
{
children: [
{ label: "Je recrute", link: "/je-recrute" },
{ label: "Je deviens mentor", link: "/je-deviens-mentor" },
{ label: "Je propose des immersions", link: "/immersions" },
{
label: "Je forme les jeunes grâce à l'emploi",
link: "/je-recrute-afpr-poei",
},
],
label: "Recruter et agir pour les jeunes",
},
{
label: "Découvrir les mesures employeurs",
link: "/mesures-employeurs",
},
{ label: "Accéder à mon espace", link: "/mon-espace" },
{ label: "Obtenir de l'aide", link: "/liens-utiles" },
{ label: "Qui sommes nous ?", link: "/a-propos" },
{ label: "Comment nous aider ?", link: "/ameliorer" },
],
},
]
Expand Down
2 changes: 1 addition & 1 deletion src/context/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import mesAidesOrgContext from "./mes-aides.org"
const contexts = {
[baseContext.name]: baseContext,
[mesAidesContext.name]: mesAidesContext,
[mesAidesOrgContext.name]: mesAidesOrgContext
[mesAidesOrgContext.name]: mesAidesOrgContext,
}

const context = contexts[process.env.VITE_CONTEXT_NAME]
Expand Down
178 changes: 73 additions & 105 deletions src/context/mes-aides.org/base-layout.vue
Original file line number Diff line number Diff line change
@@ -1,117 +1,85 @@
<template>
<header class="navbar" role="navigation">
<div class="container navbar__container">
<div class="navbar__container">
<router-link id="logo" to="/" class="navbar__home">
<img
class="navbar__logo"
src="@/../public/mes-aides.org/img/logo.svg"
alt="Logo de Mes-Aides.org"
/>
</router-link>
<div class="fr-skiplinks">
<nav
ref="skipLinks"
class="fr-container"
role="navigation"
aria-label="Accès rapide"
>
<ul class="fr-skiplinks__list">
<li>
<router-link
class="fr-link"
:to="{ hash: '#main' }"
aria-current="none"
>Contenu</router-link
>
</li>
<li>
<router-link
class="fr-link"
:to="{ hash: '#navigation' }"
aria-current="none"
>Menu</router-link
>
</li>
</ul>
</nav>
</div>
<div class="aj-page--full-height">
<header role="banner" class="fr-header">
<div class="fr-header__body">
<div class="fr-container">
<div class="fr-header__body-row">
<router-link id="logo" to="/" class="navbar__home">
<img
class="navbar__logo"
src="@/assets/images/mes-aides.org/logo.svg"
alt="Logo de Mes-Aides.org"
/>
</router-link>
<Navigation />
</div>
</div>
</div>
<nav>
<ul class="nav__links">
<li class="nav__item">
<router-link to="/liens-utiles">Obtenir de l'aide</router-link>
</li>
<li class="nav__item">
<router-link to="/a-propos">Qui sommes nous&nbsp;?</router-link>
</li>
<li class="nav__item"
><router-link to="/ameliorer">
Comment nous aider&nbsp;?
</router-link></li
<div
id="modal-499"
class="fr-header__menu fr-modal"
aria-labelledby="button-500"
>
<div class="fr-container">
<button
class="fr-btn--close fr-btn"
aria-controls="modal-499"
title="Fermer"
>
</ul>
</nav>
</div>
</header>

<div class="aj-website">
<div class="aj-website-content">
Fermer
</button>
<div class="fr-header__menu-links"> </div>
</div>
</div>
</header>
<main
id="main"
ref="main"
role="main"
class="fr-container fr-container--fluid aj-main-container"
tabindex="-1"
>
<slot />
</div>
</main>
</div>
</template>

<script>
<script lang="ts">
import Navigation from "@/components/1j1s/navigation-1j1s.vue"
import layoutRouteMixin from "@/mixins/layout-route-mixin.js"
export default {
name: "BaseLayout",
components: {},
created() {
this.$router.isReady().then(() => {
if (this.$route.query.debug === "parcours") {
this.$store.dispatch("setDebug", true)
}
})
mixins: [layoutRouteMixin],
components: {
Navigation,
},
}
</script>

<style scoped lang="scss">
.navbar__logo {
height: 80%;
margin-left: 1em;
}
.logo.partenaire {
max-height: 30px;
}
.logo.mesaides {
position: relative;
top: 5px;
left: 2px;
}
.logo.incubateur {
display: flex;
}
.navbar__container {
flex-wrap: nowrap;
-ms-flex-direction: row;
flex-direction: row;
}
#logo:hover,
#logo:focus {
opacity: 1;
background-color: unset;
}
footer {
display: flex;
flex-direction: row;
margin: 1em;
justify-content: space-between;
> div {
display: flex;
flex-direction: column;
padding: 1em 0em;
}
}
@media (max-width: 760px) {
nav {
display: none;
}
}
@media (max-width: 950px) {
.large_screen_text {
display: none;
}
}
@media (min-width: 761px) {
.navbar__container {
padding: 1em 0em;
}
footer {
display: none;
}
}
</style>
Loading

0 comments on commit 2d6c7fb

Please sign in to comment.