68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php
|
|
// -------------------------------------------
|
|
// kirby snippet FOR GENERAL
|
|
|
|
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
|
|
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
|
|
|
// set switches, to enable parts of the code. All disabled by default!
|
|
// -------------------------------------------
|
|
|
|
// available switches:
|
|
$switches = array("bs_util", "bs_collapse", "bs_carousel", "plg_masonry");
|
|
$jquery = false;
|
|
|
|
foreach ($switches as $switch) {
|
|
if (isset(${$switch}) && ${$switch}==true) {
|
|
$jquery = true;
|
|
${$switch} = true;
|
|
}else {
|
|
${$switch} = false;
|
|
}
|
|
}
|
|
?>
|
|
|
|
<?php if($jquery) {
|
|
echo js('assets/vendors/jquery-2.2.2.min.js');
|
|
}?>
|
|
|
|
<!-- Bootstrap core JavaScript-->
|
|
<?php
|
|
if($bs_util) {
|
|
echo js('assets/vendors/bootstrap/js/dist/util.js');
|
|
}
|
|
if($bs_collapse) {
|
|
echo js('assets/vendors/bootstrap/js/dist/collapse.js');
|
|
}
|
|
if($bs_carousel) {
|
|
echo js('assets/vendors/bootstrap/js/dist/carousel.js');
|
|
}
|
|
?>
|
|
|
|
<?php if (c::get('plg_masonry.enable') && $plg_masonry==true) : ?>
|
|
<?php echo js('assets/vendors/masonry/dist/masonry.pkgd.min.js');?>
|
|
|
|
<script type="text/javascript">
|
|
$('#masonry').masonry({
|
|
isFitWidth: true,
|
|
columnWidth: <?php echo c::get('plg_masonry.width') ?>,
|
|
gutter: 10,
|
|
itemSelector: '.masonryitem'
|
|
});
|
|
</script>
|
|
|
|
<?php echo js('assets/vendors/swipebox/src/js/jquery.swipebox.min.js');?>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$('.swipebox' ).swipebox();
|
|
});
|
|
</script>
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php echo piwik(); ?>
|
|
|
|
</body>
|
|
</html>
|