-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-frontpage.php
216 lines (174 loc) · 9.8 KB
/
page-frontpage.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
<?php
/**
* Template Name: Frontpage
*/
get_header();
?>
<?php /*
<section id="main-slider-wrapper">
<div id="main-slider" class="carousel wet-asphalt">
<?php
$args = array( 'post_type'=>'zee_slider', 'orderby' => 'menu_order','order' => 'ASC' );
$sliders = get_posts( $args );
?>
<ol class="carousel-indicators">
<?php foreach ($sliders as $key => $value) { ?>
<li data-target="#main-slider" data-slide-to="<?php echo $key; ?>" class="<?php echo ($key==0) ? 'active' : ''; ?>"></li>
<?php } ?>
</ol><!--/.carousel-indicators-->
<div class="carousel-inner">
<?php foreach ($sliders as $key => $value) { ?>
<div class="item<?php echo ($key==0) ? ' active' : ''; ?>">
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="carousel-content">
<h2><?php echo $value->post_title; ?></h2>
<p class="lead"><?php echo $value->post_content; ?></p>
<a class="btn btn-md btn-danger" href="#"><?php _e( 'Read More', ZEETEXTDOMAIN ); ?></a>
</div>
</div>
<div class="col-sm-6 hidden-xs">
<div class="carousel-image">
<?php
$full_img = wp_get_attachment_image_src( get_post_thumbnail_id($value->ID), 'full');
$img_src= $full_img[0];
?>
<img class="img-responsive pull-right" src="<?php echo $img_src; ?>" alt="<?php echo $value->post_title; ?>" />
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</div><!--/.carousel-inner-->
</div><!--/.carousel-->
</section>
*/
?>
<section id="intro" class="imar-blue">
<div class="container">
<div class="row">
<div class="col-sm-12">
The <strong>Intelligent Mechatronics and RFID (IMaR) Technology Gateway</strong> is based at <strong>Munster Technological University</strong> and is part of the <a href="http://www.enterprise-ireland.com/en/Research-Innovation/Companies/Collaborate-with-companies-research-institutes/Technology-Gateway-Programme.html" target="_blank">Technology Gateway Network</a>, a nationwide resource for industry based in the IoTs delivering solutions on near to market problems for industrial partners.
<strong>IMaR</strong> provides solutions for companies using Intelligent Mechatronics, RFID and Internet of Things.
</div>
</div>
</div>
</section>
<?php
$args = array( 'post_type'=>'zee_slider', 'orderby' => 'menu_order','order' => 'ASC', 'posts_per_page' => 10);
$sliders = get_posts($args);
$total_sliders = count($sliders);
?>
<section id="main-slider" style="margin: 0; padding: 0;">
<div class="carousel slide wet-asphalt">
<ol class="carousel-indicators">
<?php for ($i = 0; $i<$total_sliders; $i++) { ?>
<li data-target="#main-slider" data-slide-to="<?php echo $i ?>" class="<?php echo ($i==0) ? 'active' : '' ?>"></li>
<?php } ?>
</ol>
<div class="carousel-inner">
<?php foreach ($sliders as $key => $slider) {
$full_img = wp_get_attachment_image_src(get_post_thumbnail_id($slider->ID), 'full');
$slider_position = get_post_meta($slider->ID, 'slider_position', true);
$boxed = (get_post_meta($slider->ID, 'slider_boxed', true)=='yes') ? 'boxed' : '';
$has_button = (get_post_meta($slider->ID, 'slider_button_text', true)=='') ? false : true;
$button = get_post_meta($slider->ID, 'slider_button_text', true);
$button_url = get_post_meta($slider->ID, 'slider_button_url', true);
$video_url = get_post_meta($slider->ID, 'slider_video_link', true);
$video_type = get_post_meta($slider->ID, 'slider_video_type', true);
$bg_image_url = get_post_meta($slider->ID, 'slider_background_image', true);
$background_image = 'background-image: url('.wp_get_attachment_url($bg_image_url).')';
$columns = false;
if (!empty($image_url) or !empty($video_url)) {
$columns = true;
}
if ($video_type=='youtube') {
$embed_code = '<iframe width="640" height="480" src="//www.youtube.com/embed/' . get_video_ID($video_url) . '?rel=0" frameborder="0" allowfullscreen></iframe>';
} elseif ($video_type=='vimeo') {
$embed_code = '<iframe src="//player.vimeo.com/video/' . get_video_ID($video_url) . '?title=0&byline=0&portrait=0&color=a22c2f" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>';
}
if ($full_img) {
$embed_code = '<img src="' . $full_img[0] . '" alt="">';
$columns = true;
} ?>
<div class="item <?php echo ($key==0) ? 'active' : '' ?>" style="<?php echo ($bg_image_url) ? $background_image : '' ?>">
<div class="container">
<div class="row">
<div class="<?php echo ($columns) ? 'col-sm-6' : 'col-sm-12' ?>">
<div class="carousel-content centered <?php echo $slider_position ?>">
<h2 class="<?php echo $boxed ?> animation animated-item-1">
<?php echo $slider->post_title ?>
</h2>
<p class="<?php echo $boxed ?> animation animated-item-2">
<?php echo do_shortcode($slider->post_content) ?>
</p>
<?php if ($has_button) { ?>
<br>
<a class="btn btn-md animation animated-item-3" href="<?php echo $button_url ?>"><?php echo $button ?></a>
<?php } ?>
</div>
</div>
<?php if ($columns) { ?>
<div class="col-sm-6 hidden-xs animation animated-item-4">
<div class="centered" style="margin-top: 129px;">
<div class="embed-container">
<?php echo $embed_code; ?>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div><!--/.item-->
<!--
<div class="item" style="background-image: url(http://shapebootstrap.net/demo/flat_theme/images/slider/bg2.jpg)">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="carousel-content center centered" style="margin-top: 209px;">
<h2 class="boxed animation animated-item-1">Clean, Crisp, Powerful and Responsie Web Design Theme</h2>
<p class="boxed animation animated-item-2">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
<br>
<a class="btn btn-md animation animated-item-3" href="#">Learn More</a>
</div>
</div>
</div>
</div>
</div>
<div class="item" style="background-image: url(http://shapebootstrap.net/demo/flat_theme/images/slider/bg3.jpg)">
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="carousel-content centered" style="margin-top: 219.5px;">
<h2 class="animation animated-item-1">Powerful and Responsive Web Design Theme</h2>
<p class="animation animated-item-2">Pellentesque habitant morbi tristique senectus et netus et malesuada fames</p>
<a class="btn btn-md animation animated-item-3" href="#">Learn More</a>
</div>
</div>
<div class="col-sm-6 hidden-xs animation animated-item-4">
<div class="centered" style="margin-top: 129px;">
<div class="embed-container">
<iframe src="//player.vimeo.com/video/69421653?title=0&byline=0&portrait=0&color=a22c2f" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
</div>
</div>
</div>
</div>
</div>
</div> -->
<?php
} // endforeach?>
</div><!--/.carousel-inner-->
</div><!--/.carousel-->
<a class="prev hidden-xs" href="#main-slider" data-slide="prev">
<i class="icon-angle-left"></i>
</a>
<a class="next hidden-xs" href="#main-slider" data-slide="next">
<i class="icon-angle-right"></i>
</a>
</section>
<?php the_post(); ?>
<?php the_content(); ?>
<?php
get_footer();