nouveau-theatre-de-besancon/site/templates/sectioned.php

42 lines
1.5 KiB
PHP
Raw Normal View History

2024-09-03 15:46:35 +02:00
<?php snippet('header') ?>
2024-09-04 15:23:45 +02:00
<section class="anchors-strip">
<ul>
<?php foreach($page->children() as $section): ?>
<?php if ($section->isIndexed() != 'false'): ?>
<li>
<a href="#<?= $section->slug() ?>" title="Défiler jusqu'à la section <?= $section->title() ?>"><?= $section->title() ?></a>
</li>
<?php endif ?>
<?php endforeach ?>
</ul>
</section>
2024-09-03 15:46:35 +02:00
<section>
<h1><?= $page->title() ?></h1>
</section>
<?php foreach($page->children() as $sectionPage): ?>
<section id="<?= $sectionPage->slug() ?>" <?= e($sectionPage->backgroundColor()->isNotEmpty() == 'true', ' style="--color: ' . $sectionPage->backgroundColor() . ';"') ?>>
2024-09-03 15:46:35 +02:00
<?php if ($sectionPage->isIndexed() != 'false'): ?>
<h2 class="h3"><?= $sectionPage->title() ?></h2>
<?php endif ?>
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
<div
2024-09-16 15:56:53 +02:00
class="section__row grid<?= e($layout->attrs()->imgHeight()->isNotEmpty() == 'true', ' fixed-img-height') ?>"
<?= e($layout->attrs()->imgHeight()->isNotEmpty() == 'true', ' style="--height: ' . $layout->attrs()->imgHeight() . 'vw;" ') ?>
id="<?= $layout->id() ?>"
>
2024-09-03 15:46:35 +02:00
<?php foreach ($layout->columns() as $column): ?>
<div class="grid__item" style="--span:<?= $column->span() ?>">
<div class="blocks">
<?= $column->blocks() ?>
</div>
</div>
<?php endforeach ?>
</div>
<?php endforeach ?>
</section>
<?php endforeach ?>
<?php snippet('footer') ?>