From ddfde3282cf9488371e7b45edd9875e63563d3d6 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Mon, 5 Apr 2021 20:06:54 +0200 Subject: [PATCH 1/3] added separate contact page and added xmpp (closes #48) and threema --- src/_includes/layouts/base.njk | 2 +- src/de/contact.html | 43 ++++++++++++++++++++++++++++++++++ src/de/donate.html | 2 +- src/de/imprint.html | 36 ++++++++++------------------ src/de/privacy.html | 3 ++- src/en/contact.html | 41 ++++++++++++++++++++++++++++++++ src/en/donate.html | 2 +- src/en/imprint.html | 34 ++++++++++----------------- src/img/threema.svg | 1 + src/img/xmpp.svg | 1 + 10 files changed, 117 insertions(+), 48 deletions(-) create mode 100644 src/de/contact.html create mode 100644 src/en/contact.html create mode 100644 src/img/threema.svg create mode 100644 src/img/xmpp.svg diff --git a/src/_includes/layouts/base.njk b/src/_includes/layouts/base.njk index fd358e0..31b61d6 100644 --- a/src/_includes/layouts/base.njk +++ b/src/_includes/layouts/base.njk @@ -96,7 +96,7 @@ title: sp-codes diff --git a/src/en/contact.html b/src/en/contact.html new file mode 100644 index 0000000..dd16f0b --- /dev/null +++ b/src/en/contact.html @@ -0,0 +1,41 @@ +--- +layout: base.njk +key: contact +title: Contact +eleventyNavigation: + key: contact + title: Contact + icon: comment-dots + order: 3 +--- +

Contact Information

+

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.

+
+ +
diff --git a/src/en/donate.html b/src/en/donate.html index 1d727b3..63041fd 100644 --- a/src/en/donate.html +++ b/src/en/donate.html @@ -6,7 +6,7 @@ eleventyNavigation: key: donate title: Donate icon: hand-holding-heart - order: 3 + order: 4 ---

Donate

diff --git a/src/en/imprint.html b/src/en/imprint.html index 2d722a4..9b4d755 100644 --- a/src/en/imprint.html +++ b/src/en/imprint.html @@ -11,25 +11,17 @@ title: sp-codes Deutschland

-

Contact Information

-

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.

- +

Contact

+

+ E-Mail-Address: mail@sp-codes.de
+ More contact options: https://sp-codes.de/{{locale}}/contact
+

+
+
+

Domains

+
diff --git a/src/img/threema.svg b/src/img/threema.svg new file mode 100644 index 0000000..7b89b35 --- /dev/null +++ b/src/img/threema.svg @@ -0,0 +1 @@ +Threema icon diff --git a/src/img/xmpp.svg b/src/img/xmpp.svg new file mode 100644 index 0000000..5a0b67c --- /dev/null +++ b/src/img/xmpp.svg @@ -0,0 +1 @@ +XMPP icon From 4448b13580a28a63f964679ba87578003e8212ca Mon Sep 17 00:00:00 2001 From: samuel-p Date: Mon, 5 Apr 2021 21:46:34 +0200 Subject: [PATCH 2/3] minor bug fix in translation urls added more heading icons --- .eleventy.js | 3 +++ src/_includes/layouts/base.njk | 17 +++-------------- src/de/contact.html | 2 +- src/de/imprint.html | 2 +- src/de/privacy.html | 2 +- src/en/contact.html | 2 +- src/en/imprint.html | 2 +- src/en/privacy.html | 6 ++---- 8 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 9a02e4b..df43924 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -11,6 +11,9 @@ module.exports = function(eleventyConfig) { "node_modules/@fortawesome/fontawesome-free/webfonts/": "font", "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 { dir: { diff --git a/src/_includes/layouts/base.njk b/src/_includes/layouts/base.njk index 31b61d6..98618b1 100644 --- a/src/_includes/layouts/base.njk +++ b/src/_includes/layouts/base.njk @@ -43,14 +43,8 @@ title: sp-codes
{% 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%} @@ -74,20 +68,15 @@ title: sp-codes
{% 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%} {% endfor %}
+

{{url}}

{{ content | safe }} diff --git a/src/de/contact.html b/src/de/contact.html index b79223a..2d31e59 100644 --- a/src/de/contact.html +++ b/src/de/contact.html @@ -8,7 +8,7 @@ eleventyNavigation: icon: comment-dots order: 3 --- -

Kontaktmöglichkeiten

+

Kontaktmöglichkeiten

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 hören.

diff --git a/src/de/imprint.html b/src/de/imprint.html index 647cea9..a2fc900 100644 --- a/src/de/imprint.html +++ b/src/de/imprint.html @@ -2,7 +2,7 @@ layout: base.njk title: Impressum --- -

Impressum

+

Impressum

Angaben gemäß § 5 TMG:

Samuel Philipp
diff --git a/src/de/privacy.html b/src/de/privacy.html index 336d9c7..008d443 100644 --- a/src/de/privacy.html +++ b/src/de/privacy.html @@ -2,7 +2,7 @@ layout: base.njk title: Datenschutzerklärung --- -

Datenschutzerklärung

+

Datenschutzerklärung

Verantwortlicher

diff --git a/src/en/contact.html b/src/en/contact.html index dd16f0b..22a4f6c 100644 --- a/src/en/contact.html +++ b/src/en/contact.html @@ -8,7 +8,7 @@ eleventyNavigation: icon: comment-dots order: 3 --- -

Contact Information

+

Contact Information

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.

diff --git a/src/en/imprint.html b/src/en/imprint.html index 9b4d755..3e0e9e5 100644 --- a/src/en/imprint.html +++ b/src/en/imprint.html @@ -2,7 +2,7 @@ layout: base.njk title: sp-codes --- -

Imprint

+

Imprint

Information as per § 5 TMG:

Samuel Philipp
diff --git a/src/en/privacy.html b/src/en/privacy.html index 439cb13..d540d21 100644 --- a/src/en/privacy.html +++ b/src/en/privacy.html @@ -1,8 +1,6 @@ --- layout: base.njk -title: sp-codes +title: Privacy --- - -

Privacy

+

Privacy

Sorry, this document is only available in German so far. Read it here.

- From 3aadfeeaf982383cd2c57e208de344410195eb76 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Tue, 6 Apr 2021 12:41:01 +0200 Subject: [PATCH 3/3] updated contact links --- src/de/donate.html | 2 +- src/en/donate.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/donate.html b/src/de/donate.html index 151b8d8..4ac4214 100644 --- a/src/de/donate.html +++ b/src/de/donate.html @@ -24,7 +24,7 @@ eleventyNavigation:

Banküberweisung

-
Wenn Du mir etwas überweisen willst, schreib mir einfach eine kurze Nachricht. +
Wenn Du mir etwas überweisen willst, schreib mir einfach eine kurze Nachricht. Ich schicke dir dann schnellstmöglich meine Bankverbindung zu. Ganz besonders freue ich mich auch über einen Dauerauftrag.
diff --git a/src/en/donate.html b/src/en/donate.html index 63041fd..40bb010 100644 --- a/src/en/donate.html +++ b/src/en/donate.html @@ -23,7 +23,7 @@ eleventyNavigation:

Bank transfer

-
If you want to transfer some money to me, just write me a short message. I +
If you want to transfer some money to me, just write me a short message. I will then send you my bank details as soon as possible. I am especially happy about a standing order.