Fix html for project pages
This commit is contained in:
parent
0b0707eafe
commit
689428241c
|
@ -130,20 +130,4 @@
|
|||
.newuserelement input {
|
||||
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);
|
||||
}
|
|
@ -33,4 +33,20 @@ main h2 {
|
|||
background-color: #00407F;
|
||||
|
||||
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);
|
||||
}
|
|
@ -46,41 +46,39 @@ if($new == 0){
|
|||
}
|
||||
?>
|
||||
|
||||
<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/events.css">
|
||||
<link rel="stylesheet" href="../../css/admin.css">
|
||||
<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/splash.css">
|
||||
</head>
|
||||
|
||||
<header>Prosjekt­verk­stedet</header>
|
||||
<body>
|
||||
<nav>
|
||||
<?php echo navbar(1, 'prosjekt'); ?>
|
||||
<?php echo loginbar(); ?>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<main>
|
||||
<h2>Nytt prosjekt</h2>
|
||||
|
||||
<article>
|
||||
<h2>Nytt prosjekt</h2>
|
||||
<form action="update.php", method="post">
|
||||
<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">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>
|
||||
<p class="subtitle no-chin">Beskrivelse</p>
|
||||
<p class="subnote">Hva går prosjektet ditt ut på?</p>
|
||||
<textarea name="desc" style="width:100%" rows="8" class="boxinput"><?= $project->getDescription() ?></textarea>
|
||||
|
||||
<p class="subtitle no-chin">Beskrivelse</p>
|
||||
<p class="subnote">Hva går prosjektet ditt ut på?</p>
|
||||
<textarea name="desc" style="width:100%" rows="8" class="boxinput"><?= $project->getDescription() ?></textarea>
|
||||
<?= '<input type="hidden" name="id" value="' . $project->getID() . '" />' ?>
|
||||
|
||||
<?= '<input type="hidden" name="id" value="' . $project->getID() . '" />' ?>
|
||||
<div style="margin-top: 2em;">
|
||||
<hr class="ruler">
|
||||
|
||||
<div style="margin-top: 2em;">
|
||||
<hr class="ruler">
|
||||
|
||||
<?= '<input type="submit" class="btn" value="' . ($new ? 'Opprett prosjekt' : 'Lagre endringer') . '"></a>'; ?>
|
||||
</div>
|
||||
</form>
|
||||
</article>
|
||||
|
||||
</main>
|
||||
|
||||
<nav>
|
||||
<?= navbar(1, 'prosjekt'); ?>
|
||||
<?= loginbar(); ?>
|
||||
</nav>
|
||||
<?= '<input type="submit" class="btn" value="' . ($new ? 'Opprett prosjekt' : 'Lagre endringer') . '"></a>'; ?>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
setlocale(LC_ALL, 'no_NO');
|
||||
require __DIR__ . '/../../inc/navbar.php';
|
||||
require __DIR__ . '/../../src/_autoload.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">
|
||||
<link rel="stylesheet" href="../css/normalize.css">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<link rel="stylesheet" href="../css/events.css">
|
||||
<link rel="stylesheet" href="../css/admin.css">
|
||||
<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/splash.css">
|
||||
<link rel="stylesheet" href="../css/admin.css">
|
||||
</head>
|
||||
|
||||
<header>Prosjekt­verkstedet</header>
|
||||
<body>
|
||||
<nav>
|
||||
<?php echo navbar(1, 'prosjekt'); ?>
|
||||
<?php echo loginbar(); ?>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
|
||||
<article class="gridsplit">
|
||||
<div class="gridl">
|
||||
<main>
|
||||
<h2 class="no-chin">Mine Prosjekter</h2>
|
||||
<hr class="ruler">
|
||||
|
||||
<ul class="event-list">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$pageLimit = 4;
|
||||
<div class="gridsplit">
|
||||
<div class="gridl">
|
||||
<ul class="event-list">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$pageLimit = 4;
|
||||
|
||||
for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){
|
||||
if($counter == $pageLimit){
|
||||
break;
|
||||
for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){
|
||||
if($counter == $pageLimit){
|
||||
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];
|
||||
$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>';
|
||||
}
|
||||
|
||||
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>
|
||||
if(($counter == $pageLimit) and (($pageLimit * $page) < count($projects))){
|
||||
echo '<a class="btn float-right" href="?page=' . ($page + 1) . '">Neste side</a>';
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
<?= navbar(1, 'prosjekt'); ?>
|
||||
<?= loginbar(); ?>
|
||||
</nav>
|
||||
<div style="margin-top: 2em;">
|
||||
<input type="submit" class="btn" value="Filtrer"></input>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div class="gridsplit">
|
||||
</main>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue