diff --git a/_config.yml b/_config.yml index 4fa74f52f57706436d949dafe3224a8f8e0de966..57af8c9e4df6f80a1f7089e682ad76ae2c49ff68 100644 --- a/_config.yml +++ b/_config.yml @@ -17,9 +17,12 @@ directory: vendor: /assets/vendor/ videos: /assets/videos/ +languages: ["en", "de"] + # Defaults default: - title_image: hifis_page_title_background.svg + title_image: hifis_page_title_background.svg + lang: en defaults: - @@ -39,7 +42,18 @@ defaults: type: "posts" values: author: "HIFIS" - + - + scope: + path: "" + values: + lang: "en" + - + scope: + path: "de" + values: + lang: "de" + hidden: true + gitlab: project_url: https://gitlab.hzdr.de/hifis/hifis.net diff --git a/_data/_i18n/translations.yml b/_data/_i18n/translations.yml new file mode 100644 index 0000000000000000000000000000000000000000..66610f6187865754fdbdaa9bdab67a7b2bf68181 --- /dev/null +++ b/_data/_i18n/translations.yml @@ -0,0 +1,11 @@ +en: + global: + lang-selector: "The content of this site is also available in other languages:" + lang-de: Deutsch + lang-en: English (US) + +de: + global: + lang-selector: "Dieser Inhalt ist auch in anderen Sprachen verfügbar:" + lang-de: Deutsch + lang-en: English (US) diff --git a/_includes/blog_post/metadata.html b/_includes/blog_post/metadata.html index 9a1c19cc5d78e8c23629ccce614aa376ac5c4c89..3e30e84b62419acd70ee7a26f5243efb07daef32 100644 --- a/_includes/blog_post/metadata.html +++ b/_includes/blog_post/metadata.html @@ -28,7 +28,9 @@ {% if include.categories.size > 0 %} <h3><i class="fas fa-list"></i> Categories:</h3> {% for category in include.categories %} + {%- unless site.languages contains category -%} <span class="badge badge-pill badge-secondary">{{ category | capitalize }}</span> + {%- endunless -%} {% endfor %} {% endif %} diff --git a/_includes/cards/post_card_image.html b/_includes/cards/post_card_image.html index b20f01b5b814c413feef1fb885fa46ff66307512..d4bb2d5dbdbc6c266ab9e69bf578ebe5d5526980 100644 --- a/_includes/cards/post_card_image.html +++ b/_includes/cards/post_card_image.html @@ -27,7 +27,11 @@ </span> <span class="badge badge-dark"> <i class="fas fa-tag" aria-hidden="true"></i> - {{ include.post.categories[0] | capitalize }} + {%- for category in include.post.categories -%} + {%- unless site.languages contains category -%} + {{ category | capitalize }} + {%- endunless -%} + {%- endfor -%} </span> </div> <div class="card-body"> diff --git a/_includes/language-selector.html b/_includes/language-selector.html new file mode 100644 index 0000000000000000000000000000000000000000..fb4bca04012eb4938211748456d3741bd7b3f8a9 --- /dev/null +++ b/_includes/language-selector.html @@ -0,0 +1,25 @@ +{%- assign posts=site.posts | where:"lang_ref", page.lang_ref | where_exp: "post", "page.lang != post.lang" | sort: 'path' -%} +{%- assign pages=site.pages | where:"lang_ref", page.lang_ref | where_exp: "item", "page.lang != item.lang" | sort: 'path' -%} +{%- if posts.size > 0 -%} +{% assign items = posts %} +{%- else -%} +{% assign items = pages %} +{%- endif -%} +{%- comment -%} +Only grab elements from the post list, that are the equivalent according to +the lang_ref metadata. Also ensure, that only posts are grabbed that have a +different language. +{%- endcomment -%} +{%- assign t = site.data._i18n.translations[page.lang]['global'] -%} +<p class="text-right"> + {%- for item in items -%} + {%- assign language_text = "lang-" | append: item.lang -%} + {%- if forloop.first -%} + <i class="fas fa-globe-europe"></i> <i>{{ t['lang-selector'] }} </i> + {%- endif -%} + <a href="{{ item.url | relative_url }}">{{ t[language_text] }}</a> + {%- unless forloop.last -%} + | + {%- endunless -%} + {%- endfor -%} +</p> diff --git a/_includes/minimal_head.html b/_includes/minimal_head.html index 2ba27dbbccc616414702251b8f94e7897e807d02..539a09fa3ae43634f209ff1cee3011fcf9bec2d5 100644 --- a/_includes/minimal_head.html +++ b/_includes/minimal_head.html @@ -8,3 +8,11 @@ <link rel="stylesheet" href="{{ '/assets/css/fontawesome.css' | relative_url }}"> <link rel="stylesheet" href="{{ '/assets/css/modernizr.css' | relative_url }}"> <link rel="stylesheet" href="{{ '/assets/css/hifis.css' | relative_url }}"> +{%- assign posts = site.posts | where:"lang_ref", page.lang_ref -%} +{%- for post in posts -%} +<link rel="alternate" hreflang="{{ post.lang }}" href="{{ post.url | relative_url }}"> +{%- endfor -%} +{%- assign pages = site.pages | where:"lang_ref", page.lang_ref -%} +{%- for page in pages -%} +<link rel="alternate" hreflang="{{ page.lang }}" href="{{ page.url | relative_url }}"> +{%- endfor -%} diff --git a/_includes/top.html b/_includes/top.html index 33ec82c27532163c11147bf109b8c8b826a4e0e3..20e3025c756975343630f40ebf55a91c0751b40e 100644 --- a/_includes/top.html +++ b/_includes/top.html @@ -7,7 +7,7 @@ accordingly. In contrast, if everything goes well, Modernizr will remove that special class. {% endcomment %} -<html lang="en-US" class="modernizr-no-js"> +<html lang="{{ page.lang }}" class="modernizr-no-js"> <head> {% include minimal_head.html %} diff --git a/_layouts/blogpost.html b/_layouts/blogpost.html index dd5b28936cf5c0161a90f9fc391e5f6b65a94faf..f91d342913cb52f86edbebe426de6dd4bb10b624 100644 --- a/_layouts/blogpost.html +++ b/_layouts/blogpost.html @@ -26,6 +26,7 @@ handling certain scenarios in markdown. {% endcomment %} <article class="non-excerpt-content"> + {%- include language-selector.html -%} {{ content }} </article> </section> diff --git a/_layouts/default.html b/_layouts/default.html index 5bd2a794ec0c7341b282e7c20aa700356494039e..8b4a842a55ed8c5a2cf049d0365a364e34390487 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -9,6 +9,7 @@ <section> <article> + {%- include language-selector.html -%} {{ content }} </article> </section> diff --git a/_layouts/frontpage.html b/_layouts/frontpage.html index 54b88e040aa8bda549b59b8d212c0814a1d970d3..14ecfe24deaa7dad16e6d7b31ab55c85f8178827 100644 --- a/_layouts/frontpage.html +++ b/_layouts/frontpage.html @@ -21,14 +21,20 @@ {% endif %} <h1>News</h1> <div class="flex-cards"> - {% for post in site.posts limit:5 %} - {% if forloop.index < 4 -%} - {% assign class="" %} - {% else -%} - {% assign class="hide-on-mobile" %} - {% endif -%} - {% include cards/post_card_image.html post=post class=class %} - {% endfor %} + {%- assign posts = site.posts | where:"lang", site.default.lang -%} + {%- for post in posts limit:5 -%} + {%- assign post_translated = site.categories[page.lang] | where_exp: "item", "post.lang_ref == item.lang_ref" | first -%} + {%- if forloop.index < 4 -%} + {%- assign class="" -%} + {%- else -%} + {%- assign class="hide-on-mobile" -%} + {%- endif -%} + {%- if post_translated -%} + {%- include cards/post_card_image.html post=post_translated class=class -%} + {%- else -%} + {%- include cards/post_card_image.html post=post class=class -%} + {%- endif -%} + {%- endfor -%} </div> <a href="{{ 'news/' | relative_url }}" class="btn btn-outline-secondary">More</a> </section> diff --git a/_posts/2020/03/2020-03-13-jsc-hpc-support-for-covid-19-research.md b/_posts/2020/03/2020-03-13-jsc-hpc-support-for-covid-19-research.md index f5e13230358d1ad55fe42ae61f073ac7e4867cfe..fcdd4599dbb0210dc0fa64ed69fa518421d3d186 100644 --- a/_posts/2020/03/2020-03-13-jsc-hpc-support-for-covid-19-research.md +++ b/_posts/2020/03/2020-03-13-jsc-hpc-support-for-covid-19-research.md @@ -10,6 +10,8 @@ categories: excerpt: The Jülich Supercomputing Center (JSC) offers computing time and support on its HPC facilities for research on the COVID-19 virus. +lang: en +lang_ref: 2020-03-13-jsc-hpc-support-for-covid-19-research --- {{ page.excerpt }} diff --git a/_posts/2020/04/2020-04-06-hifis-support-folding-at-home.md b/_posts/2020/04/2020-04-06-hifis-support-folding-at-home.md index a46f88a429682402c835ca57430434416c462321..5412c5b9a3174b6a3282cc9cbebed4df492a3cea 100644 --- a/_posts/2020/04/2020-04-06-hifis-support-folding-at-home.md +++ b/_posts/2020/04/2020-04-06-hifis-support-folding-at-home.md @@ -8,6 +8,8 @@ layout: blogpost categories: - news excerpt_separator: <!--more--> +lang: en +lang_ref: 2020-04-06-hifis-support-folding-at-home --- The Helmholtz platform HIFIS, the HZDR and the Center for Advanced Systems diff --git a/_posts/2020/04/2020-04-08-kit-supports-distributed-protein-computing-projects.md b/_posts/2020/04/2020-04-08-kit-supports-distributed-protein-computing-projects.md index 03f9f2447b72aefa9e528b9b02fbc54f41346411..4d17004a1b75632fc4bf613bca5c1070d51f6d50 100644 --- a/_posts/2020/04/2020-04-08-kit-supports-distributed-protein-computing-projects.md +++ b/_posts/2020/04/2020-04-08-kit-supports-distributed-protein-computing-projects.md @@ -11,6 +11,8 @@ excerpt: Since end of March, the Grid Computing Centre Karlsruhe and the HPC systems of KIT support the distributed computing projects Folding@Home and Rosetta@home, helping to improve the understanding of proteins, including those of SARS-CoV-2. +lang: en +lang_ref: 2020-04-08-kit-supports-distributed-protein-computing-projects --- Since end of March, the diff --git a/_posts/2020/04/2020-04-15-hifis-software-workshops-in-2020.md b/_posts/2020/04/2020-04-15-hifis-software-workshops-in-2020.md index 8a17138ffe6db09e53c4cd9c8b8e4a375b87ebf6..9332f6b864af47180e046ff858dc1be7035447e9 100644 --- a/_posts/2020/04/2020-04-15-hifis-software-workshops-in-2020.md +++ b/_posts/2020/04/2020-04-15-hifis-software-workshops-in-2020.md @@ -11,6 +11,8 @@ excerpt: "HIFIS workshop cluster in spring and autumn 2020: Basic Software Carpentry, Introduction to GitLab and Bring Your Own Script. Specialized workshops are being planned: Catch them all by keeping an eye on our events page!" +lang: en +lang_ref: 2020-04-15-hifis-software-workshops-in-2020 --- Several different software development trainings will be offered to researchers. diff --git a/_posts/2020/05/2020-05-15-guidelines-for-chatting.md b/_posts/2020/05/2020-05-15-guidelines-for-chatting.md index 3725eb4a469830e543fe7794fea56466ae25ecaa..6219da63c1d448129946038262916f1e3394705a 100644 --- a/_posts/2020/05/2020-05-15-guidelines-for-chatting.md +++ b/_posts/2020/05/2020-05-15-guidelines-for-chatting.md @@ -14,6 +14,8 @@ redirect_from: excerpt: Whenever you choose and set up a chat system you should as well implement a netiquette and best practices for you and your team members from the start. +lang: en +lang_ref: 2020-05-15-guidelines-for-chatting --- ## Scope diff --git a/_posts/2020/05/2020-05-15-guidelines-for-video-conferencing.md b/_posts/2020/05/2020-05-15-guidelines-for-video-conferencing.md index f4d40ac0253c543538e70df75c40f052421b8b31..b2295fe11294b5bf862a91dd2fde53070367d566 100644 --- a/_posts/2020/05/2020-05-15-guidelines-for-video-conferencing.md +++ b/_posts/2020/05/2020-05-15-guidelines-for-video-conferencing.md @@ -19,6 +19,8 @@ excerpt: Using a video conferencing tool shall not hamper an effective meeting and should be used to make the virtual get-together as efficient as possible when participants are not at the same place. +lang: en +lang_ref: 2020-05-15-guidelines-for-video-conferencing --- ## Scope diff --git a/_posts/2020/06/2020-06-01-hifis-software-helpdesk-launched.md b/_posts/2020/06/2020-06-01-hifis-software-helpdesk-launched.md index 4e9054654504cb6d7bc093f242f9717f406773cb..d3278e6ab5c9ead4d00bf28ea09ea14c139738e6 100644 --- a/_posts/2020/06/2020-06-01-hifis-software-helpdesk-launched.md +++ b/_posts/2020/06/2020-06-01-hifis-software-helpdesk-launched.md @@ -12,6 +12,8 @@ excerpt: Using common HIFIS authorization and authentication infrastructure (future Helmholtz AAI), users can simply sign in using personal access data of their home institution or even their personal GitHub account. +lang: en +lang_ref: 2020-06-01-hifis-software-helpdesk-launched --- The [HIFIS Software Helpdesk](https://hifis-help.hzdr.de) has been launched. diff --git a/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md b/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md index 64ff75f2cc8dab93a68d523016127faf65986d7b..c154a1e9b758eb750d567ec49fd419c7cc7ca03b 100644 --- a/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md +++ b/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md @@ -8,6 +8,8 @@ layout: blogpost categories: - news excerpt_separator: <!--more--> +lang: en +lang_ref: 2020-06-19-hifis-in-the-egi-newsletter --- _Helmholtz Federated IT Services - Promoting IT based science at all levels_, diff --git a/_posts/2020/06/2020-06-26-guidelines-for-collaborative-notetaking.md b/_posts/2020/06/2020-06-26-guidelines-for-collaborative-notetaking.md index 5d94af9ab73894c72a5707bd2f2d9d52142c7542..68654f65c48d53055c40414b162129e2df1fdae2 100644 --- a/_posts/2020/06/2020-06-26-guidelines-for-collaborative-notetaking.md +++ b/_posts/2020/06/2020-06-26-guidelines-for-collaborative-notetaking.md @@ -19,6 +19,8 @@ excerpt: follow the note taking directly but also to contribute when misunderstandings, misinterpretations, delays in record keeping and other obstacles hinder the success of a joint meeting. +lang: en +lang_ref: 2020-06-26-guidelines-for-collaborative-notetaking --- ## Scope diff --git a/_posts/2020/07/2020-07-08-haicore-kit.md b/_posts/2020/07/2020-07-08-haicore-kit.md index 1f68d07f70c0a2038b006274e3286ad439a8e3db..6fda94bf9245469f3c7a56eb96df6a3a7d43a9ce 100644 --- a/_posts/2020/07/2020-07-08-haicore-kit.md +++ b/_posts/2020/07/2020-07-08-haicore-kit.md @@ -8,6 +8,8 @@ layout: blogpost categories: - news excerpt_separator: <!--more--> +lang: en +lang_ref: 2020-07-08-haicore-kit --- A super-fast computer system dedicated to [Helmholtz artificial intelligence (AI)](https://www.helmholtz.ai/) research has been installed at [KIT](https://www.kit.edu). diff --git a/contact.md b/contact.md index 376829e59e665d2ed3ec0349219d625410978b7f..b269c8b008f430ba0a3da7c03d176285cab5e8a6 100644 --- a/contact.md +++ b/contact.md @@ -4,6 +4,8 @@ title_image: default layout: default excerpt: Contact to HIFIS Office. +lang: en +lang_ref: contact --- ## Questions to this website? Contact us! diff --git a/de/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md b/de/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md new file mode 100644 index 0000000000000000000000000000000000000000..1e775d24cfe00a4f5d60587a4b763051ee2eaa11 --- /dev/null +++ b/de/_posts/2020/06/2020-06-19-hifis-in-the-egi-newsletter.md @@ -0,0 +1,23 @@ +--- +title: "HIFIS im EGI Newsletter" +title_image: default +data: 2020-06-08 +authors: + - jandt +layout: blogpost +categories: + - news +excerpt_separator: <!--more--> +lang: de +lang_ref: 2020-06-19-hifis-in-the-egi-newsletter +--- + +_Helmholtz Federated IT Services - Promoting IT based science at all levels_, +so lautet der Titel unseres Artikels, der im Newsletter unserer Freunde von der +EGI-Foundation erschienen ist. +In dem EGI-Newsletter geben wir einen Überblick über die neue HIFIS-Plattform. +<!--more--> + +<a type="button" class="btn btn-outline-primary btn-lg" href="https://www.egi.eu/about/newsletters/helmholtz-federated-it-services-promoting-it-based-science-at-all-levels/"> + <i class="fas fa-external-link-alt"></i> Weiterlesen +</a> diff --git a/de/_posts/2020/07/.gitkeep b/de/_posts/2020/07/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/de/_posts/2020/07/2020-07-08-haicore-kit.md b/de/_posts/2020/07/2020-07-08-haicore-kit.md new file mode 100644 index 0000000000000000000000000000000000000000..2b87fb7608746e67ad477ae3bbae85eab2c7346a --- /dev/null +++ b/de/_posts/2020/07/2020-07-08-haicore-kit.md @@ -0,0 +1,23 @@ +--- +title: "Superschnelles AI-Rechensystem für HAICORE" +title_image: default +data: 2020-07-08 +authors: + - jandt +layout: blogpost +categories: + - news +excerpt_separator: <!--more--> +lang_ref: 2020-07-08-haicore-kit +--- + +Am [KIT](https://www.kit.edu) wurde ein superschnelles Computersystem für +[Hemholtz Artificial Intelligence (AI)](https://www.helmholtz.ai/) Forschung installiert. +Dies ist der erste Standort in Europa, an dem das mit InfiniBand verbundene NVIDIA DGX A100 AI-System in Betrieb genommen wurde, +finanziert aus der Helmholtz AI Computing Resources Initiative (HAICORE). +Der gemeinsame Zugang zu diesen Kapazitäten wird über den von HIFIS angebotenen AAI-Dienst hergestellt. +<!--more--> + +<a type="button" class="btn btn-outline-primary btn-lg" href="https://www.kit.edu/kit/english/pi_2020_056_super-fast-ai-system-installed-at-kit.php"> + <i class="fas fa-external-link-alt"></i> Weitere Informationen +</a> diff --git a/services/index.md b/services/index.md index 3b618d859bdc6a509c92e16a8d88ae9a441297e2..aafef0287ea8f040fd99aed594cb32faf06659cc 100644 --- a/services/index.md +++ b/services/index.md @@ -13,7 +13,8 @@ research and especially in times of social distancing. We provide guidelines and helping information. <div class="flex-cards"> -{% for post in site.categories['guidelines'] -%} +{%- assign posts = site.categories['guidelines'] | where: "lang", "en" -%} +{% for post in posts -%} {% include cards/post_card_image.html post=post %} {% endfor -%} </div>