player view
This commit is contained in:
parent
00b87ddda7
commit
a1f7684ff7
3 changed files with 12 additions and 3 deletions
|
@ -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(`<a href="/polis+film/${film.id}/">${title_en}${director}</a>`)
|
||||
html.push(`<a href="/video/${film.id}/">${title_en}${director}</a>`)
|
||||
} else {
|
||||
var director = film.director ? ` (${film.director[1]})` : ''
|
||||
html.push(`<a href="/polis+film/${film.id}/">${title_zh}${director}</a>`)
|
||||
html.push(`<a href="/video/${film.id}/">${title_zh}${director}</a>`)
|
||||
}
|
||||
})
|
||||
var films = html.length == 1 ? 'Film' : 'Films'
|
||||
|
|
5
app/static/js/player.js
Normal file
5
app/static/js/player.js
Normal file
|
@ -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)
|
|
@ -39,5 +39,9 @@
|
|||
var config = {{ text.json | safe }};
|
||||
var pandoraURL = "{{ pandora_url }}";
|
||||
</script>
|
||||
<script src="/static/js/ascroll.js?2"></script>
|
||||
{% if text.data.view == 'player' %}
|
||||
<script src="/static/js/player.js"></script>
|
||||
{% else %}
|
||||
<script src="/static/js/ascroll.js"></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue