Init import
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user