This commit is contained in:
William 2022-02-06 03:35:20 +01:00
parent 65735fb457
commit 0712b7e13d
3 changed files with 16 additions and 0 deletions

View File

@ -22,16 +22,25 @@ spl_autoload_register(function ($class_name) {
/* === App Setup === */ /* === App Setup === */
// Displays a custom page on error or exception
new ErrorHandler; new ErrorHandler;
// Grab configuration file
$config = ( $config = (
new Config(__DIR__ . '/config.php') new Config(__DIR__ . '/config.php')
)->config; )->config;
// Start database connection
$database = new Database($config['database']); $database = new Database($config['database']);
// Session wrapper
$session = new Session; $session = new Session;
// Handles current user session
$user = new User($session, $database); $user = new User($session, $database);
// Decides if the user is allowed to view current page
new AccessControl($user); new AccessControl($user);
$app = new App( $app = new App(

View File

@ -34,10 +34,12 @@
<div id="container"> <div id="container">
<div id="nav"> <div id="nav">
<h4>Felles</h4>
<ul> <ul>
<li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li> <li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li>
<li><a href="<?=$this->config['root_url']?>example.php">Eksempel</a></li> <li><a href="<?=$this->config['root_url']?>example.php">Eksempel</a></li>
<li><a href="<?=$this->config['root_url']?>simulator.php">Simulator</a></li> <li><a href="<?=$this->config['root_url']?>simulator.php">Simulator</a></li>
<li><a href="<?=$this->config['root_url']?>view-teams.php">Se lagtabell</a></li>
</ul> </ul>
</div> </div>

View File

@ -75,6 +75,11 @@ a {
padding-left: .75rem; padding-left: .75rem;
} }
#nav h4 {
margin: 0;
border-bottom: 1px solid #aaa;
}
@media only screen and (max-width: 40rem) { @media only screen and (max-width: 40rem) {
#container { #container {
flex-flow: column; flex-flow: column;