nouveaux tests

This commit is contained in:
sarahgarcin1 2026-03-18 08:44:44 +01:00
parent 87eb528e7b
commit 00edad1729
117 changed files with 5757 additions and 141 deletions

View file

@ -47,3 +47,10 @@ fields:
type: writer
icon: text
inline: true
taille:
label: Taille de l'image
type: select
options:
"small": Petite
"medium": Moyenne
"big": Grande

View file

@ -10,6 +10,13 @@ columns:
label: Légende
type: writer
size: small
taille:
label: Taille de l'image
type: select
options:
"small": Petite
"medium": Moyenne
"big": Grande
- width: 1/2
sections:
meta:

View file

@ -7,7 +7,7 @@ $ratio = $block->ratio()->or('auto');
<figure<?= Html::attr(['data-ratio' => $ratio, 'data-crop' => $crop], null, ' ') ?>>
<ul>
<?php foreach ($block->images()->toFiles() as $image): ?>
<li>
<li class="<?= $image->taille()->esc()?> <?= $image->orientation()?>">
<a href="<?= $image->url() ?>" class="glightbox" <?php if($caption->isNotEmpty()):?> data-glightbox="title: <?= $caption ?>"<?php endif?>>
<?= $image ?>
</a>

View file

@ -19,7 +19,7 @@ $src = $block->image()->toFile()->url();
<?php endif ?>
</figure>
<figure class="print-image full-page" style="height:<?= $block->image()->toFile()->height()?>px">
<figure class="print-image full-page <?= $block->taille()->esc() ?>" style="height:<?= $block->image()->toFile()->height()?>px">
<?php if($srcred = $block->imagered()->toFile()):?>
<div class="print-red red-layer">
<img src="<?= $srcred->url() ?>" alt="<?= $alt->esc() ?>">

View file

@ -1,47 +1,47 @@
<?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">
<?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="cover">
<h1><?= $site->title()->html()?></h1>
</section>
<section class="toc">
<h2>Sommaire</h2>
<article id="table-of-contents"></article>
</section>
<section class="toc">
<h2>Sommaire</h2>
<article id="table-of-contents"></article>
</section>
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre')->listed() as $chapitre):?>
<section class="chapter">
<?php if($cover = $chapitre->cover()->toFile()):?>
<div class="interpage full-bleed-image full-page">
<figure>
<img src="<?= $cover->url() ?>" alt="">
</figure>
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre')->listed() as $chapitre):?>
<section class="chapter <?= $chapitre->typeof()->esc()?>" id="<?= $chapitre->uid()?>">
<?php if($cover = $chapitre->cover()->toFile()):?>
<div class="interpage full-bleed-image full-page">
<figure>
<img src="<?= $cover->url() ?>" alt="">
</figure>
</div>
<?php endif;?>
<div class="chapter-title">
<p class="type"><?= $chapitre->typeof()?></p>
<h2><?= $chapitre->title()->html()->smartypants() ?></h2>
<h3><?= $chapitre->author()->html()->smartypants() ?></h3>
</div>
<?php endif;?>
<div class="chapter-title">
<p class="type"><?= $chapitre->typeof()?></p>
<h2><?= $chapitre->title()->html()->smartypants() ?></h2>
<h3><?= $chapitre->author()->html()->smartypants() ?></h3>
</div>
<div class="chapter-content">
<?php foreach ($chapitre->text()->toBlocks() as $block): ?>
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
<?= $block ?>
<div class="chapter-content">
<?php foreach ($chapitre->text()->toBlocks() as $block): ?>
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
<?= $block ?>
</div>
<?php endforeach ?>
</div>
<?php endforeach ?>
</div>
</section>
<?php endforeach;?>
</section>
<?php endforeach;?>
</template>
<?php snippet('footer');?>
</template>
<?php snippet('footer');?>