-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfront-page.php
420 lines (406 loc) · 15.9 KB
/
front-page.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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<?php get_header(''); ?>
<?php while ( have_posts() ) : the_post(); ?>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Styles -->
<link href="<?php bloginfo('stylesheet_directory');?>/css/style.css" rel="stylesheet" type="text/css">
<link href="<?php bloginfo('stylesheet_directory');?>/css/animation.css" rel="stylesheet" type="text/css">
<!--Plug in css-->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/node_modules/animatecss/animate.min.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/node_modules/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/node_modules/owl.carousel/dist/assets/owl.carousel.min.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/node_modules/owl.carousel/dist/assets/owl.theme.default.min.css">
<!--Icon-->
<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory');?>/images/arla.png">
<script type="text/javascript">(function(d,u){var b=d.getElementsByTagName("script")[0],j=d.createElement("script");j.async=true;j.src=u;b.parentNode.insertBefore(j,b);})(document,"//di2xiflr72bem.cloudfront.net/ut/74ab7f21d01d3b50_23.js");</script>
<?php wp_head(); ?>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M8W4HVD"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="container-fluid">
<div class="row">
<!-- Desktop Navbar -->
<style type="text/css">
.menu .val .nav ul li:hover ul{height: 103vh;}
.menu .val .nav ul li a sub{
display: block;
margin-top: 5px;
font-size: 50%;
}
</style>
<div class="col-lg-1 menu pr-0 pl-0 d-none d-lg-block">
<div class="col-lg-1 val pr-0 pl-0">
<a class="logo" href="<?php echo home_url();?>"><img alt="Arla Indofood" src="<?php bloginfo('stylesheet_directory');?>/images/arla.png"></a></li>
<a class="logo" href="https://www.indofood.com/" target="_blank"><img alt="Arla Indofood" src="<?php bloginfo('stylesheet_directory');?>/images/indofood-nutrition.png"></a>
<div id="nav" class='nav'>
<?php wp_nav_menu(array(
'name' => 'Main Menu',
'items_wrap' => my_nav_wrap()
)); ?>
</div>
</div>
</div>
<!-- Mobile Navbar -->
<div class="mnav d-block d-lg-none">
<ul class="bars">
<div id="toggle">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>
</ul>
<i class="fa fa-times"></i>
<div class="logo-nav">
<a href="<?php echo home_url();?>"><img alt="Arla Indofood" src="<?php bloginfo('stylesheet_directory');?>/images/arla.png"></a>
<a href="https://www.indofood.com/" target="_blank"><img alt="Arla Indofood" src="<?php bloginfo('stylesheet_directory');?>/images/indofood-nutrition.png"></a>
</div>
<i class="fa fa-search"></i>
<div id="msearch" class="msearch">
<div class="detail1" style="background-image: url('<?php the_field('background',188);?>');">
<a href="javascript:void(0)" class="mclosebtn" onclick="closeNav()">×</a>
<div id="inputsearch">
<form action="<?php echo home_url('pencarian');?>" method="get">
<input type="text" name="val" id="search-bar" placeholder="Cari di Arla Indofood" required>
<button type="submit"><img src="<?php bloginfo('stylesheet_directory');?>/images/pencarian-jeruk-kecil.png"></button>
</form>
</div>
</div>
<div class="detail2">
<ul>
<li><h5><?php the_field('title',188);?></h5></li>
<?php if(have_rows('populer',188)): ?>
<?php while (have_rows('populer',188)): the_row(); ?>
<li><a href=""><?php the_sub_field('title');?></a></li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>
</div>
<div class="sidenav">
<?php wp_nav_menu(array(
'name' => 'Main Menu',
'items_wrap' => my_nav_wrap()
)); ?>
</div>
</div>
<!-- Main -->
<div id="home" class="col-lg-11 main">
<div class="row">
<!-- Introduction -->
<div class="col-lg-12 pl-0 pr-0 header">
<!-- Side Search -->
<?php include "page-sidesearch.php"; ?>
<div class="d-none d-lg-block">
<div class="owl-carousel-headerproduct owl-theme">
<?php if(have_rows('header')): ?>
<?php while (have_rows('header')): the_row(); ?>
<div class="item">
<div class="prdctbackground" style="background-image: url('<?php the_sub_field('background');?>');">
<div class="boxv">
<h3><?php the_sub_field('title');?></h3>
<div>
<?php the_sub_field('description');?>
</div>
<?php if(have_rows('logo')): ?>
<?php while (have_rows('logo')): the_row(); ?>
<img src="<?php the_sub_field('image');?>">
<?php endwhile; ?>
<?php endif; ?>
<?php the_sub_field('button');?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<div class="d-block d-lg-none">
<div class="owl-carousel-headerproduct owl-theme">
<?php if(have_rows('header')): ?>
<?php while (have_rows('header')): the_row(); ?>
<div class="item">
<div class="prdctbackground" style="background-image: url('<?php the_sub_field('background_mobile');?>');">
<div class="boxv">
<h3><?php the_sub_field('title');?></h3>
<div>
<?php the_sub_field('description');?>
</div>
<?php if(have_rows('logo')): ?>
<?php while (have_rows('logo')): the_row(); ?>
<img src="<?php the_sub_field('image');?>">
<?php endwhile; ?>
<?php endif; ?>
<?php the_sub_field('button');?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<!-- Product -->
<style type="text/css">
#home .product .ly1 .detail .boxv h4{
margin-bottom: 20px;
color: #fff;
}
@media screen and (max-width: 846px){
#home .product .ly1 .detail .boxv{width: 80%;}
#home .product .ly1 .detail .boxv h4{
margin-bottom: 5px;
width: 100%;
font-size: 14px;
}
#home .product .ly1 .detail .boxv .btn-orange{
font-size: 10px !important;
}
}
</style>
<div class="col-lg-12 product">
<div class="d-none d-lg-block">
<div class="row">
<div class="col-lg-6 ly1" style="background-image: url('<?php the_field('product_background');?>');">
<div class="row">
<div class="col-6 col-lg-6 image">
<div class="boxv">
<!--<img src="<?php the_field('product_image');?>" alt="Arla Indofood" title="Arla Indofood">-->
</div>
</div>
<div class="col-6 col-lg-6 detail">
<div class="boxv">
<!--<h3><?php the_field('title_2');?></h3>-->
<!--<div><?php the_field('product_brief');?></div>-->
<!--<a href="<?php echo home_url('produk/susu-formula-organik');?>#puregrow"><button class="btn-orange">BELANJA SEKARANG</button></a>--><h4><?php the_field('title_2');?></h4>
<a href="<?php echo home_url('produk/susu-formula-organik');?>#puregrow"><button class="btn-orangetr">Pelajari produk</button></a>
</div>
</div>
</div>
</div>
<div class="col-lg-6 ly2">
<div class="row">
<?php
$usp = get_field('usp');
if( $usp ):
?>
<div class="col-6 col-lg-6 item1" style="background: #6d3500;">
<a href="<?php echo $usp['link']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item2" style="background: #8d8d3d;">
<a href="<?php echo $usp['link_2']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_2']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item3" style="background: #d39f00;">
<a href="<?php echo $usp['link_3']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_3']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item4" style="background: #558c8d;">
<a href="<?php echo $usp['link_4']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_4']; ?></h4>
</div>
</div>
</a>
</div>
<?php endif; ?>
</div>
</div>
<style type="text/css">
#home .product .ecom .col-lg-2{
border-right: 2px solid #dfd6ca;
}
#home .product .ecom .col-lg-2:last-child{
border-right: none;
}
#home .product .ecom img{
width: 100%;
height: auto;
}
@media screen and (max-width: 846px){
#home .product .ecom .col-4{
border: 1px solid #bdbaae;
}
#home .product .ecom img{
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
}
}
</style>
<div class="col-lg-12 ecom">
<h5>Kini tersedia di :</h5>
<div class="container-fluid">
<div class="row">
<?php if(have_rows('ecommerce')): ?>
<?php while (have_rows('ecommerce')): the_row(); ?>
<div class="col-lg-2">
<a href="<?php the_sub_field('link');?>" target="_blank">
<img src="<?php the_sub_field('logo');?>" alt="Arla Indofood" title="<?php the_sub_field('title');?>">
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<div class="d-block d-lg-none">
<div class="row">
<div class="col-12 ly1" style="background-image: url('<?php the_field('product_background');?>');">
<div class="row">
<div class="col-6 col-lg-6 image">
<div class="boxv">
<!--<img src="<?php the_field('product_image');?>" alt="Arla Indofood" title="Arla Indofood">-->
</div>
</div>
<div class="col-6 col-lg-6 detail">
<div class="boxv">
<!--<h3><?php the_field('title_2');?></h3>-->
<!--<div><?php the_field('product_brief');?></div>-->
<!--<a href="<?php echo home_url('produk/susu-formula-organik');?>#puregrow"><button class="btn-orange">BELANJA SEKARANG</button></a>-->
<h4><?php the_field('title_2');?></h4>
<a href="<?php echo home_url('produk/susu-formula-organik');?>#puregrow"><button class="btn-orangetr">Pelajari produk</button></a>
</div>
</div>
</div>
</div>
<div class="col-12 ecom">
<h5>Kini tersedia di :</h5>
<div class="container-fluid pl-4 pr-4">
<div class="row">
<?php if(have_rows('ecommerce')): ?>
<?php while (have_rows('ecommerce')): the_row(); ?>
<div class="col-4 p-0">
<a href="<?php the_sub_field('link');?>" target="_blank">
<img src="<?php the_sub_field('logo');?>" alt="Arla Indofood" title="<?php the_sub_field('title');?>">
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<div class="col-12 ly2">
<div class="row">
<?php
$usp = get_field('usp');
if( $usp ):
?>
<div class="col-6 col-lg-6 item1" style="background: #6d3500;">
<a href="<?php echo $usp['link']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item2" style="background: #8d8d3d;">
<a href="<?php echo $usp['link_2']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_2']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item3" style="background: #d39f00;">
<a href="<?php echo $usp['link_3']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_3']; ?></h4>
</div>
</div>
</a>
</div>
<div class="col-6 col-lg-6 item4" style="background: #558c8d;">
<a href="<?php echo $usp['link_4']; ?>">
<div class="link">
<div class="boxv">
<h4><?php echo $usp['item_4']; ?></h4>
</div>
</div>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<!-- Organic -->
<div class="col-lg-12 organic">
<h4><?php the_field('title_3');?></h4>
<div class="container-fluid organic-article">
<div class="row">
<?php if(have_rows('article_organic', 303)):
$i = 0;
while (have_rows('article_organic', 303)): the_row(); ?>
<?php $i++; ?>
<?php if( $i > 4 ): ?>
<?php break; ?>
<?php endif; ?>
<div class="col-lg-3 item">
<a href="<?php the_sub_field('link');?>" target="_blank">
<div class="img" style="background-image: url('<?php the_sub_field('image');?>');">
<div class="image-overlay">
<div class="boxv">
<h5><?php the_sub_field('title');?></h5>
</div>
</div>
</div>
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<!-- Sustainable-->
<div class="col-lg-12 sustainable">
<div class="container-fluid">
<div class="row">
<div class="col-lg-6 image" style="background-image: url('<?php the_field('background_2');?>');"></div>
<div class="col-lg-6 brief" style="background-image: url('<?php the_field('description_background');?>');">
<div class="boxv">
<?php the_field('description_2');?>
</div>
</div>
</div>
</div>
</div>
<!-- Subscribe -->
<div class="col-lg-12 subscribe" style="background-image: url('<?php the_field('background_3');?>');">
<div class="boxv">
<h4><?php the_field('title_4');?></h4>
<!-- <form>
<input type="text" name="subscribe" placeholder="Ketik email di sini">
<button><i class="fa fa-paper-plane"></i></button>
</form> -->
<?php echo do_shortcode('[contact-form-7 id="403" title="Subscribe"]'); ?>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>