~singpolyma/post-part

2ea48c4319e28e730dc332e383804c139f790a17 — Stephen Paul Weber 2 years ago 49cd267
Transcriptions fade in/out
2 files changed, 4 insertions(+), 3 deletions(-)

M Main.purs
M index.scss
M Main.purs => Main.purs +2 -2
@@ 64,10 64,10 @@ triggerSpot doc n = do
  traverse_ (\(Tuple i (Tuple figure audio)) -> do
    style <- Style.style (Style.fromHTMLElement figure)
    if Just i == n then do
      Style.setProperty style "display" "block"
      Style.setProperty style "opacity" "1"
      HTMLMediaElement.play audio
    else do
      Style.setProperty style "display" "none"
      Style.setProperty style "opacity" "0"
      HTMLMediaElement.load audio
  ) (zip (1..5) figures)


M index.scss => index.scss +2 -1
@@ 183,7 183,8 @@ body > p {
	}

	&.js figure {
		display: none;
		opacity: 0;
		transition: opacity 0.75s;
		pointer-events: none;
		position: absolute;
		width: 45%;