blob: fa89920e57f537ae96b6654b4ba6fa208bc5ee2e (
plain)
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
|
<?php
require_once __DIR__ . '/../app.php';
$url = strtok($_SERVER["REQUEST_URI"], '?');
#var_dump([ "faces" => get_faces() ]);
switch( $url ) {
case("/"):
echo $twig->render('index.html');
break;
case("/about"):
echo $twig->render('about.html');
break;
case("/projects"):
echo $twig->render('projects.html');
break;
case("/tools"):
echo $twig->render('tools.html');
break;
case("/tools/faces"):
case("/tools/faces/"):
echo $twig->render('tools/faces/index.html', [ "faces" => get_faces() ]);
break;
default:
http_response_code(404);
echo $twig->render('404.html');
}
|