diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-04-30 20:51:33 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-04-30 20:51:33 -0400 |
commit | e6ba75472a9973c488e834867c83393705480325 (patch) | |
tree | 1351d22bb60dbc96f3d3c49bfdcbd30bb922840d | |
parent | b348e8f87431623bb398eb13d3784157a82339a3 (diff) | |
download | thedroneely.com-e6ba75472a9973c488e834867c83393705480325.tar.gz thedroneely.com-e6ba75472a9973c488e834867c83393705480325.tar.bz2 thedroneely.com-e6ba75472a9973c488e834867c83393705480325.zip |
app/model/Navigation: Remove title switch function, and set title on page itself
-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"> |