Removes the page-specific CSS

This commit is contained in:
Christophe HENRY 2022-08-01 14:34:45 +02:00
parent ef149dcad8
commit 852e57d800
1 changed files with 2 additions and 11 deletions

View File

@ -118,17 +118,8 @@ if ($urlRewriting)
else
$gt_html = new \htmgem\GemTextTranslate_html($fileContents, $gt_htmlextDecoration, "$php_self?url=", dirname($url));
if (empty($style)) { // Searches for a stylesheet for the current page.
$parts = pathinfo($filePath);
$localCss = $parts["filename"].".css";
$localCssFilePath = $parts["dirname"]."/".$localCss;
if (file_exists($localCssFilePath)) {
# Warning, using htmhem.php?url=… will make $localCss not found
# as the path is relative to htmgem.php and not / !
$gt_html->addCss($localCss);
} else { // No local style
$gt_html->addCss($php_self_dir.DEFAULT_CSS);
}
if (empty($style)) {
$gt_html->addCss($php_self_dir.DEFAULT_CSS);
} else {
$style = preg_replace("/,/", "/", $style);
$gt_html->addCss("$php_self_dir/css/$style");