27 Commits

Author SHA1 Message Date
3d843667ad update /tjenester for mobile devices 2025-08-31 01:13:26 +02:00
617a799ad8 Merge pull request 'remove duplicated Kalender button at /hendelser' (#89) from vegardbm/nettsiden:main into main
Reviewed-on: #89
2025-08-18 02:03:29 +02:00
0be8e51af4 remove duplicated Kalender button at /hendelser 2025-08-18 01:59:37 +02:00
381f67189a Merge pull request 'fix missing port for buttercup' (#88) from vegardbm/nettsiden:main into main
Reviewed-on: #88
2025-08-17 20:57:52 +02:00
2e56c7aed4 fix missing port for buttercup 2025-08-17 20:54:21 +02:00
5b7a04dc69 Merge pull request 'update dead links for VM hosts at /tjenester' (#87) from vegardbm/nettsiden:main into main
Reviewed-on: #87
2025-08-17 20:45:06 +02:00
485110bf43 update dead links for VM hosts at /tjenester 2025-08-17 20:43:05 +02:00
3498cb7d8e Merge pull request 'fix minecraft map link at /tjenester' (#86) from vegardbm/nettsiden:main into main
Reviewed-on: #86
2025-08-17 00:13:58 +02:00
ed3f307b9b fix minecraft map link at /tjenester 2025-08-17 00:04:51 +02:00
7070a12e16 Merge pull request 'render /hendelser tid, sted, arrangør nicely on mobile' (#85) from vegardbm/nettsiden:main into main
Reviewed-on: #85
Reviewed-by: Oystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
2025-08-14 22:47:21 +02:00
6bda1a91bd render /hendelser tid, sted, arrangør nicely on mobile 2025-08-14 22:46:06 +02:00
559b7ec03b Merge pull request 'fix mobile experience for /aktiviteter' (#84) from vegardbm/nettsiden:main into main
Reviewed-on: #84
Reviewed-by: Oystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
2025-08-14 22:20:24 +02:00
602ae1f396 fix mobile experience for /aktiviteter 2025-08-14 22:17:25 +02:00
f3c439d038 fix README 2025-08-14 21:20:05 +02:00
2b3a9dd6ec update README to reflect changes in dev environment 2025-08-14 21:09:33 +02:00
59b071d8be Fix oopsie, gitignore cache 2025-08-14 19:00:44 +02:00
f732582d0d Merge pull request 'Høst 2025; Legg til fadderuke, pause events' (#83) from fall-2025 into main
Reviewed-on: #83
Reviewed-by: Peder Bergebakken Sundt <pederbs@pvv.ntnu.no>
2025-07-18 21:05:40 +02:00
de72342018 activities: disable recurring events for the summer 2025-07-17 23:39:56 +02:00
b54bbda71f index.php: add fadderuke 2025 poster 2025-07-17 23:35:07 +02:00
20bab54235 dist/simplesamlphp-authsources: set entityID for service provider 2025-03-19 01:34:39 +01:00
c3d8ce017d shell.nix: find rootlevel in shell hook 2025-03-18 21:25:41 +01:00
02cfe9feaa pvv_mysql.sql: format 2025-03-18 21:18:24 +01:00
4d4ec78ea3 pvv_sqlite.sql: format 2025-03-18 21:17:36 +01:00
a74ea31356 .envrc: init 2025-03-18 21:15:59 +01:00
0653672a17 shell.nix: add sql formatter 2025-03-18 21:15:59 +01:00
8a1ff1a265 dist/pvv.sql -> dist/pvv_sqlite.sql 2025-03-18 21:10:48 +01:00
c1802e7cf2 treewide: strict comparisons 2025-03-12 01:09:08 +01:00
25 changed files with 177 additions and 196 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

5
.gitignore vendored
View File

@@ -1,6 +1,7 @@
/result
/config.php
*.sqlite
/cache
/config.php
/result
/test.sql
/vendor/
/www/simplesaml

View File

@@ -51,7 +51,6 @@ return (new PhpCsFixer\Config())
// TODO: fix these
'psr_autoloading' => false,
'strict_comparison' => false,
])
->setFinder($finder)
->setIndent(" ")

View File

@@ -1,3 +1,4 @@
# Programvareverkstedets nettside
A website created with the latest and greatest web technologies.
@@ -5,59 +6,25 @@ May contain blackjack and other things one tends to include in awesome projects.
## Installation
git clone --recursive https://github.com/Programvareverkstedet/nettsiden.git
git clone --recursive https://github.com/Programvareverkstedet/nettsiden.git
Put it in a folder your webserver can find.
## Development setup
Make sure you have `sqlite3`, `php` and `pdo-sqlite` installed.
These can be obtained from your package manager.
Then make sure PHP has the `curl`, `pdo-sqlite`, `ext-dom` and `sqlite3` extensions enabled, see `/etc/php/php.ini`.
The development environment can be setup with:
To install all mentioned requirements on debian: `apt install composer sqlite3 php8.1-sqlite3 simplesamlphp php-xml`, followed by `composer update`.
nix develop
./dev.sh
For this you will need to install the nix package manager and possibly set the experimental features in your nix config, likely located at /etc/nix/nix.conf or $HOME/.config/nix/nix.conf.
On Windows you can use chocolatey and git bash to run `./dev.sh`.
Install `php` and `sqlite`, then enable these extensions in `C:\tools\php80\php.ini`:
`mbstring`, `openssl`, `curl`, `pdo-sqlite` and `sqlite3`
Installing nix with your package manager might not work without some tweaking, but the upstream script should just work which you can find [here](https://nixos.org/download/).
Alternatively you may use `cmd` on Windows.
In this case you'll have to perform a `composer install` manually beforehand.
Good luck.
experimental-features = flakes nix-command
dev.bat
### Dependency management
`dev.sh` will ensure the git submodules have been properly pulled, then download the `composer` package manager to a php archive file named `composer.phar`, then run it.
Composer will then check for the php extensions needed, such as `pdo_sqlite`, which must be enabled on your system.
This usually includes installing a php-sqlite3 package and enabling it in `/etc/php/php.ini`:
[PHP]
extension=pdo_sqlite
extension=sqlite3
extension=ext-curl
Composer is used as such:
php composer.phar update
php composer.phar install
### Docker
We provide a simple docker-compose setup for local development.
First ensure that docker is running:
sudo systemctl start docker
then
DOCKER_USER=$(id -u):$(id -g) docker-compose up
You can then run the server with:
runDev
### Admin account
@@ -65,15 +32,6 @@ Login goes through `idp.pvv.ntnu.no` via SAML, so you have to use your PVV accou
(This only works if you use access the local development site via the the hostname `localhost`)
To make your account into an admin account, run:
sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("YOUR_USERNAME", 1);'
If using docker, when already running:
DOCKER_USER=$(id -u):$(id -g) docker-compose exec nettside sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("YOUR_USERNAME", 1);'
If not already running:
DOCKER_USER=$(id -u):$(id -g) docker-compose run nettside sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("YOUR_USERNAME", 1);'
sqlite3 pvv.sqlite "INSERT INTO users (uname, groups) VALUES ('YOUR_USERNAME', 1);"
## Hosting

50
dist/pvv.sql vendored
View File

@@ -1,50 +0,0 @@
CREATE TABLE "events" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"start" TEXT,
"stop" TEXT,
"organiser" TEXT,
"location" TEXT,
"description" TEXT
);
CREATE TABLE "projects" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"description" TEXT,
"active" BOOLEAN
);
CREATE TABLE "projectmembers" (
"projectid" INTEGER,
"name" TEXT,
"uname" TEXT,
"mail" TEXT,
"role" TEXT,
"lead" BOOLEAN DEFAULT 0,
"owner" BOOLEAN DEFAULT 0
);
CREATE TABLE "users" (
"uname" TEXT,
"groups" INT DEFAULT 0
);
CREATE TABLE "motd" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"title" TEXT,
"content" TEXT
);
INSERT INTO motd (title, content)
VALUES ('MOTD ./dev.sh', 'du kan endre motd i admin panelet');
CREATE TABLE "door" (
"time" INTEGER PRIMARY KEY,
"open" BOOLEAN
);
INSERT INTO door (time, open)
VALUES (0, FALSE);
INSERT INTO users (uname, groups)
VALUES ('min_test_bruker', 1);

60
dist/pvv_mysql.sql vendored
View File

@@ -1,47 +1,45 @@
CREATE TABLE events (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`start` TEXT,
`stop` TEXT,
`organiser` TEXT,
`location` TEXT,
`description` TEXT
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`start` TEXT,
`stop` TEXT,
`organiser` TEXT,
`location` TEXT,
`description` TEXT
);
CREATE TABLE projects (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`description` TEXT,
`active` BOOLEAN
CREATE TABLE projects (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`description` TEXT,
`active` BOOLEAN
);
CREATE TABLE projectmembers (
`projectid` INTEGER,
`name` TEXT,
`uname` TEXT,
`mail` TEXT,
`role` TEXT,
`lead` BOOLEAN DEFAULT 0,
`owner` BOOLEAN DEFAULT 0
`projectid` INTEGER,
`name` TEXT,
`uname` TEXT,
`mail` TEXT,
`role` TEXT,
`lead` BOOLEAN DEFAULT 0,
`owner` BOOLEAN DEFAULT 0
);
CREATE TABLE users (
`uname` TEXT,
`groups` INT DEFAULT 0
);
CREATE TABLE users (`uname` TEXT, `groups` INT DEFAULT 0);
CREATE TABLE motd (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`title` TEXT,
`content` TEXT
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`title` TEXT,
`content` TEXT
);
/*
INSERT INTO motd (title, content)
VALUES ("MOTD ./dev.sh", "du kan endre motd i admin panelet");
*/
CREATE TABLE door (`time` INTEGER PRIMARY KEY, `open` BOOLEAN);
CREATE TABLE door (
`time` INTEGER PRIMARY KEY,
`open` BOOLEAN
);
INSERT INTO door(time, open) VALUES (0, FALSE);
INSERT INTO
door (time, open)
VALUES
(0, FALSE);

54
dist/pvv_sqlite.sql vendored Normal file
View File

@@ -0,0 +1,54 @@
CREATE TABLE "events" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"start" TEXT,
"stop" TEXT,
"organiser" TEXT,
"location" TEXT,
"description" TEXT
);
CREATE TABLE "projects" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"description" TEXT,
"active" BOOLEAN
);
CREATE TABLE "projectmembers" (
"projectid" INTEGER,
"name" TEXT,
"uname" TEXT,
"mail" TEXT,
"role" TEXT,
"lead" BOOLEAN DEFAULT 0,
"owner" BOOLEAN DEFAULT 0
);
CREATE TABLE "users" ("uname" TEXT, "groups" INT DEFAULT 0);
CREATE TABLE "motd" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"title" TEXT,
"content" TEXT
);
INSERT INTO
motd (title, content)
VALUES
(
'MOTD ./dev.sh',
'du kan endre motd i admin panelet'
);
CREATE TABLE "door" ("time" INTEGER PRIMARY KEY, "open" BOOLEAN);
INSERT INTO
door (time, open)
VALUES
(0, FALSE);
INSERT INTO
users (uname, groups)
VALUES
('min_test_bruker', 1);

View File

@@ -6,6 +6,7 @@ $config = [
/* This is the name of this authentication source, and will be used to access it later. */
'default-sp' => [
'saml:SP',
'entityID' => 'https://www.pvv.ntnu.no/simplesaml/',
'idp' => 'https://idp.pvv.ntnu.no/',
],
];

View File

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

View File

@@ -18,7 +18,7 @@ function navbar($depth, $active = null) {
];
foreach ($menuItems as $caption => $link) {
$isActive = $active === $link;
if (substr($link, 0, 4) != 'http') {
if (substr($link, 0, 4) !== 'http') {
$link = rtrim(str_repeat('../', $depth) . $link, '/') . '/';
}

View File

@@ -1,4 +1,4 @@
{ pkgs }:
{ pkgs, lib }:
let
phpEnv = pkgs.php84.buildEnv {
extensions = { enabled, all }: enabled ++ (with all; [ iconv mbstring pdo_mysql pdo_sqlite ]);
@@ -11,20 +11,21 @@ pkgs.mkShellNoCC {
php84Packages.php-parallel-lint
php84Packages.php-cs-fixer
sqlite-interactive
sql-formatter
];
# Prepare dev environment with sqlite and config files
shellHook = ''
alias runDev='php -S localhost:1080 -d error_reporting=E_ALL -d display_errors=1 -t www/'
# Prepare dev environment with sqlite and config files
test -e pvv.sqlite || sqlite3 pvv.sqlite < dist/pvv.sql
test -e config.php || cp -v dist/config.local.php config.php
declare -a PROJECT_ROOT="$("${lib.getExe pkgs.git}" rev-parse --show-toplevel)"
mkdir -p "$PROJECT_ROOT/www/galleri/bilder/slideshow"
test -e "$PROJECT_ROOT/pvv.sqlite" || sqlite3 "$PROJECT_ROOT/pvv.sqlite" < "$PROJECT_ROOT/dist/pvv_sqlite.sql"
test -e "$PROJECT_ROOT/config.php" || cp -v "$PROJECT_ROOT/dist/config.local.php" "$PROJECT_ROOT/config.php"
if [ ! -d www/galleri/bilder/slideshow ] ; then
mkdir -p www/galleri/bilder/slideshow
fi
if [ ! -d vendor ] ; then
if [ ! -d "$PROJECT_ROOT/vendor" ] ; then
pushd "$PROJECT_ROOT"
composer install || exit $?
cp dist/simplesamlphp-authsources.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -34,6 +35,7 @@ pkgs.mkShellNoCC {
cp dist/config.local.php config.php
ln -s ../vendor/simplesamlphp/simplesamlphp/public/ www/simplesaml
popd
fi
'';
}

View File

@@ -98,7 +98,7 @@ class UserManager {
$statement->execute();
$row = $statement->fetch();
if ($row == false) {
if ($row === false) {
return 0;
}

View File

@@ -8,11 +8,11 @@ use pvv\side\Activity;
class AnimekveldActivity implements Activity {
public function nextDate(\DateTimeImmutable $date) {
if ($date->format('H') > 20 || $date->format('H') == 19 && $date->format('i') > 30) {
if (intval($date->format('H')) > 20 || intval($date->format('H')) === 19 && intval($date->format('i')) > 30) {
return $this->nextDate($date->add(new \DateInterval('P1D'))->setTime(19, 30, 0));
}
$date = $date->setTime(19, 30, 0);
if ($date->format('N') != 5) {
if (intval($date->format('N')) !== 5) {
return $this->nextDate($date->add(new \DateInterval('P1D')));
}
@@ -20,11 +20,11 @@ class AnimekveldActivity implements Activity {
}
public function prevDate(\DateTimeImmutable $date) {
if ($date->format('H') < 19 || $date->format('H') == 20 && $date->format('i') < 30) {
if (intval($date->format('H')) < 19 || intval($date->format('H')) === 20 && intval($date->format('i')) < 30) {
return $this->prevDate($date->sub(new \DateInterval('P1D'))->setTime(19, 30, 0));
}
$date = $date->setTime(19, 30, 0);
if ($date->format('N') != 5) {
if (intval($date->format('N')) !== 5) {
return $this->prevDate($date->sub(new \DateInterval('P1D')));
}

View File

@@ -8,14 +8,14 @@ use pvv\side\Activity;
class BrettspillActivity implements Activity {
public function nextDate(\DateTimeImmutable $date) {
if ($date->format('H') > 17 || $date->format('H') == 16 && $date->format('i') > 15) {
if (intval($date->format('H')) > 17 || intval($date->format('H')) === 16 && intval($date->format('i')) > 15) {
return $this->nextDate($date->add(new \DateInterval('P1D'))->setTime(16, 15, 0));
}
$date = $date->setTime(16, 15, 0);
if ($date->format('N') != 7) {
if (intval($date->format('N')) !== 7) {
return $this->nextDate($date->add(new \DateInterval('P1D')));
}
if ($date->format('W') % 2 - 1) {
if (intval($date->format('W')) % 2 - 1) {
return $this->nextDate($date->add(new \DateInterval('P7D')));
}
@@ -23,14 +23,14 @@ class BrettspillActivity implements Activity {
}
public function prevDate(\DateTimeImmutable $date) {
if ($date->format('H') < 16 || $date->format('H') == 17 && $date->format('i') < 15) {
if (intval($date->format('H')) < 16 || intval($date->format('H')) === 17 && intval($date->format('i')) < 15) {
return $this->prevDate($date->sub(new \DateInterval('P1D'))->setTime(16, 15, 0));
}
$date = $date->setTime(16, 15, 0);
if ($date->format('N') != 7) {
if (intval($date->format('N')) !== 7) {
return $this->prevDate($date->sub(new \DateInterval('P1D')));
}
if ($date->format('W') % 2 - 1) {
if (intval($date->format('W')) % 2 - 1) {
return $this->prevDate($date->sub(new \DateInterval('P7D')));
}

View File

@@ -8,14 +8,14 @@ use pvv\side\Activity;
class DriftkveldActivity implements Activity {
public function nextDate(\DateTimeImmutable $date) {
if ($date->format('H') > 18 || $date->format('H') == 17 && $date->format('i') > 30) {
if (intval($date->format('H')) > 18 || intval($date->format('H')) === 17 && intval($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') != 6) {
if (intval($date->format('N')) !== 6) {
return $this->nextDate($date->add(new \DateInterval('P1D')));
}
if ($date->format('W') % 2 - 1) {
if (intval($date->format('W')) % 2 - 1) {
return $this->nextDate($date->add(new \DateInterval('P7D')));
}
@@ -23,14 +23,14 @@ class DriftkveldActivity implements Activity {
}
public function prevDate(\DateTimeImmutable $date) {
if ($date->format('H') < 17 || $date->format('H') == 18 && $date->format('i') < 30) {
if (intval($date->format('H')) < 17 || intval($date->format('H')) === 18 && intval($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') != 6) {
if (intval($date->format('N')) !== 6) {
return $this->prevDate($date->sub(new \DateInterval('P1D')));
}
if ($date->format('W') % 2 - 1) {
if (intval($date->format('W')) % 2 - 1) {
return $this->prevDate($date->sub(new \DateInterval('P7D')));
}

View File

@@ -8,14 +8,14 @@ use pvv\side\Activity;
class HackekveldActivity implements Activity {
public function nextDate(\DateTimeImmutable $date) {
if ($date->format('H') > 18 || $date->format('H') == 17 && $date->format('i') > 30) {
if (intval($date->format('H')) > 18 || intval($date->format('H')) === 17 && intval($date->format('i')) > 30) {
return $this->nextDate($date->add(new \DateInterval('P1D'))->setTime(18, 15, 0));
}
$date = $date->setTime(16, 15, 0);
if ($date->format('N') != 6) {
if (intval($date->format('N')) !== 6) {
return $this->nextDate($date->add(new \DateInterval('P1D')));
}
if ($date->format('W') % 2) {
if (intval($date->format('W')) % 2) {
return $this->nextDate($date->add(new \DateInterval('P7D')));
}
@@ -23,14 +23,14 @@ class HackekveldActivity implements Activity {
}
public function prevDate(\DateTimeImmutable $date) {
if ($date->format('H') < 17 || $date->format('H') == 18 && $date->format('i') < 30) {
if (intval($date->format('H')) < 17 || intval($date->format('H')) === 18 && intval($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') != 6) {
if (intval($date->format('N')) !== 6) {
return $this->prevDate($date->sub(new \DateInterval('P1D')));
}
if ($date->format('W') % 2) {
if (intval($date->format('W')) % 2) {
return $this->prevDate($date->sub(new \DateInterval('P7D')));
}

View File

@@ -8,14 +8,14 @@ use pvv\side\Activity;
class NerdepitsaActivity implements Activity {
public function nextDate(\DateTimeImmutable $date) {
if ($date->format('H') > 19) {
if (intval($date->format('H')) > 19) {
return $this->nextDate($date->add(new \DateInterval('P1D'))->setTime(19, 0, 0));
}
$date = $date->setTime(19, 0, 0);
if ($date->format('N') != 5) {
if (intval($date->format('N')) !== 5) {
return $this->nextDate($date->add(new \DateInterval('P1D')));
}
if ($date->format('W') % 2) {
if (intval($date->format('W')) % 2) {
return $this->nextDate($date->add(new \DateInterval('P7D')));
}
@@ -23,14 +23,14 @@ class NerdepitsaActivity implements Activity {
}
public function prevDate(\DateTimeImmutable $date) {
if ($date->format('H') < 19) {
if (intval($date->format('H')) < 19) {
return $this->prevDate($date->sub(new \DateInterval('P1D'))->setTime(19, 0, 0));
}
$date = $date->setTime(19, 0, 0);
if ($date->format('N') != 5) {
if (intval($date->format('N')) !== 5) {
return $this->prevDate($date->sub(new \DateInterval('P1D')));
}
if ($date->format('W') % 2) {
if (intval($date->format('W')) % 2) {
return $this->prevDate($date->sub(new \DateInterval('P7D')));
}

View File

@@ -55,6 +55,7 @@ $day = (isset($_GET['day']))
<em><?php echo $event->getRelativeDate(); ?></em>
<?php if (Agenda::isToday($event->getStart())) { ?></strong><?php } ?>
<?php if ($event->getURL()) { ?>
<br>
<a href="<?php echo $event->getURL(); ?>"><?php echo $event->getName(); ?></a>
<?php } else { ?>
<?php echo $event->getName(); ?>

View File

@@ -11,7 +11,6 @@ h2 em {
font-size: .5em;
line-height: 2em;
float: left;
margin-right: 1em;
border: .1em solid gray;
padding: 0 1em;
border-radius: .25em;
@@ -107,7 +106,6 @@ p + .subtext {
}
@media screen and (max-width: 50rem) {
h2 {
text-align: center;
position: relative;
border-bottom-left-radius: 0.3em;
border-bottom-right-radius: 0.3em;
@@ -133,4 +131,8 @@ p + .subtext {
article >.subtext {
margin-top: -1em !important;
}
.subtext li {
display: block;
}
}

View File

@@ -45,6 +45,7 @@ main {
.serviceContent {
flex-grow: 1;
margin-right: 4%;
}
.serviceTitle {
@@ -91,3 +92,18 @@ main {
}
}
@media (max-width: 400px) {
.serviceImage {
width: 25%;
height: auto;
}
.serviceContent {
width: 50%;
}
}
@media (max-width: 360px) {
.serviceContent {
font-size: 14px;
}
}

View File

@@ -66,9 +66,5 @@ $translation = ['I dag', 'I morgen', 'Denne uka', 'Neste uke', 'Denne måneden',
<?php } ?>
<?php } ?>
<div style="text-align: center; margin-bottom: 2em;">
<a style="padding-left: 2em; padding-right: 2em;" class="btn" style="" href="../kalender/">Kalender</a>
</div>
</main>
</body>

View File

@@ -37,7 +37,7 @@ if (!$event) {
<?php if (Agenda::isToday($event->getStart())) { ?><strong><?php } ?>
<em><?php echo $event->getRelativeDate(); ?></em>
<?php if (Agenda::isToday($event->getStart())) { ?></strong><?php } ?>
<br>
<?php echo $event->getName(); ?>
</h2>
<ul class="subtext">

View File

@@ -109,6 +109,8 @@ $doorTime = date('H:i', $doorEntry->time);
</div>
<div class="gridl">
<img src="/sosiale/fadderuke-2025.png" width="100%">
<br>
<?php
$title = $motd['title'];

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

View File

@@ -129,29 +129,29 @@ require_once \dirname(__DIR__, 2) . implode(\DIRECTORY_SEPARATOR, ['', 'inc', 'i
<div class="service">
<div class="serviceContent">
<h2 class="serviceTitle">Proxmox @joshua</h2>
<p class="serviceDescription">Joshua er en av våre VM-tjenere, her kan du kjøre enten fulle VM-er eller konteinere. Bare Drift har tilgang på disse tjenerne.</p>
<div class="serviceLink"><a href="https://joshua.pvv.ntnu.no:8006" target="_blank">Gå til joshua.pvv.ntnu.no</a></div>
<h2 class="serviceTitle">Proxmox @blossom</h2>
<p class="serviceDescription">Blossom er den sterkeste av våre VM-tjenere, her kan du kjøre enten fulle VM-er eller konteinere. Bare Drift har tilgang på disse tjenerne.</p>
<div class="serviceLink"><a href="https://blossom.pvv.ntnu.no:8006" target="_blank">Gå til blossom.pvv.ntnu.no</a></div>
</div>
<img class="serviceImage" src="img/proxmox.png" alt="Proxmox-logo">
</div>
<div class="service">
<div class="serviceContent">
<h2 class="serviceTitle">Proxmox @andresbu</h2>
<p class="serviceDescription">Andresbu er en kraftigere VM-tjener, men har fortsatt en del rusk i maskineriet.</p>
<div class="serviceLink"><a href="https://andresbu.pvv.ntnu.no:8006" target="_blank">Gå til andresbu.pvv.ntnu.no</a></div>
<h2 class="serviceTitle">Proxmox @bubbles</h2>
<p class="serviceDescription">Bubbles er den svakeste av våre VM-tjenere.</p>
<div class="serviceLink"><a href="https://bubbles.pvv.ntnu.no:8006" target="_blank">Gå til bubbles.pvv.ntnu.no</a></div>
</div>
<img class="serviceImage" src="img/proxmox.png" alt="Proxmox-logo">
</div>
<div class="service">
<div class="serviceContent">
<h2 class="serviceTitle">ESXI @asgore</h2>
<p class="serviceDescription">Asgore er vår eldste og største VM-tjener, og kjører ESXI.</p>
<div class="serviceLink"><a href="https://asgore.pvv.ntnu.no" target="_blank">Gå til asgore.pvv.ntnu.no</a></div>
<h2 class="serviceTitle">Proxmox @buttercup</h2>
<p class="serviceDescription">Buttercup er en av våre VM-tjenere.</p>
<div class="serviceLink"><a href="https://buttercup.pvv.ntnu.no:8006" target="_blank">Gå til buttercup.pvv.ntnu.no</a></div>
</div>
<img class="serviceImage" src="img/esxi.png" alt="ESXI-logo">
<img class="serviceImage" src="img/proxmox.png" alt="Proxmox-logo">
</div>
</div>
</div>
@@ -164,7 +164,7 @@ require_once \dirname(__DIR__, 2) . implode(\DIRECTORY_SEPARATOR, ['', 'inc', 'i
<div class="serviceContent">
<h2 class="serviceTitle">Minecraft</h2>
<p class="serviceDescription">Vi har en egen Minecraft-server <b>for medlemmer</b>, som du kan koble til med IP-adressen <b>minecraft.pvv.ntnu.no</b>. Spør om whitelist på matrix/discord.</p>
<div class="serviceLink"><a href="https://isvegg.pvv.ntnu.no/kart/" target="_blank">Gå til verdenskartet vårt</a></div>
<div class="serviceLink"><a href="https://minecraft.pvv.ntnu.no" target="_blank">Gå til verdenskartet vårt</a></div>
</div>
<img class="serviceImage" src="img/minecraft.png" alt="Minecraft-logo">
</div>