From b05845f495e7561eddf2ad5b0c9325649f5289af Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 17 Mar 2024 22:21:55 +0100 Subject: cleanup some ancient code and fix check for $path so that it will not pass if theme_include() will not return anything. also add an empty zen.css file for the zen template --- Zotlabs/Render/Theme.php | 7 +------ boot.php | 10 ++-------- include/plugin.php | 8 ++++---- view/css/zen.css | 1 + 4 files changed, 8 insertions(+), 18 deletions(-) create mode 100644 view/css/zen.css diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php index dc23eae84..543bf7a3f 100644 --- a/Zotlabs/Render/Theme.php +++ b/Zotlabs/Render/Theme.php @@ -97,14 +97,9 @@ class Theme { * * Provide a sane default if nothing is chosen or the specified theme does not exist. * - * @param bool $installing (optional) default false, if true return the name of the first base theme - * * @return string */ - static public function url($installing = false) { - - if($installing) - return self::$base_themes[0]; + static public function url() { $uid = App::$profile_uid ?: local_channel(); diff --git a/boot.php b/boot.php index 1eb64cb0a..1dc29051e 100644 --- a/boot.php +++ b/boot.php @@ -2331,8 +2331,6 @@ function construct_page() { require_once(theme_include('theme_init.php')); - $installing = false; - $uid = ((App::$profile_uid) ? App::$profile_uid : local_channel()); $navbar = get_config('system', 'navbar', 'default'); @@ -2344,14 +2342,10 @@ function construct_page() { $navbar = App::$layout['navbar']; } - if (App::$module == 'setup') { - $installing = true; - } - else { + if (App::$module !== 'setup') { nav($navbar); } - $current_theme = Zotlabs\Render\Theme::current(); // logger('current_theme: ' . print_r($current_theme,true)); // Zotlabs\Render\Theme::debug(); @@ -2372,7 +2366,7 @@ function construct_page() { if (($p = theme_include('mod_' . App::$module . '.css')) != '') head_add_css('mod_' . App::$module . '.css'); - head_add_css(Zotlabs\Render\Theme::url($installing)); + head_add_css(Zotlabs\Render\Theme::url()); if (($p = theme_include('mod_' . App::$module . '.js')) != '') head_add_js('mod_' . App::$module . '.js'); diff --git a/include/plugin.php b/include/plugin.php index cc740f915..bbfeab988 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -985,12 +985,12 @@ function format_css_if_exists($source) { } } else { // It's a file from the theme - $path = '/' . theme_include($script); + $path = theme_include($script); } if($path) { $qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION; - return '' . "\r\n"; + return '' . "\r\n"; } } @@ -1057,11 +1057,11 @@ function format_js_if_exists($source) { } else { // It's a file from the theme - $path = '/' . theme_include($source); + $path = theme_include($source); } if($path) { $qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION; - return '' . "\r\n" ; + return '' . "\r\n" ; } } diff --git a/view/css/zen.css b/view/css/zen.css new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/view/css/zen.css @@ -0,0 +1 @@ + -- cgit v1.2.3 From 9cbb9a48742d41eba8d2d65e1a74cd0d6fe61554 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 17 Mar 2024 21:30:50 +0000 Subject: theme min/max version and minor css fix --- view/css/conversation.css | 6 +++--- view/theme/redbasic/php/theme.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 6958e9bf2..491cee92e 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -304,7 +304,7 @@ code.inline-code { } img.emoji { - height: 1.2rem; + height: 1.3rem; vertical-align: baseline; margin-bottom: -.2rem; } @@ -314,9 +314,9 @@ img.emoji.single-emoji { } img.emoji:not(.single-emoji):hover { - transform: scale(2); + transform: scale(1.8); transition: transform .1s ease-out; - filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, .5)); + filter: drop-shadow(0px 0px 0.05rem rgba(0, 0, 0, .5)); } .checklist input { diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index c33c4f78e..1f50ed786 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -4,8 +4,8 @@ * * Name: Redbasic * * Description: Hubzilla standard theme * * Version: 2.2 - * * MinVersion: 8.0 - * * MaxVersion: 9.0 + * * MinVersion: 9.0 + * * MaxVersion: 10.0 * * Author: Fabrixxm * * Maintainer: Mike Macgirvin * * Maintainer: Mario Vavti -- cgit v1.2.3