-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.php
More file actions
63 lines (43 loc) · 1.19 KB
/
Copy pathtemplate.php
File metadata and controls
63 lines (43 loc) · 1.19 KB
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
<?php
namespace template;
include ("components/components.php");
$pages = scandir("page");
ob_start();
foreach ($pages as $page) {
if (str_starts_with($page, "."))
continue;
$name = preg_split("/-/", $page)[1];
\template\componets\list_item($name);
}
$list_items = ob_get_clean();
ob_start();
require ($contentPath);
$content = ob_get_clean();
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pages</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div class="grid grid-rows-3 grid-cols-3">
<div class="row-span-1 col-span-1"></div>
<header class="row-span-1 col-span-2 place-self-center">
<h1>
<?php echo $pageName; ?>
</h1>
</header>
<aside class="row-span-2 col-span-1 place-self-center">
<menu class="list-decimal list-inside">
<?php echo ($list_items) ?>
</menu>
</aside>
<main class="row-span-2 col-span-2 place-self-center">
<?php echo $content ?>
</main>
</div>
</body>
</html>