diff --git a/frontend/src/component/photo/viewer.vue b/frontend/src/component/photo/viewer.vue index 0eec7f227..06ee18b55 100644 --- a/frontend/src/component/photo/viewer.vue +++ b/frontend/src/component/photo/viewer.vue @@ -116,6 +116,9 @@ if (this.interval) { clearInterval(this.interval); this.interval = false; + + const psp = this.$viewer.gallery; + psp.framework.removeClass(psp.container, "slide_show"); } }, onSlideshow() { @@ -129,6 +132,8 @@ psp.next(); + psp.framework.addClass(psp.container, "slide_show"); + self.interval = setInterval(() => { if (psp && typeof psp.next === "function") { psp.next(); diff --git a/frontend/src/css/viewer.css b/frontend/src/css/viewer.css index 711fc17e8..70c8bb9e9 100644 --- a/frontend/src/css/viewer.css +++ b/frontend/src/css/viewer.css @@ -54,3 +54,20 @@ -webkit-box-shadow: none; box-shadow: none; } + +@keyframes fadeInOut { + 0% { + opacity:0; + } + 30% { + opacity:1; + } +} + +.slide_show { + animation-name: fadeInOut; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + animation-duration: 2s; + animation-direction: alternate; +} \ No newline at end of file