jekyll-theme-conference 2.4.1 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,18 @@
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);
15
16
  }, '{{ site.data.lang[site.conference.lang].location.focus_conf | default: "Center map on conference location" }}').addTo(map);
16
17
 
17
18
  L.control.locate({
@@ -20,5 +21,25 @@ var map;
20
21
  title: '{{ site.data.lang[site.conference.lang].location.focus_me | default: "Show me where I am" }}'
21
22
  }
22
23
  }).addTo(map);
23
- }
24
+ };
25
+
26
+ let init = function () {
27
+ elId = 'map';
28
+
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
+ };
24
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 %}
@@ -4,7 +4,7 @@
4
4
  {% unless site.conference.lang == "en" %}
5
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
6
  {% endunless %}
7
- {% elsif site.data.lang.version < 2 %}
7
+ {% elsif site.data.lang.version < 4 %}
8
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)." %}
9
9
  {% endunless %}
10
10
  {% unless site.conference.lang == "en" or site.conference.lang == "de" or site.conference.lang == "fr" or site.conference.lang == "pt" %}
@@ -30,5 +30,5 @@
30
30
 
31
31
  {% assign main_category_size = site.conference.talks.main_categories | size %}
32
32
  {% if main_category_size == 0 %}
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-main-categories-and-icons) 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." %}
34
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,7 +21,12 @@
21
21
  </div>
22
22
  </div>
23
23
 
24
- <script src="{{ site.baseurl }}/assets/js/main.js"></script>
24
+ {% if site.conference.live.streaming %}
25
+ {% include partials/live-modal.html %}
26
+ {% endif %}
27
+
28
+ <!-- Append build time to avoid caching of live program embedded in JavaScript file -->
29
+ <script src="{{ site.baseurl }}/assets/js/main.js?t={{ site.time | date: "%s" }}"></script>
25
30
 
26
31
  </body>
27
32
  </html>
@@ -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
 
@@ -59,14 +60,17 @@
59
60
 
60
61
  {% endif %}
61
62
 
63
+ {% else %}
64
+ {% assign link_disabled = true %}
65
+
62
66
  {% endif %}
63
67
 
64
68
  {% capture link_tag -%}
65
69
  {%- if link.disabled -%}
66
- <a class="disabled{% if link_styleclass %} {{ link_styleclass }}{% endif %}">
70
+ <a class="disabled{% if link_styleclass %} {{ link_styleclass }}{% endif %}" href="#">
67
71
 
68
72
  {%- elsif link_iframe -%}
69
- <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 -%}
70
74
  data-header="{{ modal_header | strip_newlines | escape }}"
71
75
  {%- elsif modal_title -%}
72
76
  data-title="{{ modal_title }}"
@@ -85,3 +89,5 @@
85
89
 
86
90
  {%- endif -%}
87
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,51 @@
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
+
5
+ <div class="modal-header">
6
+ <h5 class="modal-title">
7
+ {{ site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" }}
8
+ </h5>
9
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
10
+ <span aria-hidden="true">&times;</span>
11
+ </button>
12
+ </div>
13
+
14
+ <div class="modal-body embed-responsive embed-responsive-16by9">
15
+ <iframe class="embed-responsive-item" src="" allowfullscreen></iframe>
16
+ <div id="stream-placeholder" class="embed-responsive-item d-none justify-content-center align-items-center">
17
+ <div></div>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="modal-footer flex-column justify-content-start d-none live-past" id="stream-info" data-time="">
22
+ <div class="my-0 small align-self-start live-time" id="stream-info-time" data-time=""></div>
23
+ <div class="pl-3 align-self-start" id="stream-info-color">
24
+ <p class="mb-0">
25
+ <a class="text-reset" href="#" id="stream-info-talk"></a>
26
+ </p>
27
+ <p class="font-weight-light mb-0" id="stream-info-speakers"></p>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="modal-footer justify-content-around">
32
+ {% for r in site.data.program %}
33
+ {% assign room = site.rooms | where: 'name', r.room | first %}
34
+
35
+ <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 }}">
36
+ {{ room.name }}
37
+ </a>
38
+ {% endfor %}
39
+ <div class="form-group w-100 d-block d-sm-none">
40
+ <select class="form-control" id="stream-select">
41
+ {% for r in site.data.program %}
42
+ {% assign room = site.rooms | where: 'name', r.room | first %}
43
+ <option {% unless room.live %}disabled{% endunless %}>{{ room.name }}</option>
44
+ {% endfor %}
45
+ </select>
46
+ </div>
47
+ </div>
48
+
49
+ </div>
50
+ </div>
51
+ </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 %}
@@ -10,6 +10,7 @@
10
10
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
11
11
  <ul class="navbar-nav mr-auto">
