diff --git a/www/aktiviteter/index.php b/www/aktiviteter/index.php index 9e349f2..17e68ff 100644 --- a/www/aktiviteter/index.php +++ b/www/aktiviteter/index.php @@ -5,7 +5,6 @@ require __DIR__ . '/../../src/_autoload.php'; require __DIR__ . '/../../sql_config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - use \pvv\side\Agenda; $agenda = new \pvv\side\Agenda([ new \pvv\side\social\NerdepitsaActivity, @@ -13,6 +12,17 @@ $agenda = new \pvv\side\Agenda([ new \pvv\side\social\BrettspillActivity, new \pvv\side\DBActivity($pdo), ]); + +$year = (isset($_GET['year'])) + ? $_GET['year'] + : date("Y"); +$month = (isset($_GET['month'])) + ? $_GET['month'] + : date("m"); +$day = (isset($_GET['day'])) + ? $_GET['day'] + : -1; + ?> Aktivitetverkstedet @@ -26,9 +36,16 @@ $agenda = new \pvv\side\Agenda([
- -getNextOfEach(new \DateTimeImmutable) as $event) { ?> +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) { +?>

getImageURL()) { ?> diff --git a/www/css/calendar.css b/www/css/calendar.css index 6551c21..94a7a45 100644 --- a/www/css/calendar.css +++ b/www/css/calendar.css @@ -12,6 +12,14 @@ figure.calendar { grid-template-rows: auto; } +.calendar ul a { + text-decoration: none; + color: inherit; +} +.calendar ul a div { + min-height: 4.8em; +} + .calendar ul li { margin: 2px; @@ -28,7 +36,6 @@ figure.calendar { font-size: 0.8em; color: #444; - transition: 0.1s; } .calendar ul li.header { diff --git a/www/kalender/index.php b/www/kalender/index.php index e82843a..e2b8ac8 100644 --- a/www/kalender/index.php +++ b/www/kalender/index.php @@ -72,19 +72,24 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year)); - - getEventsBetween( - new DateTimeImmutable("$year-$month-$day 00:00:00"), - new DateTimeImmutable("$year-$month-$day 23:59:59")); ?> - -
  • . - -
  • . - - - -
    getName()?>
    - + getEventsBetween( + new DateTimeImmutable("$year-$month-$day 00:00:00"), + new DateTimeImmutable("$year-$month-$day 23:59:59")); ?> + +
  • + +
  • + + + ">
    + . + +
    getName()?>
    + +
    + + . +