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

@ -1,60 +1,56 @@
*{ * {
--main-font: sans-serif; --main-font: sans-serif;
--font-size-L: 11vw; --font-size-L: 11vw;
--text-color: black; --text-color: black;
} }
body{ body {
font-family: var(--main-font); font-family: var(--main-font);
} }
h1{ h1 {
font-weight: normal; font-weight: normal;
line-height: inherit; line-height: inherit;
margin: 0; margin: 0;
} }
a{ a {
color: var(--text-color); color: var(--text-color);
} }
/* menu */ /* menu */
menu{ menu {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
menu li a{ menu li a {
font-size: var(--font-size-L); font-size: var(--font-size-L);
list-style: none; list-style: none;
text-decoration: none; text-decoration: none;
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;
} }
.projects menu li .menu-item-projects{ .projects menu li .menu-item-projects {
text-decoration: underline; text-decoration: underline;
} }
.about menu li .menu-item-about{ .about menu li .menu-item-about {
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:
sections: content:
label: Contenu
Drafts: icon: bars
label: Drafts sections:
type: pages projects: fields/projects
layout: list files: tabs/files
template: project seo:
status: drafts icon: search
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
sections: tabs:
pages: dashboard:
type: pages 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 [ 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('footer') ?>
<?php snippet('menu') ?>
<p>
<?= $page->presentation() ?>
</p>
</body>

View file

@ -1,23 +1,8 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<h1><?= $site->title() ?></h1>
<body class="home"> <?php foreach ($site->slideshow()->toFiles() as $image): ?>
<h1><?= $site->title() ?></h1>
<?php snippet('menu') ?>
<?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('footer') ?>
<?php snippet('menu') ?>
</body>

View file

@ -1,12 +1,6 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<body class="projects"> <ul class="projects-index">
<h1><?= $site->title() ?></h1>
<?php snippet('menu') ?>
<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>
<details> <details>
@ -21,8 +15,8 @@
</details> </details>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</body> <?php snippet('footer') ?>