jekyll-theme-conference 3.6.2 → 3.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a8a764ea9cd83ec595e33843bfc153ed9771d50fc7913b27be142c48ec911ad
4
- data.tar.gz: ed274c9834c5a2f832300d78260ddbd740471f59d53767ba34667fd4a7f2b762
3
+ metadata.gz: d1d770839517e574b06fdd019f0a69e4378e73984327e6c6c3f93f56eb4a1ff2
4
+ data.tar.gz: 9d9c91ce29f897523aef59eecfffe177f71972befc684f4982edd2c1530dc62f
5
5
  SHA512:
6
- metadata.gz: 73c23afdd2af6befe4d2986ba6c8d00f6c10173a5e6ed65da2440480b8664cbfb9986457d120dc91e6386fec3f41fac4ff548d634b2f3f54186cf90385894680
7
- data.tar.gz: dddb4b961103052da89c38d721411a9e853ee317ebf0c5c30bc163f307e6bfac1e1b2b65a2f966b5c349ffce42805f3ff44251930f5b8002abb1632b8ba8e482
6
+ metadata.gz: 3c90d5c431811772cae69566e296659c8f08d15e84fdc8fd94c11a5e28247ced8d4c6811e1e687d5ec7f7aa5a79627d6d8fc88302089bc9140a0d7c5b483c910
7
+ data.tar.gz: cb851debdc7ac29a89e4ea2821f5706d5dbcdf9587268fd54dd8a735fb0666fb06588ab692eefd8a9211cfdf442f6ee9563511bbdeb4a8f16b2ac9c7f346affd
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright 2017-2020 Lorenz Schmid
3
+ Copyright 2017-2024 Lorenz Schmid
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
data/README.md CHANGED
@@ -176,6 +176,8 @@ To get started, simply copy the desired workflow file to your repository and ada
176
176
 
177
177
  - `_tools/build.yml` -> `.github/workflows/build.yml`
178
178
 
179
+ Please note that the `Gemfile.lock` of your project must be adapted to include specific versions required by Github's workflow server, i.e. run `bundle lock --add-platform x86_64-linux` to add support for them.
180
+
179
181
 
180
182
  ## Configuration
181
183
 
@@ -288,6 +290,8 @@ conference:
288
290
  url: 'https://github.com'