12
12
  {% for link in site.conference.navigation.links %}
13
+
13
14
  {% if link.menu %}
14
15
  <li class="nav-item dropdown">
15
16
  <a class="nav-link dropdown-toggle" href="#" id="navbar-dropdown{{ forloop.index0 }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@@ -26,6 +27,36 @@
26
27
  {% endfor %}
27
28
  </div>
28
29
  </li>
30
+
31
+ {% elsif link.live %}
32
+ {% include partials/get_conf_time.html %}
33
+ {% assign time_start = conf_start %}
34
+ {% assign time_end = conf_end %}
35
+ {% include partials/get_timestamp.html %}
36
+
37
+ {% assign offset_start = site.conference.live.streaming.start_early | default: 0 %}
38
+ {% assign offset_end = site.conference.live.streaming.end_late | default: 0 %}
39
+ {% assign timestamp_start = offset_start | times: -60 | plus: timestamp_start %}
40
+ {% assign timestamp_end = offset_end | times: 60 | plus: timestamp_end %}
41
+
42
+ <li class="nav-item live-show d-none" data-start="{{ timestamp_start }}" data-end="{{ timestamp_end }}">
43
+ {% if site.conference.live.streaming %}
44
+ <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="#">
45
+ {% else %}
46
+ {% assign link_styleclass = "nav-link" %}
47
+ {% include partials/get_link.html %}
48
+ {{ link_tag }}
49
+ {% endif %}
50
+
51
+ {{ link.name | default: "" }}
52
+
53
+ <span class="live-button badge badge-dark font-weight-normal text-left">
54
+ <object data="{{ site.baseurl }}/assets/icons/live.svg" type="image/svg+xml">!</object>
55
+ {{ site.data.lang[site.conference.lang].live.live | default: "Live" }}
56
+ </span>
57
+ </a>
58
+ </li>
59
+
29
60
  {% else %}
30
61
  <li class="nav-item {% if page.url contains link.relative_url %}active{% endif %}">
31
62
  {% assign link_styleclass = "nav-link" %}
@@ -1,5 +1,5 @@
1
1
  {% if room.hide or site.conference.location.hide %}
2
- <span class="badge badge-light font-weight-normal"><i class="far fa-square"></i> {{ room.name }}</span><!--
2
+ <span class="badge badge-light font-weight-normal text-left"><i class="far fa-square"></i>&nbsp;{{ room.name }}</span><!--
3
3
  {% else %}
4
- <a href="{{ room.url | prepend: site.baseurl }}" class="badge badge-light font-weight-normal"><i class="far fa-square"></i> {{ room.name }}</a><!--
4
+ <a href="{{ room.url | prepend: site.baseurl }}" class="badge badge-light font-weight-normal"><i class="far fa-square"></i>&nbsp;{{ room.name }}</a><!--
5
5
  {% endif %}-->
@@ -1,3 +1,3 @@
1
- <span class="badge badge-light font-weight-normal">
2
- <i class="fas fa-stopwatch"></i> {{ talk_duration_min }}min
1
+ <span class="badge badge-light font-weight-normal text-left">
2
+ <i class="fas fa-stopwatch"></i>&nbsp;{{ talk_duration_min }}min
3
3
  </span>
@@ -1,3 +1,3 @@
1
- <a href="{{ site.conference.program.url | prepend: site.baseurl }}" class="badge badge-light font-weight-normal">
2
- <i class="far fa-clock"></i> {{ talk_start_hour }}:{% if talk_start_min == 0 %}0{%endif %}{{ talk_start_min }}
1
+ <a href="{{ site.conference.program.url | prepend: site.baseurl }}" class="badge badge-light font-weight-normal text-left">
2
+ <i class="far fa-clock"></i>&nbsp;{{ talk_start_hour }}:{% if talk_start_min == 0 %}0{%endif %}{{ talk_start_min }}
3
3
  </a>