From 9bc4267c6a7c3859bc177d92fbe70c087d717abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Wed, 3 Jan 2018 01:03:43 +0100 Subject: [PATCH] Highlight active tab --- www/data/css/styles.css | 2 ++ www/data/css/styles_header.scss | 2 ++ www/fragments/header.php | 10 +++++----- www/index.php | 3 +++ www/pages/blog_list.php | 2 +- www/pages/blog_view.php | 2 +- www/pages/main.php | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/www/data/css/styles.css b/www/data/css/styles.css index 7ecf9af..4a06e09 100644 --- a/www/data/css/styles.css +++ b/www/data/css/styles.css @@ -98,6 +98,8 @@ body { #headerdiv .tabrow .tab:hover { cursor: pointer; background-color: #555; } + #headerdiv .tabrow .tab_active { + background-color: #422; } #headerdiv .tabrow .tab_split { flex: auto; } #headerdiv .tabrow .tab_github { diff --git a/www/data/css/styles_header.scss b/www/data/css/styles_header.scss index 9548230..be2174a 100644 --- a/www/data/css/styles_header.scss +++ b/www/data/css/styles_header.scss @@ -51,6 +51,8 @@ } } + .tab_active { background-color: #422; } + .tab_split { flex: auto; } diff --git a/www/fragments/header.php b/www/fragments/header.php index 14b69ae..eac9d87 100644 --- a/www/fragments/header.php +++ b/www/fragments/header.php @@ -4,11 +4,11 @@
- Home - Project Euler - Blog - Programs - About + Home + Project Euler + Blog + Programs + About
Github
diff --git a/www/index.php b/www/index.php index 9cce99a..54b40e5 100644 --- a/www/index.php +++ b/www/index.php @@ -75,6 +75,9 @@ $pathparts = preg_split('@/@', $path, NULL, PREG_SPLIT_NO_EMPTY); $partcount = count($pathparts); global $OPTIONS; +global $HEADER_ACTIVE; + +$HEADER_ACTIVE = 'none'; foreach ($URL_RULES as $rule) { diff --git a/www/pages/blog_list.php b/www/pages/blog_list.php index af6c3f3..32dbd77 100644 --- a/www/pages/blog_list.php +++ b/www/pages/blog_list.php @@ -17,7 +17,7 @@ $allposts = Blog::listAllOrderedDescending();
- +
diff --git a/www/pages/blog_view.php b/www/pages/blog_view.php index bea82c9..52b60b2 100644 --- a/www/pages/blog_view.php +++ b/www/pages/blog_view.php @@ -36,7 +36,7 @@ if ($post === NULL) httpError(404, 'blogpost not found');
- +
diff --git a/www/pages/main.php b/www/pages/main.php index 917d467..88b26df 100644 --- a/www/pages/main.php +++ b/www/pages/main.php @@ -11,7 +11,7 @@
- +