Skip to content

Commit

Permalink
Add current talk to streaming modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzschmid committed Nov 15, 2020
1 parent a1717b6 commit 36274a0
Show file tree
Hide file tree
Showing 9 changed files with 311 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
jekyll-theme-conference (2.5.2)
jekyll-theme-conference (2.5.3)
jekyll (~> 4.0)

GEM
Expand Down
54 changes: 53 additions & 1 deletion _data/lang.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 3
version: 4

en:
pronoun:
Expand All @@ -12,6 +12,19 @@ en:
streaming: Live Stream
pre_stream: Live stream has not started yet.
post_stream: Live stream has ended.
time:
in: in
since: since
weeks: weeks
week: week
days: days
day: day
hours: hours
hour: hour
minutes: minutes
minute: minute
soon: soon
now: now
location:
title: Location
directions: Directions
Expand Down Expand Up @@ -41,6 +54,19 @@ de:
streaming: Live Stream
pre_stream: Der Live Stream hat noch nicht begonnen.
post_stream: Der Live Stream ist beendet.
time:
in: in
since: seit
weeks: Wochen
week: Woche
days: Tagen
day: Tag
hours: Stunden
hour: Stunde
minutes: Minuten
minute: Minute
soon: demnächst
now: jetzt
location:
title: Örtlichkeit
directions: Anfahrt
Expand Down Expand Up @@ -70,6 +96,19 @@ fr:
streaming: Diffusion en direct
pre_stream: La diffusion en direct n'a pas encore commencé.
post_stream: La diffusion en direct est terminée.
time:
in: dans
since: depuis
weeks: semaines
week: semaine
days: jours
day: jour
hours: heures
hour: heure
minutes: minutes
minute: minute
soon: à venir
now: maintenant
location:
title: Lieu
directions: Indications
Expand Down Expand Up @@ -99,6 +138,19 @@ pt:
streaming: Transmissão ao vivo
pre_stream: A transmissão ao vivo ainda não começou.
post_stream: A transmissão ao vivo terminou.
time:
in: em
since:
weeks: semanas
week: semana
days: dias
day: dia
hours: horas
hour: hora
minutes: minutos
minute: minuto
soon: em breve
now: agora
location:
title: Localização
directions: Indicações
Expand Down
87 changes: 87 additions & 0 deletions _includes/js/conference-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
let rooms = {
{%- for r in site.data.program -%}
{%- assign room = site.rooms | where: 'name', r.room | first -%}
{%- if room.live -%}

{%- assign t = r.talks | first -%}
{%- include partials/get_talk_time.html -%}
{%- assign time_start = talk_start -%}
{%- assign time_end = talk_end -%}
{%- include partials/get_timestamp.html -%}

{%- assign offset_start = site.conference.live.streaming.start_early | default: 0 -%}
{%- assign room_ts_start = offset_start | times: -60 | plus: timestamp_start -%}

{%- assign t = r.talks | last -%}
{%- include partials/get_talk_time.html -%}
{%- assign time_start = talk_start -%}
{%- assign time_end = talk_end -%}
{%- include partials/get_timestamp.html -%}

{%- assign offset_end = site.conference.live.streaming.end_late | default: 0 -%}
{%- assign room_ts_end = offset_end | times: 60 | plus: timestamp_end -%}

"{{ room.name }}": {
"id": {{ forloop.index }},
"name": "{{ room.name }}",
"href": "{{ room.live }}",
"start": {{ room_ts_start }},
"end": {{ room_ts_end }}
},
{%- endif -%}
{%- endfor -%}
};

let speakers = {
{%- for speaker in site.speakers -%}
"{{ speaker.name }}" : {
{%- if site.conference.speakers.show_firstname -%}
"name": "{{ speaker.first_name | append: ' ' | append: speaker.last_name }}",
{%- else -%}
"name": "{{ speaker.first_name | slice: 0 | append : '. ' | append: speaker.last_name }}",
{%- endif -%}
{%- if speaker.hide -%}
"href": "",
{%- else -%}
"href": "{{ speaker.url | prepend: site.baseurl }}",
{%- endif -%}
},
{%- endfor -%}
};

let talks = {
{%- for r in site.data.program -%}
{%- assign room = site.rooms | where: 'name', r.room | first -%}
{%- if room.live -%}
"{{ room.name | replace: '"', '\"' }}": [
{%- for t in r.talks -%}
{%- assign talk = site.talks | where: 'name', t.name | first -%}
{
"name": "{{ talk.name | replace: '"', '\"' }}",

{%- unless talk.hide -%}
"href": "{{ talk.url | prepend: site.baseurl }}",
{%- else -%}
"href": "",
{%- endunless -%}

{%- include partials/get_main_category.html -%}
"color": "{{ main_cat_color }}",

"speakers": [
{%- for speaker_name in talk.speakers -%}
"{{ speaker_name}}",
{%- endfor -%}
],

{%- assign time_start = t.time_start -%}
{%- assign time_end = t.time_end -%}
{%- include partials/get_timestamp.html -%}
"start": {{ timestamp_start }},
"end": {{ timestamp_end }}
},
{%- endfor -%}
],
{%- endif -%}
{%- endfor -%}
};
Loading

0 comments on commit 36274a0

Please sign in to comment.