-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheadlines.php
170 lines (143 loc) · 5.14 KB
/
headlines.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
<?php $t =& peTheme(); ?>
<?php $content =& $t->content; ?>
<?php $meta = $t->content->meta(); ?>
<?php $bg = empty($meta->bg->background) ? PE_THEME_URL."/images/bg.jpg" : $meta->bg->background; ?>
<?php $isSlider = (! empty( $meta->bg->type ) && $meta->bg->type == 'slider') ? true : false; ?>
<?php $isVideo = (! empty( $meta->bg->type ) && $meta->bg->type == 'video') ? true : false; ?>
<?php if ($isSlider||$isVideo): ?>
<?php define( 'HOME_SLIDER', true ); ?>
<?php endif; ?>
<?php if ($isSlider): ?>
<?php $loop = $t->gallery->getSliderLoop($meta->bg->gallery); ?>
<?php if ( $loop ): ?>
<div class="hidden_overlay" data-src="<?php echo PE_THEME_URL."/images/slider/overlays/03.png"; ?>"></div>
<?php while ($slide =& $loop->next()): ?>
<div class="hiddenslide" data-src="<?php echo $slide->img; ?>"></div>
<?php endwhile; ?>
<?php else: ?>
<p><?php _e("Gallery you selected as a Slider Gallery in Home page settings contains no slides, make sure to upload at least one image for selected gallery.",'Pixelentity Theme/Plugin'); ?></p>
<?php endif; ?>
<section id="<?php $content->slug(); ?>" class="home-first-section hero clearfix">
<!-- Content -->
<div class="dark content container">
<!-- Headings -->
<div class="ticker">
<?php if (!empty($meta->bg->headlines)): ?>
<?php foreach ($meta->bg->headlines as $headline): ?>
<h1><?php echo $headline; ?></h1>
<?php endforeach; ?>
<?php endif; ?>
</div>
<!-- Buttons -->
<?php if ( ! empty( $meta->bg->label1 ) || ! empty( $meta->bg->label2 ) ): ?>
<ul class="call-to-action">
<?php if ( ! empty( $meta->bg->label1 ) ) : ?>
<li>
<?php $link1 = empty( $meta->bg->url1 ) ? 'javascript:void(0);' : $meta->bg->url1; ?>
<a class="button" href="<?php echo $link1; ?>">
<?php echo $meta->bg->label1; ?>
</a>
</li>
<?php endif; ?>
<?php if ( ! empty( $meta->bg->label2 ) ) : ?>
<li>
<?php $link2 = empty( $meta->bg->url2 ) ? 'javascript:void(0);' : $meta->bg->url2; ?>
<a class="button no-border" href="<?php echo $link2; ?>" target="_blank">
<?php echo $meta->bg->label2; ?>
<span class="icon-circle">
<i class="icon-right-open-big"></i>
</span>
</a>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<!-- Slider Controls -->
<ul class="slider-controls">
<li><a id="vegas-next" href="#"><?php _e("Next",'Pixelentity Theme/Plugin'); ?></a></li>
<li><a id="vegas-prev" href="#"><?php _e("Prev",'Pixelentity Theme/Plugin'); ?></a></li>
</ul>
</div>
</section>
<!-- End Hero -->
<?php elseif ($isVideo): ?>
<!-- Begin Hero -->
<section id="<?php $content->slug(); ?>" class="home-first-section hero hero-video clearfix" data-video="<?php echo esc_attr( $meta->bg->video ); ?>">
<!-- Content -->
<div class="dark content container">
<!-- Headings -->
<div class="ticker">
<?php if (!empty($meta->bg->headlines)): ?>
<?php foreach ($meta->bg->headlines as $headline): ?>
<h1><?php echo $headline; ?></h1>
<?php endforeach; ?>
<?php endif; ?>
</div>
<!-- Buttons -->
<?php if ( ! empty( $meta->bg->label1 ) || ! empty( $meta->bg->label2 ) ): ?>
<ul class="call-to-action">
<?php if ( ! empty( $meta->bg->label1 ) ) : ?>
<li>
<?php $link1 = empty( $meta->bg->url1 ) ? 'javascript:void(0);' : $meta->bg->url1; ?>
<a class="button" href="<?php echo $link1; ?>">
<?php echo $meta->bg->label1; ?>
</a>
</li>
<?php endif; ?>
<?php if ( ! empty( $meta->bg->label2 ) ) : ?>
<li>
<?php $link2 = empty( $meta->bg->url2 ) ? 'javascript:void(0);' : $meta->bg->url2; ?>
<a class="button no-border" href="<?php echo $link2; ?>" target="_blank">
<?php echo $meta->bg->label2; ?>
<span class="icon-circle">
<i class="icon-right-open-big"></i>
</span>
</a>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
</section>
<!-- End Hero -->
<?php else: ?>
<!-- Begin Hero -->
<section id="<?php $content->slug(); ?>" class="home-first-section hero parallax clearfix" style="background-image: url('<?php echo $bg; ?>');">
<!-- Content -->
<div class="dark content container">
<!-- Headings -->
<div class="ticker">
<?php if (!empty($meta->bg->headlines)): ?>
<?php foreach ($meta->bg->headlines as $headline): ?>
<h1><?php echo $headline; ?></h1>
<?php endforeach; ?>
<?php endif; ?>
</div>
<!-- Buttons -->
<?php if ( ! empty( $meta->bg->label1 ) || ! empty( $meta->bg->label2 ) ): ?>
<ul class="call-to-action">
<?php if ( ! empty( $meta->bg->label1 ) ) : ?>
<li>
<?php $link1 = empty( $meta->bg->url1 ) ? 'javascript:void(0);' : $meta->bg->url1; ?>
<a class="button" href="<?php echo $link1; ?>">
<?php echo $meta->bg->label1; ?>
</a>
</li>
<?php endif; ?>
<?php if ( ! empty( $meta->bg->label2 ) ) : ?>
<li>
<?php $link2 = empty( $meta->bg->url2 ) ? 'javascript:void(0);' : $meta->bg->url2; ?>
<a class="button no-border" href="<?php echo $link2; ?>" target="_blank">
<?php echo $meta->bg->label2; ?>
<span class="icon-circle">
<i class="icon-right-open-big"></i>
</span>
</a>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
</section>
<!-- End Hero -->
<?php endif; ?>