Improve theme

Improve theme
This commit is contained in:
Danang Probo Sayekti 2014-02-10 12:01:24 +07:00
commit b62f013588
10 changed files with 22 additions and 19 deletions

View file

@ -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' => '<div class="author-info"><h4>by <strong>' . $bio->title . '</strong></h4>' . $bio->body . '</div>',
'authorinfo' => authorinfo($bio->title, $bio->body),
'bodyclass' => 'inpost',
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' .config('breadcrumb.home'). '</a></span> &#187; '. $current->tagb . ' &#187; ' . $current->title,
'prev' => has_prev($prev),

View file

@ -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 '<div class="author-info"><h4>by <strong>' . $title . '</strong></h4>' . $body . '</div>';
}
}
function head_contents($title, $description, $canonical) {
$output = '';
$title = '<title>' . $title . '</title>';