diff --git a/kernel/boot/init.php b/kernel/boot/init.php index 4189a0c8..d27d2090 100644 --- a/kernel/boot/init.php +++ b/kernel/boot/init.php @@ -152,10 +152,13 @@ define('HTML_PATH_THEME_JS', HTML_PATH_THEME.'js/'); define('HTML_PATH_THEME_IMG', HTML_PATH_THEME.'img/'); define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'admin/themes/'.$Site->adminTheme().'/'); +define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/'); define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/'); define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/'); define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/'); +define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js'); + // PHP paths with dependency define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/'); define('PATH_THEME_PHP', PATH_THEME.'php'.DS); diff --git a/kernel/helpers/theme.class.php b/kernel/helpers/theme.class.php index 58cd2297..4a61984a 100644 --- a/kernel/helpers/theme.class.php +++ b/kernel/helpers/theme.class.php @@ -4,6 +4,17 @@ class Theme { // NEW + public static function favicon($file='favicon.png', $path=HTML_PATH_THEME_IMG, $echo=true) + { + $tmp = ''.PHP_EOL; + + if($echo) { + echo $tmp; + } + + return $tmp; + } + public static function css($files, $path=HTML_PATH_THEME_CSS, $echo=true) { if(!is_array($files)) { @@ -109,6 +120,16 @@ class Theme { } } + public static function jquery($echo=true) + { + $tmp = ''.PHP_EOL; + + if($echo) { + echo $tmp; + } + + return $tmp; + } // OLD @@ -120,17 +141,8 @@ class Theme { return BLOG_URL; } - public static function jquery($path=JS_JQUERY) - { - $tmp = ''.PHP_EOL; - return $tmp; - } - public static function favicon() - { - return ''.PHP_EOL; - } public static function name() { diff --git a/kernel/page.class.php b/kernel/page.class.php index 8b4431da..7b6c5aa7 100644 --- a/kernel/page.class.php +++ b/kernel/page.class.php @@ -64,6 +64,10 @@ class Page extends fileContent return $tags; } else { + if($tags==false) { + return false; + } + // Return string with tags separeted by comma. return implode(', ', $tags); } diff --git a/kernel/post.class.php b/kernel/post.class.php index 0da32994..883eafff 100644 --- a/kernel/post.class.php +++ b/kernel/post.class.php @@ -126,6 +126,10 @@ class Post extends fileContent return $tags; } else { + if($tags==false) { + return false; + } + // Return string with tags separeted by comma. return implode(', ', $tags); } diff --git a/themes/pure/css/blog.css b/themes/pure/css/blog.css index 482f206b..df0e519a 100644 --- a/themes/pure/css/blog.css +++ b/themes/pure/css/blog.css @@ -54,6 +54,10 @@ pre, code { white-space: pre-wrap !important; } +blockquote { + border-left: 10px solid #f0f2f4; + padding-left: 10px; +} /* ------------------------ Content / Main @@ -139,15 +143,20 @@ margin: 0; .post-title a { color: #555; -border-bottom: 5px solid #ccc; display: inline-block; } .page a.read-more, .post a.read-more{ -display: block; -text-align: center; -padding: 2px 5px; + border: 1px solid #ccc; + display: inline-block; + margin-top: 10px; + padding: 2px 20px; +} + +.page a.read-more:hover, +.post a.read-more:hover{ + background: #f1f1f1; } diff --git a/themes/pure/index.php b/themes/pure/index.php index d8b93753..6a16a9b7 100644 --- a/themes/pure/index.php +++ b/themes/pure/index.php @@ -3,7 +3,7 @@ - + @@ -16,7 +16,7 @@ @@ -26,15 +26,15 @@ whereAmI()=='home') || ($Url->whereAmI()=='tag') ) { - include('php/home.php'); + include(PATH_THEME_PHP.'home.php'); } elseif($Url->whereAmI()=='post') { - include('php/post.php'); + include(PATH_THEME_PHP.'post.php'); } elseif($Url->whereAmI()=='page') { - include('php/page.php'); + include(PATH_THEME_PHP.'page.php'); } ?> diff --git a/themes/pure/php/head.php b/themes/pure/php/head.php index 7502dff7..43d6a590 100644 --- a/themes/pure/php/head.php +++ b/themes/pure/php/head.php @@ -1,13 +1,23 @@ + + + + +<?php echo $Site->title() ?> + Site title - Theme::title( $Site->title() ); - - // - Theme::description( $Site->description() ); + // Favicon from theme/img/ + Theme::favicon('favicon.png'); // if( $Url->whereAmI()=='post' ) { @@ -16,35 +26,18 @@ elseif( $Url->whereAmI()=='page' ) { Theme::keywords( $Page->tags() ); } - - // - // - // - // - Theme::css(array( - 'pure-min.css', - 'grids-responsive-min.css', - 'blog.css', - 'rainbow.github.css' - )); - - Theme::css(array( - 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext' - ), ''); - - // - Theme::javascript(array( - 'rainbow.min.js' - )); ?> + + + - + \ No newline at end of file