Make the project info page mobile friendly

This commit is contained in:
Peder Bergebakken Sundt 2018-08-14 02:53:11 +02:00
parent cb9283be16
commit cc2241f71a
2 changed files with 52 additions and 20 deletions

View File

@ -69,22 +69,52 @@ a.nostyle {
} }
} }
@media screen and (min-width: 50rem) {
.contentsplit {
display: grid;
grid-template-columns: 17em 2.7fr;
grid-template-areas: "left right";
grid-column-gap: 0.9em;
}
}
@media screen and (max-width: 50rem) {
.contentsplit {
display: grid;
grid-template-rows: auto auto;
grid-template-areas: "right"
"left";
}
.projectmember-container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
grid-template-areas: "organizers members"
"join join";
.contentsplit { }
display: grid;
grid-template-columns: 1.3fr 2.7fr;
grid-template-areas: "left right";
} }
.gridl { .gridl {
padding: 0 1em 0 1em;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.2);
grid-area: left; grid-area: left;
} }
.projectmember-container {
padding: 0.1em 1em;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.2);
}
.projectmember-container h2 {
text-align: center;
}
.projectmember-container >form {
text-align: center;
grid-area: join;
}
.gridr { .gridr {
border-left: 0; border-left: 0;
grid-area: right; grid-area: right;
padding:0;
margin:0;
} }
.projectmember { .projectmember {

View File

@ -44,7 +44,6 @@ if ($attrs){
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/projects.css"> <link rel="stylesheet" href="../../css/projects.css">
<title>Prosjektverkstedet</title> <title>Prosjektverkstedet</title>
@ -67,14 +66,16 @@ if ($attrs){
</div> </div>
<div class="gridl"> <div class="gridl">
<div class="projectmember-container">
<div class="projectlead"> <div class="projectlead">
<h2>Prosjektledelsen</h2> <h2>Prosjektledelsen</h2>
<div class="projectmember"> <div class="projectmember">
<?php foreach($members as $i => $data){ <?php foreach($members as $i => $data){
if($data['lead']){ if($data['lead']){
?> ?>
<p><?= $data['role'] ?></p> <p><?= $data['name']; ?></p>
<p class="membername"><?= $data['name']; ?></p> <p class="memberrole"><?= $data['role'] ?></p>
<p class="memberuname"><?= $data['uname']; ?></p> <p class="memberuname"><?= $data['uname']; ?></p>
<p class="memberemail"><?= $data['mail']; ?></p> <p class="memberemail"><?= $data['mail']; ?></p>
<?php } <?php }
@ -88,19 +89,20 @@ if ($attrs){
if($data['lead']){ continue; } if($data['lead']){ continue; }
?> ?>
<div class="projectmember" style="border-color: #6a0;"> <div class="projectmember" style="border-color: #6a0;">
<p><?= $data['role'] ? $data['role'] : 'Deltaker' ?></p> <p><?= $data['name']; ?></p>
<p class="membername"><?= $data['name']; ?></p> <p class="memberrole"><?= $data['role'] ? $data['role'] : 'Deltaker' ?></p>
<p class="memberuname"><?= $data['uname']; ?></p> <p class="memberuname"><?= $data['uname']; ?></p>
<p class="memberemail"><?= $data['mail']; ?></p> <p class="memberemail"><?= $data['mail']; ?></p>
</div> </div>
<?php } ?> <?php } ?>
<p><form action="update.php", method="post"> </div>
<input type="hidden" name="title" value="derp"/> <form action="update.php", method="post"><p>
<input type="hidden" name="desc" value="derp"/> <input type="hidden" name="title" value="derp"/>
<input type="hidden" name="active" value="derp"/> <input type="hidden" name="desc" value="derp"/>
<input type="hidden" name="id" value="<?= $projectID ?>"/> <input type="hidden" name="active" value="derp"/>
<input type="submit" class="btn" name="join_or_leave" value="<?= ($is_member ? 'Forlat' : 'Bli med!') ?>"></input> <input type="hidden" name="id" value="<?= $projectID ?>"/>
</form></p> <input type="submit" class="btn" name="join_or_leave" value="<?= ($is_member ? 'Forlat' : 'Bli med!') ?>"></input>
</p></form>
</div> </div>
</div> </div>
</main> </main>