-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PurgeCSS and Terser to CI example and remove whitespaces from par…
…tials Closes #5
- Loading branch information
1 parent
50204f7
commit 9ea7bf0
Showing
20 changed files
with
317 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
{% assign errors = '' | split: ',' %} | ||
{%- assign errors = '' | split: ',' -%} | ||
|
||
{% unless site.data.lang.version %} | ||
{% unless site.conference.lang == "en" %} | ||
{% 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?" %} | ||
{% endunless %} | ||
{% elsif site.data.lang.version < 4 %} | ||
{% 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)." %} | ||
{% endunless %} | ||
{% unless site.conference.lang == "en" or site.conference.lang == "de" or site.conference.lang == "fr" or site.conference.lang == "pt" %} | ||
{% assign errors = errors | push : "Unknown language selected for `site.conference.lang` parameter. Supported are `en`, `de`, `fr`, and `pt`." %} | ||
{% endunless %} | ||
{%- unless site.data.lang.version -%} | ||
{%- unless site.conference.lang == "en" -%} | ||
{%- 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?" -%} | ||
{%- endunless -%} | ||
{%- elsif site.data.lang.version < 4 -%} | ||
{%- 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)." -%} | ||
{%- endunless -%} | ||
{%- unless site.conference.lang == "en" or site.conference.lang == "de" or site.conference.lang == "fr" or site.conference.lang == "pt" -%} | ||
{%- assign errors = errors | push : "Unknown language selected for `site.conference.lang` parameter. Supported are `en`, `de`, `fr`, and `pt`." -%} | ||
{%- endunless -%} | ||
|
||
{% assign program_size = site.data.program | size %} | ||
{% if program_size == 0 %} | ||
{% assign errors = errors | push : "Your schedule in `_data/program.yml` does not seem to contain any entry. Have you already created the file?" %} | ||
{% endif %} | ||
{% assign talk_size = site.talks | size %} | ||
{% if talk_size == 0 %} | ||
{% assign errors = errors | push : "The `talks` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_talks/` folder empty?" %} | ||
{% endif %} | ||
{% assign speaker_size = site.speakers | size %} | ||
{% if speaker_size == 0 %} | ||
{% assign errors = errors | push : "The `speakers` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_speakers/` folder empty?" %} | ||
{% endif %} | ||
{% assign room_size = site.rooms | size %} | ||
{% if room_size == 0 %} | ||
{% assign errors = errors | push : "The `rooms` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_rooms/` folder empty?" %} | ||
{% endif %} | ||
{%- assign program_size = site.data.program | size -%} | ||
{%- if program_size == 0 -%} | ||
{%- assign errors = errors | push : "Your schedule in `_data/program.yml` does not seem to contain any entry. Have you already created the file?" -%} | ||
{%- endif -%} | ||
{%- assign talk_size = site.talks | size -%} | ||
{%- if talk_size == 0 -%} | ||
{%- assign errors = errors | push : "The `talks` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_talks/` folder empty?" -%} | ||
{%- endif -%} | ||
{%- assign speaker_size = site.speakers | size -%} | ||
{%- if speaker_size == 0 -%} | ||
{%- assign errors = errors | push : "The `speakers` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_speakers/` folder empty?" -%} | ||
{%- endif -%} | ||
{%- assign room_size = site.rooms | size -%} | ||
{%- if room_size == 0 -%} | ||
{%- assign errors = errors | push : "The `rooms` collection does not seem to contain any entry. Have you accidentially renamed the collection or is your `_rooms/` folder empty?" -%} | ||
{%- endif -%} | ||
|
||
{% assign main_category_size = site.conference.talks.main_categories | size %} | ||
{% if main_category_size == 0 %} | ||
{% 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." %} | ||
{% endif %} | ||
{%- assign main_category_size = site.conference.talks.main_categories | size -%} | ||
{%- if main_category_size == 0 -%} | ||
{%- 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." -%} | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
{% for room in site.data.program %} | ||
{% assign t = room.talks | first %} | ||
{% include partials/get_talk_time.html %} | ||
|
||
{% assign update_var = false %} | ||
|
||
{% unless conf_start_hour %} | ||
{% assign update_var = true %} | ||
{% else %} | ||
{% if talk_start_hour < conf_start_hour %} | ||
{% assign update_var = true %} | ||
{% elsif talk_start_hour == conf_start_hour and talk_start_min < conf_start_min %} | ||
{% assign update_var = true %} | ||
{% endif %} | ||
{% endunless %} | ||
|
||
{% if update_var %} | ||
{% assign conf_start_hour = talk_start_hour %} | ||
{% assign conf_start_min = talk_start_min %} | ||
{% endif %} | ||
|
||
{% assign t = room.talks | last %} | ||
{% include partials/get_talk_time.html %} | ||
|
||
{% assign update_var = false %} | ||
|
||
{% unless conf_end_hour %} | ||
{% assign update_var = true %} | ||
{% else %} | ||
{% if talk_end_hour > conf_end_hour %} | ||
{% assign update_var = true %} | ||
{% elsif talk_end_hour == conf_end_hour and talk_end_min > conf_end_min %} | ||
{% assign update_var = true %} | ||
{% endif %} | ||
{% endunless %} | ||
|
||
{% if update_var %} | ||
{% assign conf_end_hour = talk_end_hour %} | ||
{% assign conf_end_min = talk_end_min %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if conf_start_min < 10 %} | ||
{% assign conf_start = conf_start_hour | append: ":0" | append: conf_start_min %} | ||
{% else %} | ||
{% assign conf_start = conf_start_hour | append: ":" | append: conf_start_min %} | ||
{% endif %} | ||
{% if conf_end_min < 10 %} | ||
{% assign conf_end = conf_end_hour | append: ":0" | append: conf_end_min %} | ||
{% else %} | ||
{% assign conf_end = conf_end_hour | append: ":" | append: conf_end_min %} | ||
{% endif %} | ||
|
||
{% assign conf_duration_min = conf_end_hour | minus: conf_start_hour | times: 60 | minus: conf_start_min | plus: conf_end_min %} | ||
{%- for room in site.data.program -%} | ||
{%- assign t = room.talks | first -%} | ||
{%- include partials/get_talk_time.html -%} | ||
|
||
{%- assign update_var = false -%} | ||
|
||
{%- unless conf_start_hour -%} | ||
{%- assign update_var = true -%} | ||
{%- else -%} | ||
{%- if talk_start_hour < conf_start_hour -%} | ||
{%- assign update_var = true -%} | ||
{%- elsif talk_start_hour == conf_start_hour and talk_start_min < conf_start_min -%} | ||
{%- assign update_var = true -%} | ||
{%- endif -%} | ||
{%- endunless -%} | ||
|
||
{%- if update_var -%} | ||
{%- assign conf_start_hour = talk_start_hour -%} | ||
{%- assign conf_start_min = talk_start_min -%} | ||
{%- endif -%} | ||
|
||
{%- assign t = room.talks | last -%} | ||
{%- include partials/get_talk_time.html -%} | ||
|
||
{%- assign update_var = false -%} | ||
|
||
{%- unless conf_end_hour -%} | ||
{%- assign update_var = true -%} | ||
{%- else -%} | ||
{%- if talk_end_hour > conf_end_hour -%} | ||
{%- assign update_var = true -%} | ||
{%- elsif talk_end_hour == conf_end_hour and talk_end_min > conf_end_min -%} | ||
{%- assign update_var = true -%} | ||
{%- endif -%} | ||
{%- endunless -%} | ||
|
||
{%- if update_var -%} | ||
{%- assign conf_end_hour = talk_end_hour -%} | ||
{%- assign conf_end_min = talk_end_min -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
|
||
{%- if conf_start_min < 10 -%} | ||
{%- assign conf_start = conf_start_hour | append: ":0" | append: conf_start_min -%} | ||
{%- else -%} | ||
{%- assign conf_start = conf_start_hour | append: ":" | append: conf_start_min -%} | ||
{%- endif -%} | ||
{%- if conf_end_min < 10 -%} | ||
{%- assign conf_end = conf_end_hour | append: ":0" | append: conf_end_min -%} | ||
{%- else -%} | ||
{%- assign conf_end = conf_end_hour | append: ":" | append: conf_end_min -%} | ||
{%- endif -%} | ||
|
||
{%- assign conf_duration_min = conf_end_hour | minus: conf_start_hour | times: 60 | minus: conf_start_min | plus: conf_end_min -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{% if talk %} | ||
{% assign links = talk.links%} | ||
{% else if speaker %} | ||
{% assign links = speaker.links%} | ||
{% endif %} | ||
{%- if talk -%} | ||
{%- assign links = talk.links -%} | ||
{%- else if speaker -%} | ||
{%- assign links = speaker.links -%} | ||
{%- endif -%} | ||
|
||
{% assign has_icon_links = false %} | ||
{% assign has_regular_links = false %} | ||
{% for link in links %} | ||
{% if link.icon or link.file or link.video %} | ||
{% assign has_icon_links = true %} | ||
{% else %} | ||
{% assign has_regular_links = true %} | ||
{% endif %} | ||
{% endfor %} | ||
{%- assign has_icon_links = false -%} | ||
{%- assign has_regular_links = false -%} | ||
{%- for link in links -%} | ||
{%- if link.icon or link.file or link.video -%} | ||
{%- assign has_icon_links = true -%} | ||
{%- else -%} | ||
{%- assign has_regular_links = true -%} | ||
{%- endif -%} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{% for main_cat in site.conference.talks.main_categories %} | ||
{% for cat in talk.categories %} | ||
{% if cat == main_cat.name %} | ||
{% assign main_cat = main_cat.name %} | ||
{% assign main_cat_color = main_cat.color %} | ||
{% break %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
{%- for main_cat in site.conference.talks.main_categories -%} | ||
{%- for cat in talk.categories -%} | ||
{%- if cat == main_cat.name -%} | ||
{%- assign main_cat = main_cat.name -%} | ||
{%- assign main_cat_color = main_cat.color -%} | ||
{%- break -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{% assign talk_start = t.time_start %} | ||
{% assign talk_end = t.time_end %} | ||
{%- assign talk_start = t.time_start -%} | ||
{%- assign talk_end = t.time_end -%} | ||
|
||
{% assign talk_start_hour = talk_start | split: ':' | first %} | ||
{% assign talk_start_min = talk_start | split: ':' | last | divided_by: site.conference.program.time_steps | floor | times: site.conference.program.time_steps %} | ||
{% assign talk_end_hour = talk_end | split: ':' | first %} | ||
{% assign talk_end_min = talk_end | split: ':' | last | divided_by: site.conference.program.time_steps | ceil | times: site.conference.program.time_steps %} | ||
{%- assign talk_start_hour = talk_start | split: ':' | first -%} | ||
{%- assign talk_start_min = talk_start | split: ':' | last | divided_by: site.conference.program.time_steps | floor | times: site.conference.program.time_steps -%} | ||
{%- assign talk_end_hour = talk_end | split: ':' | first -%} | ||
{%- assign talk_end_min = talk_end | split: ':' | last | divided_by: site.conference.program.time_steps | ceil | times: site.conference.program.time_steps -%} | ||
|
||
{% assign talk_duration_min = talk_end_hour | minus: talk_start_hour | times: 60 | minus: talk_start_min | plus: talk_end_min %} | ||
{%- assign talk_duration_min = talk_end_hour | minus: talk_start_hour | times: 60 | minus: talk_start_min | plus: talk_end_min -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% assign datetime_start = site.conference.live.date | append: " " | append: time_start | append: " " | append: site.conference.live.timezone %} | ||
{% assign timestamp_start = datetime_start | date: "%s" %} | ||
{% assign datetime_end = site.conference.live.date | append: " " | append: time_end | append: " " | append: site.conference.live.timezone %} | ||
{% assign timestamp_end = datetime_end | date: "%s" %} | ||
{%- assign datetime_start = site.conference.live.date | append: " " | append: time_start | append: " " | append: site.conference.live.timezone -%} | ||
{%- assign timestamp_start = datetime_start | date: "%s" -%} | ||
{%- assign datetime_end = site.conference.live.date | append: " " | append: time_end | append: " " | append: site.conference.live.timezone -%} | ||
{%- assign timestamp_end = datetime_end | date: "%s" -%} |
Oops, something went wrong.