Skip to content
Snippets Groups Projects
Commit a78774d2 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add custom css if it exists

parent 78941334
No related branches found
No related tags found
No related merge requests found
......@@ -35,18 +35,6 @@ $L = new lang($aConfig['lang'] ?? 'en');
// functions
// ----------------------------------------------------------------------
/**
* Show a info or error message
*
* @param string $sLevel level: one of "info", "error"
* @param string $sMessage Message to show
* @return void
*/
function showMessage(string $sLevel, string $sMessage)
{
echo "<div class=\"msg $sLevel\">$sMessage</div>";
}
/**
* Get a list of static links for browsers without javascript
......@@ -64,4 +52,28 @@ function getStaticlinks($aIdplist){
}
function getCustomCss()
{
foreach([
'screen_custom.css'
] as $sCustomCss ){
if(file_exists($sCustomCss)){
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$sCustomCss\" media=\"screen\" />";
}
}
}
/**
* Show a info or error message
*
* @param string $sLevel level: one of "info", "error"
* @param string $sMessage Message to show
* @return void
*/
function showMessage(string $sLevel, string $sMessage)
{
echo "<div class=\"msg $sLevel\">$sMessage</div>";
}
// ----------------------------------------------------------------------
......@@ -23,7 +23,7 @@
'source' => 'https://git-repo.iml.unibe.ch/iml-open-source/login-aai',
'docs' => 'https://os-docs.iml.unibe.ch/login-aai/',
'license' => 'GNU GPL 3.0',
'version' => '0.4',
'version' => '0.5',
];
?><!DOCTYPE html>
......@@ -36,7 +36,10 @@
<title><?php echo $aConfig['title'] ?? 'AAI Login'; ?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="login_aai.css" media="screen" />
<link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo "mode/".$aConfig['mode']."/screen.css"; ?>" media="screen" />
<?php getCustomCss(); ?>
</head>
......@@ -75,7 +78,7 @@
echo $aConfig['text-before'] ?? '' ;
// --- show Organizations / IDPs with defined view
include "inc_mode_".$aConfig['mode'].".php";
include "mode/".$aConfig['mode']."/index.php";
echo '</div>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment