From d2d0cf837b23c50b0492673477d1d0b39ae43c66 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sat, 25 May 2019 12:16:17 -0700 Subject: [PATCH] Added memorial day slideshow Signed-off-by: James Ketrenos --- frontend/slideshow.html | 165 ++++++++++++++++++++++++++++++++++++++++ server/routes/photos.js | 3 +- 2 files changed, 167 insertions(+), 1 deletion(-) create mode 100755 frontend/slideshow.html diff --git a/frontend/slideshow.html b/frontend/slideshow.html new file mode 100755 index 0000000..8575455 --- /dev/null +++ b/frontend/slideshow.html @@ -0,0 +1,165 @@ + + + + + + +
+
+
+ Loading photoset... +
+ + diff --git a/server/routes/photos.js b/server/routes/photos.js index 91bbc5c..322db5a 100755 --- a/server/routes/photos.js +++ b/server/routes/photos.js @@ -554,6 +554,7 @@ router.get("/holiday/:holiday", function(req, res/*, next*/) { /* Lookup the date for the holiday on every year from 'startYear' (1990) to today */ for (let year = startYear; year <= moment().year(); year++) { + console.log("Getting year: " + year); let holiday = moment(year + "-01-01", "YYYY-MM-DD").holiday(req.params.holiday); if (!holiday) { /* 'Leap Year' doesn't exist every year... */ @@ -573,7 +574,7 @@ router.get("/holiday/:holiday", function(req, res/*, next*/) { let direction = extraDays < 0 ? -1 : 1; for (let i = 0; i <= Math.abs(extraDays); i++) { - let comparison = "strftime('%Y-%m-%d',taken)='" + holiday.format("YYYY-MM-DD") + "'"; + let comparison = "strftime('%Y-%m-%d',taken)='" + holiday.format("YYYY-MM-DD") + "'"; /* If no holiday has been set yet, start the comparison function passed to WHERE * otherwise append it with OR. */ if (!dayIsHoliday) {