refactor : merge light-mode into script.js, rename panel to side-panel, fix print styles
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s

Integrate light-mode.js into script.js, unify .panel/.side-panel classes
into .side-panel, scope theme variables to @media screen for proper
print light mode, and add page-break after chapo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-28 10:59:10 +01:00
parent a2e65635fb
commit a352c48eaa
8 changed files with 62 additions and 71 deletions

View file

@ -664,11 +664,10 @@ button.toggle.right::before {
display: none;
}
.panel {
.side-panel {
display: none;
position: fixed;
overflow: auto;
width: 100vw;
height: 100dvh;
top: 0;
background-color: var(--color-background);
@ -679,11 +678,11 @@ button.toggle.right::before {
flex-direction: column;
}
.panel.panel--visible {
.side-panel.side-panel--visible {
display: flex;
}
.panel header {
.side-panel header {
position: sticky;
top: 0;
z-index: 1;
@ -773,7 +772,7 @@ button.search__icon {
cursor: pointer;
}
.panel__collection {
.side-panel__collection {
scroll-behavior: smooth;
height: 100%;
overflow: auto;
@ -784,7 +783,7 @@ footer {
width: 100%;
}
.panel-close {
.side-panel-close {
position: fixed;
box-sizing: border-box;
bottom: 0;
@ -801,28 +800,28 @@ footer {
}
/* ================= LISTS ================= */
.panel__toggle-btn {
.side-panel__toggle-btn {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: var(--unit--vertical);
}
.panel__toggle-icon {
.side-panel__toggle-icon {
color: var(--color-secondary);
font-size: var(--font-size-xl);
}
/* ================= YEARS ================= */
.panel__collection .panel__item:last-child {
.side-panel__collection .side-panel__item:last-child {
margin-bottom: 6rem;
}
.panel-item-content__edito {
.side-panel-item-content__edito {
margin-bottom: calc(var(--unit--vertical) / 2);
}
.panel-item-content__edito p:not(:last-child) {
.side-panel-item-content__edito p:not(:last-child) {
margin-bottom: var(--unit--vertical);
}
@ -830,30 +829,30 @@ button.see-more {
margin-bottom: var(--unit--vertical);
}
.panel-item-content__texts:not(.panel__collection .panel-item-content__texts) {
.side-panel-item-content__texts:not(.side-panel__collection .side-panel-item-content__texts) {
padding: var(--unit--vertical) var(--unit--horizontal);
}
/* ================= TEXT ITEM ================= */
.panel .text:first-child,
.panel .text:last-child {
.side-panel .text:first-child,
.side-panel .text:last-child {
margin-bottom: calc(var(--unit--vertical) * 2);
}
.panel__collection--years .text:first-child .text__title {
.side-panel__collection--years .text:first-child .text__title {
display: inline-block;
padding-left: var(--unit--horizontal);
}
.panel .text__subtitle {
.side-panel .text__subtitle {
margin-bottom: calc(var(--unit--vertical) / 4);
}
.panel__collection--years .text:first-child .text__infos {
.side-panel__collection--years .text:first-child .text__infos {
padding-left: var(--unit--horizontal);
}
.panel__collection--years .text:first-child .text__infos::before {
.side-panel__collection--years .text:first-child .text__infos::before {
content: "";
position: absolute;
left: 0;
@ -866,19 +865,16 @@ button.see-more {
@media screen and (min-width: 640px) {
.side-panel {
width: 40rem;
}
.panel {
z-index: 4;
width: var(--padding-body);
}
.panel-close {
.side-panel-close {
display: none;
}
.panel--right {
.side-panel--right {
right: auto;
left: calc(-100vw - 1px);
}
.panel--right.open {
.side-panel--right.open {
left: 0;
}
}
@ -1184,7 +1180,7 @@ body.full-width #main-content {
}
}
@media print {
.panel,
.side-panel,
nav,
.toggle-light {
display: none;