-
Notifications
You must be signed in to change notification settings - Fork 43
/
2-slider.html
71 lines (69 loc) · 2.11 KB
/
2-slider.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
layout: default
title: Slider
permalink: /slider/
---
<div id="page-loader"><span class="preloader-interior"></span></div>
<div id="fullpage-slider">
{% for first-slide in site.first-slider %}
{% capture id %}{{ first-slide.id | remove:'/' | remove:'first-slider' | downcase }}{% endcapture %}
<div class="section">
<div class="container">
<div class="row align-items-center">
{%- if first-slide.image or first-slide.video or first-slide.iframe -%}
<div class="col-lg-5 col-md-5 col-sm-12">
{{ first-slide.content }}
</div>
<div class="col-lg-7 col-md-7 col-sm-12 text-center">
{%- if first-slide.image -%}
<img data-src="{{ site.baseurl }}/assets/img/{{first-slide.image}}" class="img-fluid">
{%- endif -%}
{%- if first-slide.video -%}
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" data-src="{{first-slide.video}}" allowfullscreen></iframe>
</div>
{%- endif -%}
{%- if first-slide.iframe -%}
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" data-src="{{first-slide.iframe}}" allowfullscreen></iframe>
</div>
{%- endif -%}
</div>
{%- else -%}
<div class="col-lg-12 col-md-12 col-sm-12 text-center">
{{ first-slide.content }}
</div>
{%- endif -%}
</div>
</div>
</div>
{% endfor %}
</div>
<script type="text/javascript">
//Inicializing sliders
$(document).ready(function() {
$('#fullpage-slider').fullpage({
verticalCentered: true,
navigation: true,
anchors: anchors,
menu: '#menu',
lazyLoading: true,
paddingTop: '10px',
paddingBottom: '30px',
responsiveWidth: 992,
afterResponsive: function(isResponsive){
},
afterRender: function(){
window.load = function () {
$('#page-loader').fadeOut(500);
}();
}
});
});
var anchors = [
{% for first-slide in site.first-slider %}
{% capture id %}{{ first-slide.id | remove:'/' | remove:'first-slider' | downcase }}{% endcapture %}
'{{id}}'{% if forloop.last == false %},{% endif %}
{% endfor %}
]
</script>