289
291
  ```
290
292
 
293
+ The navigation bar automatically collapses when the available space is too small (e.g. on a smaller screen). The breakpoints are given by [Bootstrap](https://getbootstrap.com/docs/4.6/layout/overview/#responsive-breakpoints). The default breakpoint is `md` (collapsing if the screen width is smaller than 992px). It can be adapted by setting the `breakpoint` property under the `navigation` property to either `sm`, `md`, `lg`, or `xl`.
294
+
291
295
  ### Open Graph Link Preview
292
296
 
293
297
  The theme automatically includes the necessary `<meta>` tags to ease link previewing when sharing links based on the [Open Graph protocol](https://ogp.me/) and [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards). These tags control how a link is presented when shared via different platform and apps. In order to disable these `<meta>` tags add the `disable: true` setting (default: `false`) to the `link_preview` property.
data/_includes/js/live.js CHANGED
@@ -2,7 +2,7 @@ window.conference.live = (() => {
2
2
  let config;
3
3
  let lang;
4
4
 
5
- let data;
5
+ let data = {};
6
6
 
7
7
  let confStart;
8
8
  let confEnd;
@@ -117,6 +117,11 @@ window.conference.live = (() => {
117
117
  // Set and pause app time
118
118
  pauseTime();
119
119
 
120
+ if (!('days' in data)) {
121
+ console.log('Data is not loaded yet!')
122
+ return
123
+ }
124
+
120
125
  let dayIdx;
121
126
  if (!newDay) {
122
127
  dayIdx = 0;
@@ -359,17 +364,34 @@ window.conference.live = (() => {
359
364
  };
360
365
 
361
366
  const getRoom = (roomName) => {
362
- // Return room object for given room name
363
- if (roomName in data.rooms) {
364
- return data.rooms[roomName];
367
+ // Verify if data is already loaded and object populated
368
+ if ('rooms' in data && Object.keys(data.rooms).length > 0) {
369
+ // Return room object for given room name
370
+ if (roomName in data.rooms) {
371
+ return data.rooms[roomName];
372
+ }
373
+ else {
374
+ return data.rooms[Object.keys(data.rooms)[0]];
375
+ }
365
376
  }
366
377
  else {
367
- return data.rooms[Object.keys(data.rooms)[0]];
378
+ console.log('Cannot read rooms as data is not loaded yet!')
379
+ return {}
380
+ }
381
+ };
382
+
383
+ const getAllTalks = () => {
384
+ if ('talks' in data && Object.keys(data.talks).length > 0) {
385
+ return data.talks
386
+ }
387
+ else {
388
+ console.log('Cannot read talks as data is not loaded yet!')
389
+ return {}
368
390
  }
369
391
  };
370
392
 
371
393
  const getTalks = (roomName) => {
372
- if (roomName in data.talks) {
394
+ if (roomName in getAllTalks()) {
373
395
  return data.talks[roomName].map((talk) => {
374
396
  // For talks with live links, add some grace period to the end
375
397
  // time in order to prevent that the next talk is announced
@@ -380,7 +402,7 @@ window.conference.live = (() => {
380
402
  });
381
403
  }
382
404
  else {
383
- return false;
405
+ return [];
384
406
  }
385
407
  };
386
408
 
@@ -389,7 +411,7 @@ window.conference.live = (() => {
389
411
  const timeNow = time();
390
412
  const talksHere = getTalks(roomName);
391
413
 
392
- if (talksHere) {
414
+ if (talksHere.length > 0) {
393
415
  if (timeNow < talksHere[talksHere.length-1].end) {
394
416
  for (let i = 0; i < talksHere.length; i++) {
395
417
  if (timeNow < talksHere[i].end) {
@@ -398,7 +420,18 @@ window.conference.live = (() => {
398
420
  }
399
421
  }
400
422
  }
401
- return false;
423
+ return {};
424
+ };
425
+
426
+ const getSpeaker = (speakerName) => {
427
+ if ('speakers' in data && Object.keys(data.speakers).length > 0) {
428
+ if (speakerName in data.speakers) {
429
+ return data.speakers[speakerName]
430
+ }
431
+ }
432
+
433
+ console.log('Cannot read speakers as data is not loaded yet!')
434
+ return {}
402
435
  };
403
436
 
404
437
  const getNextPause = (roomName) => {
@@ -406,7 +439,7 @@ window.conference.live = (() => {
406
439
  const timeNow = time();
407
440
  const talksHere = getTalks(roomName);
408
441
 
409
- if (talksHere) {
442
+ if (talksHere.length > 0) {
410
443
  if (timeNow < talksHere[talksHere.length-1].end) {
411
444
  for (let i = 1; i < talksHere.length; i++) {
412
445
  if (timeNow < talksHere[i].start && streamPause*60 <= talksHere[i].start - talksHere[i-1].end) {
@@ -440,10 +473,10 @@ window.conference.live = (() => {
440
473
  // Update stream modal iframe:
441
474
  // Show stream with start/pause/end message (for given room) and keep updated
442
475
  const timeNow = time();
443
-
444
- const talksHere = getTalks(roomName);
445
476
  let roomStart, roomEnd;
446
- if (talksHere) {
477
+
478
+ let talksHere = getTalks(roomName);
479
+ if (talksHere.length > 0) {
447
480
  roomStart = talksHere[0].start;
448
481
  roomEnd = talksHere[talksHere.length-1].end;
449
482
  }
@@ -451,16 +484,19 @@ window.conference.live = (() => {
451
484
  // If no program for given room, take overall first and last talk
452
485
  roomStart = 0;
453
486
  roomEnd = 0;
454
- for (let roomNameTalk in data.talks) {
487
+ for (let roomNameTalk in getAllTalks()) {
455
488
  talksHere = getTalks(roomNameTalk);
456
- const crntRoomStart = talksHere[0].start;
457
- const crntRoomEnd = talksHere[talksHere.length-1].end;
458
489
 
459
- if (roomStart == 0 || roomStart > crntRoomStart) {
460
- roomStart = crntRoomStart;
461
- }
462
- if (roomEnd == 0 || roomEnd < crntRoomEnd) {
463
- roomEnd = crntRoomEnd;
490
+ if (talksHere.length > 0) {
491
+ const crntRoomStart = talksHere[0].start;
492
+ const crntRoomEnd = talksHere[talksHere.length-1].end;
493
+
494
+ if (roomStart == 0 || roomStart > crntRoomStart) {
495
+ roomStart = crntRoomStart;
496
+ }
497
+ if (roomEnd == 0 || roomEnd < crntRoomEnd) {
498
+ roomEnd = crntRoomEnd;
499
+ }
464
500
  }
465
501
  }
466
502
  }
@@ -502,14 +538,16 @@ window.conference.live = (() => {
502
538
  // Currently a talk is active
503
539
  else {
504
540
  const room = getRoom(roomName);
505
- setStreamIframeSrc(room.href);
506
-
507
- if (!freezeTime) {
508
- if (pauseNext) {
509
- streamVideoTimer = setTimeout(setStreamVideo, delayStart(pauseNext.start + streamExtend*60) * 1000, roomName);
510
- }
511
- else {
512
- streamVideoTimer = setTimeout(setStreamVideo, delayStart(roomEnd + streamExtend*60) * 1000, roomName);
541
+ if (room !== {}) {
542
+ setStreamIframeSrc(room.href);
543
+
544
+ if (!freezeTime) {
545
+ if (pauseNext) {
546
+ streamVideoTimer = setTimeout(setStreamVideo, delayStart(pauseNext.start + streamExtend*60) * 1000, roomName);
547
+ }
548
+ else {
549
+ streamVideoTimer = setTimeout(setStreamVideo, delayStart(roomEnd + streamExtend*60) * 1000, roomName);
550
+ }
513
551
  }
514
552
  }
515
553
  }
@@ -526,7 +564,7 @@ window.conference.live = (() => {
526
564
  clearInterval(streamInfoTimer);
527
565
  }
528
566
 
529
- if (talkNext && timeNow >= talkNext.start - streamPause*60) {
567
+ if (talkNext !== {} && timeNow >= talkNext.start - streamPause*60) {
530
568
  document.getElementById('stream-info').dataset.time = talkNext.start;
531
569
  document.getElementById('stream-info-time').dataset.time = talkNext.start;
532
570
 
@@ -539,8 +577,12 @@ window.conference.live = (() => {
539
577
 
540
578
  let speakerStr = '';
541
579
  for (let i = 0; i < talkNext.speakers.length; i++) {
542
- let speaker = data.speakers[talkNext.speakers[i]];
543
- if (speaker.href == '') {
580
+ let speaker = getSpeaker(talkNext.speakers[i]);
581
+
582
+ if (speaker == {}) {
583
+ speakerStr += talkNext.speakers[i] +', '
584
+ }
585
+ else if (speaker.href == '') {
544
586
  speakerStr += speaker.name +', '
545
587
  }
546
588
  else {
@@ -588,7 +630,7 @@ window.conference.live = (() => {
588
630
  }
589
631
  else if (demo) {
590
632
  let talksHere = getTalks(roomName);
591
- if (talksHere) {
633
+ if (talksHere.length > 0) {
592
634
  streamInfoTimer = setTimeout(setStreamInfo, delayStart(talksHere[0].start - streamPrepend*60) * 1000, roomName);
593
635
  }
594
636
  }
@@ -603,13 +645,15 @@ window.conference.live = (() => {
603
645
 
604
646
  // Recover room name in case of empty default
605
647
  const room = getRoom(roomName);
606
- roomName = room.name;
648
+ if (room !== {}) {
649
+ roomName = room.name;
607
650
 
608
- setStreamVideo(roomName);
609
- setStreamInfo(roomName);
651
+ setStreamVideo(roomName);
652
+ setStreamInfo(roomName);
610
653
 
611
- streamModal.find('#stream-button' + room.id).addClass('active');
612
- streamModal.find('#stream-select').val(room.id);
654
+ streamModal.find('#stream-button' + room.id).addClass('active');
655
+ streamModal.find('#stream-select').val(room.id);
656
+ }
613
657
  };
614
658
 
615
659
  const updateStream = () => {
@@ -0,0 +1,8 @@
1
+ {% assign room_live_href = '' -%}
2
+ {%- if room.live -%}
3
+ {%- if room.live.absolute_url -%}
4
+ {%- assign room_live_href = room.live.absolute_url -%}
5
+ {%- elsif room.live.relative_url -%}
6
+ {%- assign room_live_href = room.live.relative_url | prepend: site.baseurl -%}
7
+ {%- endif -%}
8
+ {%- endif -%}
@@ -22,12 +22,15 @@
22
22
  <link rel="prefetch" as="fetch" href="{{ site.baseurl }}/assets/js/data.json" type="application/json" crossorigin="anonymous" />
23
23
  {%- endif %}
24
24
 
25
- {%- if site.conference.live.streaming.enable -%}
26
- {%- for room in site.rooms -%}
25
+ {%- if site.conference.live.streaming.enable %}
26
+ {%- for room in site.rooms %}
27
27
  {%- if room.live %}
28
- <link rel="preconnect" href="{{ room.live }}" />
29
- {%- endif -%}
30
- {%- endfor -%}
28
+ {%- include partials/get_room_live_href.html %}
29
+ {%- if room_live_href %}
30
+ <link rel="preconnect" href="{{ room_live_href }}" />
31
+ {%- endif %}
32
+ {%- endif %}
33
+ {%- endfor %}
31
34
  {%- endif %}
32
35
  </head>
33
36
 
@@ -1,4 +1,4 @@
1
- <nav class="navbar navbar-expand-md navbar-light bg-light mb-3">
1
+ <nav class="navbar navbar-expand-{{ site.conference.navigation.breakpoint | default: 'md' }} navbar-light bg-light mb-3">
2
2
  <div class="container">
3
3
 
4
4
  <a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
@@ -82,7 +82,7 @@
82
82
  </div>
83
83
 
84
84
  {%- if site.conference.navigation.logo %}
85
- <div class="navbar-brand navbar-logo mr-0 w-25 text-right overflow-hidden">
85
+ <div class="navbar-brand navbar-logo mr-0 ml-1 text-right overflow-hidden">
86
86
  <a href="{{ site.conference.navigation.logo.url }}">
87
87
  {%- if site.conference.navigation.logo.img %}
88
88
  <img src="{{ site.conference.navigation.logo.img | prepend: '/assets/images/' | prepend: site.baseurl }}" class="align-middle" alt="{{ site.conference.navigation.logo.name }}" />
@@ -1,48 +1,36 @@
1
- <ul class="nav nav-pills d-print-none mb-3">
2
- <li class="nav-item">
3
- <a class="nav-link {% if page.name contains 'index' %}active{% endif %}" href="{{ site.conference.location.url | prepend: site.baseurl }}">
4
- {% if site.conference.location.navbar_title -%}
5
- {{- site.conference.location.navbar_title -}}
6
- {%- else -%}
7
- {{- site.data.lang[site.conference.lang].location.directions | default: "Directions" -}}
8
- {%- endif %}
9
- </a>
10
- </li>
11
- {%- for room in site.rooms -%}
1
+ {% assign all_hidden = true -%}
2
+ {% unless site.conference.location.hide %}
3
+ {% for room in site.rooms %}
4
+ {% unless room.hide %}
5
+ {% assign all_hidden = false %}
6
+ {% break %}
7
+ {% endunless %}
8
+ {% endfor %}
9
+ {% endunless %}
10
+
11
+ {% unless all_hidden %}
12
+ <ul class="nav nav-pills d-print-none mb-3">
12
13
  <li class="nav-item">
13
- {%- if room.hide %}
14
- <span class="nav-item nav-link disabled">
15
- {{ room.name }}
16
- </span>
17
- {%- else %}
18
- <a class="nav-link {% if this_room.name == room.name %}active{% endif %}" href="{{ room.url | prepend: site.baseurl }}">
19
- {{ room.name }}
20
- </a>
21
- {%- endif %}
14
+ <a class="nav-link {% if page.name contains 'index' %}active{% endif %}" href="{{ site.conference.location.url | prepend: site.baseurl }}">
15
+ {% if site.conference.location.navbar_title -%}
16
+ {{- site.conference.location.navbar_title -}}
17
+ {%- else -%}
18
+ {{- site.data.lang[site.conference.lang].location.directions | default: "Directions" -}}
19
+ {%- endif %}
20
+ </a>
22
21
  </li>
23
- {%- endfor -%}
24
- {%- for room in site.rooms -%}
25
- {%- assign room_displayed = false -%}
26
- {%- for d in site.data.program.days -%}
27
- {%- for r in d.rooms -%}
28
- {%- if room.name == r.name -%}
29
- {%- assign room_displayed = true -%}
30
- {%- break -%}
31
- {%- endif -%}
32
- {%- endfor -%}
33
- {%- endfor -%}
34
- {%- unless room_displayed %}
22
+ {% for room in site.rooms or site.conference.location.hide -%}
35
23
  <li class="nav-item">
36
- {%- if room.hide or site.conference.location.hide %}
24
+ {% if room.hide -%}
37
25
  <span class="nav-item nav-link disabled">
38
26
  {{ room.name }}
39
27
  </span>
40
- {%- else %}
28
+ {%- else -%}
41
29
  <a class="nav-link {% if this_room.name == room.name %}active{% endif %}" href="{{ room.url | prepend: site.baseurl }}">
42
30
  {{ room.name }}
43
31
  </a>
44
32
  {%- endif %}
45
33
  </li>
46
- {%- endunless -%}
47
- {%- endfor %}
48
- </ul>
34
+ {%- endfor %}
35
+ </ul>
36
+ {% endunless %}
@@ -11,7 +11,7 @@
11
11
  {%- unless talk_day_hide -%} {{ day_abbr }}, {% endunless -%}
12
12
  {%- assign talk_day_hide = false -%}
13
13
  {% endif -%}
14
- {{- talk_start_hour -}}:{%- if talk_start_min == 0 -%}0{%- endif -%}{{- talk_start_min -}}
14
+ {{- talk_start_hour -}}:{%- if talk_start_min < 10 -%}0{%- endif -%}{{- talk_start_min -}}
15
15
  </a>
16
16
 
17
17
  {%- assign talk_time_styleclass = "" -%}
data/_layouts/data.html CHANGED
@@ -15,13 +15,10 @@
15
15
  {%- assign first_room = true -%}
16
16
  {%- for room in site.rooms %}
17
17
  {%- if room.live -%}
18
- {%- if room.live.absolute_url -%}
19
- {%- assign room_live_href = room.live.absolute_url -%}
20
- {%- elsif room.live.relative_url -%}
21
- {%- assign room_live_href = room.live.relative_url | prepend: site.baseurl -%}
22
- {%- else -%}
18
+ {%- include partials/get_room_live_href.html -%}
19
+ {%- unless room_live_href -%}
23
20
  {%- continue -%}
24
- {%- endif -%}
21
+ {%- endunless -%}
25
22
 
26
23
  {%- unless first_room -%}
27
24
  ,
data/_layouts/page.html CHANGED
@@ -1,7 +1,7 @@
1
1
  {% include partials/header.html %}
2
2
 
3
3
  {% if page.title -%}
4
- <h1 class="font-weight-light mb-2">{{ page.title }}</h1>
4
+ <h1 class="display-5 mb-3">{{ page.title }}</h1>
5
5
  {%- endif %}
6
6
 
7
7
  {{ content }}
@@ -21,7 +21,8 @@
21
21
  <div class="col-md mb-4">
22
22
  <h3>{{ room.name }}</h3>
23
23
  <div class="embed-responsive embed-responsive-16by9">
24
- <iframe class="embed-responsive-item" src="{{ room.live }}" allowfullscreen></iframe>
24
+ {%- include partials/get_room_live_href.html %}
25
+ <iframe class="embed-responsive-item" src="{{ room_live_href }}" allowfullscreen></iframe>
25
26
  </div>
26
27
  </div>
27
28
 
@@ -79,6 +79,11 @@ ul.btn-group {
79
79
 
80
80
  // General
81
81
 
82
+ // Extend logo when collapsed navbar is shown
83
+ .navbar-collapse.show + .navbar-logo {
84
+ width: 100%;
85
+ }
86
+
82
87
  // Keep images in container
83
88
  main.container img {
84
89
  max-width: 100%;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-conference
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenz Schmid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.2.32
33
+ version: '2.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.2.32
40
+ version: '2.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,6 +86,7 @@ files:
86
86
  - _includes/partials/get_main_category.html
87
87
  - _includes/partials/get_page_description.html
88
88
  - _includes/partials/get_page_title.html
89
+ - _includes/partials/get_room_live_href.html
89
90
  - _includes/partials/get_talk_time.html
90
91
  - _includes/partials/get_talk_timestamp.html
91
92
  - _includes/partials/get_time_pronoun.html