This server has been upgraded to GitLab release 12.10.6.

Commit fa6ce414 authored by haemmer's avatar haemmer

Changed behaviour in the sense that CSS styles are loaded in addition and after the default styles

parent 9c56474f
......@@ -200,12 +200,14 @@ HTML Error: custom-error.php
Customize error messages
CSS Styles: css/custom-styles.css
Customize CSS styles that are printed inline in header
Customize CSS styles that are printed inline in header. The custom styles are
loaded in addition to the default styles. Therefore, they can be used to
overwrite the default CSS styles.
Languages: custom-languages.php
Can be used to change default or add new language strings. In contrast to the
above template files, this won't replace the default-languages.php but extend or
modify it.
Can be used to change default or add new language strings. The custom languages
strings in addition to the default styles. Therefore, they can be used to
overwrite the default CSS styles.
If the above files don't exist, the default templates and settings
will be used. To create a custom template, copy of the default files with
......
......@@ -1106,21 +1106,21 @@ function printEmbeddedConfigurationScript(){
/******************************************************************************/
// Print sample configuration script used for Embedded WAYF
function printCSS(){
global $imageURL;
// Read custom CSS
if (file_exists('css/custom-styles.css')){
$cssFile = 'css/custom-styles.css';
} else {
$cssFile = 'css/default-styles.css';
}
// Read CSS and substitute content
$cssContent = file_get_contents($cssFile);
$cssContent = preg_replace('/{?\$imageURL}?/',$imageURL, $cssContent);
echo $cssContent;
}
global $imageURL;
$defaultCSSFile = 'css/default-styles.css';
$cssContent = file_get_contents($defaultCSSFile);
// Read custom CSS if available
if (file_exists('css/custom-styles.css')){
$customCSSFile = 'css/custom-styles.css';
$cssContent .= file_get_contents($customCSSFile);
}
// Read CSS and substitute content
$cssContent = preg_replace('/{?\$imageURL}?/',$imageURL, $cssContent);
echo $cssContent;
}
?>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment