Fix html for the rest of the main pages

This commit is contained in:
Markus Wang Halvorsen 2018-02-10 16:23:17 +01:00
parent c4c5389fe8
commit 0b0707eafe
6 changed files with 249 additions and 252 deletions

View File

@ -91,10 +91,10 @@ if($new == 0){
<p class="subtitle">Sluttid (YYYY-MM-DD HH:MM:SS)</p> <p class="subtitle">Sluttid (YYYY-MM-DD HH:MM:SS)</p>
<?= '<input name="end" type="text" class="boxinput" value="' . $event->getStop()->format('Y-m-d H:00:00') . '"><br>' ?> <?= '<input name="end" type="text" class="boxinput" value="' . $event->getStop()->format('Y-m-d H:00:00') . '"><br>' ?>
<p class="subtitle">Organisert av</p> <p class="subtitle">Arrangør</p>
<?= '<input type="text" name="organiser" value="' . $event->getOrganiser(). '" class="boxinput">' ?><br> <?= '<input type="text" name="organiser" value="' . $event->getOrganiser(). '" class="boxinput">' ?><br>
<p class="subtitle">Hvor?</p> <p class="subtitle">Sted</p>
<?= '<input type="text" name="location" value="' . $event->getLocation(). '" class="boxinput">' ?><br> <?= '<input type="text" name="location" value="' . $event->getLocation(). '" class="boxinput">' ?><br>
</div> </div>

View File

@ -27,59 +27,61 @@ $day = (isset($_GET['day']))
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="no"> <html lang="no">
<title>Aktivitetsverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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">
<header>Aktivitets&shy;verk&shy;stedet</header> <head>
<title>Aktivitetsverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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">
</head>
<main> <body>
<nav>
<?php echo navbar(1, 'aktiviteter'); ?>
<?php echo loginbar(); ?>
</nav>
<?php <main>
$events = ($day==-1) <?php
? $agenda->getNextOfEach(new \DateTimeImmutable) $events = ($day==-1)
: $agenda->getEventsBetween( ? $agenda->getNextOfEach(new \DateTimeImmutable)
new DateTimeImmutable("$year-$month-$day 00:00:00"), : $agenda->getEventsBetween(
new DateTimeImmutable("$year-$month-$day 23:59:59")); new DateTimeImmutable("$year-$month-$day 00:00:00"),
new DateTimeImmutable("$year-$month-$day 23:59:59"));
$limit = 0; $limit = 0;
foreach($events as $event) { foreach($events as $event) {
?> ?>
<article> <div>
<h2> <h2>
<?php if ($event->getImageURL()) { ?> <?php if ($event->getImageURL()) { ?>
<img src="<?= $event->getImageURL() ?>"> <img src="<?= $event->getImageURL() ?>">
<?php } ?>
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?><strong><?php } ?>
<em><?= $event->getRelativeDate() ?></em>
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?></strong><?php } ?>
<?php if ($event->getURL()) { ?>
<a href="<?= $event->getURL() ?>"><?= $event->getName() ?></a>
<?php } else { ?>
<?= $event->getName() ?>
<?php } ?>
</h2>
<ul class="subtext">
<li>Tid: <strong><?= Agenda::getFormattedDate($event->getStart()) ?></strong></li>
<li>Sted: <strong><?= $event->getLocation() ?></strong></li>
<li>Arrangør: <strong><?= $event->getOrganiser() ?></strong></li>
</ul>
<?php $description = $event->getDescription(); ?>
<?php if ($limit) array_splice($description, $limit); ?>
<?= implode($description, "</p>\n<p>") ?>
</div>
<?php if (!$limit || $limit > 4) {$limit = 4;} else $limit = 2; ?>
<?php } ?> <?php } ?>
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?><strong><?php } ?> </main>
<em><?= $event->getRelativeDate() ?></em>
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?></strong><?php } ?>
<?php if ($event->getURL()) { ?>
<a href="<?= $event->getURL() ?>"><?= $event->getName() ?></a>
<?php } else { ?>
<?= $event->getName() ?>
<?php } ?>
</h2>
<ul class="subtext">
<li>Tid: <strong><?= Agenda::getFormattedDate($event->getStart()) ?></strong>
<li>Sted: <strong><?= $event->getLocation() ?></strong>
<li>Arrangør: <strong><?= $event->getOrganiser() ?></strong>
</ul>
<?php $description = $event->getDescription(); ?> </body>
<?php if ($limit) array_splice($description, $limit); ?>
<?= implode($description, "</p>\n<p>") ?>
</article>
<?php if (!$limit || $limit > 4) {$limit = 4;} else $limit = 2; ?>
<?php } ?>
</main>
<nav>
<?= navbar(1, 'aktiviteter'); ?>
<?= loginbar(); ?>
</nav>

