Added biweekly driftkveld #17

Merged
torsteinnh merged 1 commits from AddDriftkveld into master 2022-01-29 19:33:54 +01:00
5 changed files with 11 additions and 7 deletions
Showing only changes of commit bbe51e702b - Show all commits

2
dev.sh
View File

@ -17,7 +17,7 @@ if test ! -d vendor; then
php composer.phar install || exit $?
cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
cp -v dist/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
# cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
sed -e "s/'trusted.url.domains' => array()/'trusted.url.domains' => array('localhost:1080')/g" < vendor/simplesamlphp/simplesamlphp/config-templates/config.php > vendor/simplesamlphp/simplesamlphp/config/config.php
ln -s ../vendor/simplesamlphp/simplesamlphp/www/ www/simplesaml
fi

View File

@ -27,7 +27,7 @@ use \pvv\side\Agenda;
$agenda = new \pvv\side\Agenda([
new \pvv\side\social\NerdepitsaActivity,
// new \pvv\side\social\AnimekveldActivity,
// new \pvv\side\social\DriftkveldActivity,
new \pvv\side\social\DriftkveldActivity,
new \pvv\side\DBActivity($pdo),
]);

View File

@ -11,8 +11,10 @@ class DriftkveldActivity implements Activity {
if ($date->format('H') > 18 || $date->format('H') == 17 && $date->format('i') > 30)
return $this->nextDate($date->add(new DateInterval('P1D'))->setTime(18, 15, 0));
$date = $date->setTime(18, 15, 0);
if ($date->format('N') != 2)
if ($date->format('N') != 6)
return $this->nextDate($date->add(new DateInterval('P1D')));
if ($date->format('W') % 2)
return $this->nextDate($date->add(new DateInterval('P7D')));
return $date;
}
@ -20,8 +22,10 @@ class DriftkveldActivity implements Activity {
if ($date->format('H') < 17 || $date->format('H') == 18 && $date->format('i') < 30)
return $this->prevDate($date->sub(new DateInterval('P1D'))->setTime(18, 15, 0));
$date = $date->setTime(18, 15, 0);
if ($date->format('N') != 2)
if ($date->format('N') != 6)
return $this->prevDate($date->sub(new DateInterval('P1D')));
if ($date->format('W') % 2)
return $this->prevDate($date->sub(new DateInterval('P7D')));
return $date;
}

View File

@ -24,7 +24,7 @@ class DriftkveldEvent extends Event {
}
public function getURL() /* : string */ {
return '/drift/';
return '/driftkveld/';
}
public function getImageURL() {
@ -37,7 +37,7 @@ class DriftkveldEvent extends Event {
'Vil du være kul kis TM?',
'Kom på driftkveld!',
'',
'Vi møtes en gang i uka for å ta unna driftarbeid og drikke kaffe.',
'Vi møtes annenhver uke for å ta unna driftarbeid og drikke kaffe.',
'Alle PVVere er velkommene, enten de er erfarne driftere eller helt utenforstående!'
];
}

View File

@ -14,7 +14,7 @@ use \pvv\side\Agenda;
<meta name="theme-color" content="#024" />
<title>Drifterverkstedet</title>
<header>Sosial&shy;verk&shy;stedet</header>
<header>Drift&shy;verk&shy;stedet</header>
<main>