diff options
| Commit | 67bc860ea4b3db5033a42038ab86d0df955c9295 (patch) | |
|---|---|---|
| Author | 2021-04-03 15:48:16 +0300 | |
| Committer | 2021-04-03 15:48:16 +0300 | |
| Files | 32aa82966b75e3b5b896acef9fbe1b5cf69aadc7 /src/index.php | |
| devrix-job-board-0.2.tar devrix-job-board-0.2.tar.gz devrix-job-board-0.2.zip | ||
| Parent | f8c1df9a9a24be0ff3811dc33e00f92bf51465ab (diff) | |
| Parent | 39fd52b1aaf2fde1236fdef21df65ba768f598ed (diff) | |
Merge pull request #2 from Syndamia/dev v0.2
Implemented template front-end
1 files changed, 64 insertions, 29 deletions
| -rw-r--r-- | src/index.php | 93 |
diff --git a/src/index.php b/src/index.php index 676cd56..8b45dea 100644 --- a/src/index.php +++ b/src/index.php @@ -1,34 +1,69 @@ -<?php require "document-top.php"; ?> +<!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 rel="stylesheet" href="/css/prog.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"> + <h2 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/ - */ + <nav class="site-nav"> + <div class="job-card"> + <a href="/">Home</a> + </div> + <div class="job-card"> + <a href="/CreateOffer">Create a new job offer</a> + </div> + <div class="job-card"> + <a href="/Dashboard">Dashboard</a> + </div> + </nav> -$request = $_SERVER['REQUEST_URI']; + <?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; + } + ?> -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; -} -?> + <footer class="site-footer"> + <p>Copyright 2020</p> + </footer> + </div> -<?php require "document-bot.php"; ?> +</body> +</html> |
