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>
<?= '<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>
<p class="subtitle">Hvor?</p>
<p class="subtitle">Sted</p>
<?= '<input type="text" name="location" value="' . $event->getLocation(). '" class="boxinput">' ?><br>
</div>

View File

@ -27,59 +27,61 @@ $day = (isset($_GET['day']))
?>
<!DOCTYPE html>
<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
$events = ($day==-1)
? $agenda->getNextOfEach(new \DateTimeImmutable)
: $agenda->getEventsBetween(
new DateTimeImmutable("$year-$month-$day 00:00:00"),
new DateTimeImmutable("$year-$month-$day 23:59:59"));
<main>
<?php
$events = ($day==-1)
? $agenda->getNextOfEach(new \DateTimeImmutable)
: $agenda->getEventsBetween(
new DateTimeImmutable("$year-$month-$day 00:00:00"),
new DateTimeImmutable("$year-$month-$day 23:59:59"));
$limit = 0;
foreach($events as $event) {
?>
<article>
<h2>
<?php if ($event->getImageURL()) { ?>
<img src="<?= $event->getImageURL() ?>">
$limit = 0;
foreach($events as $event) {
?>
<div>
<h2>
<?php if ($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 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>Sted: <strong><?= $event->getLocation() ?></strong>
<li>Arrangør: <strong><?= $event->getOrganiser() ?></strong>
</ul>
</main>
<?php $description = $event->getDescription(); ?>
<?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>
</body>

View File

@ -30,78 +30,77 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));
?><!DOCTYPE html>
<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>
<?php echo navbar(1, 'kalender'); ?>
<?php echo loginbar(); ?>
</nav>
<article>
<h2 style="text-align:center;">Aktiviteter for <?=$months_translations[$month-1]?> <?=$year?></h2>
<main>
<h2 style="text-align:center;">Aktiviteter for <?=$months_translations[$month-1]?> <?=$year?></h2>
<p><?php
$pmonth = $month-1;
$nmonth = $month+1;
$pyear=$year;
$nyear=$year;
if ($pmonth==0) {$pmonth=12; $pyear--;}
if ($nmonth==13) {$nmonth=1; $nyear++;}
?>
<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>
</p>
<p><?php
$pmonth = $month-1;
$nmonth = $month+1;
$pyear=$year;
$nyear=$year;
if ($pmonth==0) {$pmonth=12; $pyear--;}
if ($nmonth==13) {$nmonth=1; $nyear++;}
?>
<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>
</p>
<figure class="calendar">
<ul>
<li class="header noselect">Mandag
<li class="header noselect">Tirsdag
<li class="header noselect">Onsdag
<li class="header noselect">Torsdag
<li class="header noselect">Fredag
<li class="header noselect">Lørdag
<li class="header noselect">Søndag
<figure class="calendar">
<ul>
<li class="header noselect">Mandag
<li class="header noselect">Tirsdag
<li class="header noselect">Onsdag
<li class="header noselect">Torsdag
<li class="header noselect">Fredag
<li class="header noselect">Lørdag
<li class="header noselect">Søndag
<?php if ($days_before_the_first != 0) { ?>
<li class="outOfMonth" style="grid-column: 1/<?=$days_before_the_first+1?>;">
<?php } ?>
<?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 if ($days_before_the_first != 0) { ?>
<li class="outOfMonth" style="grid-column: 1/<?=$days_before_the_first+1?>;">
<?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>
<?php foreach($events as $event) { ?>
<section><?=$event->getName()?></section>
<?php } ?>
</div></a>
<?php } else { ?>
<span class="noselect"><?= $day ?>.</span>
<?php } ?>
<?php } ?>
<?php } ?>
</ul>
</figure>
</ul>
</figure>
</article>
</main>
<nav>
<?= navbar(1, 'kalender'); ?>
<?= loginbar(); ?>
</nav>
</main>
</body>

View File

@ -7,38 +7,37 @@ require __DIR__ . '/../../src/_autoload.php';
require __DIR__ . '/../../sql_config.php';
?>
<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>
<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 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>
</article>
</main>
<nav>
<?= navbar(1, 'kontakt'); ?>
<?= loginbar(); ?>
</nav>
<main>
<h2>Kommunikasjon</h2>
<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 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>
</main>
</body>

View File

@ -37,55 +37,53 @@ if (isset($_SESSION['userdata'])) { // if logged in with feide
?>
<!DOCTYPE html>
<title>PVV registrering</title>
<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">
<head>
<title>PVV registrering</title>
<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">
</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.
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>
<?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>
<h3>Meldingen du kan sende:</h3>
</main>
<nav>
<?= navbar(1); ?>
<?= loginbar(); ?>
</nav>
<?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);
$projects = $projectManager->getAll();
?>
<!DOCTYPE html>
<html lang="no">
<title>Prosjektverkstedet</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/splash.css">
<head>
<title>Prosjektverkstedet</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/splash.css">
</head>
<header>Prosjekt&shy;verk&shy;stedet</header>
<body>
<nav>
<?php echo navbar(1, 'prosjekt'); ?>
<?php echo loginbar(); ?>
</nav>
<main>
<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">
<main>
<h2>Prosjekter</h2>
<?php
$randProjects = array_rand($projects, min(3, count($projects)));
if (!is_array($randProjects)) {
$randProjects = [$randProjects];
};
foreach($randProjects as $i) {
$project = $projects[$i];
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>
<li>
<p class="noborder no-chin"><?= "<a href=\"project/?id=" . $project->getID() . "\">" . $project->getName() . "</a>"; ?></p>
<p class="subnote"><?= "Organisert av: " . $project->getOwner(); ?></p>
<span>
<p><?= $project->getDescription(); ?></p>
</span>
</li>
<ul class="calendar-events">
<?php
$randProjects = array_rand($projects, min(3, count($projects)));
if (!is_array($randProjects)) {
$randProjects = [$randProjects];
};
foreach($randProjects as $i) {
$project = $projects[$i];
?>
<?php } ?>
</ul>
<?php
}
?>
</article>
<li>
<p class="noborder no-chin"><?= "<a href=\"project/?id=" . $project->getID() . "\">" . $project->getName() . "</a>"; ?></p>
<p class="subnote"><?= "Organisert av: " . $project->getOwner(); ?></p>
<span>
<p><?= $project->getDescription(); ?></p>
</span>
</li>
</main>
<nav>
<?= navbar(1, 'prosjekt'); ?>
<?= loginbar(); ?>
</nav>
<?php } ?>
</ul>
<?php
}
?>
</main>
</body>