diff --git a/Gemfile.lock b/Gemfile.lock index 26b985d8..569e0728 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,28 +3,14 @@ GEM specs: addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - bcp47 (0.3.3) - i18n - builder (3.2.4) colorator (1.1.0) concurrent-ruby (1.1.9) - ebnf (1.2.0) - rdf (~> 3.1) - sxp (~> 1.1) em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - equivalent-xml (0.6.0) - nokogiri (>= 1.4.3) eventmachine (1.2.7) ffi (1.15.3) forwardable-extended (2.6.0) - haml (5.2.0) - temple (>= 0.8.0) - tilt - hamster (3.0.0) - concurrent-ruby (~> 1.0) - htmlentities (4.3.4) http_parser.rb (0.6.0) i18n (1.8.10) concurrent-ruby (~> 1.0) @@ -45,63 +31,16 @@ GEM terminal-table (~> 1.8) jekyll-feed (0.15.1) jekyll (>= 3.7, < 5.0) - jekyll-rdf (3.1.1.pre.develop.743) - jekyll (>= 3.1) - linkeddata (~> 2.0) - net-http-persistent (~> 2.9) - sparql-client (~> 3.0, >= 3.0.1) jekyll-sass-converter (2.1.0) sassc (> 2.0.1, < 3.0) jekyll-seo-tag (2.7.1) jekyll (>= 3.8, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - json-canonicalization (0.2.0) - json-ld (3.1.4) - htmlentities (~> 4.3) - json-canonicalization (~> 0.2) - link_header (~> 0.0, >= 0.0.8) - multi_json (~> 1.14) - rack (~> 2.0) - rdf (~> 3.1) - json-ld-preloaded (3.1.3) - json-ld (~> 3.1) - rdf (~> 3.1) kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - ld-patch (0.3.3) - ebnf (~> 1.1) - rdf (>= 2.2, < 4.0) - rdf-xsd (>= 2.2, < 4.0) - sparql (>= 2.2, < 4.0) - sxp (~> 1.0) - link_header (0.0.8) - linkeddata (2.2.4) - equivalent-xml (~> 0.6) - json-ld (>= 2.1, < 4.0) - ld-patch (~> 0.3) - nokogiri (~> 1.8) - rdf (>= 2.2, < 4.0) - rdf-aggregate-repo (>= 2.2, < 4.0) - rdf-isomorphic (>= 2.0, < 4.0) - rdf-json (>= 2.0, < 4.0) - rdf-microdata (>= 2.2, < 4.0) - rdf-n3 (>= 2.1, < 4.0) - rdf-normalize (~> 0.3) - rdf-rdfa (>= 2.2, < 4.0) - rdf-rdfxml (>= 2.2, < 4.0) - rdf-reasoner (~> 0.4) - rdf-tabular (>= 2.2, < 4.0) - rdf-trig (>= 2.0, < 4.0) - rdf-trix (>= 2.2, < 4.0) - rdf-turtle (>= 2.2, < 4.0) - rdf-vocab (>= 2.2, < 4.0) - rdf-xsd (>= 2.2, < 4.0) - shex (~> 0.5) - sparql (>= 2.2, < 4.0) - sparql-client (>= 2.1, < 4.0) liquid (4.0.3) listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -111,113 +50,28 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - multi_json (1.15.0) - net-http-persistent (2.9.4) - nokogiri (1.11.7-x86_64-linux) - racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.6) - racc (1.4.16) - rack (2.2.3) rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) - rdf (3.1.6) - hamster (~> 3.0) - link_header (~> 0.0, >= 0.0.8) - rdf-aggregate-repo (3.1.0) - rdf (~> 3.1) - rdf-isomorphic (3.1.0) - rdf (~> 3.1) - rdf-json (3.1.0) - rdf (~> 3.1) - rdf-microdata (3.1.1) - htmlentities (~> 4.3) - nokogiri (~> 1.10) - rdf (~> 3.1) - rdf-xsd (~> 3.1) - rdf-n3 (3.1.0) - rdf (~> 3.0) - sparql (~> 3.0) - sxp (~> 1.0) - rdf-normalize (0.4.0) - rdf (~> 3.1) - rdf-rdfa (3.1.2) - haml (~> 5.1) - htmlentities (~> 4.3) - rdf (~> 3.1, >= 3.1.2) - rdf-aggregate-repo (~> 3.1) - rdf-vocab (~> 3.1, >= 3.1.5) - rdf-xsd (~> 3.1) - rdf-rdfxml (3.1.0) - htmlentities (~> 4.3) - rdf (~> 3.1) - rdf-rdfa (~> 3.1) - rdf-xsd (~> 3.1) - rdf-reasoner (0.6.2) - rdf (~> 3.1, >= 3.1.2) - rdf-vocab (~> 3.1, >= 3.1.5) - rdf-xsd (~> 3.1) - rdf-tabular (3.1.1) - addressable (~> 2.3) - bcp47 (~> 0.3, >= 0.3.3) - json-ld (~> 3.1) - rdf (~> 3.1) - rdf-vocab (~> 3.1) - rdf-xsd (~> 3.1) - rdf-trig (3.1.0) - ebnf (~> 1.1) - rdf (~> 3.1) - rdf-turtle (~> 3.1) - rdf-trix (3.1.0) - rdf (~> 3.1) - rdf-turtle (3.1.1) - ebnf (~> 1.2) - rdf (~> 3.1, >= 3.1.2) - rdf-vocab (3.1.8) - rdf (~> 3.1, >= 3.1.2) - rdf-xsd (3.1.0) - rdf (~> 3.1) rexml (3.2.4) rouge (3.26.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) - shex (0.5.2) - ebnf (~> 1.1) - json-ld (>= 2.2, < 4.0) - json-ld-preloaded (>= 2.2, < 4.0) - rdf (>= 2.2, < 4.0) - rdf-xsd (>= 2.2, < 4.0) - sparql (>= 2.2, < 4.0) - sxp (~> 1.0) - sparql (3.0.2) - builder (~> 3.2) - ebnf (~> 1.1) - rdf (~> 3.0) - rdf-aggregate-repo (>= 2.2, < 4.0) - rdf-xsd (~> 3.0) - sparql-client (~> 3.0) - sxp (~> 1.0) - sparql-client (3.0.1) - net-http-persistent (>= 2.9, < 4) - rdf (~> 3.0) - sxp (1.1.0) - rdf (~> 3.1) - temple (0.8.2) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - tilt (2.0.10) unicode-display_width (1.7.0) PLATFORMS + x86_64-linux x86_64-linux-musl DEPENDENCIES jekyll (~> 4.1.1) jekyll-feed (~> 0.12) - jekyll-rdf (~> 3.1.0) minima (~> 2.5) tzinfo (~> 1.2) tzinfo-data diff --git a/_layouts/trainingsplan.html b/_layouts/trainingsplan.html index 67b85d5f..4e333b07 100644 --- a/_layouts/trainingsplan.html +++ b/_layouts/trainingsplan.html @@ -171,6 +171,114 @@ border-color: transparent transparent rgba(223, 175, 95, 0.9) transparent; transform-origin: bottom; } + +.license-author { + display: flex; + justify-content: space-between; +} + +.license-author .button { + width: fit-content !important; + padding: 6px 10px !important; +} + +.author-list .author:not(:first-child):before { + content: ', '; +} + +.flex-between { + display: flex; + justify-content: space-between; + align-items: center; +} + +#reference-list { + transform: scale(0, 0); + transition: transform ease-in-out 100ms; +} + +#reference-list h4 { + margin-bottom: 0.5rem; +} + +#reference-list ul { + list-style-position: inside; + margin-left: 30px; +} + +.author-info { + margin-bottom: 1rem; +} + +#reference-button { + cursor: pointer; +} + +#reference-button i { + font-size: 1.5rem; +} + +#sidebar .breaks { + bottom: 50px !important; +} + +.display-print { + display: none; +} + +@media print { + .pagebreak { page-break-before: always; } /* page-break-after works, as well */ + .dont-print, #reference-button { + visibility: hidden; + } + #reference-list { + transform: scale(1, 1) !important; + } + .display-print { + display: inline; + } +} + +.edit-trainer-notes-button { + font-weight: bold; + font-size: 0.9em !important; + margin-left: 0 !important; +} + +.edit-trainer-notes-popup { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + z-index: 3; + transform: scale(0, 0); + transform-origin: top right; + transition: transform ease-in-out 100ms; +} + +.edit-trainer-notes-popup:target { + transform: scale(1, 1); +} + +.flex-start-center { + display: flex; + justify-content: start; + align-items: center; + gap: 5px; +} + +.reset-notes i { + font-size: 0.6rem; +} + +/* #sidebar .edit-trainer-notes-popup { + display: none; +} */ diff --git a/_resources/.template/template.md b/_resources/.template/template.md index a487f50e..ece386ef 100644 --- a/_resources/.template/template.md +++ b/_resources/.template/template.md @@ -8,5 +8,6 @@ resource: difficulty: #1-3, 1 is easyest cost: 1000 #in $ (dont leave empty, but type 0 instead) license: #e.g. CC BY-SA 4.0 + author: #add the author/organisation name in here, use [markdown](URL) formatting to link to website/reference. You can add also multiple authors via '[author 1](link1), [author 2](link2)' # marker --- diff --git a/_resources/EJN_5_Point_test_for_hate_speech_video.md b/_resources/EJN_5_Point_test_for_hate_speech_video.md index 1d6c9e2f..9ef07b7c 100644 --- a/_resources/EJN_5_Point_test_for_hate_speech_video.md +++ b/_resources/EJN_5_Point_test_for_hate_speech_video.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: + author: "[Ethical Journalism Network](https://ethicaljournalismnetwork.org/)" # marker --- diff --git a/_resources/SafeDigitasSpaces.md b/_resources/SafeDigitasSpaces.md index 34d3615d..970ba99e 100644 --- a/_resources/SafeDigitasSpaces.md +++ b/_resources/SafeDigitasSpaces.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/askotec.md b/_resources/askotec.md index d3ef579d..567f40e8 100644 --- a/_resources/askotec.md +++ b/_resources/askotec.md @@ -8,5 +8,6 @@ resource: difficulty: cost: 1000 license: + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/askotecintro.md b/_resources/askotecintro.md index d2014c30..c6bdbbf8 100644 --- a/_resources/askotecintro.md +++ b/_resources/askotecintro.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 1000 license: CC-BY-SA 4.0 + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/bmc.md b/_resources/bmc.md index 4ed3e983..ed77d944 100644 --- a/_resources/bmc.md +++ b/_resources/bmc.md @@ -8,6 +8,7 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ license: '[CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/) ' + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/code_of_conduct.md b/_resources/code_of_conduct.md index 3c8b657a..2d68417d 100644 --- a/_resources/code_of_conduct.md +++ b/_resources/code_of_conduct.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/communityrepairsetup.md b/_resources/communityrepairsetup.md index cac013e3..211603f6 100644 --- a/_resources/communityrepairsetup.md +++ b/_resources/communityrepairsetup.md @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/counter_hate_speech_online.md b/_resources/counter_hate_speech_online.md index ff194700..42edd2b2 100644 --- a/_resources/counter_hate_speech_online.md +++ b/_resources/counter_hate_speech_online.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_boardgame.md b/_resources/defyhatenow_boardgame.md index 357c9a53..ff0c1268 100644 --- a/_resources/defyhatenow_boardgame.md +++ b/_resources/defyhatenow_boardgame.md @@ -8,5 +8,6 @@ resource: difficulty: cost: 1 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_boardgame_instructions.md b/_resources/defyhatenow_boardgame_instructions.md index d40ae4f0..3a9156e1 100644 --- a/_resources/defyhatenow_boardgame_instructions.md +++ b/_resources/defyhatenow_boardgame_instructions.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: CC BY-SA 4.0 + author: "[walthierer]('https://github.com/walthierer')" # marker --- diff --git a/_resources/defyhatenow_facilitator_notes.md b/_resources/defyhatenow_facilitator_notes.md index 12f6d2f6..e73c736f 100644 --- a/_resources/defyhatenow_facilitator_notes.md +++ b/_resources/defyhatenow_facilitator_notes.md @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_field_guide_c1.md b/_resources/defyhatenow_field_guide_c1.md index 0de56ec3..fd9fd502 100644 --- a/_resources/defyhatenow_field_guide_c1.md +++ b/_resources/defyhatenow_field_guide_c1.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_field_guide_c2.md b/_resources/defyhatenow_field_guide_c2.md index 5da43e09..502f2be7 100644 --- a/_resources/defyhatenow_field_guide_c2.md +++ b/_resources/defyhatenow_field_guide_c2.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_field_guide_c3.md b/_resources/defyhatenow_field_guide_c3.md index 476ddd88..ebcf8279 100644 --- a/_resources/defyhatenow_field_guide_c3.md +++ b/_resources/defyhatenow_field_guide_c3.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_field_guide_c5.md b/_resources/defyhatenow_field_guide_c5.md index 9658ccc9..5b90e50b 100644 --- a/_resources/defyhatenow_field_guide_c5.md +++ b/_resources/defyhatenow_field_guide_c5.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/defyhatenow_field_guide_c6.md b/_resources/defyhatenow_field_guide_c6.md index 5ec10320..296b832c 100644 --- a/_resources/defyhatenow_field_guide_c6.md +++ b/_resources/defyhatenow_field_guide_c6.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/diy_water_filter_setup.md b/_resources/diy_water_filter_setup.md index eb7bd2e7..3f54fe42 100644 --- a/_resources/diy_water_filter_setup.md +++ b/_resources/diy_water_filter_setup.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: CC BY-SA 4.0 + author: '[Timm Wille](https://openculture.agency/team/)' # marker --- diff --git a/_resources/diy_water_filter_tools&materials.md b/_resources/diy_water_filter_tools&materials.md index a8f25db3..5c319ce5 100644 --- a/_resources/diy_water_filter_tools&materials.md +++ b/_resources/diy_water_filter_tools&materials.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 5 #in $ (dont leave empty, but type 0 instead) license: '[CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/)' + author: '[Timm Wille](https://openculture.agency/team/)' # marker --- diff --git a/_resources/drinking_contaminated_water.md b/_resources/drinking_contaminated_water.md index e365b951..176d46f2 100644 --- a/_resources/drinking_contaminated_water.md +++ b/_resources/drinking_contaminated_water.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: #e.g. CC BY-SA 4.0 + author: '[health & fitness](https://www.youtube.com/@healthfitness1196)' # marker --- diff --git a/_resources/ethical_journalism_guide.md b/_resources/ethical_journalism_guide.md index f8df4952..98566632 100644 --- a/_resources/ethical_journalism_guide.md +++ b/_resources/ethical_journalism_guide.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/github_image_integration b/_resources/github_image_integration index 157ae8bd..609a357c 100644 --- a/_resources/github_image_integration +++ b/_resources/github_image_integration @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/github_introduction.md b/_resources/github_introduction.md index be2b696b..b394233d 100644 --- a/_resources/github_introduction.md +++ b/_resources/github_introduction.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 0 license: CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/github_oer_template.md b/_resources/github_oer_template.md index 5d093825..193e8d89 100644 --- a/_resources/github_oer_template.md +++ b/_resources/github_oer_template.md @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/ledlight.md b/_resources/ledlight.md index c2fb9c00..4813d0b7 100644 --- a/_resources/ledlight.md +++ b/_resources/ledlight.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 5 license: + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/logframe.md b/_resources/logframe.md index 3fce30b7..cd095eef 100644 --- a/_resources/logframe.md +++ b/_resources/logframe.md @@ -7,6 +7,7 @@ resource: duration: 180 #in minutes difficulty: 3 #1-3, 1 is easyest cost: 0 #in $ + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/mental_health_trauma.md b/_resources/mental_health_trauma.md index b1265848..52bebe3e 100644 --- a/_resources/mental_health_trauma.md +++ b/_resources/mental_health_trauma.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[#defyhatenow](https://defyhatenow.org/)" # marker --- diff --git a/_resources/mmn_boardgame.md b/_resources/mmn_boardgame.md index d1706325..8a384455 100644 --- a/_resources/mmn_boardgame.md +++ b/_resources/mmn_boardgame.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 1 license: CC BY-SA 4.0 + author: '[Migrant Media Network](https://migrantmedia.network/)' # marker --- diff --git a/_resources/mmn_rumour_cards.md b/_resources/mmn_rumour_cards.md index 9f20423a..b7de2839 100644 --- a/_resources/mmn_rumour_cards.md +++ b/_resources/mmn_rumour_cards.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 1 license: CC BY-SA 4.0 + author: '[Migrant Media Network](https://migrantmedia.network/)' # marker --- diff --git a/_resources/oc.md b/_resources/oc.md index 5f291ea8..de4815c9 100644 --- a/_resources/oc.md +++ b/_resources/oc.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ license: '[CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/) ' + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/odg.md b/_resources/odg.md index 3f94fd2d..3ca8d092 100644 --- a/_resources/odg.md +++ b/_resources/odg.md @@ -8,5 +8,6 @@ resource: difficulty: 1 cost: 1 license: CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/ohg.md b/_resources/ohg.md index 06e02569..543c90d3 100644 --- a/_resources/ohg.md +++ b/_resources/ohg.md @@ -7,5 +7,6 @@ resource: difficulty: cost: 1 license: + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/open-file-formats.md b/_resources/open-file-formats.md index fdb31d7c..180b7b35 100644 --- a/_resources/open-file-formats.md +++ b/_resources/open-file-formats.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/openguides.md b/_resources/openguides.md index 4df3c369..e9455e8e 100644 --- a/_resources/openguides.md +++ b/_resources/openguides.md @@ -7,5 +7,6 @@ resource: difficulty: 2 cost: 20 license: + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/openworkshopsetup.md b/_resources/openworkshopsetup.md index 0cbd8317..09c72ca1 100644 --- a/_resources/openworkshopsetup.md +++ b/_resources/openworkshopsetup.md @@ -7,6 +7,7 @@ resource: duration: 240 #in minutes difficulty: 2 #1-3, 1 is easyest cost: 1000 #in $ (dont leave empty, but type 0 instead) - license: [CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/) #e.g. CC BY-SA 4.0 + license: '[CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/)' #e.g. CC BY-SA 4.0 + author: '[Timm Wille](https://openculture.agency/team/)' # marker --- diff --git a/_resources/os-glossary.md b/_resources/os-glossary.md index c94b3c38..7e02d30f 100644 --- a/_resources/os-glossary.md +++ b/_resources/os-glossary.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/os-licensing.md b/_resources/os-licensing.md index 695dede7..b57020ce 100644 --- a/_resources/os-licensing.md +++ b/_resources/os-licensing.md @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/os-spiral.md b/_resources/os-spiral.md index e84efce3..4fcce518 100644 --- a/_resources/os-spiral.md +++ b/_resources/os-spiral.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/solarcharger.md b/_resources/solarcharger.md index 1c44b148..a67b84ee 100644 --- a/_resources/solarcharger.md +++ b/_resources/solarcharger.md @@ -7,5 +7,6 @@ resource: difficulty: 2 cost: 1000 license: + author: '[Dawa Edina Hillary](https://wikifab.org/wiki/Utilisateur:Dawa_Edina)' # marker --- diff --git a/_resources/stop_disinformation.md b/_resources/stop_disinformation.md index 0d98a72b..284210bc 100644 --- a/_resources/stop_disinformation.md +++ b/_resources/stop_disinformation.md @@ -8,5 +8,6 @@ resource: difficulty: 2 cost: 0 license: CC BY-SA 4.0 + author: "[r0g_agency](https://openculture.agency/)" # marker --- diff --git a/_resources/toc.md b/_resources/toc.md index e69d0c42..9d2e4325 100644 --- a/_resources/toc.md +++ b/_resources/toc.md @@ -8,5 +8,6 @@ resource: difficulty: 2 #1-3, 1 is easyest cost: 0 #in $ license: '[CC-BY-SA 4.0 International](https://choosealicense.com/licenses/cc-by-sa-4.0/) ' + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/_resources/why-open.md b/_resources/why-open.md index a3ea9e75..1bac89fe 100644 --- a/_resources/why-open.md +++ b/_resources/why-open.md @@ -8,5 +8,6 @@ resource: difficulty: 1 #1-3, 1 is easyest cost: 0 #in $ (dont leave empty, but type 0 instead) license: CC BY-SA 4.0 #e.g. CC BY-SA 4.0 + author: "[#ASKnet](https://asknet.community/)" # marker --- diff --git a/assets/js/index.js b/assets/js/index.js index 139f2a96..91c5e10d 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -43,7 +43,7 @@ function initiateSortable() { pull: 'clone' }, sort: false, - onEnd: initiateTrashButton // we need this because on duplication the onclick event isn't copied + onEnd: updateClonedBreaks // we need this because cloning does not copy event listeners added using addEventListener() or those assigned to element properties (e.g., node.onclick = someFunction) (https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode) }); let index = 0; @@ -235,14 +235,22 @@ function submitTime(){ || currClassName.includes(CLASS_TIMEBREAK) || currClassName.includes(CLASS_RESOURCE)){ currentElement.dataset.duration = duration; + if (currentElement.className.includes('resource')) { + let displayEl = currentElement.querySelector('.duration-display'); + if (parseInt(duration) > 0) { + displayEl.innerText = `| ${duration} minutes`; + } else { + displayEl.innerText = ''; + } + } if(currClassName.includes(CLASS_TRAININGSTART) || currClassName.includes(CLASS_DAYBREAK)){ currentElement.dataset.start = start; } if((titleEl != null && titleEl.value != '') - && currClassName.includes(CLASS_TRAININGSTART) + && (currClassName.includes(CLASS_TRAININGSTART) || currClassName.includes(CLASS_DAYBREAK) - || currClassName.includes(CLASS_TIMEBREAK)){ + || currClassName.includes(CLASS_TIMEBREAK))){ let titleNode = getChildByClassName(currentElement, 'break-title'); titleNode.innerText = titleEl.value; } @@ -266,6 +274,22 @@ function closeTime(){ this.parentNode.parentNode.style.display = ''; } +/** + * Updates a time or day break after it has been cloned + * @param {Event} evt The dragging event + */ +function updateClonedBreaks(evt){ + let timebreak = evt.item; + let iconButton = timebreak.querySelector('.fa-edit'); + iconButton.onclick = toggleTimeEditWindow; + let submitButton = timebreak.querySelector('.submit'); + submitButton.onclick = submitTime; + let closeButton = timebreak.querySelector('.close'); + closeButton.onclick = closeTime; + let trashButton = timebreak.querySelector('.trash'); + trashButton.onclick = onClickDeleteOrMoveListElement; +} + /** * Mobile button initialisations */ @@ -377,6 +401,7 @@ function runDynamicCalculationsOnAdd(evt) { insertTimeBreaks(mod); calculateTime(); calculateSummary(); + updateAuthorList(); } function calculateTime() { @@ -759,6 +784,211 @@ function updateSelectableModulesList() { } } +/** + * Author list + */ +function updateAuthorList(){ + updateAuthorLinkTarget(); + let moduleListEl = document.getElementById('module-list-training'); + let authorList = moduleListEl.querySelectorAll('.author'); + let authorsWithResources = {}; + let identifiedResources = []; + let identifiedAuthors = []; + authorList.forEach((authorEl) => { + let { author, resource, resourceUrl, resourceLicense } = authorEl.dataset; + if (!identifiedResources.includes(resource)) { + let license = convertMDLinkToObject(resourceLicense); + let newResource = { + name: resource, + url: resourceUrl, + license, + }; + let authors = convertMultipleMDLinksToArray(author); + authors.forEach((singleAuthor) => { + if (!identifiedAuthors.includes(singleAuthor.name)) { + authorsWithResources[singleAuthor.name] = {}; + authorsWithResources[singleAuthor.name]['url'] = singleAuthor.url; + authorsWithResources[singleAuthor.name]['resources'] = []; + identifiedAuthors.push(singleAuthor.name); + } + authorsWithResources[singleAuthor.name]['resources'].push(newResource); + }); + identifiedResources.push(resource); + } + }); + let html = ''; + for (author in authorsWithResources) { + // single author item that contains their name, url, and resources + let item = authorsWithResources[author]; + + let authorHtml = `
  • ${author} (${item.url})

    `; + let resourceListEls = ''; + for (resource in item.resources) { + // Single resource item that includes the name, url, and license of the resource + let resourceItem = item.resources[resource]; + + resourceListEls +=`
  • ${resourceItem.name}`; + // Add resource link if it exists + if (resourceItem.url) { + resourceListEls += ` (${resourceItem.url})`; + } + // Add license + if (resourceItem.license.name) { + resourceListEls += `. License: ${resourceItem.license.name}`; + } + // Add license url if it exists + if (resourceItem.license.url) { + resourceListEls+= ` (${resourceItem.license.url})`; + } + // Add closing li tag + resourceListEls += `
  • `; + } + authorHtml += ``; + html += authorHtml; + } + if (html !== '') { + let referenceListEl = document.getElementById('reference-list'); + referenceListEl.innerHTML = html; + } +} + +/** + * Creates an object with the name and url from a markdown link + * @param {String} link markdown link + * @returns {Object} + */ +function convertMDLinkToObject(link){ + let result = { name: '', url: '' }; + if (!link) return result; + if(link[0] == '['){ + let regex = /[\[\]\)]/g; + let [ name, url ] = link.replace(regex, '').split('('); + result.name = name; + result.url = url; + return result; + } + result.name = link; + return result; +} + +/** + * Converts multiple Markdown links separated by commas to array of { name, url } objects + * @param {String} links + * @returns {Array} + */ +function convertMultipleMDLinksToArray(links){ + let result = []; + if (links.includes(',')) { + let singleLinks = links.split(','); + singleLinks.forEach((link) => { + let obj = convertMDLinkToObject(link.trim()); + result.push(obj); + }); + return result; + } + let obj = convertMDLinkToObject(links); + result.push(obj); + return result; +} + +/** + * Initiates the button for expanding/contracting the author list + */ +function initiateAuthorListToggleButton(){ + let button = document.getElementById('reference-button'); + button.onclick = expandAuthorList; +} + +/** + * Expands the list of authors + */ +function expandAuthorList(){ + let referenceListEl = document.getElementById('reference-list'); + referenceListEl.style.transform = 'scale(1, 1)'; + this.innerHTML = ''; + this.onclick = contractAuthorList; +} + +/** + * Contracts the list of authors + */ +function contractAuthorList(){ + let referenceListEl = document.getElementById('reference-list'); + referenceListEl.style.transform = 'scale(0, 0)'; + this.innerHTML = ''; + this.onclick = expandAuthorList; +} + +/** + * Updates the author links to open in a new tab + */ +function updateAuthorLinkTarget(){ + let moduleList = document.getElementById('module-list-training'); + let links = moduleList.querySelectorAll('.author-data a'); + links.forEach((link) => { + link.setAttribute("target", "_blank"); + }); +} + +/** + * Allows user to add custom notes + */ +function initiateEditNotes(){ + let editButtons = document.getElementsByClassName('edit-trainer-notes-button'); + for (let editButton of editButtons) { + editButton.onclick = showEditNotes; + } + let submitButtons = document.getElementsByClassName('submit-notes'); + for (let submitButton of submitButtons) { + submitButton.onclick = submitNotes; + } + let dismissButtons = document.getElementsByClassName('close-notes-popup'); + for (let dismissButton of dismissButtons) { + dismissButton.onclick = dismissEditNotes; + } + let resetButtons = document.getElementsByClassName('reset-notes'); + for (let resetButton of resetButtons) { + resetButton.onclick = clearNote; + } +} + +function showEditNotes(){ + let parentNode = this.parentNode; + let popupEl = parentNode.querySelector('.edit-trainer-notes-popup'); + popupEl.style.transform = 'scale(1,1)'; +} + +function dismissEditNotes() { + let popupEl = this.parentNode.parentNode.parentNode; + popupEl.style.transform = 'scale(0,0)'; +} + +function submitNotes(){ + let popupEl = this.parentNode.parentNode.parentNode.parentNode.parentNode; + popupEl.style.transform = 'scale(0,0)'; + + let parentEl = popupEl.parentNode; + let displayEl = parentEl.querySelector('.trainer-notes-display'); + let form = this.parentNode.parentNode; + let newNote = getChildByClassName(form, 'notes').value; + displayEl.innerText = newNote; + let addNotesButton = parentEl.querySelector('.edit-trainer-notes-button'); + if (newNote != '') { + addNotesButton.innerHTML = ' Edit your notes'; + } else { + addNotesButton.innerHTML = 'Add trainer notes'; + } +} + +/** + * Clears the input textfield for the note. It does not save the changes. + */ +function clearNote(){ + let form = this.parentNode.parentNode; + let inputEl = form.querySelector('.notes'); + inputEl.value = ""; +} + /** * and here we go */ @@ -772,4 +1002,6 @@ window.onload = function () { initiateMobileButtons(); calculateTime(); calculateSummary(); + initiateAuthorListToggleButton(); + initiateEditNotes(); } \ No newline at end of file diff --git a/training.html b/training.html index 9e0175af..2c56a31f 100644 --- a/training.html +++ b/training.html @@ -70,7 +70,24 @@

    Filter modules by tags

    --> -
    +
    +
    +
    +
    +

    Add your notes

    + +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    Add Module @@ -79,7 +96,10 @@

    Filter modules by tags

    {{ module.module.name }}

    Learning Objective:

    {% if module.module.description %}

    {{ module.module.description | markdownify }}

    {% endif %} - {% if module.module.license %}

    License: {{ module.module.license | markdownify }}

    {% endif %} +

    + Add trainer notes +

    + {% if module.module.license %}{{ module.module.license | prepend: "License: " | markdownify }}{% endif %}

    @@ -139,14 +159,45 @@

    {{ module.module.name }}

    +
    +
    +
    +

    Add your notes

    + +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    {% if res.resource.url %}Source   {% endif %} -
    {{ res.resource.name }} | {{ diff_text }} | {{ res.resource.duration }} minutes | {{ res.resource.cost }} $
    +
    {{ res.resource.name }} | {{ diff_text }} {% if res.resource.duration > 0 %}| {{ res.resource.duration }} minutes{% endif %} | {{ res.resource.cost }} $
    {% if res.resource.description %} {{ res.resource.description | markdownify }} {% endif %} +

    + Add trainer notes +

    {% if res.resource.license %} {{ res.resource.license | prepend: "License: " | markdownify }} {% endif %} + {% if res.resource.author %} +

    + {{ res.resource.author | prepend: "Author(s): " | markdownify }} + +
    + {% endif %} +
    @@ -176,7 +227,7 @@

    {{ module.module.name }}

    - + minutes @@ -319,7 +370,7 @@

    Summary

    -

    Resources

    +

    Resources

    @@ -365,7 +416,14 @@

    Attachments

    This feature is coming

    -
    +
    +
    +

    References

    + +
    +
      +
      +
      Save Download
      Quantity