set content un years panel. Styles problems
This commit is contained in:
parent
92625d2fb9
commit
76b98eb2e3
6 changed files with 130 additions and 18 deletions
|
|
@ -5,11 +5,11 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title><?= $site->title() ?><?= e($page->url() !== $site->url(), '-' . $page->title()) ?></title>
|
||||
<link rel="stylesheet" href="<?= url('assets/css/style.css') . '?version-cache-prevent' . rand(0, 1000) ?>" />
|
||||
<script src="<?= url('assets') ?>/js/script.js?version-cache-prevent<?= rand(0, 1000)?>" type="module" defer></script>
|
||||
<script src="<?= url('assets') ?>/js/script.js?version-cache-prevent<?= rand(0, 1000)?>" defer></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<meta name="robots" content="noindex, nofollow, noarchive">
|
||||
</head>
|
||||
<body class="grid" data-template="<?= $page->template() ?>">
|
||||
<body class="grid" data-template="<?= $page->template() ?>" >
|
||||
<header id="main-header">
|
||||
<div id="logo" >
|
||||
<a href="/" class="no-line">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,58 @@
|
|||
<nav id="entries">
|
||||
<button class="entry-btn entry-btn--left">années</button>
|
||||
<button class="entry-btn entry-btn--right">categories</button>
|
||||
</nav>
|
||||
|
||||
<div id="entry-btns">
|
||||
<button
|
||||
class="entry-btn entry-btn--left"
|
||||
onclick="togglePanel('left')"
|
||||
>années</button>
|
||||
<button
|
||||
class="entry-btn entry-btn--right"
|
||||
onclick="togglePanel('right')"
|
||||
>categories</button>
|
||||
</div>
|
||||
|
||||
<nav class="panel panel--left">
|
||||
<ul
|
||||
x-show="activeTab === 'texts'">
|
||||
<?php foreach($kirby->collection('years') as $year): ?>
|
||||
<div
|
||||
x-data='{
|
||||
isOpen: false
|
||||
}'
|
||||
:class="isOpen ? '' : 'short'"
|
||||
class="
|
||||
texts__year
|
||||
| full-width
|
||||
flex column
|
||||
bottom"
|
||||
style="
|
||||
--content: center;
|
||||
--bottom: 2;"
|
||||
>
|
||||
<h3 class="fs-xl color" style="--color:var(--color-secondary)"><?= $year->title() ?></h3>
|
||||
<div class="year__edito">
|
||||
<?= $year->edito() ?>
|
||||
</div>
|
||||
<button
|
||||
:class="isOpen ? 'open' : 'close'"
|
||||
class="see-more toggle left" @click="isOpen = !isOpen">Lire</button>
|
||||
</div>
|
||||
<?php foreach($year->children() as $article): ?>
|
||||
<?php snippet(
|
||||
'text-item',
|
||||
[
|
||||
'article' => $article
|
||||
]
|
||||
) ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<button
|
||||
onclick="togglePanel('left')"
|
||||
class="panel-close">
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav
|
||||
onclick="togglePanel('right')"
|
||||
class="panel panel--right"></nav>
|
||||
|
|
@ -70,8 +70,8 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<?php snippet(
|
||||
'text-item',
|
||||
[
|
||||
'article' => $article
|
||||
]
|
||||
'article' => $article
|
||||
]
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue