diff options
-rw-r--r-- | app/model/Navigation.php | 14 | ||||
-rw-r--r-- | app/views/contact.view.php | 2 | ||||
-rw-r--r-- | app/views/partials/header.php | 2 | ||||
-rw-r--r-- | public/error/403.html | 2 | ||||
-rw-r--r-- | public/error/404.html | 2 |
5 files changed, 7 insertions, 15 deletions
diff --git a/app/model/Navigation.php b/app/model/Navigation.php index bfe9616..b7ca00f 100644 --- a/app/model/Navigation.php +++ b/app/model/Navigation.php @@ -27,18 +27,4 @@ class Navigation } return; } - - public function title() - { - switch ($_SERVER['REQUEST_URI']) { - case '/contact/': - $uri = $_SERVER['REQUEST_URI']; - echo $titleHeader = 'Contact - '; - break; - case '/': - $uri = $_SERVER['REQUEST_URI']; - echo $titleHeader = 'Portfolio - '; - break; - } - } } diff --git a/app/views/contact.view.php b/app/views/contact.view.php index d2ac07e..090da92 100644 --- a/app/views/contact.view.php +++ b/app/views/contact.view.php @@ -1,3 +1,5 @@ +<?php $title = 'Contact - ' ?> + <?php require __DIR__ . '/partials/header.php'; ?> <body> diff --git a/app/views/partials/header.php b/app/views/partials/header.php index 5dd413c..d78bbe3 100644 --- a/app/views/partials/header.php +++ b/app/views/partials/header.php @@ -2,7 +2,7 @@ <html class="has-navbar-fixed-top" lang="en-us"> <head> - <title><?php $navigation->title(); ?>Thedro Neely</title> + <title><?php echo $title = $title ?? 'Portfolio - '; ?>Thedro Neely</title> <meta name="description" content="Thedro's Portfolio Website"> <meta name="keywords" content="Thedro,Neely,Portfolio,Website"> diff --git a/public/error/403.html b/public/error/403.html index 6e00116..83163ff 100644 --- a/public/error/403.html +++ b/public/error/403.html @@ -1,3 +1,5 @@ +<?php $title = '403 - ' ?> + <?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/app/views/partials/header.error.php'; ?> <section class="section hero" itemscope itemtype="http://schema.org/HomePage"> diff --git a/public/error/404.html b/public/error/404.html index ea132da..1706e10 100644 --- a/public/error/404.html +++ b/public/error/404.html @@ -1,3 +1,5 @@ +<?php $title = '404 - ' ?> + <?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/app/views/partials/header.error.php'; ?> <section class="section hero" itemscope itemtype="http://schema.org/HomePage"> |