actuel-inactuel/assets/css/src/nav.css

208 lines
3.8 KiB
CSS
Raw Normal View History

2024-12-01 12:16:27 +01:00
button.open-nav {
display: inline-block;
}
2024-11-26 10:19:13 +01:00
#nav-overlay {
position: fixed;
inset: 0;
background-color: #000;
opacity: 0.7;
z-index: 2;
cursor: w-resize;
}
#nav-overlay:not(.nav-overlay--visible) {
2024-04-15 13:43:57 +02:00
display: none;
}
2024-11-26 10:19:13 +01:00
.panel {
2024-11-26 09:53:05 +01:00
display: none;
position: fixed;
2024-11-26 09:53:05 +01:00
overflow: auto;
2024-09-05 07:14:53 +02:00
width: 100vw;
2024-04-09 12:35:24 +02:00
height: 100dvh;
top: 0;
background-color: #000;
outline: 1px solid #fff;
transition: all 0.5s var(--curve-sine);
2024-11-26 09:53:05 +01:00
z-index: 3;
box-sizing: border-box;
2024-04-10 14:55:34 +02:00
flex-direction: column;
}
2024-11-26 09:53:05 +01:00
.panel.panel--visible {
display: flex;
2024-04-15 13:43:57 +02:00
}
2024-11-26 09:53:05 +01:00
.panel header {
position: sticky;
top: 0;
z-index: 1;
background-color: #000;
padding: var(--unit--vertical) var(--unit--horizontal);
padding-bottom: 0;
2024-04-10 14:55:34 +02:00
}
2024-11-26 09:53:05 +01:00
.sort-btns {
box-sizing: border-box;
2024-04-10 14:55:34 +02:00
}
2024-11-26 09:53:05 +01:00
.sort-btns button {
all: unset;
cursor: pointer;
display: inline-block;
margin-right: 2vw;
2024-04-10 14:55:34 +02:00
}
2024-11-26 09:53:05 +01:00
.sort-btns button:hover {
text-decoration: underline;
text-underline-offset: 4px;
}
.sort-btns button.active {
text-decoration: underline;
text-underline-offset: 4px;
}
2024-04-09 17:10:43 +02:00
.search {
2024-04-10 14:55:34 +02:00
position: relative;
width: 100%;
2024-11-26 09:53:05 +01:00
margin-top: var(--unit--vertical);
2024-04-09 18:37:45 +02:00
background-color: #000;
z-index: 1;
top: 0;
2024-04-15 13:43:57 +02:00
box-sizing: border-box;
2024-04-09 17:10:43 +02:00
}
.search__input {
2024-04-09 18:58:31 +02:00
all: unset;
2024-04-09 17:10:43 +02:00
width: 100%;
background-color: transparent;
2024-04-11 10:12:36 +02:00
padding: calc(var(--unit--vertical) / 4) 0;
2024-04-09 17:10:43 +02:00
border: none;
border-bottom: 1px solid #fff;
color: #fff;
font-size: var(--font-size-m);
font-weight: var(--font-weight-light);
}
2024-04-09 18:40:54 +02:00
.search__input::placeholder {
2024-04-10 14:55:34 +02:00
font-size: var(--font-size-sm);
2024-04-09 18:40:54 +02:00
letter-spacing: 1px;
}
2024-04-09 17:10:43 +02:00
.search__icon {
2024-04-09 18:58:31 +02:00
all: unset;
2024-04-09 17:10:43 +02:00
position: absolute;
2024-04-09 18:58:31 +02:00
width: 1.2rem;
height: 1.2rem;
padding: 0.5rem;
2024-11-26 09:53:05 +01:00
right: 0;
transform: translateX(0.5rem) translateY(0.2rem);
2024-04-09 18:58:31 +02:00
}
button.search__icon {
cursor: pointer;
2024-04-09 17:10:43 +02:00
}
2024-11-26 09:53:05 +01:00
.panel__collection {
2024-04-10 14:55:34 +02:00
scroll-behavior: smooth;
height: 100%;
overflow: auto;
2024-11-26 09:53:05 +01:00
padding: var(--unit--vertical) var(--unit--horizontal);
}
.panel-close {
2024-11-26 09:53:05 +01:00
position: fixed;
box-sizing: border-box;
bottom: 0;
2024-04-09 10:44:12 +02:00
justify-content: center;
2024-11-26 09:53:05 +01:00
width: 100%;
outline: none;
2024-04-09 10:44:12 +02:00
border-top: 1px solid #fff;
font-size: var(--font-size-m);
background-color: #000;
2024-04-15 13:43:57 +02:00
padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal);
2024-04-09 10:44:12 +02:00
margin-bottom: env(safe-area-inset-bottom);
}
2024-04-09 10:44:12 +02:00
/* ================= LISTS ================= */
2024-04-09 08:38:29 +02:00
2024-04-09 10:44:12 +02:00
.panel__toggle-btn {
2024-04-09 08:38:29 +02:00
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: var(--unit--vertical);
}
2024-04-09 10:44:12 +02:00
.panel__toggle-icon {
2024-04-09 08:38:29 +02:00
color: var(--color-secondary);
font-size: var(--font-size-xl);
}
2024-04-09 10:44:12 +02:00
/* ================= YEARS ================= */
.panel-item-content__edito {
2024-04-09 08:38:29 +02:00
margin-bottom: calc(var(--unit--vertical) / 2);
}
2025-02-03 12:05:07 +01:00
.panel-item-content__edito p:not(:last-child) {
margin-bottom: var(--unit--vertical);
}
2024-11-26 10:19:13 +01:00
button.see-more {
margin-bottom: var(--unit--vertical);
}
.panel-item-content__texts:not(.panel__collection .panel-item-content__texts) {
2024-11-26 09:53:05 +01:00
padding: var(--unit--vertical) var(--unit--horizontal);
2024-04-09 08:38:29 +02:00
}
/* ================= TEXT ITEM ================= */
2025-02-03 13:32:17 +01:00
.panel .text:first-child,
.panel .text:last-child {
margin-bottom: calc(var(--unit--vertical) * 2);
}
2025-02-03 15:15:13 +01:00
.panel__collection--years .text:first-child .text__title {
2025-02-03 13:32:17 +01:00
display: inline-block;
padding-left: var(--unit--horizontal);
}
2025-02-06 13:03:33 +01:00
.panel .text__title h5 {
2025-02-06 13:06:01 +01:00
margin-top: calc(var(--unit--vertical) / 4);
margin-bottom: calc(var(--unit--vertical) / 2);
2025-02-06 13:03:33 +01:00
}
2025-02-03 15:15:13 +01:00
.panel__collection--years .text:first-child .text__infos {
2025-02-03 13:32:17 +01:00
padding-left: var(--unit--horizontal);
}
2025-02-03 15:15:13 +01:00
.panel__collection--years .text:first-child .text__infos::before {
2025-02-03 13:32:17 +01:00
content: "";
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 1px;
background-color: #fff;
}
2024-04-15 13:43:57 +02:00
@media screen and (min-width: 640px) {
2024-11-26 10:19:13 +01:00
nav.panel {
width: 40rem;
2024-04-15 13:43:57 +02:00
}
2024-10-25 18:24:19 +02:00
2024-04-15 13:43:57 +02:00
.panel {
z-index: 4;
width: var(--padding-body);
}
.panel-close {
display: none;
}
.panel--right {
right: auto;
left: calc(-100vw - 1px);
}
.panel--right.open {
left: 0;
}
}