-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
292 lines (265 loc) · 12.7 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
<?php
/**
* The front page template file
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage elising
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<section id="promo" class="promo">
<div class="bg-slide" style="background-image: url(<?php the_field('promo_img'); ?>)"></div>
<div class="container container-slider">
<div class="slider-main">
<?php if( have_rows('promo_slider') ):
while ( have_rows('promo_slider') ) : the_row(); ?>
<div class="wr-slide">
<h1 class="title"><?php the_sub_field('slide_title'); ?></h1>
<hr>
<p class="subtitle"><?php the_sub_field('slide_text'); ?></p>
<a href="#" id="pop-js" class="but-top"><?php the_field('promo_btn'); ?></a>
</div>
<?php endwhile;
endif; ?>
</div>
</div>
</section>
<section id="advantage" class="advantage">
<div class="container">
<div class="row row-advantage">
<div class="adv-widget">
<div class="widget-row">
<span class="icon-timer"></span>
<span class="adv-text"><?php the_field('advant_3'); ?></span>
</div>
</div>
<div class="adv-widget">
<div class="widget-row">
<span class="icon-file"></span>
<span class="adv-text"><?php the_field('advant_2'); ?></span>
</div>
</div>
<div class="adv-widget">
<div class="widget-row">
<span class="icon-card"></span>
<span class="adv-text"><?php the_field('advant_1'); ?></span>
</div>
</div>
</div>
</div>
</section>
<section id="formal" class="formal">
<div class="container">
<h2 class="title-section"><?php the_field('formal_title'); ?></h2>
<div class="row row-formal">
<div class="w-formal wf1">
<div class="wr-icon"><span class="icon-car"></span></div>
<div class="wformal-title"><?php the_field('formal_w_1'); ?></div>
<div class="wformal-text"><?php the_field('formal_text_1'); ?></div>
</div>
<div class="w-formal wf2">
<div class="wr-icon"><span class="icon-search"></span></div>
<div class="wformal-title"><?php the_field('formal_w_2'); ?></div>
<div class="wformal-text"><?php the_field('formal_text_2'); ?></div>
</div>
<div class="w-formal wf3">
<div class="wr-icon"><span class="icon-pass"></span></div>
<div class="wformal-title"><?php the_field('formal_w_3'); ?></div>
<div class="wformal-text"><?php the_field('formal_text_3'); ?></div>
</div>
</div>
<div id="formalForm" class="formal-form">
<h2 class="title-section"><?php the_field('formal_subtitle'); ?></h2>
<div id="sliderLch" class="slider-lch">
<div id="sliderInner" class="slider-inner">
<?php
$slide_form = get_field('cont_form');
echo (do_shortcode("$slide_form")); ?>
</div><!-- slider-inner -->
<div class="controls-slider">
<button id="leftCtrl" class="slide-control dis" disabled><span class="icon-vector arr-left"></span>назад</button>
<button id="rightCtrl" class="slide-control">далее<span class="icon-vector"></span></button>
</div><!-- controls-slider -->
</div><!-- slider-lch -->
</div>
</div>
</section>
<section id="conditions" class="conditions">
<div class="container">
<h2 class="title-section"><?php the_field('cond_title'); ?></h2>
<div class="wr-row">
<div class="cell">
<div class="cell-title"><?php the_field('cond_title_1'); ?></div>
<div class="cell-text"><?php the_field('cond_text_1'); ?></div>
</div>
<div class="cell">
<div class="cell-title"><?php the_field('cond_title_2'); ?></div>
<div class="cell-text"><?php the_field('cond_text_2'); ?></div>
</div>
<div class="cell">
<div class="cell-title"><?php the_field('cond_title_3'); ?></div>
<div class="cell-text"><?php the_field('cond_text_3'); ?></div>
</div>
<div class="cell">
<div class="cell-title"><?php the_field('cond_title_4'); ?></div>
<div class="cell-text"><?php the_field('cond_text_4'); ?></div>
</div>
</div>
<p class="cond-text"><?php the_field('cond_text'); ?></p>
</div>
</section>
<section id="whom" class="whom">
<div class="container">
<h2 class="title-section"><?php the_field('whom_title'); ?></h2>
<p class="whom-text"><?php the_field('whom_text'); ?></p>
<div class="wr-row">
<div class="cell">
<div class="cell-text"><?php the_field('whom_text_1'); ?></div>
</div>
<div class="cell">
<div class="cell-text"><?php the_field('whom_text_2'); ?></div>
</div>
<div class="cell">
<div class="cell-text"><?php the_field('whom_text_3'); ?></div>
</div>
<div class="cell">
<div class="cell-text"><?php the_field('whom_text_4'); ?></div>
</div>
</div>
<div class="decor_one"></div>
<div>
<?php
$w_form = get_field('whom_form');
echo (do_shortcode("$w_form")); ?>
</div>
<div class="decor_two"></div>
</div>
</section>
<section id="hww" class="hww">
<div class="container hww-container">
<div class="wr-img"><img class="wow slideInRight" src="<?php echo get_template_directory_uri() ?>/img/car.png" alt=""></div>
<h2 class="title-section"><?php the_field('hww_title'); ?></h2>
<div class="hww-widget hww-1">
<span class="icon-call"></span>
<p><?php the_field('hww_1'); ?></p>
</div>
<div class="hww-widget hww-2">
<span class="icon-man"></span>
<p><?php the_field('hww_2'); ?></p>
</div>
<div class="hww-widget hww-3">
<span class="icon-like"></span>
<p><?php the_field('hww_3'); ?></p>
</div>
<div class="hww-widget hww-4">
<span class="icon-brief"></span>
<p><?php the_field('hww_4'); ?></p>
</div>
</div>
</section>
<section id="faq" class="faq">
<div class="container container-faq">
<h2 class="title-section"><?php the_field('faq_title'); ?></h2>
<div class="wr-row">
<button class="tablink" onclick="switchTab(event, 'bidTab')" id="defOpen"><?php the_field('btn_1'); ?></button>
<button class="tablink" onclick="switchTab(event, 'liasingTab')"><?php the_field('btn_2'); ?></button>
<button class="tablink" onclick="switchTab(event, 'purchaseTab')"><?php the_field('btn_3'); ?></button>
<button class="tablink" onclick="switchTab(event, 'payTab')" data-link="payTab"><?php the_field('btn_4'); ?></button>
</div>
<div id="bidTab" class="tab-content">
<div class="wr-accordion">
<?php if( have_rows('acc_tab_1') ):
while ( have_rows('acc_tab_1') ) : the_row(); ?>
<button class="accordion"><?php the_sub_field('quest_1'); ?><span class="icon-vector"></span></button>
<div class="panel"><div class="wr-pan"><?php the_sub_field('answer_1'); ?></div></div><!-- panel -->
<?php endwhile;
endif;
?>
</div>
</div>
<div id="liasingTab" class="tab-content">
<div class="wr-accordion">
<?php if( have_rows('acc_tab_2') ):
while ( have_rows('acc_tab_2') ) : the_row(); ?>
<button class="accordion"><?php the_sub_field('quest_2'); ?><span class="icon-vector"></span></button>
<div class="panel"><div class="wr-pan"><?php the_sub_field('answer_2'); ?></div></div><!-- panel -->
<?php endwhile;
endif;
?>
</div>
</div>
<div id="purchaseTab" class="tab-content">
<div class="wr-accordion">
<?php if( have_rows('acc_tab_3') ):
while ( have_rows('acc_tab_3') ) : the_row(); ?>
<button class="accordion"><?php the_sub_field('quest_3'); ?><span class="icon-vector"></span></button>
<div class="panel"><div class="wr-pan"><?php the_sub_field('answer_3'); ?></div></div><!-- panel -->
<?php endwhile;
endif;
?>
</div>
</div>
<div id="payTab" class="tab-content">
<div class="wr-accordion">
<?php if( have_rows('acc_tab_4') ):
while ( have_rows('acc_tab_4') ) : the_row(); ?>
<button class="accordion"><?php the_sub_field('quest_4'); ?><span class="icon-vector"></span></button>
<div class="panel"><div class="wr-pan"><?php the_sub_field('answer_4'); ?></div></div><!-- panel -->
<?php endwhile;
endif;
?>
</div>
</div>
</div>
</section>
<script>
// make tabs for section FAQ
function switchTab(evt, elem){
var i, tabcontent, tablink;
tabcontent = document.getElementsByClassName("tab-content");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablink = document.getElementsByClassName("tablink");
for (i = 0; i < tablink.length; i++) {
tablink[i].className = tablink[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(elem).style.display = "block";
evt.currentTarget.className += " active";
}
// Get the element with id="defOpen" and click on it
document.getElementById("defOpen").click();
</script>
<section id="about" class="about pax-1">
<div class="container container-about">
<h2 class="title-section"><?php the_field('about_title'); ?></h2>
<p class="about-text"><?php the_field('about_text'); ?></p>
</div>
</section>
<section id="consult" class="consult">
<div class="container">
<h2 class="title-section "><?php the_field('consult_title'); ?></h2>
<p class="consult-descr"><?php the_field('consult_descr'); ?></p>
<?php $c_form = get_field('consult_text'); ?>
<div class="decor_one"></div>
<div class="consult_text"><?php echo (do_shortcode("$c_form")); ?></div>
<div class="decor_two"></div>
</div>
</section>
<section id="mapa" class="mapa">
<div class="container">
<div class="widget-mapa scrollflow -slide-top -opacity">
<span class="icon-place"></span><p class="addr-text"><?php the_field('widg_addr'); ?></p>
<span class="icon-call"></span><p class="addr-text"><a href="tel: <?php the_field('widg_tel'); ?>"><?php the_field('widg_tel'); ?></a></p>
<span class="icon-clock"></span><p class="addr-text"><?php the_field('widg_info'); ?></p>
</div>
</div>
<div class="block-mapa"><?php the_field('block_mapa'); ?></div>
</section>
<?php get_footer();