Rough architecture du site
This commit is contained in:
parent
bc87220397
commit
d4be54dfe2
12 changed files with 233 additions and 0 deletions
7
site/blueprints/pages/about.yml
Normal file
7
site/blueprints/pages/about.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
sections:
|
||||
Fields:
|
||||
type: fields
|
||||
fields:
|
||||
presentation:
|
||||
label: Presentation
|
||||
type: writer
|
||||
14
site/blueprints/pages/home.yml
Normal file
14
site/blueprints/pages/home.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
sections:
|
||||
|
||||
Carroussel:
|
||||
type: fields
|
||||
fields:
|
||||
Images:
|
||||
type: files
|
||||
label: Images
|
||||
layout: cards
|
||||
accept:
|
||||
- image/jpg
|
||||
- image/png
|
||||
- image/svg
|
||||
- image/webp
|
||||
18
site/blueprints/pages/project.yml
Normal file
18
site/blueprints/pages/project.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
sections:
|
||||
Fields:
|
||||
type: fields
|
||||
fields:
|
||||
date:
|
||||
label: Date
|
||||
type: date
|
||||
tags:
|
||||
label: project tags
|
||||
type: tags
|
||||
options:
|
||||
- tag test 1
|
||||
- tag test 2
|
||||
- tag test 3
|
||||
description:
|
||||
label: description
|
||||
type: writer
|
||||
24
site/blueprints/pages/projects.yml
Normal file
24
site/blueprints/pages/projects.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
|
||||
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
|
||||
|
||||
5
site/config/config.php
Normal file
5
site/config/config.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'debug'=> true,
|
||||
];
|
||||
3
site/snippets/header.php
Normal file
3
site/snippets/header.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<header>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
</header>
|
||||
17
site/snippets/menu.php
Normal file
17
site/snippets/menu.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<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>
|
||||
22
site/templates/about.php
Normal file
22
site/templates/about.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<body class="about">
|
||||
|
||||
<h1><?= $site->title() ?></h1>
|
||||
|
||||
<?php snippet('menu') ?>
|
||||
|
||||
|
||||
<p>
|
||||
<?= $page->presentation() ?>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
23
site/templates/home.php
Normal file
23
site/templates/home.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
<?php snippet('header') ?>
|
||||
|
||||
<body class="home">
|
||||
|
||||
<h1><?= $site->title() ?></h1>
|
||||
|
||||
<?php snippet('menu') ?>
|
||||
|
||||
|
||||
|
||||
<?php foreach ($page->images() as $image): ?>
|
||||
<img src="<?= $image->url() ?>">
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
12
site/templates/project.php
Normal file
12
site/templates/project.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<body class="project">
|
||||
|
||||
<h1><?= $site->title() ?></h1>
|
||||
|
||||
<?php snippet('menu') ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
28
site/templates/projects.php
Normal file
28
site/templates/projects.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<body class="projects">
|
||||
|
||||
<h1><?= $site->title() ?></h1>
|
||||
|
||||
<?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>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue