| @@ -39,7 +39,7 @@ | |||
| ._content .fullscreen { | |||
| position: absolute; | |||
| width: auto; | |||
| width: 100%; | |||
| height: 100%; | |||
| top: 0px; | |||
| left: 50%; | |||
| @@ -48,6 +48,9 @@ | |||
| -webkit-transform: translateX(-50%); | |||
| transform: translateX(-50%); | |||
| } | |||
| ._content img.fullscreen { | |||
| width: auto; | |||
| } | |||
| #_overlay { | |||
| transition: opacity {{transition_time}}s; | |||
| @@ -83,6 +83,15 @@ function Slide(dir) { | |||
| sendfile(res, pathlib.join(dir, name)); | |||
| } | |||
| self.dirExists = function() { | |||
| try { | |||
| fs.accessSync(dir, fs.F_OK); | |||
| return true; | |||
| } catch (err) { | |||
| return false; | |||
| } | |||
| } | |||
| return self; | |||
| } | |||
| @@ -163,7 +172,8 @@ function Slideshow(dir, changeInterval) { | |||
| slideIndex += 1; | |||
| // Go to the next slide, or restart | |||
| if (slideIndex >= slides.length) { | |||
| if ((slideIndex >= slides.length) | |||
| || (!slides[slideIndex].dirExists())) { | |||
| clearInterval(interval); | |||
| init(); | |||
| } else { | |||