diff --git a/dlibrary/static/viewer.css b/dlibrary/static/viewer.css index ffcd40c..c78f3ab 100644 --- a/dlibrary/static/viewer.css +++ b/dlibrary/static/viewer.css @@ -88,6 +88,15 @@ html, body { #page-num { left: 10px; + text-align: center; +} + +#page-num table { + border-spacing: 0; +} + +#current-page { + border-bottom: 2px solid; } #duration { diff --git a/dlibrary/static/viewer.js b/dlibrary/static/viewer.js index b6cab82..3803801 100644 --- a/dlibrary/static/viewer.js +++ b/dlibrary/static/viewer.js @@ -61,22 +61,21 @@ document.addEventListener('DOMContentLoaded', () => { const display = document.getElementById('image-container'); display.style.backgroundImage = `url("${current.src}")`; - document.getElementById('page-num') - .innerText = [ - (pageNum + 1).toLocaleString(), - pages.length.toLocaleString() - ].join('\u200a/\u200a'); + document.getElementById('current-page').innerText = (pageNum + 1).toLocaleString(); } + const durationDisplay = document.getElementById('duration'); function changeDuration(secs, pause) { duration = secs; localStorage.setItem(`${WORK_ID}-duration`, duration); paused = pause; - document.getElementById('duration').textContent = (paused ? '[paused] ' : '') + duration.toLocaleString() + 's'; + durationDisplay.textContent = duration.toLocaleString() + 's'; if (paused) { + durationDisplay.style.textDecoration = "line-through"; stopTimer(); } else { + durationDisplay.style.textDecoration = ""; startTimer(); } } diff --git a/dlibrary/templates/viewer.html b/dlibrary/templates/viewer.html index 86c44d3..a2d61fd 100644 --- a/dlibrary/templates/viewer.html +++ b/dlibrary/templates/viewer.html @@ -15,7 +15,12 @@ {% endfor %}
-
+
+ + + +
{{ images | length }}
+