mirror of
https://github.com/unraid/webgui.git
synced 2026-01-07 01:59:52 -06:00
Prepare for automatic style sheet loading per page
This commit is contained in:
@@ -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 '<link type="text/css" rel="stylesheet" href="',autov($css),'">',"\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 '<link type="text/css" rel="stylesheet" href="',autov($css_stock),'">',"\n";
|
||||
if (is_file($docroot.$css_theme)) echo '<link type="text/css" rel="stylesheet" href="',autov($css_theme),'">',"\n";
|
||||
// create page content
|
||||
empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text']));
|
||||
if ($close) echo "</div></div>";
|
||||
|
||||
Reference in New Issue
Block a user