From 5f3866241377536bf1657fd814d29de0a3f2f083 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 26 Sep 2022 18:31:00 +0100 Subject: [PATCH] add single mode color --- app/static/js/ascroll.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 8dae309..0e30230 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -409,6 +409,11 @@ function renderSingleMode(config) { config.root.appendChild(div) var frame = div.querySelector('.frame') var text = div.querySelector('.text') + var first = config.annotations[0] + if (text && first) { + var color1 = `hsl(${first.color1.hue}, 60%, 15%)` + div.style.background = `${color1}`; + } document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) { if (config.loaded && visible) { updatePlayer(config.video, frame, config['in'], config['out'], src, config)