Initial commit

This commit is contained in:
isUnknown 2026-02-12 15:22:46 +01:00
commit 65e0da7e11
1397 changed files with 596542 additions and 0 deletions

23
site/snippets/about.php Normal file
View file

@ -0,0 +1,23 @@
<?php if ($aboutPage = $site->aboutPage()->toPage()): ?>
<div id="about-logo">
<svg><use xlink:href="<?= url('assets/images/svg-sprite.svg') ?>#logo" /></svg>
</div>
<div id="about-text"><?= $aboutPage->text()->kt() ?></div>
<div id="about-socials">
<?php if ($aboutPage->socials()->isNotEmpty()): ?>
<?php foreach ($aboutPage->socials()->toStructure() as $key => $item): ?>
<a class="row uppercase link-hover black" href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
<?php endforeach ?>
<?php endif ?>
</div>
<div id="about-contact"><?= $aboutPage->contact()->kt() ?><div id="about-address"><?= $aboutPage->address()->kt() ?></div></div>
<?php snippet('newsletter') ?>
<div id="credits">© <?= date('Y').' '.$site->title()->html() ?> — All rights reserved</div>
<?php endif ?>

View file

@ -0,0 +1,63 @@
<?php if( $image): ?>
<?php if ($image->laptopvideo()->isNotEmpty() ||
$image->laptopvideo()->isNotEmpty() ||
$image->monitorvideo()->isNotEmpty()): ?>
<?php snippet('video-player', ['image' => $image]) ?>
<?php else: ?>
<div class="artist-image">
<?php
if(!isset($maxWidth)) $maxWidth = 3400;
if (isset($ratio)) {
$placeholder = $image->crop(10, floor(10/$ratio))->dataURI();
$src = $image->crop(1000, floor(1000/$ratio))->url();
$srcset = $image->crop(340, floor(340/$ratio))->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->crop($i, floor($i/$ratio))->url() . ' ' . $i . 'w,';
} else {
$placeholder = $image->resize(10)->dataURI();
$src = $image->resize(1000)->url();
$srcset = $image->resize(340)->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->resize($i)->url() . ' ' . $i . 'w,';
}
?>
<img
class="lazy lazyload<?php if(isset($preload)) echo ' lazypreload' ?>"
src="<?= $placeholder ?>"
data-src="<?= $src ?>"
data-srcset="<?= $srcset ?>"
data-sizes="auto"
data-optimumx="1.5"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
height="100%" width="auto" />
<?php if($image->embed()->isNotEmpty()): ?>
<?= video($image->embed()) ?>
<?php endif ?>
<noscript>
<img src="<?= $src ?>"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
height="100%" width="auto" />
</noscript>
<?php if (isset($withCaption) && $image->caption()->isNotEmpty()): ?>
<div class="row caption"><?= $image->caption()->kt() ?></div>
<?php endif ?>
</div>
<?php endif ?>
<?php endif ?>

65
site/snippets/footer.php Normal file
View file

