2024-09-02 14:31:50 +02:00
|
|
|
|
<template>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
<button @click="toggleExpand()" class="btn btn--white | rounded-lg" aria-controls="menu" :aria-expanded="isExpanded">
|
|
|
|
|
|
<svg aria-labelledby="menu-toggle" class="icon" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
|
<title id="menu-toggle">{{ isExpanded ? 'Masquer le menu' : 'Afficher le menu' }}</title>
|
|
|
|
|
|
<path d="M10.6751 2.625L3.00007 10.3125C2.94028 10.3686 2.89263 10.4364 2.86005 10.5116C2.82748 10.5869 2.81067 10.668 2.81067 10.75C2.81067 10.832 2.82748 10.9131 2.86005 10.9884C2.89263 11.0636 2.94028 11.1314 3.00007 11.1875L10.6751 18.875M17.1876 2.625L9.50007 10.3125C9.38555 10.4293 9.32141 10.5864 9.32141 10.75C9.32141 10.9136 9.38555 11.0707 9.50007 11.1875L17.1876 18.875" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<div v-if="isExpanded" id="menu" class="flex | rounded-lg">
|
|
|
|
|
|
<header class="w-full | flex">
|
2024-09-04 19:12:29 +02:00
|
|
|
|
<p>Nom du service</p>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
</header>
|
|
|
|
|
|
<nav class="w-full | flow">
|
|
|
|
|
|
<ul class="flex">
|
|
|
|
|
|
<li data-icon="home" class="active">
|
2024-09-09 20:05:47 +02:00
|
|
|
|
<a href="/" aria-current="page">Home</a>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
</li>
|
|
|
|
|
|
<li data-icon="megaphone" data-count="4">
|
2024-09-09 20:05:47 +02:00
|
|
|
|
<a href="/notifications">Notifications</a>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
</li>
|
|
|
|
|
|
<li data-icon="calendar">
|
2024-09-09 20:05:47 +02:00
|
|
|
|
<a href="/reunions">Réunions</a>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
<span class="pill pill--secondary">Dans 2h</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li data-icon="inspiration">
|
2024-09-09 20:05:47 +02:00
|
|
|
|
<a href="/inspirations">Inspirations</a>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
<span class="pill pill--secondary">Nouveauté</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<details open>
|
|
|
|
|
|
<summary>Projets en cours</summary>
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href="#" class="new">Miss Dior Blooming Bouquet</a></li>
|
|
|
|
|
|
<li><a href="#">Dior J’adore</a></li>
|
|
|
|
|
|
<li><a href="#">Gris Dior</a></li>
|
|
|
|
|
|
<li><a href="#">Sauvage 60ml</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</details>
|
|
|
|
|
|
<details>
|
|
|
|
|
|
<summary>Projets archivés</summary>
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href="#">Titre projet archivé 1</a></li>
|
|
|
|
|
|
<li><a href="#">Titre projet archivé 2</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</details>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
<footer class="w-full">
|
|
|
|
|
|
<ul class="flex">
|
|
|
|
|
|
<li data-icon="user">
|
|
|
|
|
|
<a href="#">Profil</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li data-icon="logout">
|
|
|
|
|
|
<a href="#">Déconnexion</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
</div>
|
2024-09-02 14:31:50 +02:00
|
|
|
|
</template>
|
2024-09-02 21:18:25 +02:00
|
|
|
|
|
2024-09-03 18:38:09 +02:00
|
|
|
|
<style scoped>
|
2024-09-02 21:18:25 +02:00
|
|
|
|
|
2024-09-04 18:55:21 +02:00
|
|
|
|
button[aria-controls="menu"] {
|
2024-09-09 20:05:47 +02:00
|
|
|
|
position: fixed;
|
2024-09-04 18:55:21 +02:00
|
|
|
|
z-index: 10;
|
|
|
|
|
|
width: 2.5rem;
|
|
|
|
|
|
height: 2.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
button[aria-controls="menu"] svg {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
button[aria-controls="menu"][aria-expanded="true"] {
|
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
|
padding: 0.625rem; /* 10px */
|
|
|
|
|
|
left: var(--gutter);
|
|
|
|
|
|
transform: translateX(calc(var(--sidebar-width) - 100% - 1rem));
|
|
|
|
|
|
}
|
|
|
|
|
|
button[aria-controls="menu"][aria-expanded="false"] {
|
|
|
|
|
|
width: 3.75rem;
|
|
|
|
|
|
height: 3.75rem;
|
|
|
|
|
|
padding: 1.25rem;
|
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Menu */
|
|
|
|
|
|
|
|
|
|
|
|
#menu {
|
|
|
|
|
|
--flow-space: var(--space-32);
|
|
|
|
|
|
--direction: column;
|
|
|
|
|
|
--items: flex-start;
|
|
|
|
|
|
--wrap: no-wrap;
|
2024-09-09 20:05:47 +02:00
|
|
|
|
position: -webkit-sticky;
|
|
|
|
|
|
position: sticky;
|
|
|
|
|
|
top: var(--gutter);
|
2024-09-04 18:55:21 +02:00
|
|
|
|
width: var(--sidebar-width);
|
|
|
|
|
|
height: calc(100vh - var(--gutter) * 2);
|
|
|
|
|
|
height: calc(100dvh - var(--gutter) * 2);
|
|
|
|
|
|
padding: var(--gap);
|
|
|
|
|
|
background: var(--color-background);
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu [data-icon]::before {
|
|
|
|
|
|
background-color: var(--color-grey-700);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu header {
|
|
|
|
|
|
--justify: center;
|
|
|
|
|
|
padding-left: var(--gap);
|
|
|
|
|
|
min-height: var(--space-40);
|
|
|
|
|
|
font-family: var(--font-serif);
|
2024-09-04 19:12:29 +02:00
|
|
|
|
font-size: var(--text-md);
|
2024-09-04 18:55:21 +02:00
|
|
|
|
background: var(--color-background);
|
|
|
|
|
|
position: -webkit-sticky;
|
|
|
|
|
|
position: sticky;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
#menu header::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: -1rem;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
bottom: -2rem;
|
2024-09-04 19:12:29 +02:00
|
|
|
|
z-index: -1;
|
2024-09-04 18:55:21 +02:00
|
|
|
|
background: linear-gradient(to bottom, var(--color-background) 0%, var(--color-background) 75%, transparent 100%);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu nav {
|
|
|
|
|
|
--flow-space: var(--space-32);
|
|
|
|
|
|
flex: 1 1 0%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu ul {
|
|
|
|
|
|
--direction: column;
|
|
|
|
|
|
--items: flex-start;
|
|
|
|
|
|
--row-gap: var(--space-4);
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu li,
|
|
|
|
|
|
#menu summary {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
min-height: 2.5rem; /* 40px */
|
|
|
|
|
|
padding: 0 var(--space-16);
|
|
|
|
|
|
gap: var(--space-12);
|
|
|
|
|
|
border-radius: var(--rounded-md);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu li {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
min-height: 2.75rem; /* 44px */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu li[data-count]::after {
|
|
|
|
|
|
content: attr(data-count);
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
color: var(--color-primary);
|
|
|
|
|
|
font-size: var(--text-sm);
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu li .pill {
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu li a::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
inset: 0;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu .active,
|
|
|
|
|
|
#menu li:hover {
|
|
|
|
|
|
background-color: var(--color-grey-50);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#menu details {
|
|
|
|
|
|
font-family: var(--font-serif);
|
|
|
|
|
|
background-size: 1px 21px;
|
|
|
|
|
|
background-image: repeating-linear-gradient(0deg, var(--color-grey-50), var(--color-grey-50) 1px, transparent 1px, transparent);
|
|
|
|
|
|
background-repeat: repeat-x;
|
|
|
|
|
|
}
|
|
|
|
|
|
#menu details > summary {
|
|
|
|
|
|
font-family: var(--font-sans);
|
|
|
|
|
|
font-size: var(--text-sm);
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: var(--color-grey-700);
|
|
|
|
|
|
background-color: var(--color-background);
|
|
|
|
|
|
width: fit-content;
|
|
|
|
|
|
}
|
|
|
|
|
|
#menu details .new::after {
|
|
|
|
|
|
content: 'Nouvelles modifications';
|
|
|
|
|
|
color: transparent;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: .375rem; /* 6px */
|
|
|
|
|
|
height: .375rem; /* 6px */
|
|
|
|
|
|
border-radius: var(--rounded-full);
|
|
|
|
|
|
background-color: var(--color-primary-100);
|
|
|
|
|
|
margin-left: var(--space-8);
|
|
|
|
|
|
transform: translateY(-0.1em);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
2024-09-02 21:18:25 +02:00
|
|
|
|
</style>
|
|
|
|
|
|
|
2024-09-02 14:31:50 +02:00
|
|
|
|
<script setup>
|
2024-09-04 18:55:21 +02:00
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
const isExpanded = ref(true);
|
|
|
|
|
|
function toggleExpand() {
|
|
|
|
|
|
isExpanded.value = !isExpanded.value;
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|