From 51cd71846b3d07d08eb542bf856372a3929faa0d Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Fri, 3 Jul 2015 10:59:54 +0200 Subject: [PATCH] Blogtitle in Header --- index.php | 26 ++++++++++++++++++++++---- res/css/rangitaki.css | 5 +++++ res/php/BlogListGenerator.php | 9 +++++++++ themes/background-img.css | 4 ++++ themes/material-dark.css | 4 ++++ themes/material-light.css | 4 ++++ 6 files changed, 48 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 3885e4a..b5f4917 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ THE SOFTWARE. $getblog = filter_input(INPUT_GET, "blog"); $getarticle = filter_input(INPUT_GET, "article"); $gettag = filter_input(INPUT_GET, "tag"); - $url = "http://" . filter_input(INPUT_SERVER, "HTTP_HOST") . filter_input(INPUT_SERVER, "REQUEST_URI"); + $url = "http://" . filter_input(INPUT_SERVER, "HTTP_HOST") . filter_input(INPUT_SERVER, "REQUEST_URI"); ?> @@ -73,7 +73,7 @@ THE SOFTWARE. if (strlen($blog) >= 3 && substr($blog, -3) == ".md") { if ($getblog == "") { if ($blog != "main.md") { - if(empty($blogmainname)){ + if (empty($blogmainname)) { $blogmaintitle = $blogtitle; } else { $blogmaintitle = $blogmainname; @@ -82,7 +82,7 @@ THE SOFTWARE. } } else { if ($getblog . ".md" != $blog) { - if(empty($blogmainname)){ + if (empty($blogmainname)) { $blogmaintitle = $blogtitle; } else { $blogmaintitle = $blogmainname; @@ -114,7 +114,25 @@ THE SOFTWARE.
- + + + › + + › "> + + + +
a{ + text-decoration: none; + color: #fff; +} + .nav-img{ height: 26px; padding: 19px; diff --git a/res/php/BlogListGenerator.php b/res/php/BlogListGenerator.php index 63c7059..a2fa242 100644 --- a/res/php/BlogListGenerator.php +++ b/res/php/BlogListGenerator.php @@ -44,5 +44,14 @@ class BlogListGenerator { } } } + + function getName($file){ + $blog = file_get_contents($file); + $blog = $blog . "\n"; + if(substr($blog, 0, 6) == "%TITLE"){ + $blog = substr($blog, 8, strpos($blog, "\n") - 8); + return $blog; + } + } } diff --git a/themes/background-img.css b/themes/background-img.css index 968a609..2d26fd8 100644 --- a/themes/background-img.css +++ b/themes/background-img.css @@ -47,6 +47,10 @@ body{ position: absolute; } +.title > a{ + color: #fff; +} + .nav{ background-color: #fff; border-right: 1px solid #e0e0e0; diff --git a/themes/material-dark.css b/themes/material-dark.css index a41a244..c8952d0 100644 --- a/themes/material-dark.css +++ b/themes/material-dark.css @@ -43,6 +43,10 @@ body{ position: absolute; } +.title > a{ + color: #fff; +} + .nav{ background-color: #424242; border-right: 1px solid #1f1f1f; diff --git a/themes/material-light.css b/themes/material-light.css index f601956..fe7c09d 100644 --- a/themes/material-light.css +++ b/themes/material-light.css @@ -43,6 +43,10 @@ body{ position: absolute; } +.title > a{ + color: #fff; +} + .nav{ background-color: #fff; border-right: 1px solid #e0e0e0;