Add landing page
This commit is contained in:
parent
9439de0603
commit
aaf1aa7890
603 changed files with 637 additions and 1 deletions
157
private/site/templates/project.php
Normal file
157
private/site/templates/project.php
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?= snippet('header') ?>
|
||||
|
||||
<header class="header">
|
||||
<a href="<?= $site->find('agence')->url() ?>"><h1 class="header__logo">DATA</h1></a>
|
||||
<div class="header__views views header__views--unvisible" style="opacity: 1">
|
||||
<button class="views__btn views__btn--close" style="display: block">
|
||||
<img src="/assets/svg/close.svg" alt="">
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="project">
|
||||
<div class="projectContainer">
|
||||
<!-- Slider main container -->
|
||||
<div class="swiper-container">
|
||||
<!-- Additional required wrapper -->
|
||||
<div class="swiper-wrapper">
|
||||
<!-- Slides -->
|
||||
|
||||
<!-- Image principale -->
|
||||
<div class="swiper-slide">
|
||||
<img class="swiper-slide__image" src="<?= $page->coverImage()->toFile()->url() ?>" srcset=" <?= $page->coverImage()->toFile()->srcset() ?>" />
|
||||
</div>
|
||||
|
||||
<!-- Galerie -->
|
||||
<?php
|
||||
|
||||
$images = $page->blocks()->toStructure();
|
||||
|
||||
foreach ($images as $image): ?>
|
||||
<?php if ($image->project() == 'true' && $image->pic() !== NULL): ?>
|
||||
<div class="swiper-slide">
|
||||
<img class="swiper-slide__image" src="<?= $image->pic()->toFile()->url() ?>" srcset=" <?= $image->pic()->toFile()->srcset() ?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
<!-- Slide texte -->
|
||||
<div class="swiper-slide">
|
||||
<div class="swiper-slide__intro">
|
||||
<span class="intro__recap">
|
||||
<?php if ($page->start()->isNotEmpty() && $page->end()->isNotEmpty()) : ?>
|
||||
<span class="recap__item">
|
||||
<?php echo $page->start() . ' - ' . $page->end() . ', ' . $page->place() . '<br />' ?>
|
||||
</span>
|
||||
|
||||
<?php elseif ($page->start()->isNotEmpty() || $page->end()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
<?= $page->start() ?><?= $page->end() ?>, <?= $page->place() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->pgm()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
<?= $page->pgm() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->architects()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
ARCHITECTES : <?= $page->architects() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->be()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
BE : <?= $page->be() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->mo()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
MOA : <?= $page->mo() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->size()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
<?= $page->size() ?>
|
||||
</span>
|
||||
<br />
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->credits()->isNotEmpty()): ?>
|
||||
<span class="recap__item">
|
||||
<?= $page->credits() ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fin slide texte -->
|
||||
</div>
|
||||
<!-- If we need pagination -->
|
||||
<!-- <div class="swiper-pagination"></div> -->
|
||||
|
||||
<!-- Navigation buttons -->
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
|
||||
<!-- If we need scrollbar -->
|
||||
<!-- <div class="swiper-scrollbar"></div> -->
|
||||
</div>
|
||||
<button class="toProjectDesc"><h1 class="project__title"><span class="project__title--ref"><?= $page->ref() ?></span><?= $page->title() ?></h1></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
|
||||
<script>
|
||||
let mySwiper = new Swiper('.swiper-container', {
|
||||
// Optional parameters
|
||||
direction: 'horizontal',
|
||||
loop: true,
|
||||
observer: true,
|
||||
observeSlideChildren: true,
|
||||
observeParents: true,
|
||||
speed: 300,
|
||||
autoplay: {
|
||||
delay: 2000
|
||||
},
|
||||
|
||||
// Responsive
|
||||
breakpoints: {
|
||||
800: {
|
||||
speed: 500,
|
||||
autoplay: false
|
||||
}
|
||||
},
|
||||
|
||||
// Navigation arrows
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev'
|
||||
},
|
||||
|
||||
// Keyboard control
|
||||
keyboard: {
|
||||
enabled: true
|
||||
}
|
||||
})
|
||||
|
||||
document.querySelector('.views__btn--close').addEventListener('click', () => {
|
||||
document.location.replace('<?= $site->url() ?>')
|
||||
})
|
||||
document.querySelector('.toProjectDesc').addEventListener('click', () => {
|
||||
mySwiper.slideTo(document.querySelectorAll('.swiper-slide').length - 2)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue