diff --git a/config.ini b/config.ini index 2278d68..09d507f 100644 --- a/config.ini +++ b/config.ini @@ -15,8 +15,14 @@ pic_big = static/images/profile_big.jpg [language] lang = en +[components] highlight = true +[custom] +;styles[] = static/styles/custom1.css +;styles[] = static/styles/custom2.css +;scripts = static/styles/scripts.css + [login] force_login = true nick = demo @@ -24,6 +30,6 @@ pass = demo [system] system_name = blog -version = 1.04 +version = 1.041 debug = true logs = false \ No newline at end of file diff --git a/index.php b/index.php index 5e58286..9ff86dc 100644 --- a/index.php +++ b/index.php @@ -47,6 +47,30 @@ if(file_exists($header_path)){ $header = ''; } +// Translate styles into html +$styles = Config::get_safe("styles", []); +$styles_html = ''; +if(!empty($styles)){ + if(!is_array($styles)){ + $styles = [$styles]; + } + + $styles = array_unique($styles); + $styles_html = ''.PHP_EOL.''.PHP_EOL; +} + +// Translate script urls into html +$scripts = Config::get_safe("scripts", []); +$scripts_html = ''; +if(!empty($scripts)){ + if(!is_array($styles)){ + $styles = [$styles]; + } + + $scripts = array_unique($scripts); + $scripts_html = ''.PHP_EOL.''.PHP_EOL; +} + ?> @@ -63,7 +87,10 @@ if(file_exists($header_path)){ + ' : ''; ?> + +
@@ -79,20 +106,21 @@ if(file_exists($header_path)){