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

@ -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
sections:
Drafts:
label: Drafts
type: pages
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
tabs:
content:
label: Contenu
icon: bars
sections:
projects: fields/projects
files: tabs/files
seo:
icon: search

View file

@ -1,5 +1,17 @@
title: Site
sections:
pages:
type: pages
tabs:
dashboard:
label: Tableau de bord
icon: star
sections:
slideshowSection:
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 [
'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">
</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') ?>
<body class="about">
<h1><?= $site->title() ?></h1>
<h1><?= $site->title() ?></h1>
<?php snippet('menu') ?>
<p>
<?= $page->presentation() ?>
</p>
</body>
<?php snippet('footer') ?>

View file

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

View file

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

View file

@ -1,28 +1,22 @@
<?php snippet('header') ?>
<body class="projects">
<ul class="projects-index">
<?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $project): ?>
<li>
<details>
<summary>
<span> <?= $project->title() ?> </span>
<span> <?= $project->tags() ?> </span>
<span> <?= $project->date() ?> </span>
</summary>
<p><?= $project->description() ?></p>
<h1><?= $site->title() ?></h1>
</details>
</li>
<?php endforeach; ?>
</ul>
<?php snippet('menu') ?>
<ul class="projects-index">
<?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $project): ?>
<li>
<details>
<summary>
<span> <?= $project->title() ?> </span>
<span> <?= $project->tags() ?> </span>
<span> <?= $project->date() ?> </span>
</summary>
<p><?= $project->description() ?></p>
</details>
</li>
<?php endforeach; ?>
</ul>
</body>
<?php snippet('footer') ?>