Add owlCarousel to homepage modal

This commit is contained in:
Hanzei 2018-07-19 15:33:29 +02:00
parent 2246ec7370
commit 9125225a21
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
28 changed files with 52 additions and 28 deletions

View file

@ -0,0 +1,9 @@
$(document).ready(function(){
$(".owl-carousel").owlCarousel({
loop: true,
nav: true,
margin: 10,
items: 1,
autoHeight: true
});
});

View file

@ -0,0 +1 @@
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}

View file

@ -0,0 +1 @@
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});

View file

@ -0,0 +1 @@
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -1 +0,0 @@
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}

View file

@ -0,0 +1 @@
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}

View file

@ -0,0 +1 @@
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});

View file

@ -0,0 +1 @@
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -1 +0,0 @@
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}

View file

@ -0,0 +1 @@
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}

View file

@ -0,0 +1 @@
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});

View file

@ -0,0 +1 @@
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -1 +0,0 @@
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}

View file

@ -5,6 +5,7 @@
{{ partial "head/openGraph.html" . }}
{{ partial "head/favicons.html" . }}
{{ partial "head/css.html" . }}
{{ partial "css/owlCarousel.html" . }}
</head>
<body>
<div id="top">
@ -105,5 +106,6 @@
</div>
<!-- End of fade in three section -->
{{ partial "footer/scripts.html" . }}
{{ partial "js/owlCarousel.html" . }}
</body>
</html>

View file

@ -0,0 +1,4 @@
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.css" }}
{{ $owlCarouselTheme := resources.Get "vendor/owlCarousel/owl.theme.default.min.css" }}
{{ $owlCarouselBundle := slice $owlCarousel $owlCarouselTheme | resources.Concat "/css/owlCarousel.min.css" | fingerprint }}
<link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" media="screen">

View file

@ -8,8 +8,8 @@
{{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
{{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
{{ $initMomentjs := resources.Get "js/initMoment.js" | resources.ExecuteAsTemplate "js/initMoment.tmp.js" . }}
{{ $scripts := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "/js/bundleMoment.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
{{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "/js/bundleMoment.js" | fingerprint }}
<script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script>
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}

View file

@ -58,9 +58,22 @@
{{ end }}
{{ with .Resources.ByType "image" }}
{{ range first 1 (sort . "Params.weight") }}
{{ $image := .Resize "640x" }}
<img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}">
{{ $moreThenOneImage := gt (len .) 1 }}
{{ if $moreThenOneImage }}
<div class="owl-carousel owl-theme">
{{ end }}
{{ range sort . "Params.weight" }}
{{ $image := .Resize "640x" }}
{{ if $moreThenOneImage }}
<div class="item owl-height">
{{ end }}
<img src="{{ $image.RelPermalink }}" class="img-responsive" alt="{{ $image.Name }}">
{{ if $moreThenOneImage }}
</div>
{{ end }}
{{ end }}
{{ if $moreThenOneImage }}
</div>
{{ end }}
{{ end }}

View file

@ -0,0 +1,5 @@
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.js" }}
{{ $initOwlCarousel := resources.Get "js/initOwlCarousel.js" | minify }}
{{ $bundleOwlCarousel := slice $owlCarousel $initOwlCarousel | resources.Concat "/js/bundleOwlCarousel.js" | fingerprint }}
<script src="{{ $bundleOwlCarousel.Permalink }}" integrity="{{ $bundleOwlCarousel.Data.Integrity }}"></script>

View file

@ -30,24 +30,9 @@
{{ end }}
{{ define "customCSS" }}
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.css" }}
{{ $owlCarouselTheme := resources.Get "vendor/owlCarousel/owl.theme.default.min.css" }}
{{ $owlCarouselBundle := slice $owlCarousel $owlCarouselTheme | resources.Concat "/css/owlCarousel.min.css" | fingerprint }}
<link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" media="screen">
{{ partial "css/owlCarousel.html" . }}
{{ end }}
{{ define "customScripts" }}
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.js" | fingerprint }}
<script src="{{ $owlCarousel.Permalink }}" integrity="{{ $owlCarousel.Data.Integrity }}"></script>
<script>
$(document).ready(function(){
$(".owl-carousel").owlCarousel({
loop: true,
nav: true,
margin: 10,
items: 1,
autoHeight: true
});
});
</script>
{{ partial "js/owlCarousel.html" . }}
{{ end }}