You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.1 KiB
54 lines
1.1 KiB
|
9 months ago
|
<?php
|
||
|
|
require_once 'config.php';
|
||
|
|
require_once 'lib/template.php';
|
||
|
|
|
||
|
|
# Necessary since I'm not using RewriteRule
|
||
|
|
$basehref = dirname($_SERVER['SCRIPT_NAME']);
|
||
|
|
|
||
|
|
if (isset($_SERVER['PATH_INFO'])) {
|
||
|
|
if ($_SERVER['PATH_INFO'] === '/' ) {
|
||
|
|
$contents = include_path('/list-site.php');
|
||
|
|
} else {
|
||
|
|
$contents = include_path($_SERVER['PATH_INFO']);
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
header("Location: {$_SERVER['SCRIPT_NAME']}/");
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
<!doctype html>
|
||
|
|
<html>
|
||
|
|
<head lang="en">
|
||
|
|
<?= snippet_include('_meta.html', ['title'=>'Hello World' ]) ?>
|
||
|
|
|
||
|
|
<!-- cache breaking -->
|
||
|
|
<link rel="stylesheet" href="<?= $basehref ?>/main.css?<?= time() ?>">
|
||
|
|
<style>
|
||
|
|
/*
|
||
|
|
main,footer,.container,.row { border: 1px dashed #ffab27; }
|
||
|
|
*/
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<header class="mb-5">
|
||
|
|
<?= snippet_include('_header.html') ?>
|
||
|
|
</header>
|
||
|
|
|
||
|
|
<main class="bg-body-tertiary flex-grow-1">
|
||
|
|
<div class="container">
|
||
|
|
<?= $contents ?>
|
||
|
|
</div>
|
||
|
|
</main>
|
||
|
|
|
||
|
|
<footer>
|
||
|
|
<div class="container">
|
||
|
|
<?= snippet_include('_footer.html') ?>
|
||
|
|
</div>
|
||
|
|
</footer>
|
||
|
|
|
||
|
|
<!-- cache breaking -->
|
||
|
|
<script src="<?= $basehref ?>/app.js?<?= time() ?>"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|