diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 4580f83..2cbcf11 100755 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -317,10 +317,10 @@ function renderAnnotations(config) { var title_zh = film.title.split(' / ')[1] || title_en if (config.language == 'en') { var director = film.director ? ` (${film.director[0]})` : '' - html.push(`${title_en}${director}`) + html.push(`${title_en}${director}`) } else { var director = film.director ? ` (${film.director[1]})` : '' - html.push(`${title_zh}${director}`) + html.push(`${title_zh}${director}`) } }) var films = html.length == 1 ? 'Film' : 'Films' diff --git a/app/static/js/player.js b/app/static/js/player.js new file mode 100644 index 0000000..1d1ccaf --- /dev/null +++ b/app/static/js/player.js @@ -0,0 +1,5 @@ + +var iframe = document.createElement('iframe') +iframe.src = pandoraURL + '/edits/' + config.edit + '#embed?matchRatio=true&showInfo=true' +var ascroll = document.querySelector('#ascroll') +ascroll.appendChild(iframe) diff --git a/app/templates/text.html b/app/templates/text.html index 3a409a7..c3bc487 100644 --- a/app/templates/text.html +++ b/app/templates/text.html @@ -39,5 +39,9 @@ var config = {{ text.json | safe }}; var pandoraURL = "{{ pandora_url }}"; - +{% if text.data.view == 'player' %} + +{% else %} + +{% endif %} {% endblock %}