jekyll-theme-conference 2.3.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,45 @@
1
- var map;
1
+ window.conference.mapConfig = (function() {
2
2
 
3
- (function() {
4
- var map_provider = "{{ site.conference.location.map.map_provider | default: 'OpenStreetMap.Mapnik' }}";
5
- var home_coord = [{{ site.conference.location.map.home_coord }}];
6
- var default_zoom = {{ site.conference.location.map.default_zoom | default: 17 }};
3
+ let map;
7
4
 
8
- if (document.getElementById('map')) {
9
- map = L.map('map').setView(home_coord, default_zoom);
5
+ let mapProvider = "{{ site.conference.location.map.map_provider | default: 'OpenStreetMap.Mapnik' }}";
6
+ let homeCoord = [{{ site.conference.location.map.home_coord }}];
7
+ let zoomLevel = {{ site.conference.location.map.default_zoom | default: 17 }};
10
8
 
11
- L.tileLayer.provider(map_provider).addTo(map);
9
+ let setup = function (elId) {
10
+ map = L.map(elId).setView(homeCoord, zoomLevel);
11
+
12
+ L.tileLayer.provider(mapProvider).addTo(map);
12
13
 
13
14
  L.easyButton('far fa-star', function(){
14
- map.setView(home_coord, default_zoom);
15
+ map.flyTo(homeCoord, zoomLevel);
16
+ }, '{{ site.data.lang[site.conference.lang].location.focus_conf | default: "Center map on conference location" }}').addTo(map);
17
+
18
+ L.control.locate({
19
+ flyTo: true,
20
+ strings: {
21
+ title: '{{ site.data.lang[site.conference.lang].location.focus_me | default: "Show me where I am" }}'
22
+ }
15
23
  }).addTo(map);
24
+ };
25
+
26
+ let init = function () {
27
+ elId = 'map';
16
28
 
17
- L.control.locate().addTo(map);
18
- }
29
+ if (document.getElementById(elId)) {
30
+ setup(elId);
31
+ window.conference.map = map;
32
+ }
33
+ };
34
+
35
+ return {
36
+ init: init,
37
+ default: {
38
+ mapProvider: mapProvider,
39
+ homeCoord: homeCoord,
40
+ zoomLevel: zoomLevel
41
+ }
42
+ };
19
43
  })();
44
+
45
+ window.conference.mapConfig.init();
@@ -1,14 +1,15 @@
1
- (function() {
2
- $('#link-modal').on('show.bs.modal', function (event) {
3
- var button = $(event.relatedTarget);
1
+ window.conference.modal = (function () {
4
2
 
5
- var href = button.data('href');
6
- var header = button.data('header');
7
- var title = button.data('title');
8
- var footer = button.data('footer');
9
- var desc = button.data('desc');
3
+ let show = function (el, event) {
4
+ let button = $(event.relatedTarget);
10
5
 
11
- var modal = $(this);
6
+ let href = button.data('href');
7
+ let header = button.data('header');
8
+ let title = button.data('title');
9
+ let footer = button.data('footer');
10
+ let desc = button.data('desc');
11
+
12
+ let modal = $(el);
12
13
  modal.find('iframe').attr('src', href);
13
14
 
14
15
  if (header) {
@@ -18,25 +19,45 @@
18
19
  modal.find('.modal-title').text(title);
19
20
  }
20
21
  else {
21
- modal.find('.modal-title').text('')
22
+ modal.find('.modal-title').text('');
22
23
  }
23
24
 
24
25
  if (footer) {
25
- modal.find('.modal-footer').removeClass('d-none')
26
+ modal.find('.modal-footer').removeClass('d-none');
26
27
  modal.find('.modal-description').html(footer);
27
28
  }
28
29
  else if (desc) {
29
- modal.find('.modal-footer').removeClass('d-none')
30
+ modal.find('.modal-footer').removeClass('d-none');
30
31
  modal.find('.modal-description').text(desc);
31
32
  }
32
33
  else {
33
- modal.find('.modal-footer').addClass('d-none')
34
+ modal.find('.modal-footer').addClass('d-none');
34
35
  }
35
- });
36
- $('#link-modal').on('hide.bs.modal', function (event) {
37
- var modal = $(this);
36
+ };
37
+
38
+ let hide = function (el, event) {
39
+ let modal = $(el);
40
+
38
41
  modal.find('.modal-title').text('');
39
42
  modal.find('iframe').attr('src', '');
40
43
  modal.find('.modal-description').html('');
41
- });
44
+ };
45
+
46
+ let init = function() {
47
+ elSel = '#link-modal';
48
+
49
+ $(elSel).on('show.bs.modal', function (event) {
50
+ show(this, event);
51
+ });
52
+ $(elSel).on('hide.bs.modal', function (event) {
53
+ hide(this, event);
54
+ });
55
+ };
56
+
57
+ return {
58
+ init: init
59
+ };
60
+
42
61
  })();
62
+
63
+ window.conference.modal.init();
@@ -9,8 +9,11 @@
9
9
  // Vertical Scroll Sync: Syncscroll
10
10
  {% include js/syncscroll.js %}
11
11
 
12
+ // Global app variable
13
+ window.conference = {};
14
+
15
+ // Map Display Framework: Leaflet
12
16
  {% if site.conference.location.hide != true and site.conference.location.map.enable %}
13
- // Map Display Framework: Leaflet
14
17
  {% include js/leaflet.js %}
15
18
  {% include js/leaflet-easybutton.js %}
16
19
  {% include js/leaflet-locatecontrol.js %}
@@ -21,3 +24,8 @@
21
24
 
22
25
  // Bootstrap Extension: Modals
23
26
  {% include js/conference-modal.js %}
27
+
28
+ // Live
29
+ {% if site.conference.live %}
30
+ {% include js/conference-live.js %}
31
+ {% endif %}
@@ -1,10 +1,15 @@
1
1
  {% assign errors = '' | split: ',' %}
2
2
 
3
3
  {% unless site.data.lang.version %}
4
- {% assign errors = errors | push : "The internationalization file containing different strings for this template seems to be missing. Have you copied the `_data/lang.yml` file from the [theme's repository](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/blob/master/_data/lang.yml) to you local website folder?" %}
5
- {% elsif site.data.lang.version < 1 %}
4
+ {% unless site.conference.lang == "en" %}
5
+ {% assign errors = errors | push : "The internationalization file containing different strings for this template seems to be missing. Have you copied the `_data/lang.yml` file from the [theme's repository](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/blob/master/_data/lang.yml) to you local website folder?" %}
6
+ {% endunless %}
7
+ {% elsif site.data.lang.version < 3 %}
6
8
  {% assign errors = errors | push : "The internationalization file in `_data/lang.yml` seems to be outdated and does not correspond to the current version of the theme. Grab the current version from the [theme's repository](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/blob/master/_data/lang.yml)." %}
7
9
  {% endunless %}
10
+ {% unless site.conference.lang == "en" or site.conference.lang == "de" or site.conference.lang == "fr" or site.conference.lang == "pt" %}
11
+ {% assign errors = errors | push : "Unknown language selected for `site.conference.lang` parameter. Supported are `en`, `de`, `fr`, and `pt`." %}
12
+ {% endunless %}
8
13
 
9
14
  {% assign program_size = site.data.program | size %}
10
15
  {% if program_size == 0 %}
@@ -25,5 +30,5 @@
25
30
 
26
31
  {% assign main_category_size = site.conference.talks.main_categories | size %}
27
32
  {% if main_category_size == 0 %}
28
- {% assign errors = errors | push : "Your `_config.yml` configuration file does not define any main category for your talks. Have you set the `conference.talks.main_categories` property? See also [Talk Settings](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/#talk-settings-main-categories) section in the theme's README file." %}
33
+ {% assign errors = errors | push : "Your `_config.yml` configuration file does not define any main category for your talks. Have you set the `conference.talks.main_categories` property? See also [Talk Settings](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/#talk-settings) section in the theme's README file." %}
29
34
  {% endif %}
@@ -11,8 +11,8 @@
11
11
  <span aria-hidden="true">&times;</span>
12
12
  </button>
13
13
  </div>
14
- <div class="modal-body">
15
- <iframe src="" frameborder="0" allowfullscreen></iframe>
14
+ <div class="modal-body embed-responsive embed-responsive-16by9">
15
+ <iframe class="embed-responsive-item" src="" allowfullscreen></iframe>
16
16
  </div>
17
17
  <div class="modal-footer justify-content-start">
18
18
  <p class="modal-description"></p>
@@ -21,6 +21,10 @@
21
21
  </div>
22
22
  </div>
23
23
 
24
+ {% if site.conference.live.streaming %}
25
+ {% include partials/live-modal.html %}
26
+ {% endif %}
27
+
24
28
  <script src="{{ site.baseurl }}/assets/js/main.js"></script>
25
29
 
26
30
  </body>
@@ -0,0 +1,54 @@
1
+ {% for room in site.data.program %}
2
+ {% assign t = room.talks | first %}
3
+ {% include partials/get_talk_time.html %}
4
+
5
+ {% assign update_var = false %}
6
+
7
+ {% unless conf_start_hour %}
8
+ {% assign update_var = true %}
9
+ {% else %}
10
+ {% if talk_start_hour < conf_start_hour %}
11
+ {% assign update_var = true %}
12
+ {% elsif talk_start_hour == conf_start_hour and talk_start_min < conf_start_min %}
13
+ {% assign update_var = true %}
14
+ {% endif %}
15
+ {% endunless %}
16
+
17
+ {% if update_var %}
18
+ {% assign conf_start_hour = talk_start_hour %}
19
+ {% assign conf_start_min = talk_start_min %}
20
+ {% endif %}
21
+
22
+ {% assign t = room.talks | last %}
23
+ {% include partials/get_talk_time.html %}
24
+
25
+ {% assign update_var = false %}
26
+
27
+ {% unless conf_end_hour %}
28
+ {% assign update_var = true %}
29
+ {% else %}
30
+ {% if talk_end_hour > conf_end_hour %}
31
+ {% assign update_var = true %}
32
+ {% elsif talk_end_hour == conf_end_hour and talk_end_min > conf_end_min %}
33
+ {% assign update_var = true %}
34
+ {% endif %}
35
+ {% endunless %}
36
+
37
+ {% if update_var %}
38
+ {% assign conf_end_hour = talk_end_hour %}
39
+ {% assign conf_end_min = talk_end_min %}
40
+ {% endif %}
41
+ {% endfor %}
42
+
43
+ {% if conf_start_min < 10 %}
44
+ {% assign conf_start = conf_start_hour | append: ":0" | append: conf_start_min %}
45
+ {% else %}
46
+ {% assign conf_start = conf_start_hour | append: ":" | append: conf_start_min %}
47
+ {% endif %}
48
+ {% if conf_end_min < 10 %}
49
+ {% assign conf_end = conf_end_hour | append: ":0" | append: conf_end_min %}
50
+ {% else %}
51
+ {% assign conf_end = conf_end_hour | append: ":" | append: conf_end_min %}
52
+ {% endif %}
53
+
54
+ {% assign conf_duration_min = conf_end_hour | minus: conf_start_hour | times: 60 | minus: conf_start_min | plus: conf_end_min %}
@@ -1,4 +1,5 @@
1
1
 
2
+ {% assign link_disabled = link.disabled %}
2
3
  {% assign link_icon = link.icon %}
3
4
  {% assign link_iframe = link.iframe %}
4
5
 
@@ -29,7 +30,15 @@
29
30
 
30
31
  {% if talk %}
31
32
  {% capture modal_header %}
32
- <h3 class="font-weight-light">{{ talk.name }}</h3>
33
+ <h3 class="font-weight-light">
34
+ {% if talk.hide %}
35
+ {{ talk.name }}
36
+ {% else %}
37
+ <a class="text-reset" href="{{ talk.url | prepend: site.baseurl }}">
38
+ {{ talk.name }}
39
+ </a>
40
+ {% endif %}
41
+ </h3>
33
42
  <p class="mb-0 font-weight-light">
34
43
  {% include partials/list_speakers.html %}
35
44
  </p>
@@ -38,21 +47,30 @@
38
47
  {% elsif speaker %}
39
48
  {% capture modal_header %}
40
49
  <h3 class="mb-0 font-weight-light">
41
- {{ speaker.first_name }} {{ speaker.last_name }}
50
+ {% if speaker.hide %}
51
+ {{ speaker.first_name }} {{ speaker.last_name }}
52
+ {% else %}
53
+ <a class="text-reset" href="{{ speaker.url | prepend: site.baseurl }}">
54
+ {{ speaker.first_name }} {{ speaker.last_name }}
55
+ </a>
56
+ {% endif %}
42
57
  </h3>
43
58
  {% endcapture %}
44
59
  {% assign modal_desc = link.name %}
45
60
 
46
61
  {% endif %}
47
62
 
63
+ {% else %}
64
+ {% assign link_disabled = true %}
65
+
48
66
  {% endif %}
49
67
 
50
68
  {% capture link_tag -%}
51
69
  {%- if link.disabled -%}
52
- <a class="disabled{% if link_styleclass %} {{ link_styleclass }}{% endif %}">
70
+ <a class="disabled{% if link_styleclass %} {{ link_styleclass }}{% endif %}" href="#">
53
71
 
54
72
  {%- elsif link_iframe -%}
55
- <a class="cursor-pointer{% if link_styleclass %} {{ link_styleclass }}{% endif %}" title="{{ link.name }}" data-toggle="modal" data-target="#link-modal" data-href="{{ link_href }}" {% if modal_header -%}
73
+ <a {% if link_styleclass %}class="{{ link_styleclass }}"{% endif %} title="{{ link.name }}" data-toggle="modal" data-target="#link-modal" data-href="{{ link_href }}" href="#" {% if modal_header -%}
56
74
  data-header="{{ modal_header | strip_newlines | escape }}"
57
75
  {%- elsif modal_title -%}
58
76
  data-title="{{ modal_title }}"
@@ -71,3 +89,5 @@
71
89
 
72
90
  {%- endif -%}
73
91
  {%- endcapture %}
92
+
93
+ {% assign link_styleclass = "" %}
@@ -0,0 +1,4 @@
1
+ {% assign datetime_start = site.conference.live.date | append: " " | append: time_start | append: " " | append: site.conference.live.timezone %}
2
+ {% assign timestamp_start = datetime_start | date: "%s" %}
3
+ {% assign datetime_end = site.conference.live.date | append: " " | append: time_end | append: " " | append: site.conference.live.timezone %}
4
+ {% assign timestamp_end = datetime_end | date: "%s" %}
@@ -8,8 +8,21 @@
8
8
  <title>
9
9
  {% unless page.name contains '.' %}{{ page.name }} - {% else %}{% if page.title %}{{ page.title }} - {% endif %}{% endunless %}{{ site.title }}
10
10
  </title>
11
+ <meta name="description" content="{{ site.description }}" />
11
12
 
12
13
  <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/main.css" />
14
+
15
+ {%- if site.conference.live -%}
16
+ <link rel="prefetch" href="{{ site.baseurl }}/assets/icons/live.svg" />
17
+ {%- endif -%}
18
+
19
+ {%- if site.conference.live.streaming -%}
20
+ {%- for room in site.rooms -%}
21
+ {%- if room.live -%}
22
+ <link rel="preconnect" href="{{ room.live }}" />
23
+ {%- endif -%}
24
+ {%- endfor -%}
25
+ {%- endif -%}
13
26
  </head>
14
27
 
15
28
  <body class="pb-4">
@@ -0,0 +1,37 @@
1
+ <div class="modal fade" id="stream-modal" tabindex="-1" role="dialog" aria-labelledby="link-modal-label" aria-hidden="true">
2
+ <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
3
+ <div class="modal-content">
4
+ <div class="modal-header">
5
+ <h5 class="modal-title">
6
+ {{ site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" }}
7
+ </h5>
8
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
9
+ <span aria-hidden="true">&times;</span>
10
+ </button>
11
+ </div>
12
+ <div class="modal-body embed-responsive embed-responsive-16by9">
13
+ <iframe class="embed-responsive-item" src="" allowfullscreen></iframe>
14
+ <div id="stream-placeholder" class="embed-responsive-item d-none justify-content-center align-items-center">
15
+ <div></div>
16
+ </div>
17
+ </div>
18
+ <div class="modal-footer justify-content-around">
19
+ {% for r in site.data.program %}
20
+ {% assign room = site.rooms | where: 'name', r.room | first %}
21
+
22
+ <a id="stream-button{{ forloop.index }}" href="#" class="btn btn-outline-primary d-none d-sm-inline {% unless room.live %}disabled{% endunless %}" role="button" data-room="{{ room.name }}">
23
+ {{ room.name }}
24
+ </a>
25
+ {% endfor %}
26
+ <div class="form-group w-100 d-block d-sm-none">
27
+ <select class="form-control" id="stream-select">
28
+ {% for r in site.data.program %}
29
+ {% assign room = site.rooms | where: 'name', r.room | first %}
30
+ <option {% unless room.live %}disabled{% endunless %}>{{ room.name }}</option>
31
+ {% endfor %}
32
+ </select>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
@@ -0,0 +1,19 @@
1
+ {% if site.conference.live %}
2
+ {% assign time_start = t.time_start %}
3
+ {% assign time_end = t.time_end %}
4
+ {% include partials/get_timestamp.html %}
5
+
6
+ {%- if site.conference.live.streaming -%}
7
+ <a title="{{ link.name }}" data-toggle="modal" data-target="#stream-modal" data-room="{{ r.room }}" href="#"
8
+ {%- else -%}
9
+ <span
10
+ {%- endif %} class="live-show live-button badge badge-dark font-weight-normal text-left d-none {{ live_button_styleclass }}" data-start="{{ timestamp_start }}" data-end="{{ timestamp_end }}">
11
+ <object data="{{ site.baseurl }}/assets/icons/live.svg" type="image/svg+xml">!</object>
12
+ {{ site.data.lang[site.conference.lang].live.live | default: "Live" }}
13
+ {%- if site.conference.live.streaming -%}
14
+ </a>
15
+ {%- else -%}
16
+ </span>
17
+ {%- endif -%}
18
+ {% assign live_button_styleclass = "" %}
19
+ {% endif %}
@@ -26,6 +26,36 @@
26
26
  {% endfor %}
27
27
  </div>
28
28
  </li>
29
+
30
+ {% elsif link.live %}
31
+ {% include partials/get_conf_time.html %}
32
+ {% assign time_start = conf_start %}
33
+ {% assign time_end = conf_end %}
34
+ {% include partials/get_timestamp.html %}
35
+
36
+ {% assign offset_start = site.conference.live.streaming.start_early | default: 0 %}
37
+ {% assign offset_end = site.conference.live.streaming.end_late | default: 0 %}
38
+ {% assign timestamp_start = offset_start | times: -60 | plus: timestamp_start %}
39
+ {% assign timestamp_end = offset_end | times: 60 | plus: timestamp_end %}
40
+
41
+ <li class="nav-item live-show d-none" data-start="{{ timestamp_start }}" data-end="{{ timestamp_end }}">
42
+ {% if site.conference.live.streaming %}
43
+ <a class="nav-link" title="{% if link.name %}{{ link.name }}{% else %}{{ site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" }}{% endif %}" data-toggle="modal" data-target="#stream-modal" data-room="" href="#">
44
+ {% else %}
45
+ {% assign link_styleclass = "nav-link" %}
46
+ {% include partials/get_link.html %}
47
+ {{ link_tag }}
48
+ {% endif %}
49
+
50
+ {{ link.name | default: "" }}
51
+
52
+ <span class="live-button badge badge-dark font-weight-normal text-left">
53
+ <object data="{{ site.baseurl }}/assets/icons/live.svg" type="image/svg+xml">!</object>
54
+ {{ site.data.lang[site.conference.lang].live.live | default: "Live" }}
55
+ </span>
56
+ </a>
57
+ </li>
58
+
29
59
  {% else %}
30
60
  <li class="nav-item {% if page.url contains link.relative_url %}active{% endif %}">
31
61
  {% assign link_styleclass = "nav-link" %}