add sectioned template

This commit is contained in:
isUnknown 2024-08-18 16:56:58 +02:00
parent 3008e231cb
commit b1ddfee49c
29 changed files with 297 additions and 23 deletions

View file

@ -0,0 +1,32 @@
name: field.blocks.heading.name
icon: title
wysiwyg: true
preview: heading
fields:
level:
label: field.blocks.heading.level
type: toggles
empty: false
default: "h2"
labels: false
options:
- value: h2
icon: h2
text: H2
- value: h3
icon: h3
text: H3
- value: h4
icon: h4
text: H4
- value: h5
icon: h5
text: H5
- value: h6
icon: h6
text: H6
text:
label: field.blocks.heading.text
type: writer
inline: true
placeholder: field.blocks.heading.placeholder

View file

@ -0,0 +1,31 @@
name: field.blocks.image.name
icon: image
preview: image
fields:
image:
label: field.blocks.image.name
type: files
query: model.images
multiple: false
image:
back: black
uploads:
template: blocks/image
src:
label: field.blocks.image.url
type: url
when:
location: web
alt:
label: field.blocks.image.alt
type: text
icon: title
caption:
label: field.blocks.image.caption
type: writer
icon: text
inline: true
link:
label: field.blocks.image.link
type: text
icon: url

View file

@ -0,0 +1,28 @@
name: Liste de liens
icon: table
preview: fields
wysiwyg: true
fields:
items:
label: false
type: structure
columns:
firstText:
width: 1/3
secondText:
width: 1/3
link:
width: 1/3
fields:
firstText:
type: text
label: 1er texte
width: 1/3
secondText:
type: text
label: 2ème texte
width: 1/3
link:
type: url
label: Lien
width: 1/3

View file

@ -0,0 +1,19 @@
name: field.blocks.text.name
icon: text
wysiwyg: true
preview: text
fields:
leftMargin:
label: ⇥ Marge gauche
type: radio
columns: 4
default: false
options:
false: Aucune
small: Petite
medium: Moyenne
large: Grande
text:
label: Texte
type: writer
placeholder: field.blocks.text.placeholder

View file

@ -0,0 +1,16 @@
label: Couleur
type: color
mode: options
default: "#fff"
options:
"#ed268f": Rose
"#ff4f4b": Saumon
"#9e00ff": Violet
"#d6ff00": Jaune
"#ff5c00": Orange
"#ff3300": Rouge
"#2e8799": Colvert
"#009eff": Bleu
"#00b477": Vert
"#a59478": Brun
"#fff": Blanc

View file

@ -156,6 +156,9 @@ tabs:
label: Réglages
icon: cog
fields:
color: fields/color
mapadoLine:
type: line
isMapadoEvent:
label: Connecter à Mapado
type: toggle

View file

@ -1 +0,0 @@
title: Page libre

View file

@ -0,0 +1,21 @@
title: Section
image: false
tabs:
contentTab:
label: Constructeur
icon: dashboard
fields:
section:
label: Section
type: layout
layouts:
- "1/1"
- "1/2, 1/2"
- "1/3, 1/3, 1/3"
fieldsets:
- heading
- text
- image
- links-list
filesTab: tabs/files

View file

@ -0,0 +1,13 @@
title: Page sectionnées
image:
icon: divider
back: black
color: white
tabs:
contentTab:
sections:
sectionsSection:
label: Sections
type: pages
template: section

View file

@ -86,8 +86,11 @@ tabs:
type: pages
label: Pages principales
templates:
- free
- sectioned
- program
create:
- sectioned
info: "{{ page.blueprint.title }}"
contactTab:
label: Contact
icon: email

View file

@ -0,0 +1,11 @@
<section class="collapsable" x-data="{
open: false
}">
<button class="toggle" @click="open = !open" title="Ouvrir la section">
<h4>Prenez vos places !</h4>
<?= svg('assets/images/icons/arrow-down.svg') ?>
</button>
<div class="collapsable__content" :class="open ? 'open' : ''">
test
</div>
</section>

View file

@ -9,12 +9,19 @@
<link rel="stylesheet" type="text/css" href="<?= url('assets/css/style.css?version-cache-prevent') . rand(0, 1000) ?>">
<meta name="robots" content="noindex,nofollow">
<?php if ($page->isHomePage()): ?>
<?php if ($page->isHomePage() || $page->template() == 'event'): ?>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/locale/fr.js"></script>
<?= js('/assets/js/calendar.js') ?>
<?php endif ?>
<?php if ($page->color()->exists()): ?>
<style>
:root {
--color-accent: <?= $page->color() ?>;
}
</style>
<?php endif ?>
</head>
<body>
<?php if ($page->isHomePage()): ?>

24
site/templates/event.php Normal file
View file

@ -0,0 +1,24 @@
<?php snippet('header') ?>
<section class="key-infos">
<ul>
<li><p class="key-infos__key">Dates</p><p class="key-infos__info"><?= $page->schedule() ?></p></li>
<li><p class="key-infos__key">Durée</p><p class="key-infos__info"><?= e($page->isMapadoEvent(), $page->remoteDuration(), $page->duration()) ?></p></li>
<li><p class="key-infos__key">Public</p><p class="key-infos__info"><?= $page->public() ?></p></li>
<li><p class="key-infos__key">Lieu</p><p class="key-infos__info"><?= $page->place() ?></p></li>
</ul>
</section>
<section class="presentation">
<?php snippet('picture', ['file' => $page->gallery()->toFiles()->first()]) ?>
<div class="presentation__text">
<h2 class="h1 presentation__title"><?= $page->title() ?></h2>
<h3 class="h2 presentation__authors"><?= $page->authors() ?></h3>
<div class="presentation__chapo"><?= $page->chapo() ?></div>
<div class="presentation__description"><?= $page->description() ?></div>
</div>
</section>
<section class="collapsable-sections">
<?php snippet('collapsable-section') ?>
</section>
<?php snippet('footer') ?>

View file

View file