From b4529aaab3894707c92245332cf0b953f9f75595 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 10 Oct 2021 16:25:17 +0100 Subject: [PATCH] add titles and other edit fixes --- app/static/css/partials/_ascroll.scss | 15 ++++++++++++--- app/static/js/ascroll.js | 10 ++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/app/static/css/partials/_ascroll.scss b/app/static/css/partials/_ascroll.scss index dab8c7d..4818439 100644 --- a/app/static/css/partials/_ascroll.scss +++ b/app/static/css/partials/_ascroll.scss @@ -1,6 +1,8 @@ #ascroll { font-family: "Noton Sans"; - width: 100vw; + width: 100%; + max-width: 1080px; + margin: auto; h1 { margin: 4px; @@ -13,17 +15,24 @@ .player { position: absolute; display: none; - width: 100vw; + width: 100%; height: auto; + max-width: 1080px; + margin: auto; //transition: opacity 0.4s; } .annotation { .frame { img { - width: 100vw; + width: 100%; height: auto; } + figcaption { + text-align: right; + padding-right: 4px; + font-size: 14px; + } } .text { margin: 20px 20px; diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 8226e20..3ee9bd4 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -156,7 +156,13 @@ function loadEdit(config) { var div = document.createElement('div') div.classList.add('annotation') div.innerHTML = ` -
+
+
+ +
${clip.title}
+
+ +
${annotation.value}
` @@ -173,7 +179,7 @@ function loadEdit(config) { loaded = true let frame = ascroll.querySelector('.annotation .frame') if (frame) { - var src = `${baseURL}/${ifrst.id.split('/')[0]}/480p.webm` + var src = `${baseURL}/${first.id.split('/')[0]}/480p.webm` updatePlayer(video, frame, first['in'], src) }