View File

@ -30,78 +30,77 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="no"> <html lang="no">
<title>Kalenderverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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/calendar.css">
<header>Kalender&shy;verk&shy;stedet</header> <head>
<title>Kalenderverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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/calendar.css">
</head>
<main> <body>
<nav>
<article> <?php echo navbar(1, 'kalender'); ?>
<h2 style="text-align:center;">Aktiviteter for <?=$months_translations[$month-1]?> <?=$year?></h2> <?php echo loginbar(); ?>
</nav>
<p><?php <main>
$pmonth = $month-1; <h2 style="text-align:center;">Aktiviteter for <?=$months_translations[$month-1]?> <?=$year?></h2>
$nmonth = $month+1;
$pyear=$year; <p><?php
$nyear=$year; $pmonth = $month-1;
if ($pmonth==0) {$pmonth=12; $pyear--;} $nmonth = $month+1;
if ($nmonth==13) {$nmonth=1; $nyear++;} $pyear=$year;
?> $nyear=$year;
<a class="btn noselect" href="../kalender?year=<?=$pyear?>&amp;month=<?=$pmonth?>">Forrige måned</a> if ($pmonth==0) {$pmonth=12; $pyear--;}
<a class="btn noselect" style="float:right;" href="../kalender?year=<?=$nyear?>&amp;month=<?=$nmonth?>">Neste måned</a> if ($nmonth==13) {$nmonth=1; $nyear++;}
</p> ?>
<a class="btn noselect" href="../kalender?year=<?=$pyear?>&amp;month=<?=$pmonth?>">Forrige måned</a>
<a class="btn noselect" style="float:right;" href="../kalender?year=<?=$nyear?>&amp;month=<?=$nmonth?>">Neste måned</a>
<figure class="calendar"> </p>
<ul>
<li class="header noselect">Mandag
<li class="header noselect">Tirsdag <figure class="calendar">
<li class="header noselect">Onsdag <ul>
<li class="header noselect">Torsdag <li class="header noselect">Mandag
<li class="header noselect">Fredag <li class="header noselect">Tirsdag
<li class="header noselect">Lørdag <li class="header noselect">Onsdag
<li class="header noselect">Søndag <li class="header noselect">Torsdag
<li class="header noselect">Fredag
<?php if ($days_before_the_first != 0) { ?> <li class="header noselect">Lørdag
<li class="outOfMonth" style="grid-column: 1/<?=$days_before_the_first+1?>;"> <li class="header noselect">Søndag
<?php } ?>
<?php if ($days_before_the_first != 0) { ?>
<?php for ($day=1; $day <= $days_in_month; $day++) { ?> <li class="outOfMonth" style="grid-column: 1/<?=$days_before_the_first+1?>;">
<?php $events = $agenda->getEventsBetween(
new DateTimeImmutable("$year-$month-$day 00:00:00"),
new DateTimeImmutable("$year-$month-$day 23:59:59")); ?>
<?php if ($day==$day_of_month) { ?>
<li class="active">
<?php } else { ?>
<li>
<?php } ?> <?php } ?>
<?php if (sizeof($events)!=0) { ?>
<a href="../aktiviteter/?<?="year=$year&amp;month=$month&amp;day=$day"?>"><div> <?php for ($day=1; $day <= $days_in_month; $day++) { ?>
<?php $events = $agenda->getEventsBetween(
new DateTimeImmutable("$year-$month-$day 00:00:00"),
new DateTimeImmutable("$year-$month-$day 23:59:59")); ?>
<?php if ($day==$day_of_month) { ?>
<li class="active">
<?php } else { ?>
<li>
<?php } ?>
<?php if (sizeof($events)!=0) { ?>
<a href="../aktiviteter/?<?="year=$year&amp;month=$month&amp;day=$day"?>"><div>
<span class="noselect"><?= $day ?>.</span>
<?php foreach($events as $event) { ?>
<section><?=$event->getName()?></section>
<?php } ?>
</div></a>
<?php } else { ?>
<span class="noselect"><?= $day ?>.</span> <span class="noselect"><?= $day ?>.</span>
<?php foreach($events as $event) { ?> <?php } ?>
<section><?=$event->getName()?></section>
<?php } ?>
</div></a>
<?php } else { ?>
<span class="noselect"><?= $day ?>.</span>
<?php } ?> <?php } ?>
<?php } ?>
</ul>
</ul> </figure>
</figure>
</main>
</article> </body>
</main>
<nav>
<?= navbar(1, 'kalender'); ?>
<?= loginbar(); ?>
</nav>

