From 21189acdb01c42174aaa58501f95feee56095227 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 14 Oct 2023 01:42:46 +0200 Subject: [PATCH] Prepare for automatic style sheet loading per page --- emhttp/plugins/dynamix/include/DefaultPageLayout.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 0cdd4f4c3..812c53311 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -738,9 +738,12 @@ foreach ($pages as $page) { // create list of nchan scripts to be started if (isset($page['Nchan'])) nchan_merge($page['root'], $page['Nchan']); annotate($page['file']); - // include page specific stylesheet (if existing) - $css = "/{$page['root']}/pages/{$page['name']}.css"; - if (is_file($docroot.$css)) echo '',"\n"; + // include page specific stylesheets (if existing) + $css = "/{$page['root']}/sheets/{$page['name']}"; + $css_stock = "$css.css"; + $css_theme = "$css-$theme.css"; + if (is_file($docroot.$css_stock)) echo '',"\n"; + if (is_file($docroot.$css_theme)) echo '',"\n"; // create page content empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text'])); if ($close) echo "";