-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbody.php
55 lines (51 loc) · 1.28 KB
/
body.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
<?php
// prevent script from getting called directly
if (!defined("URLAUBE")) { die(""); }
?>
<!-- Empty Section so that no menu entry is active when scrolling to the top -->
<section id="empty" class="empty-section">
</section>
<?php
// iterate through the content entries
$counter = 0;
$even = false;
foreach (value(Main::class, CONTENT) as $content_item) {
// increment section counter
$counter++;
// choose alternating CSS class
if ($even) {
$class = "even-section";
} else {
$class = "uneven-section";
}
$even = (!$even);
$content = value($content_item, CONTENT).NL;
$title = value($content_item, TITLE);
$id = StartBootstrapScrollingNav::cleanString(value($content_item, "section"));
if (null === $id) {
$id = StartBootstrapScrollingNav::cleanString($title);
}
if (null === $id) {
$id = "section-$counter";
}
?>
<!-- <?= html($title) ?> Section -->
<section id="<?= html($id) ?>" class="<?= html($class) ?>">
<div class="container">
<div class="row">
<div class="col-lg-12">
<?php
if (null !== $title) {
?>
<h1><?= html($title) ?></h1>
<?php
}
?>
<?= $content ?>
</div>
</div>
</div>
</section>
<?php
}
?>