diff options
Removed unused front-end files and made landing page dynamic (with the new style)
1 files changed, 56 insertions, 30 deletions
| -rw-r--r-- | src/index.php | 86 |
diff --git a/src/index.php b/src/index.php index 2ce8c4b..d00c7d9 100644 --- a/src/index.php +++ b/src/index.php @@ -1,34 +1,60 @@ -<?php require "document-top.html"; ?> +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Jobs</title> + <link rel="preconnect" href="https://fonts.gstatic.com"> -<?php -include_once("controllers/LandingController.php"); -include_once("controllers/CreateOfferController.php"); -include_once("controllers/DashboardLoginController.php"); + <link rel="stylesheet" href="/css/master.css"> + <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet"> +</head> +<body> + <div class="site-wrapper"> + <header class="site-header"> + <h1 class="site-title"><a href="/">Job Offers</a></h2> + </header> -/* The landing page practically acts as our page router. - * All request get redirected to here (look at the devrix-job-board.conf) - * Thanks https://www.taniarascia.com/the-simplest-php-router/ - */ + <?php + include_once("controllers/LandingController.php"); + include_once("controllers/CreateOfferController.php"); + include_once("controllers/DashboardLoginController.php"); + + /* The landing page practically acts as our page router. + * All request get redirected to here (look at the devrix-job-board.conf) + * Thanks https://www.taniarascia.com/the-simplest-php-router/ + */ + + $request = $_SERVER['REQUEST_URI']; + + switch ($request) { + case "": + case "/": + LandingController::invoke(); + break; + case "/CreateOffer": + case "/CreateOffer/": + CreateOfferController::invoke(); + break; + case "/Dashboard": + case "/Dashboard/": + DashboardLoginController::invoke(); + break; + default: + http_response_code(404); + break; + } + ?> -$request = $_SERVER['REQUEST_URI']; + <footer class="site-footer"> + <p>Copyright 2020 | Developer links: + <a href="/Dashboard">Dashboard</a>, + <a href="/">Home</a>, + <a href="/single.html">Single</a> + </p> + </footer> + </div> -switch ($request) { - case "": - case "/": - LandingController::invoke(); - break; - case "/CreateOffer": - case "/CreateOffer/": - CreateOfferController::invoke(); - break; - case "/Dashboard": - case "/Dashboard/": - DashboardLoginController::invoke(); - break; - default: - http_response_code(404); - break; -} -?> - -<?php require "document-bot.html"; ?> +</body> +</html> |
