This commit is contained in:
William 2021-10-11 10:34:32 +02:00
parent 3cc069773f
commit 97f9468cc1
4 changed files with 22 additions and 13 deletions

View File

@ -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");

View File

@ -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;

View File

@ -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;
}

View File

@ -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('<div class="alert alert-'.$alert[0].'"><b>'.$prefix.'</b> '.$alert[1].'</div>');