@ -0,0 +1,65 @@
</div>
</div>
</div>
</div>
<div id="about-panel">
<div class="about-close uppercase link-hover black" event-target="about-panel"><?= t('close') ?></div>
<div data-scroll="y" data-scrollmobile="y">
<div class="inner-scroll"><?php snippet('about') ?></div>
</div>
</div>
<div id="artists-preview">
<?php foreach ($artists as $key => $artist): ?>
<?php if ($artist->hero()->isNotEmpty()): ?>
<div class="artist-preview" data-id="<?= $artist->uid() ?>"><?php snippet('responsive-image', ['image' => $artist->hero()->toFile(), 'preload' => true]) ?></div>
<?php elseif ($artist->featured()->isNotEmpty()): ?>
<div class="artist-preview" data-id="<?= $artist->uid() ?>"><?php snippet('responsive-image', ['image' => $artist->featured()->toFile(), 'preload' => true]) ?></div>
<?php endif ?>
<?php endforeach ?>
</div>
<div id="outdated">
<div class="inner">
<p class="browserupgrade">You are using an <strong>outdated</strong> browser.
<br>Please <a href="http://outdatedbrowser.com" target="_blank">upgrade your browser</a> to improve your experience.</p>
</div>
</div>
<?php if($site->googleanalytics()->isNotEmpty()): ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-115150448-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?= $site->googleanalytics() ?>');
</script>
<?php endif ?>
<!--========== VIDEO RESPONSIVE PATCH ==========-->
<script>
document.querySelectorAll('.video-player').forEach(video => {
const source = document.createElement('source')
source.setAttribute('type', 'video/mp4')
if (window.innerWidth > 2500 && video.dataset.monitor.length > 0) {
source.setAttribute('src', video.dataset.monitor)
} else if (window.innerWidth < 1000 && video.dataset.mobile.length > 0) {
source.setAttribute('src', video.dataset.mobile)
} else {
source.setAttribute('src', video.dataset.laptop)
}
video.appendChild(source)
});
</script>
<?= js('assets/js/build/app.min.js'); ?>
<?php snippet('front-comments') ?>
</body>
</html>

221
site/snippets/header.php Normal file
View file

@ -0,0 +1,221 @@
<!DOCTYPE html>
<html lang="<?= $site->language()->code() ?>" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="dns-prefetch" href="//www.google-analytics.com">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="canonical" href="<?php echo html($page->url()) ?>" />
<?php if($page->isHomepage()): ?>
<title><?= $site->title()->html() ?></title>
<?php else: ?>
<title><?= $page->title()->html() ?> | <?= $site->title()->html() ?></title>
<?php endif ?>
<?php if($page->isHomepage()): ?>
<meta name="description" content="<?= $site->description()->html() ?>">
<?php else: ?>
<meta name="DC.Title" content="<?= $page->title()->html() ?>" />
<?php if(!$page->text()->empty()): ?>
<meta name="description" content="<?= $page->text()->excerpt(250) ?>">
<meta name="DC.Description" content="<?= $page->text()->excerpt(250) ?>"/ >
<meta property="og:description" content="<?= $page->text()->excerpt(250) ?>" />
<?php else: ?>
<meta name="description" content="">
<meta name="DC.Description" content=""/ >
<meta property="og:description" content="" />
<?php endif ?>
<?php endif ?>
<meta name="robots" content="index,follow" />
<meta name="keywords" content="<?= $site->keywords()->html() ?>">
<?php if($page->isHomepage()): ?>
<meta itemprop="name" content="<?= $site->title()->html() ?>">
<meta property="og:title" content="<?= $site->title()->html() ?>" />
<?php else: ?>
<meta itemprop="name" content="<?= $page->title()->html() ?> | <?= $site->title()->html() ?>">
<meta property="og:title" content="<?= $page->title()->html() ?> | <?= $site->title()->html() ?>" />
<?php endif ?>
<meta property="og:type" content="website" />
<meta property="og:url" content="<?= html($page->url()) ?>" />
<?php if($page->featured()->isNotEmpty() && $ogimage = $page->featured()->toFile()): ?>
<?php $ogimage = $ogimage->resize(1200) ?>
<meta property="og:image" content="<?= $ogimage->url() ?>"/>
<meta property="og:image:width" content="<?= $ogimage->width() ?>"/>
<meta property="og:image:height" content="<?= $ogimage->height() ?>"/>
<?php else: ?>
<?php if($site->ogimage()->isNotEmpty() && $ogimage = $site->ogimage()->toFile()): ?>
<?php $ogimage = $ogimage->width(1200) ?>
<meta property="og:image" content="<?= $ogimage->url() ?>"/>
<meta property="og:image:width" content="<?= $ogimage->width() ?>"/>
<meta property="og:image:height" content="<?= $ogimage->height() ?>"/>
<?php endif ?>
<?php endif ?>
<meta itemprop="description" content="<?= $site->description()->html() ?>">
<link rel="shortcut icon" href="<?= url('assets/images/favicon.ico') ?>">
<link rel="icon" href="<?= url('assets/images/favicon.ico') ?>" type="image/x-icon">
<?php
echo css('assets/css/build/build.min.css');
echo js('assets/js/build/vendor/modernizr-bundle.js');
?>
<?php if(!$site->customcss()->empty()): ?>
<style type="text/css">
<?php echo $site->customcss()->html() ?>
</style>
<?php endif ?>
<!-- CSS PATCH (ADRIEN) -->
<style>
table p {
text-align: left;
}
.visuallyhidden {
display: none;
}
.shopify-buy__btn-disabled {
background: transparent;
color: #000;
border: none;
padding: 0;
}
.shopify-buy__btn.shopify-buy__btn-disabled {
border: none;
border-radius: 0;
background: transparent;
color: #000;
width: auto;
height: 0;
cursor: not-allowed;
}
/* ================= NEWS PATCH ================= */
body {
overflow-y: hidden;
}
#news {
display: flex;
height: 100vh;
}
#news .item {
flex-shrink: 0;
margin-right: .35rem;
}
#news .link-overlay {
position: absolute;
z-index: 1;
height: 100%;
}
.responsive-image {
height: 100vh;
}
.responsive-image img {
height: 100%;
object-fit: cover;
}
/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
* {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
#news .caption {
line-height: 1;
position: absolute;
bottom: 0;
background: #fff;
padding: 1rem;
transform: translateY(16rem);
opacity: 0;
transition: all .5s cubic-bezier(0.1, 0.57, 0.1, 1);
}
#news .item:hover .caption {
transform: translateY(0);
opacity: 1;
}
/* ================= NEWS MOBILE ================= */
@media screen and (max-width: 1025px) {
body {
overflow-y: auto;
}
#news {
display: block;
height: auto;
}
#news .item {
width: 100vw !important;
height: auto !important;
}
#news .item {
position: relative;
}
#news .responsive-image {
height: auto;
}
.ph {
display: none;
}
#news .link-overlay {
display: inline;
height: 100%;
width: 100% !important;
}
#news .responsive-image img {
position: relative;
}
#news .item .caption {
position: relative;
opacity: 1;
transform: translateY(0);
width: 100vw !important;
}
}
</style>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '211316429500623');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1"
src="https://www.facebook.com/tr?id=211316429500623&ev=PageView
&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->
</head>
<body page-type="<?= $page->intendedTemplate() ?>" <?php e(!$site->font()->bool(), 'class="sans-serif"') ?>>
<div id="loader"></div>
<?php snippet('intro') ?>
<div id="main">
<div class="pjax">
<?php snippet('site-title') ?>
<div id="container">
<div id="page-content" page-type="<?= $page->intendedTemplate() ?>">

