diff --git a/app/static/css/partials/_ascroll.scss b/app/static/css/partials/_ascroll.scss index be1dfbd..523779b 100755 --- a/app/static/css/partials/_ascroll.scss +++ b/app/static/css/partials/_ascroll.scss @@ -58,6 +58,16 @@ padding: 20px 20px; font-size: 22px; line-height: 26px; + + figure { + width: 100%; + text-align: center; + } + + img { + margin: auto; + max-width: 100%; + } } } } diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index d597bf2..271b3d2 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -35,7 +35,10 @@ function setVideoSrc(video, src) { } }) } - video.src = src.replace('.webm', videoExtension) + src = src.replace('.webm', videoExtension) + if (src != video.src) { + video.src = src + } } function updatePlayer(video, frame, currentTime, out, src) { @@ -216,6 +219,7 @@ function renderAnnotation(config, video, ascroll, annotation) { if (annotation.title) { figcaption = `
${annotation.title}
` } + annotation.value = annotation.value.replace('src="/', `src="${baseURL}/`).replace('href="/', `href="${baseURL}/`) div.innerHTML = `
diff --git a/app/templates/texts.html b/app/templates/texts.html index ffb60c9..02897aa 100644 --- a/app/templates/texts.html +++ b/app/templates/texts.html @@ -6,7 +6,7 @@ {% for text in texts %}

{{ text.title | safe }}

-

{{ text.byline|safe }}

+

{{ text.byline|striptags }}

{% endfor %} {% endblock %}