Removes the page-specific CSS
This commit is contained in:
parent
ef149dcad8
commit
852e57d800
13
index.php
13
index.php
|
@ -118,17 +118,8 @@ if ($urlRewriting)
|
||||||
else
|
else
|
||||||
$gt_html = new \htmgem\GemTextTranslate_html($fileContents, $gt_htmlextDecoration, "$php_self?url=", dirname($url));
|
$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.
|
if (empty($style)) {
|
||||||
$parts = pathinfo($filePath);
|
$gt_html->addCss($php_self_dir.DEFAULT_CSS);
|
||||||
$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);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$style = preg_replace("/,/", "/", $style);
|
$style = preg_replace("/,/", "/", $style);
|
||||||
$gt_html->addCss("$php_self_dir/css/$style");
|
$gt_html->addCss("$php_self_dir/css/$style");
|
||||||
|
|
Loading…
Reference in New Issue