View File

@ -7,38 +7,37 @@ require __DIR__ . '/../../src/_autoload.php';
require __DIR__ . '/../../sql_config.php'; require __DIR__ . '/../../sql_config.php';
?> ?>
<html lang="no"> <html lang="no">
<title>Kommunikasjonsverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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">
<header>Kommunikasjons&shy;verk&shy;stedet</header> <head>
<title>Kommunikasjonsverkstedet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<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">
</head>
<main> <body>
<nav>
<?php echo navbar(1, 'kontakt'); ?>
<?php echo loginbar(); ?>
</nav>
<article>
<h2>Kommunikasjon</h2> <main>
<p> <h2>Kommunikasjon</h2>
Det er ulike måter å kommunisere med PVV-medlemmer . <p>
</p> Det er ulike måter å kommunisere med PVV-medlemmer .
<p> </p>
Vi har en IRC-kanal <a href="http://webchat.ircnet.net/">IRCnet</a> kalt #pvv. <p>
</p> Vi har en IRC-kanal <a href="http://webchat.ircnet.net/">IRCnet</a> kalt #pvv.
<p> </p>
Vi har også en Discord-kanal. Denne kanalen er satt opp slik at man i Discord-kanalen ser hva som skrives i IRC-kanalen, og vice versa. For å bli med i Discord-kanalen, <a href="https://discord.gg/8VTBr6Q">klikk her</a>. <p>
</p> Vi har også en Discord-kanal. Denne kanalen er satt opp slik at man i Discord-kanalen ser hva som skrives i IRC-kanalen, og vice versa. For å bli med i Discord-kanalen, <a href="https://discord.gg/8VTBr6Q">klikk her</a>.
<p> </p>
Det er også mulig å ta i bruk analog kontakt ved å møte opp <a href="https://use.mazemap.com/?v=1&left=10.4032&right=10.4044&top=63.4178&bottom=63.4172&campusid=1&zlevel=2&sharepoitype=point&sharepoi=10.40355%2C63.41755%2C2&utm_medium=longurl"> stripa</a>. <p>
</p> Det er også mulig å ta i bruk analog kontakt ved å møte opp <a href="https://use.mazemap.com/?v=1&left=10.4032&right=10.4044&top=63.4178&bottom=63.4172&campusid=1&zlevel=2&sharepoitype=point&sharepoi=10.40355%2C63.41755%2C2&utm_medium=longurl"> stripa</a>.
</article> </p>
</main>
</main> </body>
<nav>
<?= navbar(1, 'kontakt'); ?>
<?= loginbar(); ?>
</nav>

View File

@ -37,55 +37,53 @@ if (isset($_SESSION['userdata'])) { // if logged in with feide
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<title>PVV registrering</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <head>
<link rel="stylesheet" href="../css/normalize.css"> <title>PVV registrering</title>
<link rel="stylesheet" href="../css/style.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
</head>
<header>Registrerings&shy;verks&shy;stedet</header> <body>
<nav>
<?php echo navbar(1); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Registrer deg som bruker</h2>
<article>
<h2>Registrer deg som bruker</h2>
<p>
PVV har for øyeblikket et manuelt system for å legge til nye brukere.
Vi foretrekker at du kommer inn besøk <a href="https://use.mazemap.com/?v=1&left=10.4032&right=10.4044&top=63.4178&bottom=63.4172&campusid=1&zlevel=2&sharepoitype=point&sharepoi=10.40355%2C63.41755%2C2&utm_medium=longurl">våre lokaler stripa</a>
for å sette sette opp din PVV bruker. Hvis du vil, kan du også sende oss
en melding fra denne siden med ditt navn, epost og NTNU brukernavn.
For å aktivere din brukerkonto PVV, du møte opp
lokalene våre slik at vi kan satt et passord.
</p>
<h3>Meldingen som du kan sendes:</h3>
<?php if($attrs) { //logged in with pvv account?>
<p>
Du er logget in som <i><?= htmlspecialchars($attrs['uid'][0]) ?></i>,
du trenger ikke sende melding om ny bruker fordi du helt klart har en.
</p>
<?php } elseif (isset($_SESSION['userdata'])) { //logged in with feide ?>
<code>
Til: drift@pvv.ntnu.no<br>
Fra: nettsiden<br>
<br/>
<?= nl2br($mailBody) ?>
</code><br>
<br>
Todo: Legg til en "send mail" knapp
<?php } else { // not logged in?>
<a class="btn" href=".?login">æ kanj itj lææv uten piær!</a>
<?php }?>
</article> <p>
PVV har for øyeblikket et manuelt system for å legge til nye brukere.
</main> Vi foretrekker at du kommer inn besøk <a href="https://use.mazemap.com/?v=1&left=10.4032&right=10.4044&top=63.4178&bottom=63.4172&campusid=1&zlevel=2&sharepoitype=point&sharepoi=10.40355%2C63.41755%2C2&utm_medium=longurl">våre lokaler stripa</a>
for å sette sette opp din PVV bruker. Hvis du vil, kan du også sende oss
<nav> en melding fra denne siden med ditt navn, epost og NTNU brukernavn.
<?= navbar(1); ?> For å aktivere din brukerkonto PVV, du møte opp
<?= loginbar(); ?> lokalene våre slik at vi kan satt et passord.
</nav> </p>
<h3>Meldingen du kan sende:</h3>
<?php if($attrs) { //logged in with pvv account?>
<p>
Du er logget in som <i><?= htmlspecialchars($attrs['uid'][0]) ?></i>,
du trenger ikke sende melding om ny bruker fordi du helt klart har en.
</p>
<?php } elseif (isset($_SESSION['userdata'])) { //logged in with feide ?>
<code>
Til: drift@pvv.ntnu.no<br>
Fra: nettsiden<br>
<br/>
<?= nl2br($mailBody) ?>
</code><br>
<br>
Todo: Legg til en "send mail" knapp
<?php } else { // not logged in?>
<a class="btn" href=".?login">æ kanj itj lææv uten piær!</a>
<?php }?>
</main>
</body>

View File

@ -11,64 +11,63 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$projectManager = new \pvv\side\ProjectManager($pdo); $projectManager = new \pvv\side\ProjectManager($pdo);
$projects = $projectManager->getAll(); $projects = $projectManager->getAll();
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="no"> <html lang="no">
<title>Prosjektverkstedet</title> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Prosjektverkstedet</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/normalize.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/splash.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>Prosjekter</h2>
<article class="threed">
<h2>Prosjekter</h2>
<?php
if(count($projects) == 0){
?>
<p>PVV har for øyeblikket ingen aktive prosjekter. Tenker du at noe bør gjøres? Har du en kul ide for noe PVV kan samarbeide om? Sett opp et prosjekt!</p>
<br>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<a class="btn" href="mine.php">Mine prosjekter</a>
<?php
}else{
?>
<p>Lyst til å gjøre noe kult? Her er et utvalg av de prosjektene som PVVere har laget. Mangler det noe, eller brenner du for noe annet? Sett opp et eget prosjekt!</p>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<a class="btn" href="mine.php">Mine prosjekter</a>
<ul class="calendar-events">
<?php <?php
$randProjects = array_rand($projects, min(3, count($projects))); if(count($projects) == 0){
if (!is_array($randProjects)) {
$randProjects = [$randProjects];
};
foreach($randProjects as $i) {
$project = $projects[$i];
?> ?>
<p>PVV har for øyeblikket ingen aktive prosjekter. Tenker du at noe bør gjøres? Har du en kul ide for noe PVV kan samarbeide om? Sett opp et prosjekt!</p>
<br>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<a class="btn" href="mine.php">Mine prosjekter</a>
<?php
}else{
?>
<p>Lyst til å gjøre noe kult? Her er et utvalg av de prosjektene som PVVere har laget. Mangler det noe, eller brenner du for noe annet? Sett opp et eget prosjekt!</p>
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
<a class="btn" href="mine.php">Mine prosjekter</a>
<li> <ul class="calendar-events">
<p class="noborder no-chin"><?= "<a href=\"project/?id=" . $project->getID() . "\">" . $project->getName() . "</a>"; ?></p> <?php
<p class="subnote"><?= "Organisert av: " . $project->getOwner(); ?></p> $randProjects = array_rand($projects, min(3, count($projects)));
<span> if (!is_array($randProjects)) {
<p><?= $project->getDescription(); ?></p> $randProjects = [$randProjects];
</span> };
</li> foreach($randProjects as $i) {
$project = $projects[$i];
?>
<?php } ?> <li>
</ul> <p class="noborder no-chin"><?= "<a href=\"project/?id=" . $project->getID() . "\">" . $project->getName() . "</a>"; ?></p>
<?php <p class="subnote"><?= "Organisert av: " . $project->getOwner(); ?></p>
} <span>
?> <p><?= $project->getDescription(); ?></p>
</article> </span>
</li>
</main> <?php } ?>
</ul>
<nav> <?php
<?= navbar(1, 'prosjekt'); ?> }
<?= loginbar(); ?> ?>
</nav> </main>
</body>