add info template (for à propos page)

This commit is contained in:
isUnknown 2024-04-15 09:35:39 +02:00
parent 1e9a192a40
commit 57e9ca74da
7 changed files with 48 additions and 9 deletions

View file

@ -68,6 +68,9 @@ body[data-template="home"] {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
[data-template="info"] #entry-btns {
top: calc(var(--unit--vertical) * 4);
}
.entry-btn { .entry-btn {
transition: all 0.5s var(--curve-sine); transition: all 0.5s var(--curve-sine);

View file

@ -9,6 +9,9 @@ body {
main { main {
padding: 0 var(--unit--horizontal); padding: 0 var(--unit--horizontal);
} }
[data-template="info"] main {
margin-top: calc(var(--unit--vertical) * 2);
}
hr { hr {
height: calc(var(--unit--vertical) / 2); height: calc(var(--unit--vertical) / 2);

View file

@ -0,0 +1,20 @@
title: Linéaire
image:
back: black
color: white
icon: bars
create:
fields:
- category
tabs:
contentTab:
label: Contenu
sections:
bodySection:
label: Corps
type: fields
fields:
body:
label: Corps
type: writer

View file

@ -1,7 +1,7 @@
<footer id="main-footer"> <footer id="main-footer">
<ul id="links"> <ul id="links">
<li> <li>
<a href="#"> <a href="<?= $site->find('a-propos')->url() ?>">
à propos à propos
</a> </a>
</li> </li>

View file

@ -12,11 +12,6 @@ $entryTopPos = $entryTopPos ?? 20;
<script defer src="<?= url('assets/js/alpine.min.js') ?>"></script> <script defer src="<?= url('assets/js/alpine.min.js') ?>"></script>
<script defer src="<?= url('assets/js/ragadjust.js') ?>"></script> <script defer src="<?= url('assets/js/ragadjust.js') ?>"></script>
<meta name="robots" content="noindex, nofollow, noarchive"> <meta name="robots" content="noindex, nofollow, noarchive">
<style>
:root {
--entry-btns-top: calc(var(--unit--vertical-relative) * <?= $entryTopPos ?>);
}
</style>
</head> </head>
<body class="grid" data-template="<?= $page->template() ?>" > <body class="grid" data-template="<?= $page->template() ?>" >
<header id="main-header"> <header id="main-header">

20
site/templates/info.php Normal file
View file

@ -0,0 +1,20 @@
<?php snippet('header') ?>
<main id="<?= $page->template() ?>">
<div id="entry-btns">
<button
class="entry-btn entry-btn--left toggle-btn left"
onclick="togglePanel('left')"
>années</button>
<button
class="entry-btn entry-btn--right toggle-btn right"
onclick="togglePanel('right')"
>categories</button>
</div>
<article>
<div class="content">
<?= $page->body() ?>
</div>
</article>
</main>
<?php snippet('footer') ?>

View file

@ -1,6 +1,4 @@
<?php snippet('header', array( <?php snippet('header') ?>
'entryTopPos' => 20
)) ?>
<main id="<?= $page->template() ?>"> <main id="<?= $page->template() ?>">
<article> <article>
<?php snippet('cover', array('isOpen' => true), slots: true) ?> <?php snippet('cover', array('isOpen' => true), slots: true) ?>