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
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:
parent
a2e65635fb
commit
a352c48eaa
8 changed files with 62 additions and 71 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<ul class="texts panel__all-texts panel-item-content__texts hidden">
|
||||
<ul class="texts side-panel__all-texts side-panel-item-content__texts hidden">
|
||||
<?php foreach(page('textes')->grandChildren()->sortBy('published', 'desc') as $article): ?>
|
||||
<?php
|
||||
$author = $article->author()->toPage() == null ? 'inconnu' : $article->author()->toPage()->title();
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<ul
|
||||
class="panel__collection panel__collection--<?= $collection ?><?= e($collection == 'categories', ' hidden') ?>">
|
||||
class="side-panel__collection side-panel__collection--<?= $collection ?><?= e($collection == 'categories', ' hidden') ?>">
|
||||
<?php foreach($kirby->collection($collection) as $section): ?>
|
||||
<li class="panel__item " x-data='{ isOpen: false }'>
|
||||
<li class="side-panel__item " x-data='{ isOpen: false }'>
|
||||
<a class="no-underline" href="#<?= $section->slug() ?>"
|
||||
id="<?= $section->slug() ?>">
|
||||
<button class="panel__toggle-btn" @click="isOpen = !isOpen">
|
||||
<button class="side-panel__toggle-btn" @click="isOpen = !isOpen">
|
||||
<h3><?= $section->title() ?></h3>
|
||||
<div class="panel__toggle-icon" x-text="isOpen || search.length > 0 ? '-' : '+'"></div>
|
||||
<div class="side-panel__toggle-icon" x-text="isOpen || search.length > 0 ? '-' : '+'"></div>
|
||||
</button>
|
||||
</a>
|
||||
<div class="panel-item-content" x-show="isOpen || search.length > 0" x-data='{ edito: false }'>
|
||||
<div class="side-panel-item-content" x-show="isOpen || search.length > 0" x-data='{ edito: false }'>
|
||||
<?php if ($collection === 'years'): ?>
|
||||
<div class="panel-item-content__edito" :class="edito ? '' : 'short'" x-show="search.length === 0">
|
||||
<div class="side-panel-item-content__edito" :class="edito ? '' : 'short'" x-show="search.length === 0">
|
||||
<?= $section->edito() ?>
|
||||
</div>
|
||||
<button :class="edito ? 'open' : 'close'" x-show="search.length === 0"
|
||||
class="see-more toggle-btn toggle-btn--left" @click="edito = !edito">Lire</button>
|
||||
<?php endif ?>
|
||||
<ul class="panel-item-content__texts texts">
|
||||
<ul class="side-panel-item-content__texts texts">
|
||||
<?php $articles = method_exists($section, 'allTexts') ? $section->allTexts() : $section->children(); ?>
|
||||
<?php foreach($articles as $article): ?>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="side-panel panel" data-panel="side-panel">
|
||||
<div class="side-panel" data-panel="side-panel">
|
||||
<div class="side-panel__view" data-view="nav" x-data="{search: ''}">
|
||||
<header>
|
||||
<p class="sort-btns">
|
||||
|
|
@ -27,5 +27,5 @@
|
|||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<button class="less panel-close">fermer</button>
|
||||
<button class="less side-panel-close">fermer</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue