Fix admin css

This commit is contained in:
Markus Wang Halvorsen 2018-02-10 16:13:18 +01:00
parent 32aa9e077c
commit c4c5389fe8
9 changed files with 360 additions and 363 deletions

View File

@ -54,17 +54,25 @@ if($new == 0){
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Aktivitets&shy;administrasjon</header>
<body>
<nav>
<?php echo navbar(3, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<h2>Aktivietsadministrasjon</h2>
<hr class="ruler">
<article>
<h2><?= ($new == 1 ? "Ny hendelse" : "Rediger hendelse"); ?></h2>
<form action="update.php", method="post" class="gridsplit5050">
@ -102,11 +110,5 @@ if($new == 0){
<p>
</article>
</main>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>
</body>

View File

@ -47,18 +47,26 @@ $events = array_values(array_filter(
));
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Aktivitets&shy;administrasjon</header>
<body>
<nav>
<?php echo navbar(2, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<h2>Aktivitetsadministrasjon</h2>
<hr class="ruler">
<article class="gridsplit">
<div class="gridsplit">
<div class="gridl">
<h2 class="no-chin">Aktive aktiviteter</h2>
<p class="subnote">Gjentagende aktiviteter vises ikke</p>
@ -127,11 +135,6 @@ $events = array_values(array_filter(
</div>
</form>
</div>
</article>
</div>
</main>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>
</body>

View File

@ -3,6 +3,7 @@ ini_set('display_errors', '1');
date_default_timezone_set('Europe/Oslo');
setlocale(LC_ALL, 'no_NO');
error_reporting(E_ALL);
require __DIR__ . '/../../../inc/navbar.php';
require __DIR__ . '/../../../src/_autoload.php';
require __DIR__ . '/../../../sql_config.php';
require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
@ -27,37 +28,26 @@ if(!$userManager->isAdmin($uname)){
$users = $userManager->getAllUserData();
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css">
<nav>
<ul>
<li class="active"><a href="index.php">hjem</a></li>
<li><a href="aktiviteter/">aktiviteter</a></li>
<li><a href="../prosjekt/">prosjekter</a></li>
<li><a href="kontakt">kontakt</a></li>
<li><a href="pvv/">wiki</a></li>
</ul>
<header class="admin">Bruker&shy;administrasjon</header>
</head>
<?php
$attr = $as->getAttributes();
if($attr){
$uname = $attr["uid"][0];
echo '<p class="login">logget inn som: ' . $uname . '</p>';
}else{
echo '<a class="login" href="' . $as->getLoginURL() . '">logg inn</a>';
}
?>
<body>
<nav>
<?php echo navbar(2, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<header class="admin">Bruker&shy;administrasjon</header>
<main>
<article>
<h2>Brukeradministrasjon</h2>
<hr class="ruler">
<form action="./update.php" method="post">
<table class="userlist">
@ -101,6 +91,5 @@ $users = $userManager->getAllUserData();
</table>
<input type="submit" class="btn" value="Lagre">
</form>
</article>
</main>
</body>

View File

@ -23,37 +23,37 @@ if(!($isAdmin | $projectGroup | $activityGroup)){
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css">
<link rel="stylesheet" href="../css/admin.css">
</head>
<header class="admin">Stor-&shy;gutt-&shy;leketøy</header>
<body>
<nav id="navbar">
<?php echo navbar(1, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<article>
<h2>Verktøy</h2>
<h2>Stor-gutt-leketøy</h2>
<ul class="tools">
<?php
if($isAdmin | $activityGroup){
echo '<a class="btn adminbtn" href="aktiviteter/?page=1">Aktiviteter/Hendelser</a>';
echo '<li><a class="btn" href="aktiviteter/?page=1">Aktiviteter/Hendelser</a></li>';
}
if($isAdmin | $projectGroup){
echo '<a class="btn adminbtn" href="prosjekter/">Prosjekter</a>';
echo '<li><a class="btn" href="prosjekter/">Prosjekter</a></li>';
}
if($isAdmin){
echo '<a class="btn adminbtn" href="brukere/">Brukere</a>';
echo '<li><a class="btn" href="brukere/">Brukere</a></li>';
}
?>
</article>
<ul>
</main>
<nav>
<?= navbar(1); ?>
<?= loginbar(); ?>
</nav>
</body>

View File

@ -49,17 +49,25 @@ if($new == 0){
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Prosjekt&shy;administrasjon</header>
<body>
<nav>
<?php echo navbar(3, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<h2>Prosjektadministrasjon</h2>
<hr class="ruler">
<article>
<h2><?= ($new == 1 ? "Nytt prosjekt" : "Rediger prosjekt"); ?></h2>
<form action="update.php", method="post" class="gridsplit5050">
@ -72,10 +80,10 @@ if($new == 0){
</div>
<div class="gridr noborder">
<p class="subtitle">Prosjekteier (Brukernavn)</p>
<p class="subtitle">Prosjektleder (Brukernavn)</p>
<?= '<input type="text" name="organiser" value="' . $project->getOwnerUName(). '" class="boxinput">' ?><br>
<p class="subtitle">Prosjekteier (Navn)</p>
<p class="subtitle">Prosjektleder (Navn)</p>
<?= '<input type="text" name="organisername" value="' . $project->getOwner(). '" class="boxinput">' ?>
<p class="subtitle">Aktiv</p>
@ -91,11 +99,5 @@ if($new == 0){
</div>
</form>
<p>
</article>
</main>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>
</body>

View File

@ -47,18 +47,26 @@ $projects = array_values(array_filter(
));
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Prosjekt&shy;administrasjon</header>
<body>
<nav>
<?php echo navbar(2, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<h2>Prosjektadministrasjon</h2>
<hr class="ruler">
<article class="gridsplit">
<div class="gridsplit">
<div class="gridl">
<h2 class="no-chin">Prosjekter</h2>
@ -113,9 +121,9 @@ $projects = array_values(array_filter(
<a class="btn adminbtn" href="edit.php?new=1">Legg inn nytt prosjekt</a>
<h2>Filter</h2>
<form action="." method="post">
<p class="no-chin">Navn</p>
<p class="no-chin">Prosjektnavn</p>
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
<p class="no-chin">Organisator</p>
<p class="no-chin">Leders brukernavn</p>
<?= '<input type="text" name="organiser" class="boxinput" value="' . $filterOrganiser . '">' ?><br>
<div style="margin-top: 2em;">
@ -123,11 +131,7 @@ $projects = array_values(array_filter(
</div>
</form>
</div>
</article>
</div>
</main>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>
</body>

View File

@ -1,14 +1,12 @@
header.admin {
margin-top: 3rem;
height: 16rem;
overflow: hidden;
text-align: right;
color: #fff;
font-family: monospace;
padding: 1rem;
font-size: 4em;
background: url('ja.png') no-repeat 1% 50% #024;
background-size: contain;
.tools {
width: 100%;
margin: 0;
padding: 0;
list-style: none;
}
.tools li {
margin: 1.5em 0;
}
.event-list {
@ -101,27 +99,6 @@ header.admin {
float: left;
}
.btn {
text-decoration: none;
border: 1px solid #048;
color: #048;
padding: .2em 1em;
border-radius: .2em;
white-space: nowrap;
display: inline-block;
margin-bottom: .25em;
}
.btn:hover {
border-color: #084;
background: #eee;
color: #084;
}
.btn:active {
border-color: #084;
background: #084;
color: white;
}
.userlist {
table-layout: fixed;
width: 100%;
@ -154,3 +131,19 @@ header.admin {
border: none;
background-color: #ddd;
}
.subnote {
margin-top: 0;
color: gray;
font-size: .7em;
font-style: italic;
}
.no-chin {
margin-bottom: 0;
}
.ruler {
border: none;
border-bottom: 1px dotted rgba(0,0,0,.5);
}

View File

@ -49,7 +49,7 @@ nav li {
line-height: 50px;
}
nav a {
nav a, nav p {
display: inline-block;
height: 40px;
margin: 0 .7em;
@ -83,6 +83,10 @@ nav .login {
line-height: 55px;
}
nav p.login {
right: .5em;
}
#navopen {
display: none;
}

View File

@ -10,7 +10,7 @@ body {
main {
padding: 1em 15vw;
height: 100vh;
margin-top: 5vh;
margin-top: 7vh;
background-color: #fff;
}