-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewhome.php
252 lines (204 loc) · 10.3 KB
/
newhome.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
<?php //include file for type 0 & 1 - home page and sub home pages in deltaskin ?>
<div id="body">
<?php
if($blockdata["processes"] || $blockdata["cases"] || $blockdata["concepts"] || $blockdata["facts"]):?>
<div class="navigation mb+">
<!-- row processen/cases -->
<div class="layout mobile-mb tablet-mb0 section-processen-cases">
<div class="layout__item u-1/2-tablet u-2/3-desktop section-processen">
<div class="navigation__label navigation__label--first hide-on-mobile"><span class="p"><?php echo wfMessage( 'deltaskin-theory' )->text();?></span></div>
<?php if($blockdata["processes"]):?>
<div class="box">
<h2 class="section-titel section-title--first"><a href="<?php echo $blockdata["processes"]["more"];?>"><?php echo wfMessage( 'deltaskin-processes' )->text();?><span class="mobile-only"> (<?php echo wfMessage( 'deltaskin-theory' )->text();?>)</span></a></h2>
<div class="layout">
<?php
foreach($blockdata["processes"] as $pk=>$process):
if($pk==="more") continue; //skip the more link for now, used elders (above & below)
//important: no new lines or spacing must be present between begin and end of this foreach loop... see EMT-365:
?><div class="layout__item u-1/1-tablet u-1/2-desktop">
<a href="<?php echo $process[0];?>">
<div class="box navigation__item mb cover" style="background-image: url(<?php echo $process[2];?>)">
<h3 class="navigation__item--title"><?php echo $process[1];?></h3>
<?php
if(is_array($process["subs"]) && count($process["subs"])>0){
echo '<ul class="list-bare navigation__list">';
foreach ($process["subs"] as $key => $value)
echo $this->makeListItem( $key, $value, array('link-class'=>'navigation__subitem')) . "\n";
echo '</ul>';
}
?>
</div>
</a>
</div><?php endforeach; //important: no new lines or spacing must be present between begin and end of this foreach loop... see EMT-365?>
<a href="<?php echo $blockdata["processes"]["more"];?>" class="blocklink fr">
<?php echo wfMessage( 'deltaskin-more' )->text()." ".strtolower(wfMessage( 'deltaskin-processes' )->text()); ?> »
</a>
</div>
</div>
<?php endif;?>
</div
><div class="layout__item u-1/2-tablet u-1/3-desktop">
<div class="navigation__label hide-on-mobile"><span class="p"><?php echo wfMessage( 'deltaskin-practice' )->text();?></span></div>
<?php if($blockdata["cases"]):?>
<div class="box box--absolute">
<h2 class="section-titel"><a href="<?php echo $blockdata["cases"]["more"];?>"><?php echo wfMessage( 'deltaskin-cases' )->text();?><span class="mobile-only"> (<?php echo wfMessage( 'deltaskin-practice' )->text();?>)</span></a></h2>
<div class="scroller">
<div class="scroller__inner">
<ul class="list-bare case-list">
<?php
foreach($blockdata["cases"] as $ck=>$case):
if($ck==="more") continue; //skip the more link for now, used elders (above)
//NB: $case["subs"] is not used at the moment (will not be dealt with in the code below).
?>
<li class="mb"><a href="<?php echo $case[0];?>" style="background-image: url(<?php echo $case[2];?>)" class="case-list__item p"><?php echo $case[1];?></a></li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<!-- row begrippen/feiten -->
<div class="layout layout--devider mobile-pt tablet-pt0 section-begrippen-feiten">
<div class="layout__item u-1/2-tablet u-2/3-desktop section-begrippen">
<?php if($blockdata["concepts"]):?>
<div class="box pt-">
<h2 class="section-titel"><a href="<?php echo $blockdata["concepts"]["more"];?>"><?php echo wfMessage( 'deltaskin-concepts' )->text();?><span class="mobile-only"> (<?php echo wfMessage( 'deltaskin-theory' )->text();?>)</span></a></h2>
<div class="">
<ul class="list-block terms">
<?php
foreach($blockdata["concepts"] as $ck=>$concept):
if($ck==="more") continue; //skip the more link for now, used elders (above & below)
//NB: $concept["subs"] is not used at the moment (will not be dealt with in the code below).
?>
<li><a href="<?php echo $concept[0];?>"><?php echo $concept[1];?></a></li>
<?php endforeach;?>
</ul>
<a href="<?php echo $blockdata["concepts"]["more"];?>" class="blocklink fr">
<?php echo wfMessage( 'deltaskin-more' )->text()." ".strtolower(wfMessage( 'deltaskin-concepts' )->text()); ?> »
</a>
</div>
</div>
<?php endif;?>
</div><div class="layout__item u-1/2-tablet u-1/3-desktop">
<?php if($blockdata["facts"]):?>
<div class="box box--absolute">
<h2 class="section-titel"><a href="<?php echo $blockdata["facts"]["more"];?>"><?php echo wfMessage( 'deltaskin-facts' )->text();?><span class="mobile-only"> (<?php echo wfMessage( 'deltaskin-practice' )->text();?>)</span></a></h2>
<div class="scroller">
<div class="scroller__inner">
<ul class="list-bare case-list">
<?php
foreach($blockdata["facts"] as $fk=>$fact):
if($fk==="more") continue; //skip the more link for now, used elders (above)
//NB: $fact["subs"] is not used at the moment (will not be dealt with in the code below).
?>
<li class="mb"><a href="<?php echo $fact[0];?>" style="background-image: url(<?php echo $fact[2]?>)" class="case-list__item p"><?php echo $fact[1];?></a></li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
</div>
<?php
endif;
if($blockdata["moreblocks"]):?>
<div class="navigation mb">
<div class="box pb0">
<div class="layout">
<?php
//TODO: this block of code is the almost the same as for processes (except for: u-1/2-tablet u-/1/3-desktop) - remove codedupl?
foreach($blockdata["moreblocks"] as $mk=>$anotherblock):
if($mk==="more") continue; //skip the more link for now, not used elders at the moment
//important: no new lines or spacing must be present between begin and end of this foreach loop... see EMT-365:
?><div class="layout__item u-1/2-tablet u-1/3-desktop">
<a href="<?php echo $anotherblock[0];?>">
<div class="box navigation__item cover" style="background-image: url(<?php echo $anotherblock[2];?>)">
<h3 class="navigation__item--title"><?php echo $anotherblock[1];?></h3>
<?php
if(is_array($anotherblock["subs"]) && count($anotherblock["subs"])>0){
echo '<ul class="list-bare navigation__list">';
foreach ($anotherblock["subs"] as $key => $value)
echo $this->makeListItem( $key, $value, array('link-class'=>'navigation__subitem')) . "\n";
echo '</ul>';
}
?>
</div>
</a>
</div><?php endforeach; //important: no new lines or spacing must be present between begin and end of this foreach loop... see EMT-365?>
</div>
</div>
</div>
<?php
endif;
if($blockdata["sections"]):
?> <!-- Sections section -->
<section class="section">
<div class="box pb0">
<div class="layout">
<?php
foreach($blockdata["sections"] as $sk=>$section):
if($sk==="more") continue; //skip the more link for now, not used elders at the moment
?><div class="layout__item u-1/2-tablet u-1/3-desktop">
<div class="section__item">
<h3 class="section__title" style="background-image: url(<?php echo $section[2];?>);"><a href="<?php echo $section[0];?>"><?php echo ($section[1] ?: $section[0]);?></a></h3>
<ul class="section__list">
<?php
if(is_array($section["subs"])){
foreach ($section["subs"] as $key => $value)
echo $this->makeListItem( $key, $value) . "\n";
}
else{
echo $section["subs"] . "\n";
}
echo "<li class=\"more\"><a href=\"{$section[0]}\">" . wfMessage( 'deltaskin-more' )->text() ." ". strtolower( ($section[1] ?: $section[0]) ) . "</a></li>\n";
echo "</ul>\n";
?>
</div>
</div><?php endforeach;?>
</div>
</div>
</section>
<?php
endif;
if($blockdata["audience"]):
?> <!-- Audience section -->
<section class="section">
<div class="box pb0">
<div class="layout">
<?php
foreach($blockdata["audience"] as $ak=>$audienceItem):
if($ak==="more") continue; //skip the more link for now, not used elders at the moment
?><div class="layout__item u-1/2-tablet u-1/3-desktop">
<div class="section__item">
<h3 class="section__title" style="background-image: url(<?php echo $audienceItem[2];?>);"><a href="<?php echo $audienceItem[0];?>"><?php echo ($audienceItem[1] ?: $audienceItem[0]);?></a></h3>
<ul class="section__list">
<?php
if(is_array($audienceItem["subs"])){
foreach ($audienceItem["subs"] as $key => $value)
echo $this->makeListItem( $key, $value) . "\n";
}
else{
echo $audienceItem["subs"] . "\n";
}
echo "<li class=\"more\"><a href=\"{$audienceItem[0]}\">" . wfMessage( 'deltaskin-more' )->text() ." ". strtolower( ($audienceItem[1] ?: $audienceItem[0]) ) . "</a></li>\n";
echo "</ul>\n";
?>
</div>
</div><?php endforeach;?>
</div>
</div>
</section>
<?php
endif;
if( !($blockdata["sections"] || $blockdata["audience"] || $blockdata["processes"] || $blockdata["cases"] || $blockdata["concepts"] || $blockdata["facts"]) ) //if none of the msgs is set, just print the page content
{
$this->html('bodytext');
if($this->data['loggedin'] && $_GET["action"] != 'edit')
echo "<div id=\"editlink\"><a href=\"?action=edit\">wijzig</a></div>";
}
?>
</div>