From b62f0135881928d7207f92689e368bf14993ccf7 Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Mon, 10 Feb 2014 12:01:24 +0700 Subject: [PATCH] Improve theme Improve theme --- system/htmly.php | 2 +- system/includes/functions.php | 7 +++++++ themes/clean/404-search.html.php | 2 +- themes/clean/404.html.php | 2 +- themes/clean/layout.html.php | 8 ++++---- themes/clean/post.html.php | 4 +--- themes/default/404-search.html.php | 2 +- themes/default/404.html.php | 2 +- themes/default/layout.html.php | 8 ++++---- themes/default/post.html.php | 4 +--- 10 files changed, 22 insertions(+), 19 deletions(-) diff --git a/system/htmly.php b/system/htmly.php index 3af95d9..c0f0e25 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -133,7 +133,7 @@ get('/:year/:month/:name', function($year, $month, $name){ render('post',array( 'head_contents' => head_contents($current->title .' - ' . blog_title(), $description = get_description($current->body), $current->url), 'p' => $current, - 'authorinfo' => '

by ' . $bio->title . '

' . $bio->body . '
', + 'authorinfo' => authorinfo($bio->title, $bio->body), 'bodyclass' => 'inpost', 'breadcrumb' => '' .config('breadcrumb.home'). ' » '. $current->tagb . ' » ' . $current->title, 'prev' => has_prev($prev), diff --git a/system/includes/functions.php b/system/includes/functions.php index d58c3db..7f1f535 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -1346,6 +1346,13 @@ function blog_copyright() { return config('blog.copyright'); } +// Return author info +function authorinfo($title=null, $body=null) { + if (config('author.info') == 'true') { + return '

by ' . $title . '

' . $body . '
'; + } +} + function head_contents($title, $description, $canonical) { $output = ''; $title = '' . $title . ''; diff --git a/themes/clean/404-search.html.php b/themes/clean/404-search.html.php index 400020a..3db2c2e 100644 --- a/themes/clean/404-search.html.php +++ b/themes/clean/404-search.html.php @@ -5,7 +5,7 @@ - Search results not found! - <?php echo config('blog.title') ?> + Search results not found! - <?php echo blog_title() ?> diff --git a/themes/clean/404.html.php b/themes/clean/404.html.php index 665519c..c72afdb 100644 --- a/themes/clean/404.html.php +++ b/themes/clean/404.html.php @@ -5,7 +5,7 @@ - 404 Not Found - <?php echo config('blog.title') ?> + 404 Not Found - <?php echo blog_title() ?> diff --git a/themes/clean/layout.html.php b/themes/clean/layout.html.php index c686c54..e386eac 100644 --- a/themes/clean/layout.html.php +++ b/themes/clean/layout.html.php @@ -11,13 +11,13 @@
- - + +