7 Commits

7 changed files with 28 additions and 27 deletions

View File

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

View File

@@ -217,14 +217,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;

View File

@@ -52,6 +52,17 @@ function getDirContents($dir, &$results = array()) {
} }
$images = getDirContents($galleryDir); $images = getDirContents($galleryDir);
function cmpModifyTime($a, $b) {
global $galleryDir;
$mtime_a = filemtime($galleryDir . $a);
$mtime_b = filemtime($galleryDir . $b);
return ($mtime_a > $mtime_b) ? -1 : 1;
}
usort($images, "cmpModifyTime");
$imageTemplate = ' $imageTemplate = '
<div class="card"> <div class="card">
<div class="card-image-div"> <div class="card-image-div">
@@ -105,7 +116,6 @@ $imageTemplate = '
$vars = [ $vars = [
"%user" => htmlspecialchars($imguser), "%user" => htmlspecialchars($imguser),
"%time" => $modTime, "%time" => $modTime,
"%timestamp" => filemtime($galleryDir . $value),
"%name" => htmlspecialchars($displaypath), "%name" => htmlspecialchars($displaypath),
"%path" => $serverPath . $value, "%path" => $serverPath . $value,
"%thumbnail" => $serverPath . "/.thumbnails" . $value . ".png", "%thumbnail" => $serverPath . "/.thumbnails" . $value . ".png",

View File

@@ -21,7 +21,7 @@ function stepSlideshow(imgs) {
//Change source to next picture after it is faded out //Change source to next picture after it is faded out
slideshowIndex = (slideshowIndex + 1) % imgs.length; slideshowIndex = (slideshowIndex + 1) % imgs.length;
ssi2.src = slideshowFnames[slideshowIndex]; ssi2.src = slideshowFnames[slideshowIndex];
}, 800); }, 1000);
} }
//Initialize slideshow, start interval //Initialize slideshow, start interval
@@ -29,4 +29,4 @@ if (slideshowFnames.length > 1) {
slideshowInterval = setInterval(()=>{ slideshowInterval = setInterval(()=>{
stepSlideshow(slideshowFnames); stepSlideshow(slideshowFnames);
}, SLIDESHOWDELAYMS); }, SLIDESHOWDELAYMS);
} }

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

View File

@@ -28,31 +28,22 @@ require_once dirname(dirname(__DIR__)) . implode(DIRECTORY_SEPARATOR, ['', 'inc'
<div class="categoryContent"> <div class="categoryContent">
<div class="service"> <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="serviceContent"> <div class="serviceContent">
<h2 class="serviceTitle">GitHub</h2> <h2 class="serviceTitle">GitHub</h2>
<p class="serviceDescription">Våre offentlige kodebrønner, åpent for verden!</p> <p class="serviceDescription">Våre offentlige kodebrønner, åpent for verden!</p>
<div class="serviceLink"><a href="https://github.com/Programvareverkstedet/" target="_blank">Gå til GitHub</a></div> <div class="serviceLink"><a href="https://github.com/Programvareverkstedet/" target="_blank">Gå til GitHub</a></div>
</div> </div>
<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>