Initial commit
This commit is contained in:
commit
388079e6bb
1108 changed files with 330121 additions and 0 deletions
0
site/accounts/index.html
Normal file
0
site/accounts/index.html
Normal file
4
site/blueprints/blocks/blank.yml
Normal file
4
site/blueprints/blocks/blank.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
name: Add blank page
|
||||
icon: page
|
||||
wysiwyg: true
|
||||
preview: box
|
||||
4
site/blueprints/blocks/break.yml
Normal file
4
site/blueprints/blocks/break.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
name: Page Break
|
||||
icon: box
|
||||
wysiwyg: true
|
||||
preview: box
|
||||
45
site/blueprints/blocks/fullpageimage.yml
Normal file
45
site/blueprints/blocks/fullpageimage.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Image pleine page
|
||||
icon: image
|
||||
wysiwyg: true
|
||||
preview: image
|
||||
fields:
|
||||
location:
|
||||
label: field.blocks.image.location
|
||||
type: radio
|
||||
columns: 2
|
||||
default: "kirby"
|
||||
required: true
|
||||
options:
|
||||
kirby: "{{ t('field.blocks.image.location.internal') }}"
|
||||
web: "{{ t('field.blocks.image.location.external') }}"
|
||||
image:
|
||||
label: field.blocks.image.name
|
||||
type: files
|
||||
query: model.images
|
||||
multiple: false
|
||||
image:
|
||||
back: black
|
||||
uploads:
|
||||
template: blocks/image
|
||||
when:
|
||||
location: kirby
|
||||
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
|
||||
fullwidth:
|
||||
label: Image width fit page width
|
||||
type: toggle
|
||||
text:
|
||||
- "off"
|
||||
- "on"
|
||||
60
site/blueprints/blocks/image.yml
Normal file
60
site/blueprints/blocks/image.yml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
name: field.blocks.image.name
|
||||
icon: image
|
||||
preview: image
|
||||
fields:
|
||||
location:
|
||||
label: field.blocks.image.location
|
||||
type: radio
|
||||
columns: 2
|
||||
default: "kirby"
|
||||
options:
|
||||
kirby: "{{ t('field.blocks.image.location.internal') }}"
|
||||
web: "{{ t('field.blocks.image.location.external') }}"
|
||||
image:
|
||||
label: field.blocks.image.name
|
||||
type: files
|
||||
query: model.images
|
||||
multiple: false
|
||||
image:
|
||||
back: black
|
||||
uploads:
|
||||
template: blocks/image
|
||||
when:
|
||||
location: kirby
|
||||
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
|
||||
width:
|
||||
label: Largeur de l'image
|
||||
type: select
|
||||
width: 1/2
|
||||
options:
|
||||
16.666%: "16.666%"
|
||||
20%: "20%"
|
||||
25%: "25%"
|
||||
33.333%: "33.333%"
|
||||
50%: "50%"
|
||||
66.666%: "66.666%"
|
||||
100%: "100%"
|
||||
position:
|
||||
label: Position de l'image
|
||||
type: select
|
||||
width: 1/2
|
||||
options:
|
||||
auto: "Centrée"
|
||||
0: "Alignée à gauche"
|
||||
25
site/blueprints/blocks/interview.yml
Normal file
25
site/blueprints/blocks/interview.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Interview
|
||||
icon: question
|
||||
wysiwyg: true
|
||||
preview: text
|
||||
fields:
|
||||
alignment:
|
||||
type: toggles
|
||||
label: Alignement
|
||||
options:
|
||||
- value: justify
|
||||
text: Justify
|
||||
icon: text-justify
|
||||
- value: left
|
||||
text: Left
|
||||
icon: text-left
|
||||
- value: center
|
||||
text: Center
|
||||
icon: text-center
|
||||
- value: right
|
||||
text: Right
|
||||
icon: text-right
|
||||
text:
|
||||
type: writer
|
||||
nodes: true
|
||||
placeholder: field.blocks.text.placeholder
|
||||
47
site/blueprints/blocks/spreadimage.yml
Normal file
47
site/blueprints/blocks/spreadimage.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: Image en double page
|
||||
icon: image
|
||||
wysiwyg: true
|
||||
preview: image
|
||||
fields:
|
||||
location:
|
||||
label: field.blocks.image.location
|
||||
type: radio
|
||||
columns: 2
|
||||
default: "kirby"
|
||||
required: true
|
||||
options:
|
||||
kirby: "{{ t('field.blocks.image.location.internal') }}"
|
||||
web: "{{ t('field.blocks.image.location.external') }}"
|
||||
image:
|
||||
label: field.blocks.image.name
|
||||
type: files
|
||||
query: model.images
|
||||
multiple: false
|
||||
image:
|
||||
back: black
|
||||
uploads:
|
||||
template: blocks/image
|
||||
when:
|
||||
location: kirby
|
||||
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
|
||||
fullwidth:
|
||||
label: Image width fit page width
|
||||
type: toggle
|
||||
text:
|
||||
- "off"
|
||||
- "on"
|
||||
|
||||
|
||||
9
site/blueprints/blocks/text.yml
Normal file
9
site/blueprints/blocks/text.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
name: field.blocks.text.name
|
||||
icon: text
|
||||
wysiwyg: true
|
||||
preview: text
|
||||
fields:
|
||||
text:
|
||||
type: writer
|
||||
nodes: true
|
||||
placeholder: field.blocks.text.placeholder
|
||||
39
site/blueprints/blocks/video.yml
Normal file
39
site/blueprints/blocks/video.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: field.blocks.video.name
|
||||
icon: video
|
||||
preview: video
|
||||
fields:
|
||||
# url:
|
||||
# label: field.blocks.video.url.label
|
||||
# type: url
|
||||
# placeholder: field.blocks.video.url.placeholder
|
||||
location:
|
||||
label: field.blocks.image.location
|
||||
type: radio
|
||||
columns: 2
|
||||
default: "kirby"
|
||||
options:
|
||||
kirby: "{{ t('field.blocks.image.location.internal') }}"
|
||||
web: "{{ t('field.blocks.image.location.external') }}"
|
||||
video:
|
||||
label: field.blocks.video.name
|
||||
type: files
|
||||
query: model.videos
|
||||
multiple: false
|
||||
video:
|
||||
back: black
|
||||
uploads:
|
||||
template: blocks/video
|
||||
when:
|
||||
location: kirby
|
||||
url:
|
||||
label: field.blocks.video.url.label
|
||||
type: url
|
||||
placeholder: field.blocks.video.url.placeholder
|
||||
when:
|
||||
location: web
|
||||
caption:
|
||||
label: field.blocks.video.caption
|
||||
type: writer
|
||||
inline: true
|
||||
|
||||
|
||||
20
site/blueprints/files/default.yml
Executable file
20
site/blueprints/files/default.yml
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
title: Image
|
||||
|
||||
columns:
|
||||
- width: 1/2
|
||||
sections:
|
||||
content:
|
||||
type: fields
|
||||
fields:
|
||||
caption:
|
||||
label: Légende
|
||||
type: writer
|
||||
size: small
|
||||
- width: 1/2
|
||||
sections:
|
||||
meta:
|
||||
type: fields
|
||||
fields:
|
||||
alt:
|
||||
label: Texte alternatif
|
||||
type: text
|
||||
46
site/blueprints/pages/chapitre.yml
Normal file
46
site/blueprints/pages/chapitre.yml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
title: Chapitre
|
||||
|
||||
columns:
|
||||
main:
|
||||
width: 2/3
|
||||
sections:
|
||||
fields:
|
||||
type: fields
|
||||
fields:
|
||||
chapeau:
|
||||
label: Chapeau
|
||||
type: writer
|
||||
text:
|
||||
label: Contenu
|
||||
type: blocks
|
||||
fieldsets:
|
||||
text:
|
||||
label: Texte
|
||||
type: group
|
||||
fieldsets:
|
||||
- heading
|
||||
- text
|
||||
- list
|
||||
- quote
|
||||
- interview
|
||||
media:
|
||||
label: Media
|
||||
type: group
|
||||
fieldsets:
|
||||
- gallery
|
||||
- image
|
||||
- fullpageimage
|
||||
- spreadimage
|
||||
others:
|
||||
label: Autres
|
||||
type: group
|
||||
fieldsets:
|
||||
- break
|
||||
- blank
|
||||
sidebar:
|
||||
width: 1/3
|
||||
sections:
|
||||
files:
|
||||
label: Images
|
||||
type: files
|
||||
|
||||
35
site/blueprints/pages/default.yml
Normal file
35
site/blueprints/pages/default.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
title: Page
|
||||
|
||||
columns:
|
||||
main:
|
||||
width: 2/3
|
||||
sections:
|
||||
fields:
|
||||
type: fields
|
||||
fields:
|
||||
text:
|
||||
label: Texte
|
||||
type: blocks
|
||||
fieldsets:
|
||||
text:
|
||||
label: Texte
|
||||
type: group
|
||||
fieldsets:
|
||||
- heading
|
||||
- text
|
||||
- list
|
||||
- quote
|
||||
media:
|
||||
label: Medias
|
||||
type: group
|
||||
fieldsets:
|
||||
- gallery
|
||||
- image
|
||||
- video
|
||||
sidebar:
|
||||
width: 1/3
|
||||
sections:
|
||||
files:
|
||||
label: Fichiers
|
||||
type: files
|
||||
|
||||
21
site/blueprints/pages/home.yml
Normal file
21
site/blueprints/pages/home.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
title: Page d'accueil
|
||||
|
||||
columns:
|
||||
main:
|
||||
width: 2/3
|
||||
sections:
|
||||
fields:
|
||||
type: fields
|
||||
fields:
|
||||
bigImage:
|
||||
label: Image à afficher sur la page d'accueil
|
||||
type: files
|
||||
multiple: false
|
||||
|
||||
sidebar:
|
||||
width: 1/3
|
||||
sections:
|
||||
files:
|
||||
label: Fichiers
|
||||
type: files
|
||||
|
||||
9
site/blueprints/pages/print.yml
Normal file
9
site/blueprints/pages/print.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
title: Print
|
||||
|
||||
sections:
|
||||
info:
|
||||
type: info
|
||||
label: Info
|
||||
text: |
|
||||
Cette page permet de générer la version print de la revue
|
||||
|
||||
83
site/blueprints/site.yml
Normal file
83
site/blueprints/site.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
title: Site
|
||||
|
||||
|
||||
tabs:
|
||||
content:
|
||||
icon: text
|
||||
label: Content
|
||||
columns:
|
||||
main:
|
||||
width: 1/2
|
||||
sections:
|
||||
menu:
|
||||
label: Chapitres
|
||||
type: pages
|
||||
templates:
|
||||
- chapitre
|
||||
secondary:
|
||||
width: 1/2
|
||||
sections:
|
||||
pages:
|
||||
type: pages
|
||||
label: Autres pages
|
||||
templates:
|
||||
- home
|
||||
- print
|
||||
- error
|
||||
settings:
|
||||
label: Paramètres
|
||||
icon: settings
|
||||
columns:
|
||||
main:
|
||||
width: 2/3
|
||||
sections:
|
||||
content:
|
||||
type: fields
|
||||
fields:
|
||||
logo:
|
||||
label: Logo
|
||||
type: files
|
||||
multiple: false
|
||||
width: 1/2
|
||||
cover:
|
||||
label: Image de couverture
|
||||
type: files
|
||||
multiple: false
|
||||
width: 1/2
|
||||
copyright:
|
||||
label: Copyright
|
||||
type: text
|
||||
social:
|
||||
label: Réseaux sociaux
|
||||
type: structure
|
||||
fields:
|
||||
title:
|
||||
label: Titre
|
||||
type: text
|
||||
icon:
|
||||
label: Icône
|
||||
type: text
|
||||
help: Pour trouver votre icône, allez sur <a href="http://fontawesome.io/icons/" target="_blank">http://fontawesome.io/icons/</a>
|
||||
link:
|
||||
label: Lien
|
||||
type: url
|
||||
description:
|
||||
label: Description
|
||||
type: textarea
|
||||
subject:
|
||||
label: Sujet du site web
|
||||
type: textarea
|
||||
keywords:
|
||||
label: Mots Clés
|
||||
type: tags
|
||||
author:
|
||||
label: Auteur·ices
|
||||
type: text
|
||||
sidebar:
|
||||
width: 1/3
|
||||
sections:
|
||||
files:
|
||||
type: files
|
||||
|
||||
|
||||
|
||||
67
site/config/config.php
Normal file
67
site/config/config.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
---------------------------------------
|
||||
Kirby Configuration For Localhost
|
||||
---------------------------------------
|
||||
|
||||
*/
|
||||
|
||||
return [
|
||||
'debug' => true,
|
||||
'languages' => false,
|
||||
'smartypants' => [
|
||||
'attr' => 1,
|
||||
'doublequote.open' => '« ',
|
||||
'doublequote.close' => ' »',
|
||||
'doublequote.low' => '„',
|
||||
'singlequote.open' => '‘',
|
||||
'singlequote.close' => '’',
|
||||
'backtick.doublequote.open' => '“',
|
||||
'backtick.doublequote.close' => '”',
|
||||
'backtick.singlequote.open' => '‘',
|
||||
'backtick.singlequote.close' => '’',
|
||||
'emdash' => '—',
|
||||
'endash' => '–',
|
||||
'ellipsis' => '…',
|
||||
'space' => '(?: | | |�*160;|�*[aA]0;)',
|
||||
'space.emdash' => ' ',
|
||||
'space.endash' => ' ',
|
||||
'space.colon' => ' ',
|
||||
'space.semicolon' => ' ',
|
||||
'space.marks' => ' ',
|
||||
'space.frenchquote' => ' ',
|
||||
'space.thousand' => '',
|
||||
'space.unit' => ' ',
|
||||
'guillemet.leftpointing' => '«',
|
||||
'guillemet.rightpointing' => '»',
|
||||
'geresh' => '׳',
|
||||
'gershayim' => '״',
|
||||
'skip' => 'pre|code|kbd|script|style|math',
|
||||
],
|
||||
'routes' => [
|
||||
[
|
||||
'pattern' => 'sitemap.xml',
|
||||
'action' => function() {
|
||||
$pages = site()->pages()->index();
|
||||
|
||||
// fetch the pages to ignore from the config settings,
|
||||
// if nothing is set, we ignore the error page
|
||||
$ignore = kirby()->option('sitemap.ignore', ['error']);
|
||||
|
||||
$content = snippet('sitemap', compact('pages', 'ignore'), true);
|
||||
|
||||
// return response with correct header type
|
||||
return new Kirby\Cms\Response($content, 'application/xml');
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'sitemap',
|
||||
'action' => function() {
|
||||
return go('sitemap.xml', 301);
|
||||
}
|
||||
],
|
||||
]
|
||||
|
||||
|
||||
];
|
||||
17
site/plugins/notes-tag/index.php
Normal file
17
site/plugins/notes-tag/index.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
Kirby::plugin('sarahgarcin/notes-tag', [
|
||||
'tags' => [
|
||||
'note' => [
|
||||
'attr' => [
|
||||
'note',
|
||||
],
|
||||
'html' => function($tag) {
|
||||
$note = $tag->attr('note');
|
||||
|
||||
return '<span class="footnote">'.$note.'</span>';
|
||||
|
||||
}
|
||||
]
|
||||
]
|
||||
]);
|
||||
0
site/sessions/index.html
Normal file
0
site/sessions/index.html
Normal file
2
site/snippets/blocks/blank.php
Normal file
2
site/snippets/blocks/blank.php
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<div class="blank-page"></div>
|
||||
2
site/snippets/blocks/break.php
Normal file
2
site/snippets/blocks/break.php
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<div class="pagebreak"></div>
|
||||
27
site/snippets/blocks/fullpageimage.php
Normal file
27
site/snippets/blocks/fullpageimage.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$alt = $block->alt();
|
||||
$caption = $block->caption();
|
||||
$src = null;
|
||||
$fullWidth = $block->fullwidth()->toBool();
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$src = $block->src()->esc();
|
||||
} elseif ($image = $block->image()->toFile()) {
|
||||
$alt = $alt->or($image->alt());
|
||||
$src = $image->url();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($src): ?>
|
||||
<div class="full-bleed-image full-page">
|
||||
<figure class="<?= $fullWidth ? 'full-width' : '' ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption><?= $caption ?></figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
22
site/snippets/blocks/gallery.php
Normal file
22
site/snippets/blocks/gallery.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$caption = $block->caption();
|
||||
$crop = $block->crop()->isTrue();
|
||||
$ratio = $block->ratio()->or('auto');
|
||||
?>
|
||||
<figure<?= Html::attr(['data-ratio' => $ratio, 'data-crop' => $crop], null, ' ') ?>>
|
||||
<ul>
|
||||
<?php foreach ($block->images()->toFiles() as $image): ?>
|
||||
<li>
|
||||
<a href="<?= $image->url() ?>" class="glightbox" <?php if($caption->isNotEmpty()):?> data-glightbox="title: <?= $caption ?>"<?php endif?>>
|
||||
<?= $image ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption>
|
||||
<?= $caption ?>
|
||||
</figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
39
site/snippets/blocks/image.php
Normal file
39
site/snippets/blocks/image.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$alt = $block->alt();
|
||||
$caption = $block->caption();
|
||||
$crop = $block->crop()->toBool();
|
||||
$link = $block->link();
|
||||
$ratio = $block->ratio()->or('auto');
|
||||
$src = null;
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$src = $block->src()->esc();
|
||||
} elseif ($image = $block->image()->toFile()) {
|
||||
$alt = $alt->or($image->alt());
|
||||
$src = $image->url();
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ($src): ?>
|
||||
<figure
|
||||
data-crop="<?= $crop ? 'true' : 'false' ?>"
|
||||
data-ratio="<?= $ratio ?>"
|
||||
style="--ratio: <?= $ratio ?>;"
|
||||
>
|
||||
<?php if ($link->isNotEmpty()): ?>
|
||||
<a href="<?= Str::esc($link->toUrl()) ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption>
|
||||
<?= $caption->kt() ?>
|
||||
</figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
4
site/snippets/blocks/interview.php
Normal file
4
site/snippets/blocks/interview.php
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<div class="interview-block alignment-<?= $block->alignment()?>">
|
||||
<?= $block->text()->kt();?>
|
||||
</div>
|
||||
27
site/snippets/blocks/spreadimage.php
Normal file
27
site/snippets/blocks/spreadimage.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$alt = $block->alt();
|
||||
$caption = $block->caption();
|
||||
$src = null;
|
||||
$fullWidth = $block->fullwidth()->toBool();
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$src = $block->src()->esc();
|
||||
} elseif ($image = $block->image()->toFile()) {
|
||||
$alt = $alt->or($image->alt());
|
||||
$src = $image->url();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($src): ?>
|
||||
<div class="spread-image">
|
||||
<figure class="<?= $fullWidth ? 'full-width' : '' ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption><?= $caption ?></figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
3
site/snippets/blocks/text.php
Normal file
3
site/snippets/blocks/text.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
|
||||
<?= $block->text()->kt()->smartypants();?>
|
||||
30
site/snippets/blocks/video.php
Normal file
30
site/snippets/blocks/video.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
use Kirby\Cms\Html;
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$caption = $block->caption();
|
||||
$url = null;
|
||||
$class = null;
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$url = $block->url()->esc();
|
||||
$class = "video-from-web";
|
||||
} elseif ($video = $block->video()->toFile()) {
|
||||
$url = $video->url();
|
||||
$class = "video-from-local";
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ($video = Html::video($url)): ?>
|
||||
<figure class="<?= $class ?>">
|
||||
<?php if ($block->location() == 'web'):?>
|
||||
<?= $video ?>
|
||||
<?php else:?>
|
||||
<video src="<?= $url ?>" controls></video>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption><?= $caption ?></figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
3
site/snippets/footer.php
Normal file
3
site/snippets/footer.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
</body>
|
||||
</html>
|
||||
78
site/snippets/head.php
Normal file
78
site/snippets/head.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
|
||||
<!-- Meta Tag -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="description" content="<?= $site->description()->html() ?>">
|
||||
<meta name="keywords" content="<?= $site->keywords()->html() ?>">
|
||||
<meta name="author" content="<?= $site->author()->html() ?>">
|
||||
<meta name='subject' content="<?= $site->subject()->html() ?>">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<title><?= $site->title()->esc() ?> | <?= $page->title()->esc() ?></title>
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<?= css([
|
||||
'assets/css/reset.css',
|
||||
'assets/fonts/stylesheet.css',
|
||||
'assets/css/variables.css',
|
||||
'assets/css/main.css',
|
||||
'@auto'
|
||||
]) ?>
|
||||
|
||||
<?php if($page->intendedTemplate() == "print"):?>
|
||||
<?= css("assets/pagedjs/interface-header.css")?>
|
||||
<?= css("assets/pagedjs/interface.css")?>
|
||||
<?php else: ?>
|
||||
<?= css([
|
||||
'assets/css/libs/flexboxgrid.css',
|
||||
'assets/css/libs/glightbox.min.css',
|
||||
'assets/css/web.css',
|
||||
'assets/css/responsive.css',
|
||||
'@auto'
|
||||
]) ?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($page->intendedTemplate() == "print"):?>
|
||||
<?= js([
|
||||
"assets/pagedjs/paged.js",
|
||||
"assets/pagedjs/interface.js",
|
||||
"assets/pagedjs/reload-in-place.js",
|
||||
"assets/js/plugins/csstree.js",
|
||||
"assets/js/plugins/smartquote.js",
|
||||
"assets/js/plugins/fix-justif.js",
|
||||
"assets/js/plugins/fullpage.js",
|
||||
"assets/js/plugins/full-page.js",
|
||||
"assets/js/plugins/margin-notes.js",
|
||||
"assets/js/plugins/toc.js",
|
||||
'@auto'
|
||||
]) ?>
|
||||
|
||||
<?php else:?>
|
||||
<?= js([
|
||||
'assets/js/glightbox.min.js',
|
||||
'assets/js/main.js',
|
||||
'@auto'
|
||||
]) ?>
|
||||
<?php endif;?>
|
||||
|
||||
<!-- Social Networks -->
|
||||
<meta property="og:title" content="<?= $site->title()->html() ?> | <?= $page->title()->html() ?>">
|
||||
<meta property="og:description" content="<?= $site->description()->html() ?>">
|
||||
<?php if ($cover = $site->cover()->toFile()): ?>
|
||||
<meta property="og:image" content="<?= $cover->url()?>">
|
||||
<?php endif ?>
|
||||
<meta name='og:type' content='<?= $site->subject()->html() ?>'>
|
||||
<meta name='og:url' content='<?= $site->url() ?>'>
|
||||
<meta name='og:site_name' content='<?= $site->title()->html() ?>'>
|
||||
|
||||
</head>
|
||||
<body
|
||||
data-login="<?php e($kirby->user(),'true', 'false') ?>"
|
||||
data-template="<?= $page->template() ?>"
|
||||
data-intended-template="<?= $page->intendedTemplate() ?>">
|
||||
|
||||
5
site/snippets/header.php
Normal file
5
site/snippets/header.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<header role="banner" class="row">
|
||||
<?php snippet('logo')?>
|
||||
<?php snippet('nav')?>
|
||||
</header>
|
||||
|
||||
23
site/snippets/item.php
Normal file
23
site/snippets/item.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<li class="col-xs-12 col-sm-6 col-md-4 col-xl-3">
|
||||
<a href="<?= $projet->url()?>" title="<?= $projet->title()?>">
|
||||
<?php if($image = $projet->cover()->toFile()):?>
|
||||
<div class="projets__projet__cover">
|
||||
<picture>
|
||||
<source
|
||||
srcset="<?= $image->thumb(['width' => 680, 'height' => 680, 'crop' => true, 'format' => 'webp'])->url() ?>"
|
||||
sizes="<?= $sizes ?>"
|
||||
type="image/webp"
|
||||
>
|
||||
<img
|
||||
loading="lazy"
|
||||
alt="<?= $image->alt() ?>"
|
||||
src="<?= $image->thumb(['width' => 680, 'height' => 680, 'crop' => true, 'format' => 'webp'])->url() ?>"
|
||||
srcset="<?= $image->srcset() ?>"
|
||||
sizes="<?= $sizes ?>"
|
||||
>
|
||||
</picture>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<p><?= $projet->title()?></p>
|
||||
</a>
|
||||
</li>
|
||||
13
site/snippets/logo.php
Normal file
13
site/snippets/logo.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div class="site__logo col-xs-6 col-sm-3 col-md-4 col-lg-5 col-xl-6 row">
|
||||
<?php if($logo = $site->logo()->toFile()):?>
|
||||
<a href="<?= $site->url() ?>" title="<?= $site->title()?>">
|
||||
<figure>
|
||||
<?= $logo?>
|
||||
</figure>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<h1 class="header__title">
|
||||
<a href="<?= $site->url() ?>" title="<?= $site->title()?>">
|
||||
<?= $site->title()->html()?>
|
||||
</a></h1>
|
||||
</div>
|
||||
38
site/snippets/nav.php
Normal file
38
site/snippets/nav.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php $items = $pages->listed();?>
|
||||
|
||||
<?php if($items->isNotEmpty()):?>
|
||||
<nav class="col-xs-12 col-sm-9 col-md-8 col-lg-7 col-xl-6 row end-xs">
|
||||
<div class="mobile__menu_btn">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<ul class='row between-xs col-xs-12 col-sm'>
|
||||
<?php foreach($items as $item): ?>
|
||||
<li <?php e($item->isOpen(), ' class="active"') ?>>
|
||||
<a href="<?= $item->url() ?>"><?= $item->title()->html() ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<ul class="social-network end-xs row">
|
||||
<?php $socials = $site->social()->toStructure();?>
|
||||
<?php foreach($socials as $social): ?>
|
||||
<li>
|
||||
<a href="<?= $social->link()?>" title="<?= $social->title()?>" target="_blank">
|
||||
<?= $social->icon()?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<ul class="languages end-xs row">
|
||||
<?php foreach($kirby->languages() as $language): ?>
|
||||
<li<?php e($kirby->language() == $language, ' class="active"') ?>>
|
||||
<a href="<?= $page->url($language->code()) ?>" hreflang="<?php echo $language->code() ?>">
|
||||
<?= html($language->code()) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
15
site/templates/default.php
Normal file
15
site/templates/default.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php snippet('head') ?>
|
||||
<?php snippet('header') ?>
|
||||
|
||||
<main class="default__page" id="fade">
|
||||
<div class="default__page__wrapper">
|
||||
<h1><?= $page->title()->html()->smartypants()?></h1>
|
||||
<?php foreach ($page->text()->toBlocks() as $block): ?>
|
||||
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
|
||||
<?= $block ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php snippet('footer');?>
|
||||
23
site/templates/home.php
Normal file
23
site/templates/home.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php snippet('head') ?>
|
||||
<?php snippet('header') ?>
|
||||
|
||||
<?php $sizes = "(min-width: 1200px) 25vw,
|
||||
(min-width: 900px) 33vw,
|
||||
(min-width: 600px) 50vw,
|
||||
100vw";
|
||||
?>
|
||||
|
||||
<main class="home" id="fade">
|
||||
<section>
|
||||
|
||||
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre') as $chapitre):?>
|
||||
<article>
|
||||
<h2><?= $chapitre->title()->html() ?></h2>
|
||||
<?= $chapitre->text()->toBlocks() ?>
|
||||
</article>
|
||||
<?php endforeach;?>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<?php snippet('footer');?>
|
||||
35
site/templates/print.php
Normal file
35
site/templates/print.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php snippet('head') ?>
|
||||
|
||||
|
||||
<?php $sizes = "(min-width: 1200px) 25vw,
|
||||
(min-width: 900px) 33vw,
|
||||
(min-width: 600px) 50vw,
|
||||
100vw";
|
||||
?>
|
||||
|
||||
<header id="interface-header" w3-include-html="assets/pagedjs/interface.html"></header>
|
||||
|
||||
<div id="render-book"></div>
|
||||
|
||||
<template id="book-content">
|
||||
<section class="cover">
|
||||
<h1><?= $site->title()->html()?></h1>
|
||||
</section>
|
||||
<section class="toc">
|
||||
<h2>Sommaire</h2>
|
||||
<article id="table-of-contents"></article>
|
||||
</section>
|
||||
|
||||
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre') as $chapitre):?>
|
||||
<section class="chapter">
|
||||
<h2><?= $chapitre->title()->html()->smartypants() ?></h2>
|
||||
<?php foreach ($chapitre->text()->toBlocks() as $block): ?>
|
||||
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
|
||||
<?= $block ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
<?php endforeach;?>
|
||||
</template>
|
||||
|
||||
<?php snippet('footer');?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue