Skip to content

Commit

Permalink
#7, temporary thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
king-millez committed Jan 17, 2021
1 parent 784a9fd commit 52183a9
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion legistream/act.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
act_urls = []

if(act_stream.lower_is_live):
act_urls.append({'url': act_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid'})
act_urls.append({'url': act_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid', 'thumb': 'legistream/img/thumbs/act_la.png'})

parl_title = 'Australian Capital Territory'
6 changes: 3 additions & 3 deletions legistream/fed.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
fed_urls = []

if(fed_stream.lower_is_live):
fed_urls.append({'url': fed_stream.lower_stream_url, 'title': 'House of Representatives', 'safe': 'hor-vid'})
fed_urls.append({'url': fed_stream.lower_stream_url, 'title': 'House of Representatives', 'safe': 'hor-vid', 'thumb': 'legistream/img/thumbs/fed_hor.png'})
if(fed_stream.upper_is_live):
fed_urls.append({'url': fed_stream.upper_stream_url, 'title': 'Senate', 'safe': 'sen-vid'})
fed_urls.append({'url': fed_stream.upper_stream_url, 'title': 'Senate', 'safe': 'sen-vid', 'thumb': 'legistream/img/thumbs/fed_sen.png'})
if(fed_stream.committee_is_live):
fed_urls.append({'url': fed_stream.committee_stream_url, 'title': 'Committee', 'safe': 'com-vid'})
fed_urls.append({'url': fed_stream.committee_stream_url, 'title': 'Committee', 'safe': 'com-vid', 'thumb': 'legistream/img/thumbs/fed_com.png'})

parl_title = 'Federal'
8 changes: 4 additions & 4 deletions legistream/nsw.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
nsw_urls = []

if(nsw_stream.lower_is_live):
nsw_urls.append({'url': nsw_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid'})
nsw_urls.append({'url': nsw_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid', 'thumb': 'legistream/img/thumbs/nsw_la.png'})
if(nsw_stream.upper_is_live):
nsw_urls.append({'url': nsw_stream.upper_stream_url, 'title': 'Legislative Council', 'safe': 'legislative-council-vid'})
nsw_urls.append({'url': nsw_stream.upper_stream_url, 'title': 'Legislative Council', 'safe': 'legislative-council-vid', 'thumb': 'legistream/img/thumbs/nsw_lc.png'})
if(nsw_stream.committee_is_live):
nsw_urls.append({'url': nsw_stream.committe_stream_url, 'title': 'Committee', 'safe': 'com-vid'})
nsw_urls.append({'url': nsw_stream.committe_stream_url, 'title': 'Committee', 'safe': 'com-vid', 'thumb': 'legistream/img/thumbs/nsw_com.png'})
if(nsw_stream.jubilee_is_live):
nsw_urls.append({'url': nsw_stream.jubilee_stream_url, 'title': 'Jubilee', 'safe': 'jubilee-vid'})
nsw_urls.append({'url': nsw_stream.jubilee_stream_url, 'title': 'Jubilee', 'safe': 'jubilee-vid', 'thumb': 'legistream/img/thumbs/nsw_jubilee.png'})

parl_title = 'New South Wales'
2 changes: 1 addition & 1 deletion legistream/nt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
nt_urls = []

if(nt_stream.lower_is_live):
nt_urls.append({'url': nt_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid'})
nt_urls.append({'url': nt_stream.lower_stream_url, 'title': 'Legislative Assembly', 'safe': 'legislative-assembly-vid', 'thumb': 'legistream/img/thumbs/nt_la.png'})

parl_title = 'Northern Territory'
2 changes: 1 addition & 1 deletion legistream/qld.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
qld_urls = []

if(qld_stream.is_live):
qld_urls.append({'url': qld_stream.stream_url, 'title': qld_stream.stream_title, 'safe': 'qld-vid'})
qld_urls.append({'url': qld_stream.stream_url, 'title': qld_stream.stream_title, 'safe': 'qld-vid', 'thumb': 'legistream/img/thumbs/qld_la.png'})

parl_title = 'Queensland'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions legistream/templates/legistream/stream_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ <h1 id="logo-text">{{ parl }} Parliament</h1>
{% for stream in stream_urls %}
<div class="stream-container">
<div class="video-container">
{% if stream_amount < 3 %}
<img src="{% static 'legistream/img/16x9placeholder.jpg' %}" width="600" height="338">
{% if stream_amount <= 2 %}
<img onclick="gen_widget('{{ stream.title }}', '{{ stream.url }}', '{{ stream.safe }}', `{% static 'legistream/img/back-button.png' %}`);" id='{{ stream.safe }}' class="stream-thumb" src="{% static stream.thumb %}" width="600" height="338">
{% else %}
<img onclick="gen_widget('{{ stream.title }}', '{{ stream.url }}', '{{ stream.safe }}', `{% static 'legistream/img/back-button.png' %}`);" id='{{ stream.safe }}' class="stream-thumb" src="{% static 'legistream/img/16x9placeholder.jpg' %}" width="400" height="225">
<img onclick="gen_widget('{{ stream.title }}', '{{ stream.url }}', '{{ stream.safe }}', `{% static 'legistream/img/back-button.png' %}`);" id='{{ stream.safe }}' class="stream-thumb" src="{% static stream.thumb %}" width="400" height="225">
{% endif %}
</div>
<p class="stream-label">Stream: <strong>{{ stream.title }}</strong></p>
Expand Down
1 change: 1 addition & 0 deletions legistream/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def gen_context():
return {
'dropdown_list': statuscheck.check_statuses(),
'live_parls': grammarfy(live_parls),
'stream_amount': len(live_parls),
}

def home(request):
Expand Down

0 comments on commit 52183a9

Please sign in to comment.