2016-03-31 08:37:32 +00:00
|
|
|
<?php
|
|
|
|
// -------------------------------------------
|
|
|
|
// kirby snippet FOR GENERAL
|
|
|
|
|
|
|
|
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
|
|
|
|
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
2016-04-15 20:53:09 +00:00
|
|
|
|
|
|
|
// set switches, to enable parts of the code. All disabled by default!
|
2016-03-31 08:37:32 +00:00
|
|
|
// -------------------------------------------
|
2016-04-15 20:53:09 +00:00
|
|
|
|
|
|
|
// available switches:
|
2016-10-28 21:32:29 +00:00
|
|
|
$switches = array("bs_util", "bs_carousel", "plg_masonry");
|
2016-04-15 20:53:09 +00:00
|
|
|
$jquery = false;
|
|
|
|
|
|
|
|
foreach ($switches as $switch) {
|
|
|
|
if (isset(${$switch}) && ${$switch}==true) {
|
|
|
|
$jquery = true;
|
|
|
|
${$switch} = true;
|
|
|
|
}else {
|
|
|
|
${$switch} = false;
|
|
|
|
}
|
|
|
|
}
|
2016-03-31 08:37:32 +00:00
|
|
|
?>
|
|
|
|
|
2016-04-15 20:53:09 +00:00
|
|
|
<?php if($jquery) {
|
|
|
|
echo js('assets/vendors/jquery-2.2.2.min.js');
|
|
|
|
}?>
|
|
|
|
|
2016-03-31 08:37:32 +00:00
|
|
|
<!-- Bootstrap core JavaScript-->
|
2016-04-04 11:17:05 +00:00
|
|
|
<?php
|
2016-04-15 20:53:09 +00:00
|
|
|
if($bs_util) {
|
2016-04-04 11:17:05 +00:00
|
|
|
echo js('assets/vendors/bootstrap/js/dist/util.js');
|
2016-04-15 20:53:09 +00:00
|
|
|
}
|
|
|
|
if($bs_carousel) {
|
2016-04-05 16:38:00 +00:00
|
|
|
echo js('assets/vendors/bootstrap/js/dist/carousel.js');
|
2016-04-15 20:53:09 +00:00
|
|
|
}
|
2016-04-04 11:17:05 +00:00
|
|
|
?>
|
2016-03-31 08:37:32 +00:00
|
|
|
|
2016-04-22 20:57:29 +00:00
|
|
|
<?php if (c::get('plg_masonry.enable') && $plg_masonry==true) : $width = c::get('plg_masonry.width');?>
|
2016-10-15 18:10:34 +00:00
|
|
|
<style nonce="nRfqpuKWNuYyUAFPTr6WVNZk9">
|
2016-04-22 20:57:29 +00:00
|
|
|
#masonry {margin: 0 auto;}
|
|
|
|
.masonryitem { width: <?php echo $width ?>px; margin-bottom: 10px;}
|
|
|
|
.masonryitem.w2 { width: 40%; }
|
|
|
|
</style>
|
|
|
|
|
2016-04-15 20:53:09 +00:00
|
|
|
<?php echo js('assets/vendors/masonry/dist/masonry.pkgd.min.js');?>
|
|
|
|
|
2016-10-15 18:10:34 +00:00
|
|
|
<script type="text/javascript" nonce="nRfqpuKWNuYyUAFPTr6WVNZk9">
|
2016-04-15 20:53:09 +00:00
|
|
|
$('#masonry').masonry({
|
|
|
|
isFitWidth: true,
|
|
|
|
columnWidth: <?php echo c::get('plg_masonry.width') ?>,
|
|
|
|
gutter: 10,
|
|
|
|
itemSelector: '.masonryitem'
|
2016-03-31 08:37:32 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2016-04-15 20:53:09 +00:00
|
|
|
<?php echo js('assets/vendors/swipebox/src/js/jquery.swipebox.min.js');?>
|
2016-04-22 20:57:29 +00:00
|
|
|
<?php echo css('assets/vendors/swipebox/src/css/swipebox.css') ?>
|
2016-03-31 08:37:32 +00:00
|
|
|
|
2016-10-15 18:10:34 +00:00
|
|
|
<script type="text/javascript" nonce="nRfqpuKWNuYyUAFPTr6WVNZk9">
|
2016-03-31 08:37:32 +00:00
|
|
|
$(document).ready(function () {
|
|
|
|
$('.swipebox' ).swipebox();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php echo piwik(); ?>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|