Fix html for project pages

This commit is contained in:
Markus Wang Halvorsen 2018-02-10 16:39:30 +01:00
parent 0b0707eafe
commit 689428241c
4 changed files with 113 additions and 112 deletions

View File

@ -130,20 +130,4 @@
.newuserelement input { .newuserelement input {
border: none; border: none;
background-color: #ddd; 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

@ -33,4 +33,20 @@ main h2 {
background-color: #00407F; background-color: #00407F;
transition: background-color .2s ease; transition: background-color .2s ease;
}
.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

@ -46,41 +46,39 @@ if($new == 0){
} }
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <head>
<link rel="stylesheet" href="../../css/normalize.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/splash.css">
</head>
<header>Prosjekt&shy;verk&shy;stedet</header> <body>
<nav>
<?php echo navbar(1, 'prosjekt'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Nytt prosjekt</h2>
<article> <form action="update.php", method="post">
<h2>Nytt prosjekt</h2> <p class="subtitle no-chin">Prosjektnavn</p>
<p class="subnote">Gi prosjektet ditt et passende navn</p>
<input type="text" name="title" value="<?= $project->getName() ?>" class="boxinput" style="width:66%;"><br>
<form action="update.php", method="post"> <p class="subtitle no-chin">Beskrivelse</p>
<p class="subtitle no-chin">Prosjektnavn</p> <p class="subnote">Hva går prosjektet ditt ut ?</p>
<p class="subnote">Gi prosjektet ditt et passende navn</p> <textarea name="desc" style="width:100%" rows="8" class="boxinput"><?= $project->getDescription() ?></textarea>
<input type="text" name="title" value="<?= $project->getName() ?>" class="boxinput" style="width:66%;"><br>
<p class="subtitle no-chin">Beskrivelse</p> <?= '<input type="hidden" name="id" value="' . $project->getID() . '" />' ?>
<p class="subnote">Hva går prosjektet ditt ut ?</p>
<textarea name="desc" style="width:100%" rows="8" class="boxinput"><?= $project->getDescription() ?></textarea>
<?= '<input type="hidden" name="id" value="' . $project->getID() . '" />' ?> <div style="margin-top: 2em;">
<hr class="ruler">
<div style="margin-top: 2em;"> <?= '<input type="submit" class="btn" value="' . ($new ? 'Opprett prosjekt' : 'Lagre endringer') . '"></a>'; ?>
<hr class="ruler"> </div>
</form>
<?= '<input type="submit" class="btn" value="' . ($new ? 'Opprett prosjekt' : 'Lagre endringer') . '"></a>'; ?> </main>
</div> </body>
</form>
</article>
</main>
<nav>
<?= navbar(1, 'prosjekt'); ?>
<?= loginbar(); ?>
</nav>

View File

@ -1,6 +1,7 @@
<?php <?php
date_default_timezone_set('Europe/Oslo'); date_default_timezone_set('Europe/Oslo');
setlocale(LC_ALL, 'no_NO'); setlocale(LC_ALL, 'no_NO');
require __DIR__ . '/../../inc/navbar.php';
require __DIR__ . '/../../src/_autoload.php'; require __DIR__ . '/../../src/_autoload.php';
require __DIR__ . '/../../sql_config.php'; require __DIR__ . '/../../sql_config.php';
@ -38,78 +39,80 @@ $projects = array_values(array_filter(
)); ));
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <head>
<link rel="stylesheet" href="../css/normalize.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/admin.css"> <link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/splash.css">
<link rel="stylesheet" href="../css/admin.css">
</head>
<header>Prosjekt&shy;verkstedet</header> <body>
<nav>
<?php echo navbar(1, 'prosjekt'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<article class="gridsplit">
<div class="gridl">
<h2 class="no-chin">Mine Prosjekter</h2> <h2 class="no-chin">Mine Prosjekter</h2>
<hr class="ruler">
<ul class="event-list"> <div class="gridsplit">
<?php <div class="gridl">
$counter = 0; <ul class="event-list">
$pageLimit = 4; <?php
$counter = 0;
$pageLimit = 4;
for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){ for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){
if($counter == $pageLimit){ if($counter == $pageLimit){
break; break;
}
$project = $projects[$i];
$projectID = $project->getID();
?>
<li>
<div class="event">
<div class="event-info">
<h3 class="no-chin"><?= '<a href="edit.php?id=' . $project->getID() . '">' . $project->getName() . '</a>'; ?></h3>
<p><?= $project->getDescription(); ?></p>
</div>
</div>
</li>
<?php
$counter++;
}
?>
</ul>
<?php
if($page != 1){
echo '<a class="btn float-left" href="?page=' . ($page - 1) . '">Forrige side</a>';
} }
$project = $projects[$i]; if(($counter == $pageLimit) and (($pageLimit * $page) < count($projects))){
$projectID = $project->getID(); echo '<a class="btn float-right" href="?page=' . ($page + 1) . '">Neste side</a>';
?> }
?>
<li>
<div class="event">
<div class="event-info">
<h3 class="no-chin"><?= '<a href="edit.php?id=' . $project->getID() . '">' . $project->getName() . '</a>'; ?></h3>
<p><?= $project->getDescription(); ?></p>
</div>
</div>
</li>
<?php
$counter++;
}
?>
</ul>
<?php
if($page != 1){
echo '<a class="btn float-left" href="?page=' . ($page - 1) . '">Forrige side</a>';
}
if(($counter == $pageLimit) and (($pageLimit * $page) < count($projects))){
echo '<a class="btn float-right" href="?page=' . ($page + 1) . '">Neste side</a>';
}
?>
</div>
<div class="gridr">
<h2>Verktøy</h2>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<h2>Filter</h2>
<form action="." method="post">
<p class="no-chin">Navn</p>
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
<div style="margin-top: 2em;">
<input type="submit" class="btn" value="Filtrer"></input>
</div> </div>
</form>
</div>
</article>
</main> <div class="gridr">
<h2>Verktøy</h2>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<h2>Filter</h2>
<form action="." method="post">
<p class="no-chin">Navn</p>
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
<nav> <div style="margin-top: 2em;">
<?= navbar(1, 'prosjekt'); ?> <input type="submit" class="btn" value="Filtrer"></input>
<?= loginbar(); ?> </div>
</nav> </form>
</div>
</div class="gridsplit">
</main>
</body>