Tweak project edit page, making it use the available space better and react better

This commit is contained in:
Peder Bergebakken Sundt 2018-08-14 03:25:24 +02:00
parent cc2241f71a
commit e54142021a
3 changed files with 19 additions and 5 deletions

View File

@ -156,3 +156,17 @@ a.nostyle {
}
}
/* edit */
form .wide {
min-width: 66%;
}
form .tall {
min-height: calc(100vh - 28em);
}
@media screen and (max-width: 50rem) {
form .wide {
width: calc(100% - 2em);
margin: 0 1em;
}
}

View File

@ -55,7 +55,7 @@ if($new == 0){
<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/projects.css">
<title>Prosjektverkstedet</title>
<header>Prosjekt&shy;verk&shy;stedet</header>
@ -73,17 +73,17 @@ if($new == 0){
<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>
<input class="wide" type="text" name="title" value="<?= $project->getName() ?>" class="boxinput"><br>
<p class="subtitle no-chin">Beskrivelse (<i style="opacity:0.5;">markdown</i>)</p>
<p class="subnote no-chin">Hva går prosjektet ditt ut ?</p>
<p class="subnote">De første to linjene blir vist prosjektkortet, prøv å gjøre de til et fint sammendrag eller intro!</p>
<textarea name="desc" style="width:100%" rows="8" class="boxinput"><?= implode($project->getDescription(), "\n"); ?></textarea>
<textarea class="tall" name="desc" style="width:100%" rows="8" class="boxinput"><?= implode($project->getDescription(), "\n"); ?></textarea>
<?= '<input type="hidden" name="id" value="' . $project->getID() . '" />' ?>
<input type="hidden" name="active" value="1"/>
<div style="margin-top: 2em;">
<div style="margin-top: 0.2em;">
<hr class="ruler">
<input type="submit" class="btn" value="<?= ($new ? 'Opprett prosjekt' : 'Lagre endringer') ?>"></input>
<?php if (!$new){?><input type="submit" class="btn" name="delete" value="Slett"></input><?php } ?>

View File

@ -77,7 +77,7 @@ $projects = array_values(array_filter(
<a href="edit.php?id=<?= $project->getID() ?>">
<h3 class="no-chin"><?= $project->getName()?></h3>
</a>
<p style="text-decoration: none;"><?= implode("<br>", $project->getDescription()); ?></p>
<p style="text-decoration: none;"><?= implode("<br>", array_slice($project->getDescription(), 0, 4)); ?></p>
</div>
</div>
</li>