From cd150d73c5b5ac69ad2e17a15c6e4577b41b8e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Sat, 7 Oct 2017 16:41:50 +0200 Subject: [PATCH 1/4] Cleanup code --- src/pvv/side/agenda.php | 7 +++---- src/pvv/side/social/brettspillevent.php | 2 +- www/index.php | 14 ++++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pvv/side/agenda.php b/src/pvv/side/agenda.php index daa9afa..76ccfa1 100644 --- a/src/pvv/side/agenda.php +++ b/src/pvv/side/agenda.php @@ -1,9 +1,6 @@ getNextEventFrom($startDate); }, $this->activities - ), function($a){return $a;}); + ), function($a){ + return isset($a); + }); usort($result, function($a, $b) { return ($a->getStart()->getTimeStamp() < $b->getStart()->getTimeStamp()) ? -1 diff --git a/src/pvv/side/social/brettspillevent.php b/src/pvv/side/social/brettspillevent.php index 3395da4..cc9c3a8 100644 --- a/src/pvv/side/social/brettspillevent.php +++ b/src/pvv/side/social/brettspillevent.php @@ -20,7 +20,7 @@ class BrettspillEvent extends Event { } public function getOrganiser() /* : User */ { - return "PVV"; + return "Robert Maikher"; } public function getURL() /* : string */ { diff --git a/www/index.php b/www/index.php index 666a305..87b22a2 100644 --- a/www/index.php +++ b/www/index.php @@ -53,15 +53,15 @@ include '../inc/ticker.php';
  • getName(); ?> + */ ?> -getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) { - echo '' . strftime('%a', $event->getStart()->getTimestamp()) . ''; + echo '' . strftime('%a', $event->getStart()->getTimestamp()) . ''; } else { - echo '' . strftime('%e. %b', $event->getStart()->getTimestamp()) . ''; + echo '' . strftime('%e. %b', $event->getStart()->getTimestamp()) . ''; } - echo '' . $event->getStart()->format('H:i') . ''; -} else { echo '' . $event->getStart()->format('H:i') . ''; +} else { + echo '' . $event->getStart()->format('H:i') . ''; } ?>
  • @@ -76,7 +76,9 @@ include '../inc/ticker.php';

    Alle med tilknytning til NTNU kan bli medlem hos oss og benytte seg av våre ressurser. - +

    Bli medlem From 0a2c08eb9b8931f7845e6b4e56c8c24836fa007c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Sat, 7 Oct 2017 16:42:11 +0200 Subject: [PATCH 2/4] Move date to the right --- www/css/splash.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/css/splash.css b/www/css/splash.css index 5fb2bb5..d0bdd98 100644 --- a/www/css/splash.css +++ b/www/css/splash.css @@ -12,6 +12,7 @@ img.float-right { .calendar-events ul .date { color: rgba(0,0,0,.5); font-size: 0.8em; + margin-top: .2em; } .calendar-events > li > p { border-bottom: .1em solid rgba(0,0,0,.2); @@ -30,7 +31,8 @@ img.float-right { text-decoration: underline; } .calendar-events ul .time { - float: left; + color: rgba(0,0,0,.5); + float: right; width: 4em; } .calendar-events ul .icon, .calendar-events ul .date { From faff3a2a8dc9fc1a9c43f4b36af572a7800ce49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Sat, 7 Oct 2017 16:58:27 +0200 Subject: [PATCH 3/4] Better alignment of date/time for today --- www/css/splash.css | 1 - www/index.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/www/css/splash.css b/www/css/splash.css index d0bdd98..81c3f63 100644 --- a/www/css/splash.css +++ b/www/css/splash.css @@ -33,7 +33,6 @@ img.float-right { .calendar-events ul .time { color: rgba(0,0,0,.5); float: right; - width: 4em; } .calendar-events ul .icon, .calendar-events ul .date { float: right; diff --git a/www/index.php b/www/index.php index 87b22a2..cb4a37c 100644 --- a/www/index.php +++ b/www/index.php @@ -54,14 +54,14 @@ include '../inc/ticker.php'; getName(); ?> + */ ?> ' . $event->getStart()->format('H:i') . ''; if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) { echo '' . strftime('%a', $event->getStart()->getTimestamp()) . ''; } else { echo '' . strftime('%e. %b', $event->getStart()->getTimestamp()) . ''; } - echo '' . $event->getStart()->format('H:i') . ''; } else { - echo '' . $event->getStart()->format('H:i') . ''; + echo '' . $event->getStart()->format('H:i') . ''; } ?> From acad759bb0440fe402d7d563c78c65d7b29e3484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Sat, 7 Oct 2017 17:34:27 +0200 Subject: [PATCH 4/4] Move sosiale pictures back, fix regression --- www/{aktiviteter => sosiale}/animekveld.jpg | Bin www/{aktiviteter => sosiale}/brettspill.jpg | Bin www/{aktiviteter => sosiale}/nerdepitsa.jpg | Bin 3 files changed, 0 insertions(+), 0 deletions(-) rename www/{aktiviteter => sosiale}/animekveld.jpg (100%) rename www/{aktiviteter => sosiale}/brettspill.jpg (100%) rename www/{aktiviteter => sosiale}/nerdepitsa.jpg (100%) diff --git a/www/aktiviteter/animekveld.jpg b/www/sosiale/animekveld.jpg similarity index 100% rename from www/aktiviteter/animekveld.jpg rename to www/sosiale/animekveld.jpg diff --git a/www/aktiviteter/brettspill.jpg b/www/sosiale/brettspill.jpg similarity index 100% rename from www/aktiviteter/brettspill.jpg rename to www/sosiale/brettspill.jpg diff --git a/www/aktiviteter/nerdepitsa.jpg b/www/sosiale/nerdepitsa.jpg similarity index 100% rename from www/aktiviteter/nerdepitsa.jpg rename to www/sosiale/nerdepitsa.jpg