mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 23:09:47 +00:00
50 lines
1.5 KiB
HTML
50 lines
1.5 KiB
HTML
{{ define "main" }}
|
|
<div class="container markdown top-pad">
|
|
{{ with .Resources.ByType "image" }}
|
|
<div class="has-text-centered">
|
|
{{ $moreThenOneImage := gt (len .) 1 }}
|
|
{{ if $moreThenOneImage }}
|
|
<div class="owl-carousel owl-theme">
|
|
{{ end }}
|
|
{{ range sort . "Params.weight" }}
|
|
{{ $image := .Resize "1000x" }}
|
|
{{ 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 }}
|
|
</div>
|
|
{{ end }}
|
|
{{ .Content }}
|
|
</div>
|
|
<!-- End post content -->
|
|
<div class="disqus">
|
|
{{ template "_internal/disqus.html" . }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ define "customCSS" }}
|
|
<link rel="stylesheet" href="{{ "css/owl.carousel.min.css" | relURL }}">
|
|
<link rel="stylesheet" href="{{ "css/owl.theme.default.min.css" | relURL }}">
|
|
{{ end }}
|
|
|
|
{{ define "customScripts" }}
|
|
<script src="{{ "js/owl.carousel.min.js" | relURL }}"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(".owl-carousel").owlCarousel({
|
|
loop: true,
|
|
nav: true,
|
|
margin: 10,
|
|
items: 1,
|
|
autoHeight: true
|
|
});
|
|
});
|
|
</script>
|
|
{{ end }}
|