From 852e57d80065791b8a57884a7f833be7c3e4ceed Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Mon, 1 Aug 2022 14:34:45 +0200 Subject: [PATCH] Removes the page-specific CSS --- index.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/index.php b/index.php index b57bd33..c0b9a8b 100644 --- a/index.php +++ b/index.php @@ -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");