diff --git a/dlibrary/static/viewer.css b/dlibrary/static/viewer.css index 9045ee9..31181aa 100644 --- a/dlibrary/static/viewer.css +++ b/dlibrary/static/viewer.css @@ -4,3 +4,26 @@ html, body { padding: 0; margin: 0; } + +#button-next, #button-prev { + position: fixed; + bottom: 0px; + width: 30vw; + height: 100vh; +} + +#button-next { + left: 0px; +} + +#button-prev { + right: 0px; +} + +#button-back { + position: fixed; + top: 0px; + left: 30vw; + width: 40vw; + height: 20vh; +} diff --git a/dlibrary/static/viewer.js b/dlibrary/static/viewer.js index f2dd772..a3d0240 100644 --- a/dlibrary/static/viewer.js +++ b/dlibrary/static/viewer.js @@ -78,6 +78,12 @@ document.addEventListener('DOMContentLoaded', () => { } } + function exitToWork() { + changeDuration(duration, true); + localStorage.setItem(`${WORK_ID}-currentPage`, 0); + window.location.href = "../"; + } + changePage(currentPage); changeDuration(duration, paused); @@ -111,10 +117,12 @@ document.addEventListener('DOMContentLoaded', () => { } break; case 13: //enter - changeDuration(duration, true); - localStorage.setItem(`${WORK_ID}-currentPage`, 0); - window.location.href = "../"; + exitToWork(); break; } }; + + document.getElementById("button-next").onclick = () => { changePage(currentPage + 1); }; + document.getElementById("button-prev").onclick = () => { changePage(currentPage - 1); }; + document.getElementById("button-back").onclick = exitToWork; }); diff --git a/dlibrary/templates/viewer.html b/dlibrary/templates/viewer.html index 77f8076..2457287 100644 --- a/dlibrary/templates/viewer.html +++ b/dlibrary/templates/viewer.html @@ -16,5 +16,10 @@
+
+
+
+
+
{% endblock %}