minor bug fix in translation urls
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
added more heading icons
This commit is contained in:
parent
ddfde3282c
commit
4448b13580
8 changed files with 13 additions and 23 deletions
|
@ -11,6 +11,9 @@ module.exports = function(eleventyConfig) {
|
||||||
"node_modules/@fortawesome/fontawesome-free/webfonts/": "font",
|
"node_modules/@fortawesome/fontawesome-free/webfonts/": "font",
|
||||||
"node_modules/flag-icon-css/flags/4x3/(de|us)*": "flags"
|
"node_modules/flag-icon-css/flags/4x3/(de|us)*": "flags"
|
||||||
});
|
});
|
||||||
|
eleventyConfig.addShortcode("translatedUrl", function(currentLocale, newLocale) {
|
||||||
|
return this.page.url.replace(new RegExp(`\/${currentLocale}\/`), `/${newLocale}/`);
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
|
|
|
@ -43,14 +43,8 @@ title: sp-codes
|
||||||
<div class="flex-grow-1"></div>
|
<div class="flex-grow-1"></div>
|
||||||
|
|
||||||
{% for language in site.languages %}
|
{% for language in site.languages %}
|
||||||
{% set translatedUrl = "/" + language.code + "/" %}
|
|
||||||
{% for item in collections.all %}
|
|
||||||
{% if item.data.key == key and item.data.locale == language.code and not item.data.hidden %}
|
|
||||||
{% set translatedUrl = item.url %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor%}
|
|
||||||
<div {% if language.code== locale %} class="active" {% endif %}>
|
<div {% if language.code== locale %} class="active" {% endif %}>
|
||||||
<a href="{{ translatedUrl | url }}" class="ml-3">
|
<a href="{% translatedUrl locale, language.code %}" class="ml-3">
|
||||||
<span class="flag-icon flag-icon-{{ language.icon }}" title="{{ language.label }}"></span>
|
<span class="flag-icon flag-icon-{{ language.icon }}" title="{{ language.label }}"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,20 +68,15 @@ title: sp-codes
|
||||||
|
|
||||||
<div class="lang-large">
|
<div class="lang-large">
|
||||||
{% for language in site.languages %}
|
{% for language in site.languages %}
|
||||||
{% set translatedUrl = "/" + language.code + "/" %}
|
|
||||||
{% for item in collections.all %}
|
|
||||||
{% if item.data.key == key and item.data.locale == language.code and not item.data.hidden %}
|
|
||||||
{% set translatedUrl = item.url %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor%}
|
|
||||||
<div {% if language.code== locale %} class="active" {% endif %}>
|
<div {% if language.code== locale %} class="active" {% endif %}>
|
||||||
<a href="{{ translatedUrl | url }}" class="ml-3">
|
<a href="{% translatedUrl locale, language.code %}" class="ml-3">
|
||||||
<span class="flag-icon flag-icon-{{ language.icon }}" title="{{ language.label }}"></span>
|
<span class="flag-icon flag-icon-{{ language.icon }}" title="{{ language.label }}"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<p>{{url}}</p>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
|
@ -8,7 +8,7 @@ eleventyNavigation:
|
||||||
icon: comment-dots
|
icon: comment-dots
|
||||||
order: 3
|
order: 3
|
||||||
---
|
---
|
||||||
<h1>Kontaktmöglichkeiten</h1>
|
<h1><i class="fas fa-comment-dots"></i> Kontaktmöglichkeiten</h1>
|
||||||
<p>Du möchtest mit mir in Kontakt treten, mir einen Fehler mitteilen, hast eine Frage zu einem Dienst oder möchtest
|
<p>Du möchtest mit mir in Kontakt treten, mir einen Fehler mitteilen, hast eine Frage zu einem Dienst oder möchtest
|
||||||
mich unterstützen? Schick mir gerne deine Nachricht auf einem der folgenden Wege. Ich freue mich von dir zu
|
mich unterstützen? Schick mir gerne deine Nachricht auf einem der folgenden Wege. Ich freue mich von dir zu
|
||||||
hören.</p>
|
hören.</p>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
title: Impressum
|
title: Impressum
|
||||||
---
|
---
|
||||||
<h1>Impressum</h1>
|
<h1><i class="fas fa-info-circle"></i> Impressum</h1>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<h2>Angaben gemäß § 5 TMG:</h2>
|
<h2>Angaben gemäß § 5 TMG:</h2>
|
||||||
<p>Samuel Philipp<br/>
|
<p>Samuel Philipp<br/>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
title: Datenschutzerklärung
|
title: Datenschutzerklärung
|
||||||
---
|
---
|
||||||
<h1>Datenschutzerklärung</h1>
|
<h1><i class="fas fa-user-secret"></i> Datenschutzerklärung</h1>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h2>Verantwortlicher</h2>
|
<h2>Verantwortlicher</h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -8,7 +8,7 @@ eleventyNavigation:
|
||||||
icon: comment-dots
|
icon: comment-dots
|
||||||
order: 3
|
order: 3
|
||||||
---
|
---
|
||||||
<h1>Contact Information</h1>
|
<h1><i class="fas fa-comment-dots"></i> Contact Information</h1>
|
||||||
<p>You want to contact me, report a problem, have a question about a service or would like to support me? Please
|
<p>You want to contact me, report a problem, have a question about a service or would like to support me? Please
|
||||||
send me your message in any of the following ways. I am looking forward to receive your message.</p>
|
send me your message in any of the following ways. I am looking forward to receive your message.</p>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
title: sp-codes
|
title: sp-codes
|
||||||
---
|
---
|
||||||
<h1>Imprint</h1>
|
<h1><i class="fas fa-info-circle"></i> Imprint</h1>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<h2>Information as per § 5 TMG:</h2>
|
<h2>Information as per § 5 TMG:</h2>
|
||||||
<p>Samuel Philipp<br/>
|
<p>Samuel Philipp<br/>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
---
|
---
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
title: sp-codes
|
title: Privacy
|
||||||
---
|
---
|
||||||
<body class="legal">
|
<h1><i class="fas fa-user-secret"></i> Privacy</h1>
|
||||||
<h2>Privacy</h2>
|
|
||||||
<p>Sorry, this document is only available in German so far. Read it <a href="/de/privacy">here</a>.</p>
|
<p>Sorry, this document is only available in German so far. Read it <a href="/de/privacy">here</a>.</p>
|
||||||
</body>
|
|
||||||
|
|
Loading…
Reference in a new issue