-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
35 lines (31 loc) · 1.11 KB
/
index.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
<?php require("sideandmenu.php"); ?>
<div class="bodybody">
<?php
#$projects = preg_grep('/^([^.])/', scandir('proj', 1));
$projects = yaml_parse_file("proj/projects.yml", 0);
foreach($projects as $proj => $proj_content) {
$link_section = "";
if (array_key_exists('links', $proj_content)) {
$link_entry = "";
foreach($proj_content['links'] as $link) {
$link_entry .= "<a href=\"{$link['href']}\" target=\"_blank\" class=\"projlink\" rel=\"noopener\">{$link['title']}</a><br />\n";
}
$link_section = <<<EOD
<div class="projdocs">
$link_entry
</div>
EOD;
}
$entry = <<<EOD
<div class="project" id="$proj">
<h2 class="projhead">{$proj_content['title']}</h2>
<p>{$proj_content["body"]}
$link_section
</div>
<hr style="margin: 3rem 0 3.15rem 0;"></hr>
EOD;
echo "$entry";
}
?>
</div>
<?php require("foot.php"); ?>