adjust styles
This commit is contained in:
parent
dd217e7a6a
commit
3804d13cb6
34 changed files with 756 additions and 174 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<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)?>" />
|
||||
<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)?>" defer></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<meta name="robots" content="noindex">
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
<header id="main-header">
|
||||
<div id="logo" >
|
||||
<a href="/" class="no-line">
|
||||
<h2 id="actuel">actuel</h2>
|
||||
<h2 id="inactuel">inactuel</h2>
|
||||
<h1 id="actuel">actuel</h1>
|
||||
<h1 id="inactuel">inactuel</h1>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
$left['slug'] = Str::slug($left['label']);
|
||||
$left = $left ?? false;
|
||||
|
||||
if ($left) {
|
||||
$left['slug'] = Str::slug($left['label']);
|
||||
}
|
||||
$authorFilter = isset($authorFilter) ? $authorFilter : false;
|
||||
$activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
||||
?>
|
||||
|
|
@ -11,11 +15,13 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<div class="toggle-btns | flex space-between" style="
|
||||
--content:space-between;
|
||||
">
|
||||
<button
|
||||
class="toggle left"
|
||||
:class="activeTab === '<?=$left['slug'] ?>' ? 'open' : 'close'"
|
||||
@click="toggleTab($data, '<?=$left['slug'] ?>')"
|
||||
><?= $left['label'] ?></button>
|
||||
<?php if ($left): ?>
|
||||
<button
|
||||
class="toggle left"
|
||||
:class="activeTab === '<?=$left['slug'] ?>' ? 'open' : 'close'"
|
||||
@click="toggleTab($data, '<?=$left['slug'] ?>')"
|
||||
><?= $left['label'] ?></button>
|
||||
<?php endif ?>
|
||||
<button
|
||||
class="toggle right"
|
||||
:class="activeTab === 'texts' ? 'open' : 'close'"
|
||||
|
|
@ -26,10 +32,12 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<div
|
||||
class="active-tab"
|
||||
>
|
||||
<section
|
||||
x-show="activeTab === '<?=$left['slug'] ?>'">
|
||||
<?= $left['content'] ?>
|
||||
</section>
|
||||
<?php if ($left): ?>
|
||||
<section
|
||||
x-show="activeTab === '<?=$left['slug'] ?>'">
|
||||
<?= $left['content'] ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
<ul
|
||||
x-show="activeTab === 'texts'">
|
||||
<?php foreach($kirby->collection('years') as $year): ?>
|
||||
|
|
@ -56,25 +64,13 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
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="texts | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="texts__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="texts__infos">
|
||||
<p>
|
||||
<?php if (!$authorFilter): ?>
|
||||
<span class="opacity" style="--opacity:.5">par</span>
|
||||
<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="texts__labels">
|
||||
<button class="label label--category">[ <?= $article->category() ?> ]</button>
|
||||
</div> -->
|
||||
</li>
|
||||
<?php if (!$authorFilter || $authorFilter == $article->author()->toUser()->name()->value()) : ?>
|
||||
<?php snippet(
|
||||
'text-item',
|
||||
[
|
||||
'article' => $article
|
||||
]
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
|
|
|
|||
13
site/snippets/text-item.php
Normal file
13
site/snippets/text-item.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<li class="texts | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="texts__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="texts__infos">
|
||||
<p>
|
||||
<span class="opacity" style="--opacity:.5">par</span>
|
||||
<a class="author" href="/auteurs/<?= Str::slug($article->author()->toUser()->name()) ?>"><?= $article->author()->toUser()->name() ?></a><br>
|
||||
<span class="opacity" style="--opacity:.6">publié le </span><?= $article->published()->toDate('d/m/Y') ?>
|
||||
<span class="opacity" style="--opacity: .6">dans</span> <a href="/categories/<?= $article->category() ?>"><?= $article->category() ?></a>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
Loading…
Add table
Add a link
Reference in a new issue