save broken
This commit is contained in:
parent
94d404288f
commit
f04e9a66fb
17 changed files with 184 additions and 81 deletions
|
|
@ -3,14 +3,10 @@ $isOpen = isset($isOpen) ? $isOpen : false;
|
|||
?>
|
||||
|
||||
<header
|
||||
x-data="{
|
||||
isOpen: <?= $isOpen ?>
|
||||
}"
|
||||
class="page-cover"
|
||||
:class="isOpen ? 'open' : 'close'"
|
||||
>
|
||||
<div class="title-wrapper">
|
||||
<?= $slots->title() ?>
|
||||
</div>
|
||||
<?= $slots->tabs() ?>
|
||||
</header>
|
||||
</header>
|
||||
<?= $slots->tabs() ?>
|
||||
|
|
@ -2,13 +2,19 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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" 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">
|
||||
|
||||
|
||||
</head>
|
||||
<body class="grid">
|
||||
<body class="grid">
|
||||
<header id="main-header">
|
||||
<div id="logo" >
|
||||
<a href="/" class="no-line">
|
||||
<h2 id="actuel">actuel</h2>
|
||||
<h2 id="inactuel">inactuel</h2>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -4,7 +4,7 @@ $authorFilter = isset($authorFilter) ? $authorFilter : false;
|
|||
$activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
||||
?>
|
||||
|
||||
<div id="tabs" x-data="{
|
||||
<nav id="tabs" x-data="{
|
||||
activeTab: '<?= $activeTab ?>'
|
||||
}">
|
||||
<div class="toggle-btns | flex space-between" style="
|
||||
|
|
@ -18,6 +18,7 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<button
|
||||
class="toggle right"
|
||||
:class="activeTab === 'texts' ? 'open' : 'close'"
|
||||
title="Voir tous les textes"
|
||||
@click="toggleTab($data, 'texts')"
|
||||
>textes</button>
|
||||
</div>
|
||||
|
|
@ -29,26 +30,45 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<ul
|
||||
x-show="activeTab === 'texts'">
|
||||
<?php foreach($kirby->collection('years') as $year): ?>
|
||||
<div class="article__year | full-width flex bottom" style="--content: center;--bottom:2">
|
||||
<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 if (!$authorFilter || $authorFilter == $article->author()->toUser()->name()->value()) : ?>
|
||||
<li class="article | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="article__title no-line">
|
||||
<li class="texts | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="texts__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="article__infos">
|
||||
<div class="texts__infos">
|
||||
<p>
|
||||
<?php if (!$authorFilter): ?>
|
||||
<span class="opacity" style="--opacity:.5">par</span>
|
||||
<a class="author no-line" href="/auteurs/<?= Str::slug($article->author()->toUser()->name()) ?>"><?= $article->author()->toUser()->name() ?></a>,
|
||||
<a class="author" href="/auteurs/<?= Str::slug($article->author()->toUser()->name()) ?>"><?= $article->author()->toUser()->name() ?></a>,
|
||||
<span class="opacity" style="--opacity:.5">le</span>
|
||||
<?php endif ?>
|
||||
<?= $article->published()->toDate('d/m/Y') ?>
|
||||
</p>
|
||||
</div>
|
||||
<!-- <div class="article__labels">
|
||||
<!-- <div class="texts__labels">
|
||||
<button class="label label--category">[ <?= $article->category() ?> ]</button>
|
||||
</div> -->
|
||||
</li>
|
||||
|
|
@ -57,4 +77,4 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Loading…
Add table
Add a link
Reference in a new issue