jekyll-theme-conference 3.6.0 → 3.6.2

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: 0da457627a261ffda7837260a6b66294a383971e653ea3e3f05299cb8f672f8f
4
- data.tar.gz: b02dc7da45e1e76386635952414d57c0c22727fa6e4c6e0968e5e55db58266d3
3
+ metadata.gz: 3a8a764ea9cd83ec595e33843bfc153ed9771d50fc7913b27be142c48ec911ad
4
+ data.tar.gz: ed274c9834c5a2f832300d78260ddbd740471f59d53767ba34667fd4a7f2b762
5
5
  SHA512:
6
- metadata.gz: 23c9ce1a8794dc7f25d5973c3ce70fd1c3dbb599ffc73c5a5e9fe4135a001e4ca173671d2433f66b15dd0bdc517fee1637a52325a2f233107d0590b1f554563e
7
- data.tar.gz: ab334e1c2cd367f9ff3eebbc4d00760fc19a0ea0a1a7ea20df8d3bcc8ed0740a73464bb4b29db87452c780c4ade88b094766cff5377166a0249272105c5f50ee
6
+ metadata.gz: 73c23afdd2af6befe4d2986ba6c8d00f6c10173a5e6ed65da2440480b8664cbfb9986457d120dc91e6386fec3f41fac4ff548d634b2f3f54186cf90385894680
7
+ data.tar.gz: dddb4b961103052da89c38d721411a9e853ee317ebf0c5c30bc163f307e6bfac1e1b2b65a2f966b5c349ffce42805f3ff44251930f5b8002abb1632b8ba8e482
data/README.md CHANGED
@@ -110,7 +110,7 @@ To install:
110
110
  bundle
111
111
  ```
112
112
 
113
- 4. Add `remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@2.0.0"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
113
+ 4. Add `remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@v3.6.1"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
114
114
 
115
115
  5. Continue with the _Setup_ section further below to customize the theme and add some content for your conference
116
116
 
@@ -493,9 +493,14 @@ conference:
493
493
  map: true
494
494
  ```
495
495
 
