mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 06:32:53 +00:00
Add owlCarousel to homepage modal
This commit is contained in:
parent
2246ec7370
commit
9125225a21
28 changed files with 52 additions and 28 deletions
9
assets/js/initOwlCarousel.js
Normal file
9
assets/js/initOwlCarousel.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
$(document).ready(function(){
|
||||
$(".owl-carousel").owlCarousel({
|
||||
loop: true,
|
||||
nav: true,
|
||||
margin: 10,
|
||||
items: 1,
|
||||
autoHeight: true
|
||||
});
|
||||
});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}
|
|
@ -0,0 +1 @@
|
|||
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});
|
|
@ -0,0 +1 @@
|
|||
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -1 +0,0 @@
|
|||
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}
|
|
@ -0,0 +1 @@
|
|||
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});
|
|
@ -0,0 +1 @@
|
|||
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -1 +0,0 @@
|
|||
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
{"Target":"js/bundleOwlCarousel.cba358484a4a50bbc9c265ab71727cbcd15381bbb8cecdbcba357cb629f4e9c4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-y6NYSEpKULvJwmWrcXJ8vNFTgbu4zs28ujV8tin06cQ="}}
|
|
@ -0,0 +1 @@
|
|||
$(document).ready(function(){$(".owl-carousel").owlCarousel({loop:true,nav:true,margin:10,items:1,autoHeight:true});});
|
|
@ -0,0 +1 @@
|
|||
{"Target":"js/initOwlCarousel.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -1 +0,0 @@
|
|||
{"Target":"vendor/owlCarousel/owl.carousel.min.a53c43f834b32309b084ea9314df8307e9c78cee2202c6e07f216ae4ae5b704d.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0="}}
|
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
|
@ -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>
|
||||
|
|
4
layouts/partials/css/owlCarousel.html
Normal file
4
layouts/partials/css/owlCarousel.html
Normal 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">
|
|
@ -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" . }}
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
5
layouts/partials/js/owlCarousel.html
Normal file
5
layouts/partials/js/owlCarousel.html
Normal 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>
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue