Skip to content

Commit

Permalink
Allow external link for live button instead of streaming modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzschmid committed Feb 14, 2021
1 parent ef32375 commit 51c5601
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 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 (3.0.4)
jekyll-theme-conference (3.1.0)
jekyll (~> 4.0)

GEM
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,16 @@ conference:

In order to help users navigating the program during the congress, a _Live_ indication can be shown next to talks which are currently taking place. A small JavaScript functions keeps the site automatically up-to-date (without the need to refresh) showing the indication as soon as the talk has started and hiding it once it is over (according to the timetable indicated in the `_data/program.yml` file).

This can be further extended if some of the talks have an associated live stream: Upon clicking one of the live indications a modal will open containing the corresponding live stream embedded. The URL to the live stream has to be set via `live` property in each room (see the _Content_ > _Room_ section below).
This can be further extended if some of the talks have an associated live stream: Upon clicking one of the live indications a modal will open containing the corresponding live stream embedded. The URL to the live stream has to be set via `live` property in each room (see the _Content_ > _Room_ section below). Instead of opening the modal an external link can also be used.

In order to activate the functionality, each day in the `program.yml` file must contain a `date` property (see section _Content_ > _Schedule / Program_ below) and the `live` property has to be set in the configuration file containing

- how long a pause between two consecutive talks has to be for the live indication to pause (`time_stop`),
- optionally if streaming is enabled (`streaming`) with indications
+ how many minutes the stream goes active before a talk (`time_prepend`),
+ how many minutes the stream stays active after a talk (`time_extend`), and
+ how long a pause between two consecutive talks has to be for the stream to pause (`time_pause`),
+ how many minutes the stream stays active after a talk (`time_extend`),
+ how long a pause between two consecutive talks has to be for the stream to pause (`time_pause`), and
+ optionally an external (absolute) link to which the user will be redirected instead of opening the modal (`external`),
- optionally a demo mode setting, whereby the JavaScript function cycles through the entire program in five minutes for demonstration purposes (`demo: true`, default: `false`).

```yaml
Expand Down
13 changes: 12 additions & 1 deletion _includes/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@

<li class="nav-item live-show d-none" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
{%- if site.conference.live.streaming %}
<a class="nav-link" title="{% if link.name %}{{ link.name }}{% else %}{{ site.data.lang[site.conference.lang].live.stream | default: "Live Stream" }}{% endif %}" data-toggle="modal" data-target="#stream-modal" data-room="" href="#">
<a class="nav-link" title="
{%- if link.name -%}
{{- link.name -}}
{%- else -%}
{{- site.data.lang[site.conference.lang].live.stream | default: "Live Stream" -}}
{%- endif -%}
" {% if site.conference.live.streaming.external -%}
href="{{ site.conference.live.streaming.external }}"
{%- else -%}
data-toggle="modal" data-target="#stream-modal" data-room="{{ r.name }}" href="#"
{%- endif -%}
>
{%- else %}
{%- assign link_styleclass = "nav-link" -%}
{%- include partials/get_link.html %}
Expand Down
6 changes: 5 additions & 1 deletion _includes/partials/show_live_button.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
{%- include partials/get_talk_timestamp.html -%}

{%- if site.conference.live.streaming -%}
<a title="{{ link.name }}" data-toggle="modal" data-target="#stream-modal" data-room="{{ r.name }}" href="#"
<a title="{{ link.name }}" {% if site.conference.live.streaming.external -%}
href="{{ site.conference.live.streaming.external }}"
{%- else -%}
data-toggle="modal" data-target="#stream-modal" data-room="{{ r.name }}" href="#"
{%- endif -%}
{%- else -%}
<span
{%- endif %} class="live-show live-button badge badge-dark font-weight-normal text-center d-none {{ live_button_styleclass }}" data-start="{{ timestamp_start }}" data-end="{{ timestamp_end }}">
Expand Down
2 changes: 1 addition & 1 deletion jekyll-theme-conference.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-conference"
spec.version = "3.0.4"
spec.version = "3.1.0"
spec.authors = ["Lorenz Schmid"]
spec.email = ["lorenzschmid@users.noreply.github.com"]

Expand Down

0 comments on commit 51c5601

Please sign in to comment.