From 8af6cffa044073dfea5b3cda3ab8d1fc3401208c Mon Sep 17 00:00:00 2001 From: yiendos Date: Mon, 6 Jul 2020 14:17:05 +0100 Subject: [PATCH] #313: quickly hooking up dark mode detection on framework level, wanted to see it in action --- .../joomlatools/library/template/helper/ui.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/libraries/joomlatools/library/template/helper/ui.php b/code/libraries/joomlatools/library/template/helper/ui.php index 7434fa5ad..8dee7d35f 100644 --- a/code/libraries/joomlatools/library/template/helper/ui.php +++ b/code/libraries/joomlatools/library/template/helper/ui.php @@ -102,8 +102,15 @@ public function styles($config = array()) $config->css_file = sprintf('%scss/%s.css', (empty($config->folder) ? '' : $config->folder.'/'), $config->file); } - if ($config->css_file) { - $html .= ''; + if ($config->css_file) + { + $light = $config->css_file; + $dark = str_replace('admin.', 'admin-dark.', $config->css_file); + + //$html .= '' + $html .= ''; + $html .= ''; + $html .= ''; } return $html;