Compare commits
10 Commits
www2-www-f
...
spaceapi
Author | SHA1 | Date | |
---|---|---|---|
9d8b14a08b
|
|||
0542a10d03
|
|||
c6df8e6ae3 | |||
aebc14ccb5 | |||
13a6df92ce | |||
f87c6820d7
|
|||
592c6d46c4
|
|||
9d9d99e6ba | |||
216e153f89 | |||
d528df5f99 |
@@ -196,6 +196,9 @@ in
|
|||||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME ${finalPackage}/share/php/pvv-nettsiden/www$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME ${finalPackage}/share/php/pvv-nettsiden/www$fastcgi_script_name;
|
||||||
fastcgi_pass unix:${config.services.phpfpm.pools."pvv-nettsiden".socket};
|
fastcgi_pass unix:${config.services.phpfpm.pools."pvv-nettsiden".socket};
|
||||||
|
location = /spaceapi.php {
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# based on https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#configuring-nginx
|
# based on https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#configuring-nginx
|
||||||
@@ -217,14 +220,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
${cfg.settings.GALLERY.SERVER_PATH} = {
|
"^~ ${cfg.settings.GALLERY.SERVER_PATH}" = {
|
||||||
root = cfg.settings.GALLERY.DIR;
|
root = cfg.settings.GALLERY.DIR;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
rewrite ^${cfg.settings.GALLERY.SERVER_PATH}/(.*)$ /$1 break;
|
rewrite ^${cfg.settings.GALLERY.SERVER_PATH}/(.*)$ /$1 break;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
${cfg.settings.SLIDESHOW.SERVER_PATH} = {
|
"^~ ${cfg.settings.SLIDESHOW.SERVER_PATH}" = {
|
||||||
root = cfg.settings.SLIDESHOW.DIR;
|
root = cfg.settings.SLIDESHOW.DIR;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
rewrite ^${cfg.settings.SLIDESHOW.SERVER_PATH}/(.*)$ /$1 break;
|
rewrite ^${cfg.settings.SLIDESHOW.SERVER_PATH}/(.*)$ /$1 break;
|
||||||
|
@@ -53,8 +53,11 @@ function getDirContents($dir, &$results = array()) {
|
|||||||
$images = getDirContents($galleryDir);
|
$images = getDirContents($galleryDir);
|
||||||
|
|
||||||
function cmpModifyTime($a, $b) {
|
function cmpModifyTime($a, $b) {
|
||||||
|
global $galleryDir;
|
||||||
|
|
||||||
$mtime_a = filemtime($galleryDir . $a);
|
$mtime_a = filemtime($galleryDir . $a);
|
||||||
$mtime_b = filemtime($galleryDir . $b);
|
$mtime_b = filemtime($galleryDir . $b);
|
||||||
|
|
||||||
return ($mtime_a > $mtime_b) ? -1 : 1;
|
return ($mtime_a > $mtime_b) ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
68
www/spaceapi.php
Normal file
68
www/spaceapi.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'inc', 'include.php']);
|
||||||
|
|
||||||
|
$pdo = new \PDO($DB_DSN, $DB_USER, $DB_PASS);
|
||||||
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
$door = new \pvv\side\Door($pdo);
|
||||||
|
$doorEntry = (object)($door->getCurrent());
|
||||||
|
|
||||||
|
?>
|
||||||
|
{
|
||||||
|
"api_compatibility": ["14"],
|
||||||
|
"space": "Programvareverkstedet",
|
||||||
|
"logo": "https://git.pvv.ntnu.no/assets/img/logo.png",
|
||||||
|
"url": "https://www.pvv.ntnu.no/",
|
||||||
|
"location": {
|
||||||
|
"ext_campus": "NTNU Gløshaugen",
|
||||||
|
"ext_room_name": "Oppredning/Gruvedrift, Floor 2, Room 247",
|
||||||
|
"ext_mazemap": "https://link.mazemap.com/2n2HWa7H",
|
||||||
|
"address": "Sem Sælands vei 1, 7034 Trondheim, Norway",
|
||||||
|
"timezone": "Europe/Oslo",
|
||||||
|
"lon": 10.242,
|
||||||
|
"lat": 63.250
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"irc": "irc://irc.pvv.ntnu.no/pvv",
|
||||||
|
"email": "pvv@pvv.ntnu.no",
|
||||||
|
"ext_discord": "https://discord.gg/8VTBr6Q",
|
||||||
|
"gopher": "gopher://isvegg.pvv.ntnu.no",
|
||||||
|
"matrix": "#pvv:pvv.ntnu.no"
|
||||||
|
},
|
||||||
|
"issue_report_channels": ["email"],
|
||||||
|
"state": {
|
||||||
|
"open": <?php echo($doorEntry->open ? "true" : "false"); ?>,
|
||||||
|
"lastchange": <?php echo($doorEntry->time ? $doorEntry->time : 0); ?>,
|
||||||
|
"message": "<?php echo($doorEntry->open ? "open for public, members are present" : "closed"); ?>"
|
||||||
|
},
|
||||||
|
"feeds": {
|
||||||
|
"wiki": {
|
||||||
|
"type": "atom",
|
||||||
|
"url": "https://www.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&action=feedrecentchanges&feedformat=atom"
|
||||||
|
},
|
||||||
|
"calendar": {
|
||||||
|
"type": "html",
|
||||||
|
"url": "https://www.pvv.ntnu.no/hendelser/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"projects": [
|
||||||
|
"https://github.com/Programvareverkstedet/",
|
||||||
|
"https://git.pvv.ntnu.no/",
|
||||||
|
"https://www.pvv.ntnu.no/prosjekt/"
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"name": "YouTube",
|
||||||
|
"url": "https://www.youtube.com/@pvvntnu5640"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LinkedIn",
|
||||||
|
"url": "https://www.linkedin.com/company/pvvntnu/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Facebook",
|
||||||
|
"url": "https://www.facebook.com/pvvntnu/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
BIN
www/tjenester/img/gitea.png
Normal file
BIN
www/tjenester/img/gitea.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 40 KiB |
@@ -27,6 +27,15 @@ require_once dirname(dirname(__DIR__)) . implode(DIRECTORY_SEPARATOR, ['', 'inc'
|
|||||||
<div class="categoryLabel">Versjonskontroll og utvikling</div>
|
<div class="categoryLabel">Versjonskontroll og utvikling</div>
|
||||||
<div class="categoryContent">
|
<div class="categoryContent">
|
||||||
|
|
||||||
|
<div class="service">
|
||||||
|
<div class="serviceContent">
|
||||||
|
<h2 class="serviceTitle">Gitea</h2>
|
||||||
|
<p class="serviceDescription">Vår interne git-tjener, åpen for alle medlemmer</p>
|
||||||
|
<div class="serviceLink"><a href="https://git.pvv.ntnu.no" target="_blank">Gå til git.pvv.ntnu.no</a></div>
|
||||||
|
</div>
|
||||||
|
<img class="serviceImage" src="img/gitea.png" alt="Gitea-logo">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="service">
|
<div class="service">
|
||||||
<div class="serviceContent">
|
<div class="serviceContent">
|
||||||
<h2 class="serviceTitle">GitHub</h2>
|
<h2 class="serviceTitle">GitHub</h2>
|
||||||
@@ -36,24 +45,6 @@ require_once dirname(dirname(__DIR__)) . implode(DIRECTORY_SEPARATOR, ['', 'inc'
|
|||||||
<img class="serviceImage" src="img/github.png" alt="GitHub-logo">
|
<img class="serviceImage" src="img/github.png" alt="GitHub-logo">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="service">
|
|
||||||
<div class="serviceContent">
|
|
||||||
<h2 class="serviceTitle">Gogs</h2>
|
|
||||||
<p class="serviceDescription">Vår interne git-tjener, åpen for alle medlemmer</p>
|
|
||||||
<div class="serviceLink"><a href="https://git.pvv.ntnu.no" target="_blank">Gå til git.pvv.ntnu.no</a></div>
|
|
||||||
</div>
|
|
||||||
<img class="serviceImage" src="img/gogs.png" alt="Gogs-logo">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="service">
|
|
||||||
<div class="serviceContent">
|
|
||||||
<h2 class="serviceTitle">Dev og Trac</h2>
|
|
||||||
<p class="serviceDescription">Trac er vårt gamle prosjektsystem. Her kan du lage og dele prosjekter om du er for hipster for github.</p>
|
|
||||||
<div class="serviceLink"><a href="https://dev.pvv.ntnu.no/projects/pvv-dev/" target="_blank">Gå til dev.pvv.ntnu.no</a></div>
|
|
||||||
</div>
|
|
||||||
<img class="serviceImage" src="img/trac.png" alt="Trac-logo">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user