-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-home.php
273 lines (223 loc) · 7.62 KB
/
page-home.php
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<?php
/* Template Name: Home Page */
$video_url = get_field('video');
?>
<?php get_header(); ?>
<div class="section01">
<div class="col-md-12" >
<?php if( $video_url ): ?>
<div class="hero__video">
<video autoplay loop muted playsinline width="100%" height="auto" >
<source src="<?php echo $video_url; ?>" type="video/mp4">
</video>
</div>
<?php endif; ?>
</div>
</div>
<div class="section-02" id="sec2" >
<div class="container">
<div class="sec2logo" ><a href="<?php the_field('section_2_logo_link'); ?>"><span><img class="rotating" src="<?php the_field('section2_logo'); ?>"><img class="downarrow" src="/wp-content/uploads/2022/07/arrow.svg"></span></a></div>
<div class="sec2-box" data-aos="fade-right" data-aos-once="true">
<div class="sec2-head"><?php the_field('sec2heading'); ?></div>
<div class="sec2-subhead"><?php the_field('sec2subheading'); ?></div>
</div>
</div>
</div>
<div class="section-03" style="background-image:url(<?php the_field('sec3bg'); ?>)" >
<div class="container">
<?php if( have_rows('list_main') ): ?>
<ul class="list_content">
<?php while( have_rows('list_main') ): the_row();
$head = get_sub_field('list_heading');
?>
<li data-aos="zoom-in-up" data-aos-once="true">
<img src="<?php the_sub_field('list_icon'); ?>" />
<h3 class="value" data-speed="1000" data-count="<?php echo esc_html( $head ); ?>"><?php echo esc_html( $head ); ?></h3>
<p><?php the_sub_field('list_content'); ?></p>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
</div>
<div class="section-04 gallery-box">
<div class="container">
<div class="gallery-list">
<div class="gallery-sec">
<?php if (have_rows("sec4_cont1")): ?>
<?php while (have_rows("sec4_cont1")): the_row();
$subhead = get_sub_field('sub_heading4');
$head = get_sub_field('heading4');
?>
<ul class="owl-carousel owl-theme sec4_content">
<?php
$images = get_sub_field("sec4_image");
if( $images ): ?>
<?php foreach ($images as $image):
$data_type = pathinfo($image['url'], PATHINFO_EXTENSION);
if ($data_type == 'mp4') {?>
<li class="item">
<video width="auto" height="100%" autoplay loop muted playsinline>
<source src="<?php echo $image['url'];?>" type="video/mp4">
</video>
<div class="box-cont"><h3><?php echo esc_html( $subhead ); ?></h3>
<h2><?php echo esc_html( $head ); ?></h2>
<?php if(get_sub_field('button_link')): ?>
<a href="<?php the_sub_field('button_link'); ?>">Learn more</a>
<?php endif; ?>
</div></li>
</li>
<?php } else {?>
<li class="item">
<img src="<?php echo $image["sizes"]["large"]; ?>" alt="<?php echo $image[
"alt"]; ?>" /> <div class="box-cont"><h3><?php echo esc_html( $subhead ); ?></h3>
<h2><?php echo esc_html( $head ); ?></h2>
<?php if(get_sub_field('button_link')): ?>
<a href="<?php the_sub_field('button_link'); ?>">Learn more</a>
<?php endif; ?>
</div></li>
<?php } endforeach; ?>
<?php endif; ?>
</ul>
<?php endwhile; ?>
<?php else: ?>
// no images found
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="section-5" >
<div class="container">
<div class="sec2-box" data-aos="fade-right" data-aos-once="true" data-aos-offset="300" data-aos-easing="ease-in-sine">
<div class="sec2-head"><?php the_field('sec5heading'); ?></div>
<div class="sec2-subhead"><?php the_field('sec5subheading'); ?></div>
</div>
</div>
</div>
<div class="section-6" >
<div class="container">
<div class="sec2-head"><?php the_field('sec6heading'); ?></div>
<?php if( have_rows('logo_section') ): ?>
<ul class="logo_section owl-carousel owl-theme">
<?php while( have_rows('logo_section') ): the_row();?>
<li class="item">
<img src="<?php the_sub_field('logo'); ?>" / data-aos="zoom-in" data-aos-once="true" data-aos-offset="300" data-aos-easing="ease-in-sine">
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
</div>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/jquery.min.js"></script>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/owl.carousel.js"></script>
<script>
$('.section-04 .owl-carousel').owlCarousel({
loop:false,
margin:10,
autoplay:true,
nav:true,
responsive:{
0:{
items:1
},
600:{
items:1
},
1000:{
items:1
}
}
})
$('.section-6 .owl-carousel').owlCarousel({
loop:true,
autoplay:true,
margin:10,
nav:true,
responsive:{
0:{
items:1
},
600:{
items:1
},
1000:{
items:5
}
}
})
</script>
<script>
jQuery( document ).ready(function( $ ) {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 450) {
$("body").addClass("skin_srolld");
} else {
$("body").removeClass("skin_srolld");
}
});
});
</script>
<script>
$(document).ready(function () {
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
$('.value').each(function () {
$(this).text(0);
});
$(window).scroll(function () {
$('.value').each(function () {
if (isScrolledIntoView(this) === true) {
$(this).prop('Counter',0).animate({
Counter: $(this).data('count')
}, {
duration: 4000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
}
});
});
});
$(document).ready(function () {
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
$(window).scroll(function () {
$('.section-02 .sec2-subhead').each(function () {
if (isScrolledIntoView(this) === true) {
$(".section-02 .sec2-head").addClass("colorchange");
}
});
});
});
$(document).ready(function () {
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
$(window).scroll(function () {
$('.section-5 .sec2-subhead').each(function () {
if (isScrolledIntoView(this) === true) {
$(".section-5 .sec2-head").addClass("colorchange1");
}
});
});
});
</script>
<?php get_footer(); ?>