This commit is contained in:
isUnknown 2026-04-15 20:17:12 +02:00
parent d4be54dfe2
commit 1dd4060314
14 changed files with 151 additions and 148 deletions

View file

@ -33,7 +33,7 @@ menu li a{
text-transform: initial; text-transform: initial;
} }
.home menu li .menu-item-home{ [data-template="home"] menu li .menu-item-home {
text-decoration: underline; text-decoration: underline;
} }
@ -45,16 +45,12 @@ menu li a{
text-decoration: underline; text-decoration: underline;
} }
/* HOME */ /* HOME */
.home h1{ [data-template="home"] h1 {
font-size: var(--font-size-L); font-size: var(--font-size-L);
} }
/* PROJECTS */ /* PROJECTS */
/* ABOUT */ /* ABOUT */

View file

@ -0,0 +1,9 @@
label: Projets
type: pages
layout: cards
template: project
search: true
info: "tags: {{ page.tags }} --------- {{ page.date.toDate('d/m/Y') }}"
sortBy: date desc
image:
ratio: 12/9

View file

@ -1,24 +1,20 @@
title: Projets
status:
unlisted:
label: Non listé
text: La page est accessible uniquement par son URL
options:
move: false
duplicate: false
delete: false
changeStatus: false
tabs:
content:
label: Contenu
icon: bars
sections: sections:
projects: fields/projects
Drafts: files: tabs/files
label: Drafts seo:
type: pages icon: search
layout: list
template: project
status: drafts
search: true
info: "tags: {{ page.tags }} --------- {{ page.date.toDate('d/m/Y') }}"
sortBy: date desc
publishedProjects:
label: Published projects
type: pages
layout: list
template: project
status: published
search: true
info: "tags: {{ page.tags }} --------- {{ page.date.toDate('d/m/Y') }}"
sortBy: date desc

View file

@ -1,5 +1,17 @@
title: Site title: Site
tabs:
dashboard:
label: Tableau de bord
icon: star
sections: sections:
pages: slideshowSection:
type: pages type: fields
fields:
slideshow:
label: Carrousel
type: files
projects:
extends: fields/projects
parent: page('projets')
files: tabs/files

View file

@ -0,0 +1,16 @@
label: Fichiers
icon: attachment
columns:
- width: 1/4
fields:
manageFilesInfo:
label: false
type: info
text: À droite, tous les fichiers que stocke la page. Supprimez les fichiers inutilisés pour éviter de surcharger inutilement le serveur.
- width: 3/4
sections:
filesSection:
label: Fichiers
type: files
batch: true

View file

@ -2,4 +2,5 @@
return [ return [
'debug'=> true, 'debug'=> true,
'home' => 'projets'
]; ];

4
site/snippets/footer.php Normal file
View file

@ -0,0 +1,4 @@
</main>
</body>
</html>

View file

@ -1,3 +1,13 @@
<header> <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="/assets/css/style.css"> <link rel="stylesheet" href="/assets/css/style.css">
</header> </head>
<body data-template="<?= $page->intendedTemplate() ?>">
<?= snippet('nav') ?>
<main>

View file

@ -1,17 +0,0 @@
<menu>
<li>
<a class="menu-item-home" href="<?= page('home')->url() ?>">
<?= page('home')->title() ?>
</a>
</li>
<li>
<a class="menu-item-projects" href="<?= page('projects')->url() ?>">
<?= page('projects')->title() ?>
</a>
</li>
<li>
<a class="menu-item-about" href="<?= page('about')->url() ?>">
<?= page('about')->title() ?>
</a>
</li>
</menu>

21
site/snippets/nav.php Normal file
View file

@ -0,0 +1,21 @@
<header>
<nav>
<ul>
<li>
<a class="menu-item-home" href="<?= page('home')->url() ?>">
<?= page('home')->title() ?>
</a>
</li>
<li>
<a class="menu-item-projects" href="<?= page('projets')->url() ?>">
<?= page('projets')->title() ?>
</a>
</li>
<li>
<a class="menu-item-about" href="<?= page('about')->url() ?>">
<?= page('about')->title() ?>
</a>
</li>
</ul>
</nav>
</header>

View file

@ -1,22 +1,5 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<body class="about">
<h1><?= $site->title() ?></h1> <h1><?= $site->title() ?></h1>
<?php snippet('menu') ?> <?php snippet('footer') ?>
<p>
<?= $page->presentation() ?>
</p>
</body>

View file

@ -1,23 +1,8 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<body class="home">
<h1><?= $site->title() ?></h1> <h1><?= $site->title() ?></h1>
<?php snippet('menu') ?> <?php foreach ($site->slideshow()->toFiles() as $image): ?>
<?php foreach ($page->images() as $image): ?>
<img src="<?= $image->url() ?>"> <img src="<?= $image->url() ?>">
<?php endforeach; ?> <?php endforeach; ?>
<?php snippet('footer') ?>
</body>

View file

@ -1,12 +1,5 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<body class="project">
<h1><?= $site->title() ?></h1> <h1><?= $site->title() ?></h1>
<?php snippet('menu') ?> <?php snippet('footer') ?>
</body>

View file

@ -1,11 +1,5 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<body class="projects">
<h1><?= $site->title() ?></h1>
<?php snippet('menu') ?>
<ul class="projects-index"> <ul class="projects-index">
<?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $project): ?> <?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $project): ?>
<li> <li>
@ -23,6 +17,6 @@
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</body> <?php snippet('footer') ?>