496
- The map is based on the JavaScript Library [Leaflet](https://leafletjs.com/) and can be customized by editing the `assets/js/main.js` file, e.g. adding additional layers with markers, text, or shapes to the map. To start, copy simply the file from this repository and make use of the initialized global variable `window.conference.map` pointing to the Leaflet container.
496
+ The map is based on the [Leaflet](https://leafletjs.com/) JavaScript library. The map object can be customized by adding additional layers with markers, text, or shapes. To do so, one has to edit the main JavaScript file, `assets/js/main.js`:
497
497
 
498
- Example:
498
+ 1. Import the JavaScript library of the theme (via Jekyll `include` command)
499
+ 2. Await the initialization of the theme's object
500
+ 3. Fetch the map object and verify it is set (while the JavaScript code is imported and executed on each page, the map object will only exist on the location site)
501
+ 4. Modify the map.
502
+
503
+ Following an example is given adding a simple marker to the map:
499
504
 
500
505
  ```javascript
501
506
  ---
@@ -503,8 +508,8 @@ Example:
503
508
 
504
509
  {% include js/conference.js %}
505
510
 
506
- (() => {
507
- const map = window.conference.map;
511
+ window.conference.awaitReady().then(() => {
512
+ const map = window.conference.map.getMap();
508
513
 
509
514
  if (typeof map !== 'undefined') {
510
515
  let main_station = L.marker([47.37785, 8.54035], {
@@ -515,7 +520,7 @@ Example:
515
520
  })
516
521
  }).addTo(map);
517
522
  }
518
- })();
523
+ });
519
524
 
520
525
  ```
521
526
 
@@ -11,6 +11,19 @@
11
11
  window.conference = {
12
12
  config: {
13
13
  baseurl: '{{ site.baseurl }}'
14
+ },
15
+
16
+ ready: false,
17
+ awaitReady: () => {
18
+ const poll = (resolve) => {
19
+ if(window.conference.ready === true) {
20
+ resolve();
21
+ }
22
+ else {
23
+ setTimeout(() => poll(resolve), 500);
24
+ }
25
+ }
26
+ return new Promise(poll);
14
27
  }
15
28
  };
16
29
 
@@ -22,12 +35,12 @@ window.conference = {
22
35
  // Leaflet (Map Display)
23
36
  {% include partials/get_enable_map.html %}
24
37
  {% if enable_map %}
25
- {% include js/lib/leaflet.js %}
26
- {% include js/lib/leaflet-easybutton.js %}
27
- {% include js/lib/leaflet-locatecontrol.js %}
28
- {% include js/lib/leaflet-providers.js %}
38
+ {%- include js/lib/leaflet.js %}
39
+ {%- include js/lib/leaflet-easybutton.js %}
40
+ {%- include js/lib/leaflet-locatecontrol.js %}
41
+ {%- include js/lib/leaflet-providers.js %}
29
42
 
30
- {% include js/map.js %}
43
+ {%- include js/map.js %}
31
44
  {% endif %}
32
45
 
33
46
  // Modals ("Popups")
@@ -35,7 +48,7 @@ window.conference = {
35
48
 
36
49
  // Live and Streaming
37
50
  {% if site.conference.live %}
38
- {% include js/live.js %}
51
+ {%- include js/live.js %}
39
52
  {% endif %}
40
53
 
41
54
  // Load configuration and start initialization
data/_includes/js/init.js CHANGED
@@ -12,7 +12,7 @@ const init = () => {
12
12
 
13
13
  // Execute initialization functions
14
14
  for (const [name, module] of Object.entries(window.conference)) {
15
- if (name == 'config') {
15
+ if (['config','ready','awaitReady'].includes(name)) {
16
16
  continue;
17
17
  }
18
18
 
@@ -25,9 +25,11 @@ const init = () => {
25
25
  l = config.lang[name];
26
26
  }
27
27
 
28
- module.init(c, l)
28
+ module.init(c, l);
29
29
  }
30
30
 
31
+ }).then(() => {
32
+ window.conference.ready = true;
31
33
  })
32
34
  .catch((error) => {
33
35
  console.log(error);
data/_includes/js/map.js CHANGED
@@ -1,22 +1,22 @@
1
- window.conference.mapConfig = (() => {
1
+ window.conference.map = (() => {
2
2
  let config;
3
3
  let lang;
4
4
 
5
5
  let map;
6
6
 
7
7
  const setup = (elId) => {
8
- map = L.map(elId).setView(config.map.home_coord, config.map.default_zoom);
8
+ map = L.map(elId).setView(config.home_coord, config.default_zoom);
9
9
 
10
- L.tileLayer.provider(config.map.map_provider).addTo(map);
10
+ L.tileLayer.provider(config.map_provider).addTo(map);
11
11
 
12
12
  L.easyButton('far fa-star', () => {
13
- map.flyTo(config.map.home_coord, config.map.default_zoom);
14
- }, lang.location.focus_conf).addTo(map);
13
+ map.flyTo(config.home_coord, config.default_zoom);
14
+ }, lang.focus_conf).addTo(map);
15
15
 
16
16
  L.control.locate({
17
17
  flyTo: true,
18
18
  strings: {
19
- title: lang.location.focus_me
19
+ title: lang.focus_me
20
20
  }
21
21
  }).addTo(map);
22
22
  };
@@ -32,7 +32,12 @@ window.conference.mapConfig = (() => {
32
32
  }
33
33
  };
34
34
 
35
+ const getMap = () => {
36
+ return map
37
+ };
38
+
35
39
  return {
36
- init: init
40
+ init: init,
41
+ getMap: getMap
37
42
  };
38
43
  })();
@@ -2,10 +2,10 @@
2
2
 
3
3
  {%- unless site.data.lang.version -%}
4
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?" -%}
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/main/_data/lang.yml) to you local website folder?" -%}
6
6
  {%- endunless -%}
7
7
  {%- elsif site.data.lang.version != 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)." -%}
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/main/_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" -%}
11
11
  {%- assign errors = errors | push : "Unknown language selected for `site.conference.lang` parameter. Supported are `en`, `de`, `fr`, and `pt`." -%}
data/_layouts/config.html CHANGED
@@ -2,9 +2,9 @@
2
2
  {%- include partials/get_enable_map.html -%}
3
3
  {%- if enable_map %}
4
4
  "map": {
5
- "map_provider": "{{ site.conference.map.map_provider | default: 'OpenStreetMap.Mapnik' }}",
6
- "home_coord": [{{ site.conference.map.home_coord }}],
7
- "default_zoom": {{ site.conference.map.default_zoom | default: 17 }}
5
+ "map_provider": "{{ site.conference.location.map.map_provider | default: 'OpenStreetMap.Mapnik' }}",
6
+ "home_coord": [{{ site.conference.location.map.home_coord | default: '47.3744489, 47.3744489' }}],
7
+ "default_zoom": {{ site.conference.location.map.default_zoom | default: 17 }}
8
8
  },
9
9
  {%- endif %}
10
10
 
@@ -677,7 +677,7 @@ $form-validation-states: map-merge(
677
677
  $form-validation-states
678
678
  );
679
679
 
680
- // Z-index master list
680
+ // Z-index main list
681
681
  //
682
682
  // Warning: Avoid customizing these values. They're used for a bird's eye view
683
683
  // of components dependent on the z-axis and are designed to all work together.
File without changes
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.0
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenz Schmid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-28 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -244,9 +244,9 @@ files:
244
244
  - _sass/font-awesome/scss/v4-shims.scss
245
245
  - _sass/font-awesome/solid.scss
246
246
  - _sass/font-awesome/v4-shims.scss
247
- - _sass/leaflet/leaflet-easybutton.css
248
- - _sass/leaflet/leaflet-locatecontrol.css
249
- - _sass/leaflet/leaflet.css
247
+ - _sass/leaflet/leaflet-easybutton.scss
248
+ - _sass/leaflet/leaflet-locatecontrol.scss
249
+ - _sass/leaflet/leaflet.scss
250
250
  - assets/css/main.scss
251
251
  - assets/icons/live.svg
252
252
  - assets/js/config.json
@@ -286,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
286
  - !ruby/object:Gem::Version
287
287
  version: '0'
288
288
  requirements: []
289
- rubygems_version: 3.2.32
289
+ rubygems_version: 3.3.26
290
290
  signing_key:
291
291
  specification_version: 4
292
292
  summary: Jekyll template for a conference website containing program, speaker, talks