diff --git a/example.php b/example.php index 6f68b50..ae8444e 100644 --- a/example.php +++ b/example.php @@ -11,6 +11,8 @@ $_SESSION['alert'][] = ['info', 'Eksempel!']; $_SESSION['alert'][] = ['success', 'Eksempel!']; $_SESSION['alert'][] = ['warning', 'Eksempel!']; $_SESSION['alert'][] = ['danger', 'Eksempel!']; +$_SESSION['alert'][] = ['foo', 'Eksempel!']; + // Include the top of page require_once("template/_header.php"); diff --git a/logout.php b/logout.php index f84e557..1fe7ef7 100644 --- a/logout.php +++ b/logout.php @@ -7,7 +7,10 @@ $_SESSION = []; // Destroy the session. session_destroy(); - + +session_start(); +$_SESSION['alert'][] = ['info', 'Du har blitt logget av.']; + // Redirect to login page header("location: login.php"); exit; diff --git a/style/main.css b/style/main.css index c36ad4f..12468a5 100644 --- a/style/main.css +++ b/style/main.css @@ -1,5 +1,5 @@ html { - background-color: #fff; + background-color: #e8e8e8; background-image: url("../img/imagedoc-lightnoise.png"); } @@ -13,6 +13,8 @@ body { h1, h2, h3, h4 { margin: 0; + border-bottom: 1px solid #aaa; + margin-bottom: 12px; } .navbar-top { @@ -30,14 +32,14 @@ h1, h2, h3, h4 { } .login-statusbar { - border-top: 2px solid #fff; + border-top: 2px solid #f8f8f8; background: rgb(54,148,37); background: linear-gradient(0deg, rgba(54,148,37,1) 0%, rgba(62,162,34,1) 50%, rgba(63,177,43,1) 100%); } .login-statusbar .inner { max-width: 900px; margin: 0 auto; - color: #fff; + color: #f8f8f8; font-weight: bold; font-size: 12px; padding-left: 12px; @@ -47,11 +49,11 @@ h1, h2, h3, h4 { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .login-statusbar .inner > a { - color: #fff; + color: #f8f8f8; } .footer { - background: #ddd; + background: #d8d8d8; border-top: 1px solid #aaa; padding: 12px; } @@ -61,11 +63,13 @@ h1, h2, h3, h4 { } .grid-container { + background: #fff; + display: grid; grid-template-columns: max-content auto; grid-gap: 12px; - max-width: 900px; + max-width: 888px; margin: 0 auto; padding: 12px; } @@ -78,7 +82,7 @@ h1, h2, h3, h4 { } .grid-container .nav-links { - background: #e8e8e8; + background: #eee; border: 1px solid #aaa; padding: 12px; } diff --git a/template/_header.php b/template/_header.php index 1b5c7b3..d4327fe 100644 --- a/template/_header.php +++ b/template/_header.php @@ -59,24 +59,24 @@ if ($templateParameters["render"] === FALSE) { foreach ($_SESSION['alert'] as $alert) { switch ($alert[0]) { case 'success': - $prefix = 'Suksess:'; + $prefix = 'Suksess –'; break; case 'info': - $prefix = 'Info:'; + $prefix = 'Info –'; break; case 'warning': - $prefix = 'Advarsel:'; + $prefix = 'Varsel –'; break; case 'danger': - $prefix = 'Error:'; + $prefix = 'Error –'; break; default: $alert[0] = 'danger'; - $prefix = 'Ukjent:'; + $prefix = 'Ukjent –'; break; } echo('
'.$prefix.' '.$alert[1].'
');