View file

@ -0,0 +1,67 @@
<?php if (c::get('plugin.instagram-api.access-token')): ?>
<?php
$result = $page->instagramapi(c::get('plugin.instagram-api.access-token'), 'users/self/media/recent');
if(gettype($result) == 'array' && a::get($result, 'data')) {
$username = $result['data'][0]['user']['username'];
$t = brick('a', $username)
->addClass('insta-username bold')
->attr('target', '_blank')
->attr('rel', 'noopener')
->attr('href', 'https://www.instagram.com/'.$username);
echo $t;
foreach($result['data'] as $data) {
// https://getkirby.com/docs/toolkit/api/helpers/brick
// $imgurl = $data['images']['low_resolution']['url'];
$imgurl = $data['images']['standard_resolution']['url'];
// if you want to cache the image you could
// use this helper or write your own based on it
if($imgMedia = site()->instagramapiCacheImageToThumbs($imgurl)) {
$imgurl = $imgMedia->url();
}
$img = brick('img')
->attr('data-src', $imgurl)
->addClass('lazy lazyload lazypreload')
->attr('width', '100%');
if($data['caption']) $img->attr('alt', $data['caption']['text']);
$a = brick('a', $img)
->addClass('insta-post')
->attr('target', '_blank')
->attr('rel', 'noopener')
->attr('href', $data['link']);
$likesAndComments = ' (';
$likesAndComments .= $data['likes']['count'].' like';
if($data['likes']['count'] > 1) $likesAndComments .= 's ';
$likesAndComments .= $data['comments']['count'].' comment';
if($data['comments']['count'] > 1) $likesAndComments .= 's';
$likesAndComments .= ')';
$txt = brick('p', html($data['caption']['text'].$likesAndComments));
$a->append($txt);
echo $a;
}
$t = brick('a', 'Voir la suite…')
->addClass('bold')
->attr('target', '_blank')
->attr('rel', 'noopener')
->attr('href', 'https://www.instagram.com/'.$username);
echo $t;
} else {
// show error message this plugin provides
echo brick('code', $result);
}
?>
<?php endif ?>

File diff suppressed because one or more lines are too long

5
site/snippets/intro.php Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,80 @@
<?php
$about = $site->aboutPage()->toPage();
?>
<div id="menu" class="visible">
<div id="mobile-toggle-header">
<div event-target="menu">
<div id="burger">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<?php if ($about): ?>
<div event-target="about-panel"><?= $about->title()->html() ?></div>
<?php endif ?>
</div>
<ul id="primary-nav">
<?php foreach($site->pages()->listed() as $item): ?>
<?php if ($about && $item->is($about)): ?>
<?php else: ?>
<li>
<?php if (!in_array($item->intendedTemplate(), ['artists'])): ?>
<a<?php e($item->isOpen(), ' class="active"') ?> href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
<?php else: ?>
<span<?php e($item->isOpen(), ' class="active"') ?>><?= $item->title()->html() ?></span>
<?php endif ?>
<?php
$children = $item->children()->published();
if($children->count() > 0):
?>
<ul>
<?php foreach($children as $child): ?>
<li>
<a
<?php e($child->isOpen(), ' class="active"') ?>
href="<?= $child->url() ?>"
data-id="<?= $child->uid() ?>"
data-page="<?= $child->intendedTemplate() ?>"
>
<?= $child->title()->html() ?>
</a>
</li>
<?php endforeach ?>
</ul>
<?php endif ?>
</li>
<?php endif ?>
<?php endforeach ?>
<?php if ($aboutPage = $site->aboutPage()->toPage()): ?>
<ul id="menu-socials">
<?php if ($aboutPage->socials()->isNotEmpty()): ?>
<?php foreach ($aboutPage->socials()->toStructure()->limit(4) as $key => $item): ?>
<a class="row uppercase link-hover black" href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
<?php endforeach ?>
<?php endif ?>
</ul>
<?php endif ?>
</ul>
<ul id="secondary-nav">
<div id="languages">
<?php foreach($kirby->languages()->flip() as $language): ?>
<?php if (true || $kirby->language() != $language): ?>
<a class="language no-barba<?php e($site->language() == $language, ' active') ?>" href="<?= $page->url($language->code()) ?>">
<?= ucfirst(html($language->code())) ?>
</a>
<?php endif ?>
<?php endforeach ?>
</div>
<?php if ($about): ?>
<div event-target="about-panel"><?= $about->title()->html() ?></div>
<?php endif ?>
</ul>
</div>

View file

@ -0,0 +1,90 @@
<div id="newsletter">
<div class="form">
<div id="sib_embed_signup">
<div class="forms-builder-wrapper">
<input type="hidden" id="sib_embed_signup_lang" value="fr"> <input type="hidden" id="sib_embed_invalid_email_message" value="Cette adresse email n'est pas valide."> <input type="hidden" name="primary_type" id="primary_type" value="email">
<form class="description" id="theform" name="theform" action="https://my.sendinblue.com/users/subscribeembed/js_id/3lkpg/id/1" onsubmit="return false;">
<input type="hidden" name="js_id" id="js_id" value="3lkpg"><input type="hidden" name="listid" id="listid" value="4"><input type="hidden" name="from_url" id="from_url" value="yes"><input type="hidden" name="hdn_email_txt" id="hdn_email_txt" value="">
<div class="sib-container rounded ui-sortable" >
<input type="hidden" name="req_hid" id="req_hid" value="" >
<div class="view-messages" > </div>
<!-- an email as primary -->
<div class="primary-group email-group forms-builder-group ui-sortable" style="">
<div class="row mandatory-email" >
<!-- <div class="field">
<div>FIRST NAME</div><input type="text" name="NOM" id="NOM" value="" >
</div>
<div class="field">
<div>LAST NAME</div><input type="text" name="PRENOM" id="PRENOM" value="" >
</div>
-->
<div class="field">
<div><?= t('subscribe') ?></div><input type="text" name="email" id="email" value="" >
</div>
<div style="clear:both;"></div>
<div class="hidden-btns">
<a class="btn move" href="#"><i class="fa fa-arrows"></i></a><br> <!--<a class="btn btn-danger delete" href="#"><i class="fa fa-trash-o fa-inverse"></i></a>-->
</div>
</div>
</div>
</div>
<div class="captcha forms-builder-group" style="display: none;">
<div class="row"><div id="gcaptcha" ></div></div>
</div>
<div class="byline" > <button class="button editable " type="submit" data-editfield="subscribe"><?= t('submit') ?></div>
</form>
</div>
</div>
</div>
<script type="text/javascript"> var sib_prefix = 'sib'; var sib_dateformat = 'dd-mm-yyyy'; </script>
<script type='text/javascript' src='https://my.sendinblue.com/public/theme/version4/assets/js/src/subscribe-validate.js?v=1528114688'></script>
<div id="legal">
By subscribing to Pop Noire newsletter, you agree to receive exclusive email updates. You may unsubscribe at anytime. For any questions, please <?= Html::email('contact@popnoire.com', 'contact us') ?>.
</div>
</div>

View file

@ -0,0 +1,52 @@
<?php if($image): ?>
<div class="responsive-image">
<?php
if(!isset($maxWidth)) $maxWidth = 3400;
if (isset($ratio)) {
$placeholder = $image->crop(10, floor(10/$ratio))->url();
$src = $image->crop(1000, floor(1000/$ratio))->url();
$srcset = $image->crop(340, floor(340/$ratio))->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->crop($i, floor($i/$ratio))->url() . ' ' . $i . 'w,';
} else {
$placeholder = $image->resize(10)->url();
$src = $image->resize(1000)->url();
$srcset = $image->resize(340)->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->resize($i)->url() . ' ' . $i . 'w,';
}
?>
<?php if (isset($ratio)): ?>
<div class="ph" style="padding-bottom: <?= number_format(100 / $ratio, 5, '.', '') ?>%"></div>
<?php else: ?>
<div class="ph" style="padding-bottom: <?= number_format(100 / 10, 5, '.', '') ?>%"></div>
<?php endif ?>
<img
class="lazy lazyload<?php if(isset($preload)) echo ' lazypreload' ?>"
src="<?= $placeholder ?>"
data-src="<?= $src ?>"
data-srcset="<?= $srcset ?>"
data-sizes="auto"
data-optimumx="1.5"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
width="100%" height="auto" />
<noscript>
<img src="<?= $src ?>"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
width="100%" height="auto" />
</noscript>
<?php if (isset($withCaption) && $image->caption()->isNotEmpty()): ?>
<div class="row caption"><?= $image->caption()->kt() ?></div>
<?php endif ?>
</div>
<?php endif ?>

View file

@ -0,0 +1,19 @@
<div id="share-buttons">
Share&nbsp;
<ul>
<li>
<a href="http://www.facebook.com/sharer.php?u=<?= rawurlencode ($p->url()); ?>" target="blank" title="Share on Facebook">
Fb.
</a>
</li>
<li>
<a href="https://pinterest.com/pin/create/button/?url=<?= rawurlencode ($p->url()); ?>&media=&description=<?= rawurlencode ($site->title().' | '.$p->title()); ?>" target="blank" title="Share on Pinterest">
Pin.
</a>
</li>
<li>
<a href="https://twitter.com/intent/tweet?source=webclient&text=<?= rawurlencode($site->title().' | '.$p->title()); ?>%20<?= rawurlencode($p->url()); ?>" target="blank" title="Tweet this">Tw.</a>
</li>
</ul>
</div>

View file

@ -0,0 +1,159 @@
<?php if($image = $product->featured()->toFile()): ?>
<div class="product" data-id="<?= $product->id() ?>">
<?php if ($image->mp4()->isNotEmpty() || $image->filemp4()->isNotEmpty()): ?>
<?php snippet('video-player', ['image' => $image]) ?>
<?php else: ?>
<div class="product-image"
<?php if (!isset($noMobileScroll) || isset($noMobileScroll) && !$noMobileScroll): ?>
event-target="product-panel"
<?php endif ?>
>
<?php
$ratio = 1/1;
if(!isset($maxWidth)) $maxWidth = 3400;
if (isset($ratio)) {
$placeholder = $image->crop(10, floor(10/$ratio))->dataURI();
$src = $image->crop(1000, floor(1000/$ratio))->url();
$srcset = $image->crop(340, floor(340/$ratio))->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->crop($i, floor($i/$ratio))->url() . ' ' . $i . 'w,';
} else {
$placeholder = $image->width(10)->dataURI();
$src = $image->width(1000)->url();
$srcset = $image->width(340)->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->width($i)->url() . ' ' . $i . 'w,';
}
?>
<img
class="lazy lazyload<?php if(isset($preload)) echo ' lazypreload' ?>"
src="<?= $placeholder ?>"
data-src="<?= $src ?>"
data-srcset="<?= $srcset ?>"
data-sizes="auto"
data-optimumx="1.5"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
height="100%" width="auto" />
<noscript>
<img src="<?= $src ?>"
<?php if (isset($caption) && $caption): ?>
alt="<?= $caption.' - © '.$site->title()->html() ?>"
<?php elseif ($image->caption()->isNotEmpty()): ?>
alt="<?= $image->caption().' - © '.$site->title()->html() ?>"
<?php else: ?>
alt="<?= $page->title()->html().' - © '.$site->title()->html() ?>"
<?php endif ?>
height="100%" width="auto" />
</noscript>
<?php if (isset($withCaption) && $image->caption()->isNotEmpty()): ?>
<div class="row caption"><?= $image->caption()->kt() ?></div>
<?php endif ?>
</div>
<?php endif ?>
<div class="product-infos"
data-scroll="y"
<?php if (!isset($noMobileScroll) || isset($noMobileScroll) && !$noMobileScroll): ?>
data-scrollmobile="y"
<?php endif ?>
>
<div class="inner-scroll">
<div class="product-title row uppercase"><?= $product->title()->html() ?></div>
<div class="product-description"><?= $product->text()->kt() ?></div>
<?php if ($product->shopifyID()->isNotEmpty()): ?>
<div class="buy uppercase">
<div id="product-component-<?= $product->shopifyID() ?>" class="row" data-shop="<?= $product->shopifyID() ?>"></div>
</div>
<?php endif ?>
<?php if ($product->listen()->isNotEmpty()): ?>
<div class="product-links row uppercase">
<?php foreach ($product->listen()->toStructure() as $key => $item): ?>
<div class="row">
<a class="link-hover black" href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
</div>
<?php endforeach ?>
</div>
<?php endif ?>
<div class="row">
<div class="left">
<?php if ($product->tracklist()->isNotEmpty() && $product->tracklist()->isNotEmpty()): ?>
<div class="product-tracklist">
<div class="row uppercase mb1">Tracklist</div>
<table class="table">
<tbody>
<?php
// CONVERT LAYOUTS COLUMNS TO ROWS
$tracklistRows = layoutsColumnsToRows($product->tracklist()->toLayouts());
foreach ($tracklistRows as $row): ?>
<tr class="table-row">
<?php foreach ($row as $track): ?>
<td class="table-cell"><?= $track ?></td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php endif ?>
<?php if ($product->infos()->isNotEmpty() && $product->infos()->isNotEmpty()): ?>
<div class="product-moreinfos">
<div class="row uppercase mb1">Infos</div>
<table class="table">
<tbody>
<?php
$infosRows = layoutsColumnsToRows($product->infos()->toLayouts());
foreach ($infosRows as $row): ?>
<tr class="table-row">
<?php foreach ($row as $track): ?>
<td class="table-cell"><?= $track ?></td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php endif ?>
</div>
<div class="right">
</div>
<?php /*
<?php if ($product->medias()->isNotEmpty()): ?>
<div class="product-medias row">
<?php foreach ($product->medias()->toStructure() as $key => $m): ?>
<?php snippet('responsive-image', ['field' => $m]) ?>
<?php endforeach ?>
</div>
<?php endif ?>
<!-- <?php if ($product->buy()->isNotEmpty() && $buy = $product->buy()->toStructure()->first()): ?>
<div class="buy row">
<div class="price"><?= $buy->price()->html() ?></div>
<a href="<?= $buy->link() ?>" class="buy-button uppercase">Buy</a>
</div>
<?php endif ?> -->
*/ ?>
</div>
</div>
</div>
<div class="panel-close" event-target="product-panel"><?= t('close') ?></div>
<div class="panel-open" event-target="product-panel"><?= t('buy') ?></div>
</div>
<?php endif ?>

View file

@ -0,0 +1,9 @@
<header>
<?php if ($page->isHomepage()): ?>
<h1><?= $site->title()->html() ?></h1>
<?php else: ?>
<h1><?= $page->title()->html() ?></h1>
<?php endif ?>
<?php snippet('navigation') ?>
</header>

42
site/snippets/slider.php Normal file
View file

@ -0,0 +1,42 @@
<?php foreach ($medias as $key => $image): ?>
<?php if($image = $image->toFile()): ?>
<div class="slide format-<?= $image->extension() ?>"
data-caption="<?= $image->caption()->kt()->escape() ?>"
>
<div class="content image contain">
<?php
if(!isset($maxWidth)) $maxWidth = 3400;
if (isset($ratio)) {
$src = $image->crop(1000, floor(1000/$ratio))->url();
$srcset = $image->crop(340, floor(340/$ratio))->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->crop($i, floor($i/$ratio))->url() . ' ' . $i . 'w,';
} else {
$src = $image->width(1000)->url();
$srcset = $image->width(340)->url() . ' 340w,';
for ($i = 680; $i <= $maxWidth; $i += 340) $srcset .= $image->width($i)->url() . ' ' . $i . 'w,';
}
?>
<img class="media lazy <?php e($key == 0, " lazyload lazypreload") ?>"
data-flickity-lazyload="<?= $src ?>"
data-srcset="<?= $srcset ?>"
data-sizes="auto"
data-optimumx="1.5"
alt="<?= $image->page()->title()->html().' - © '.$site->title()->html() ?>" height="100%" width="auto" />
<noscript>
<img src="<?= $src ?>" alt="<?= $image->page()->title()->html().' - © '.$site->title()->html() ?>" width="100%" height="auto" />
</noscript>
</div>
</div>
<?php endif ?>
<?php endforeach ?>
<div class="slider-footer">
<div class="slide-number"></div>
<div class="caption"></div>
</div>

19
site/snippets/track.php Normal file
View file

@ -0,0 +1,19 @@
<?php if ($track->audioFile()->toFile() || $track->audioLink()->isNotEmpty()): ?>
<?php
$minutes = '';
$seconds = '';
if ($track->audioFile()->toFile()) {
$file = $track->audioFile()->toFile();
$minutes = $file->durationMinutes();
$seconds = $file->durationSeconds();
}
?>
<?php $key = $track->audioFile()->toFile()->trackIndex() ?>
<div class="track amplitude-play-pause amplitude-paused link-hover black" amplitude-song-index="<?= $key ?>">
<div><?= $track->title()->html() ?></div>
<div><?= $track->duration()->html() ?><span class="amplitude-duration-minutes-disable" amplitude-song-index="<?= $key ?>"></span><span class="amplitude-duration-seconds-disable" amplitude-song-index="<?= $key ?>"></span></div>
<div></div>
</div>
<?php endif ?>

3
site/snippets/tree1.php Normal file
View file

@ -0,0 +1,3 @@
<div id="press-tree" class="uppercase">
<div id="tree"><?php snippet('treemenu') ?></div>
</div>

3
site/snippets/tree2.php Normal file
View file

@ -0,0 +1,3 @@
<div id="press-tree" class="uppercase">
<div id="tree"><?php snippet('treemenu2') ?></div>
</div>

View file

@ -0,0 +1,11 @@
<?php if(!isset($subpages)) $subpages = page('press')->children() ?>
<ul>
<?php foreach($subpages->published() AS $p): ?>
<li class="depth-<?= $p->depth() ?>">
<a class="link-hover white<?php e($p->isActive(), ' active') ?>" href="<?= $p->url() ?>"><?= $p->title()->html() ?></a>
<?php if($p->hasChildren()): ?>
<?php snippet('treemenu', array('subpages' => $p->children())) ?>
<?php endif ?>
</li>
<?php endforeach ?>
</ul>

View file

@ -0,0 +1,36 @@
<?php
// nested menu
$items = page('press')->children()->published();
// only show the menu if items are available
if($items->count()):
?>
<nav>
<ul>
<?php foreach($items as $item): ?>
<li>
<a<?php e($item->isOpen(), ' class="active"') ?> href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
<?php
// get all children for the current menu item
$children = $item->children()->published();
// display the submenu if children are available
if($children->count() > 0):
?>
<ul>
<?php foreach($children as $child): ?>
<li><a<?php e($child->isOpen(), ' class="active"') ?> href="<?= $child->url() ?>"><?= $child->title()->html() ?></a></li>
<?php endforeach ?>
</ul>
<?php endif ?>
</li>
<?php endforeach ?>
</ul>
</nav>
<?php endif ?>

View file

@ -0,0 +1,50 @@
<?php
if ($image) {
$poster = $image->resize(1000)->url();
$video = null;
if ($image->laptopvideo()->isNotEmpty() ||
$image->laptopvideo()->isNotEmpty() ||
$image->monitorvideo()->isNotEmpty()) {
$attributes = [
'class' => 'video-player',
'poster' => $poster,
'height' => '100%',
'width' => 'auto',
'playsinline' => 'true',
'preload' => 'auto'
];
// $source = '<source style="display: none;" src=' . $image->laptopvideo()->toFile() . ' type="video/mp4">';
$video = '<video
class="video-player"
poster="' . $poster . '"
height="100%"
width="auto"
playsinline="true"
preload="auto"
' . ($image->mobilevideo()->isNotEmpty() ? 'data-mobile="' . $image->mobilevideo()->toFile() . '"' : '') . '
' . ($image->monitorvideo()->isNotEmpty() ? 'data-monitor="' . $image->monitorvideo()->toFile() . '"' : '') . '
' . ($image->laptopvideo()->isNotEmpty() ? 'data-laptop="' . $image->laptopvideo()->toFile() . '"' : '') . '
></video>';
$playCursor = '<div class="play-cursor video-cursor"></div>';
$pauseCursor = '<div class="pause-cursor video-cursor"></div>';
$seekBar = '<div class="seekbar"><div class="thumb"></div></div>';
$videoContainer = '<div class="artist-image video-container">' . $video . $playCursor . $pauseCursor . $seekBar . '</div>';
echo $videoContainer;
}
else {
snippet('responsive-image', array('image' => $image->thumb()));
}
}
?>