Prepare for automatic style sheet loading per page

This commit is contained in:
bergware
2023-10-13 18:08:58 +02:00
parent 48e8c5bb73
commit 2ddceae4a3

View File

@@ -739,7 +739,7 @@ foreach ($pages as $page) {
if (isset($page['Nchan'])) nchan_merge($page['root'], $page['Nchan']);
annotate($page['file']);
// include page specific stylesheet (if existing)
$css = "/{$page['root']}/pages/".strtolower($page['name']).".css";
$css = "/{$page['root']}/pages/{$page['name']}.css";
if (is_file($docroot.$css)) echo '<link type="text/css" rel="stylesheet" href="',autov($css),'">',"\n";
// create page content
empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text']));