dataarchiteces/private/site/templates/agency.php
2026-02-09 09:03:35 +01:00

43 lines
No EOL
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?= snippet('header') ?>
<header class="header">
<h1 class="header__logo" data-title="<?= $site->title() ?>">INFO</h1>
<div class="header__views views header__views--unvisible" style="opacity: 1">
<button class="views__btn views__btn--close" style="display: block">
<img src="<?= $kirby->url('assets') ?>/svg/close.svg" alt="">
</button>
</div>
</header>
<div class="wrapper">
<div class="agency">
<section class="agency__presentation"><?= $site->presentation()->kt() ?></section>
<section class="agency__projects">
<h1 class="majorProjects">Projets principaux</h1>
<?php foreach ($site->children()->sortBy('start', 'desc') as $project): ?>
<?php if ($project->major() == 'true'): ?>
<?php if ($project->start()->isNotEmpty() && $project->end()->isNotEmpty()) :?>
<?= $project->start() ?> - <?= $project->end() ?> <?= $project->title() ?><br />
<?php else : ?>
<?= $project->start() ?><?= $project->end() ?> <?= $project->title() ?><br />
<?php endif ?>
<?php endif ?>
<?php endforeach ?>
</section>
</div>
</div>
<script>
history.pushState(null, '<?= $site->title() ?>', '<?= $site->url() ?>')
history.pushState(null, '<?= $page->title() ?>', '<?= $page->url() ?>')
window.onpopstate = function() {
window.location.href = window.location.href
}
document.querySelector('.views__btn--close').addEventListener('click', () => {
document.location.replace('<?= $site->url() ?>')
})
</script>
</body>
</html>