43 lines
No EOL
1.7 KiB
PHP
43 lines
No EOL
1.7 KiB
PHP
<?= 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>
|