// also supports youtube, which we could remove // from https://codepen.io/pierrinho/pen/vNLGMa sclass HImageCarousel { new L slides; record Slide(S imgURL, S html) { S html() { ret html; } Slide(S *imgURL, S title, S text) { html = htmlCombine_new( h2(title), p(text)); } } JS js() { ret JS(mlsUnindent([[ var tag = document.createElement('script'); tag.src = "https://www.youtube.com/player_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an