-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
75 lines (61 loc) · 2.48 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
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
<?php /** @noinspection PhpUndefinedVariableInspection */
require_once 'app/setup.php';
$version = file_get_contents('version.txt');
?>
<!doctype html>
<html lang="en">
<head>
<!-- basic stuff -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="robots" content="noindex, nofollow">
<title><?= $config['title'] ?></title>
<!-- icon setup -->
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png?v=sfji238dfs">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png?v=sfji238dfs">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png?v=sfji238dfs">
<link rel="manifest" href="site.webmanifest?v=sfji238dfs">
<link rel="mask-icon" href="safari-pinned-tab.svg?v=sfji238dfs" color="#88e147">
<link rel="shortcut icon" href="favicon.ico?v=sfji238dfs">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="browserconfig.xml?v=sfji238dfs">
<!-- default (light) stylesheet -->
<!-- <link href="styles/mini.css/mini-default.min.css" type="text/css" rel="stylesheet">-->
<!-- dark stylesheet -->
<!-- <link href="styles/mini.css/mini-dark.min.css" type="text/css" rel="stylesheet">-->
<!-- nord stylesheet -->
<link href="styles/mini.css/mini-nord.min.css" type="text/css" rel="stylesheet">
<link href="styles/fixes.css" type="text/css" rel="stylesheet">
</head>
<body>
<header class="sticky row">
<a href="./" class="button logo-img">
<img src="favicon.ico" alt="Raspberry Manager logo"/>
</a>
<?php foreach ($config['controllers'] as $controller): ?>
<a href="#<?= $controller->getId() ?>" class="button"><?= $controller->getTitle() ?></a>
<?php endforeach; ?>
</header>
<main>
<?php
foreach ($config['controllers'] as $controller) {
$card = [
"id" => $controller->getId(),
"title" => $controller->getTitle(),
"body" => $controller->render()
];
include "app/views/elements/card.php";
}
if (count($config['controllers']) == 0) {
echo '<p>No controllers registered.</p>';
}
?>
</main>
<footer>
Raspberry Manager v<?= $version ?> © 2021 by Ludwig Richter. Made with <a
href="https://minicss.org/">mini.css</a>
</footer>
</body>
</html>