diff --git a/.eleventy.js b/.eleventy.js index df43924..f330d76 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,6 +1,10 @@ const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); -module.exports = function(eleventyConfig) { +module.exports = function (eleventyConfig) { + eleventyConfig.setLiquidOptions({ + dynamicPartials: true, + // strict_filters: true, + }); eleventyConfig.addWatchTarget("./src/scss/"); eleventyConfig.addPlugin(eleventyNavigationPlugin); @@ -11,10 +15,38 @@ 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) { + eleventyConfig.addShortcode("translatedUrl", function (currentLocale, newLocale) { return this.page.url.replace(new RegExp(`\/${currentLocale}\/`), `/${newLocale}/`); }); + eleventyConfig.addFilter('year', function (value) { + return value * 12; + }); + + eleventyConfig.addFilter("sum", function (value) { + return value.map(d => d.amount).reduce((a, b) => a + b); + }); + + eleventyConfig.addFilter("amount", function (value, locale) { + return value.toLocaleString(locale, {minimumFractionDigits: 2}); + }); + + eleventyConfig.addFilter("banktransfers", function (donations) { + return donations + .flatMap(y => y.donations) + .filter(d => d.via === 'banktransfer') + .filter(d => d.first) + .length; + }); + + eleventyConfig.addFilter("cash", function (donations) { + return donations + .flatMap(y => y.donations) + .filter(d => d.via === 'cash') + .filter(d => d.first) + .length; + }); + return { dir: { input: "src", diff --git a/src/_data/donations.json b/src/_data/donations.json index 51e2993..e9b4451 100644 --- a/src/_data/donations.json +++ b/src/_data/donations.json @@ -1,10 +1,68 @@ -{ - "banktransfer": { - "number": 5, - "color": "success" +[ + { + "year": 2021, + "donations": [ + { + "date": "01.06.2021", + "amount": 20, + "via": "banktransfer", + "from": "Rumo", + "first": true + }, + { + "date": "26.04.2021", + "amount": 8.96, + "via": "banktransfer", + "from": null, + "first": false + }, + { + "date": "23.03.2021", + "amount": 30, + "via": "banktransfer", + "from": null, + "first": true + }, + { + "date": "19.02.2021", + "amount": 20, + "via": "banktransfer", + "from": null, + "first": true + }, + { + "date": "02.02.2021", + "amount": 9.01, + "via": "opencollective", + "from": "Dennis H.", + "first": true + }, + { + "date": "20.01.2021", + "amount": 10, + "via": "banktransfer", + "from": null, + "first": true + }, + { + "date": "17.01.2021", + "amount": 4.41, + "via": "opencollective", + "from": "Michael Haak", + "first": true + } + ] }, - "cash": { - "number": 0, - "color": "inactive" + { + "year": 2020, + "donations": [ + { + "date": "04.12.2020", + "amount": 10, + "via": "banktransfer", + "from": null, + "first": true + } + ] } -} +] diff --git a/src/_data/expenses.json b/src/_data/expenses.json new file mode 100644 index 0000000..fc616d1 --- /dev/null +++ b/src/_data/expenses.json @@ -0,0 +1,50 @@ +[ + { + "name": { + "en": "Websites", + "de": "Webseiten" + }, + "type": "Webhosting", + "provider": "netcup", + "amount": 1.99 + }, + { + "name": "Diana", + "type": "VPS", + "provider": "Hetzner", + "amount": 2.96 + }, + { + "name": "Ceres", + "type": "VPS", + "provider": "netcup", + "amount": 5.5 + }, + { + "name": "Venus", + "type": "VPS", + "provider": "netcup", + "amount": 3.33 + }, + { + "name": "Luna", + "type": "Root-Server", + "provider": "netcup", + "amount": 14 + }, + { + "name": "Vesta", + "type": "Root-Server", + "provider": "netcup", + "amount": 11.49 + }, + { + "name": { + "en": "Additional IPv4", + "de": "Zusätzliche IPv4" + }, + "type": "IPv4", + "provider": "netcup", + "amount": 1 + } +] diff --git a/src/_data/services.json b/src/_data/services.json index e29b754..cb03dbe 100644 --- a/src/_data/services.json +++ b/src/_data/services.json @@ -13,7 +13,7 @@ { "id": "matrix", "name": "Matrix", - "icon": "fas fa-comments", + "si": "matrix", "url": "https://chat.sp-codes.de", "status": "https://matrix.sp-codes.de/_matrix/static/", "summary": { @@ -24,7 +24,7 @@ { "id": "jitsi", "name": "Jitsi Meet", - "icon": "fas fa-users", + "si": "jitsi", "url": "https://jitsi.sp-codes.de", "status": "https://jitsi.sp-codes.de", "summary": { @@ -35,7 +35,7 @@ { "id": "mastodon", "name": "Mastodon", - "icon": "fab fa-mastodon", + "si": "mastodon", "url": "https://social.sp-codes.de", "status": "https://social.sp-codes.de/health", "beta": true, @@ -47,7 +47,7 @@ { "id": "gitea", "name": "Gitea", - "icon": "fas fa-code", + "si": "gitea", "url": "https://git.sp-codes.de", "status": "https://git.sp-codes.de", "summary": { diff --git a/src/_data/strings.json b/src/_data/strings.json index 5748020..244dd09 100644 --- a/src/_data/strings.json +++ b/src/_data/strings.json @@ -38,5 +38,49 @@ "maintenance": { "de": "Wartung", "en": "Maintenance" + }, + "date": { + "de": "Datum", + "en": "Date" + }, + "amount": { + "de": "Betrag", + "en": "Amount" + }, + "via": { + "de": "Via", + "en": "Via" + }, + "from": { + "de": "Von", + "en": "Form" + }, + "banktransfer": { + "de": "Überweisung", + "en": "Bank transfer" + }, + "total": { + "de": "Gesamt", + "en": "Total" + }, + "name": { + "de": "Name", + "en": "Name" + }, + "type": { + "de": "Typ", + "en": "Type" + }, + "provider": { + "de": "Anbieter", + "en": "Provider" + }, + "month": { + "de": "Monat", + "en": "Month" + }, + "year": { + "de": "Jahr", + "en": "Year" } } diff --git a/src/_includes/donations-current.html b/src/_includes/donations-current.html new file mode 100644 index 0000000..dc9e88e --- /dev/null +++ b/src/_includes/donations-current.html @@ -0,0 +1,34 @@ + + + + + + + + + + + {% for donation in donations[0].donations %} + + + {% if donation.via == 'opencollective' %} + + {% else %} + + {% endif %} + {% if donation.from %} + + {% else %} + + {% endif %} + + + {% endfor %} + + + + + + + +
{{strings.date[locale]}}{{strings.via[locale]}}{{strings.from[locale]}}{{strings.amount[locale]}}
{{donation.date}}Open Collective{{strings[donation.via][locale]}}{{donation.from}}***{{donation.amount | amount(locale)}} €
{{strings.total[locale]}}{{donations[0].donations | sum | amount(locale)}} €
diff --git a/src/_includes/donations.html b/src/_includes/donations.html new file mode 100644 index 0000000..685dc46 --- /dev/null +++ b/src/_includes/donations.html @@ -0,0 +1,38 @@ +{% for year in donations %} +

{{year.year}}

+ + + + + + + + + + + + {% for donation in year.donations %} + + + {% if donation.via == 'opencollective' %} + + {% else %} + + {% endif %} + {% if donation.from %} + + {% else %} + + {% endif %} + + + {% endfor %} + + + + + + + +
{{strings.date[locale]}}{{strings.via[locale]}}{{strings.from[locale]}}{{strings.amount[locale]}}
{{donation.date}}Open Collective{{strings[donation.via][locale]}}{{donation.from}}***{{donation.amount | amount(locale)}} €
{{strings.total[locale]}}{{year.donations | sum | amount(locale)}} €
+{% endfor %} diff --git a/src/_includes/expenses-current.html b/src/_includes/expenses-current.html new file mode 100644 index 0000000..2810feb --- /dev/null +++ b/src/_includes/expenses-current.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + {% for expense in expenses %} + + {% if expense.name[locale] %} + + {% else %} + + {% endif %} + + + + + + {% endfor %} + + + + + + + + +
{{strings.name[locale]}}{{strings.type[locale]}}{{strings.provider[locale]}}{{strings.amount[locale]}} / {{strings.month[locale]}}{{strings.amount[locale]}} / {{strings.year[locale]}}
{{expense.name[locale]}}{{expense.name}}{{expense.type}}{{expense.provider}}{{expense.amount | amount(locale)}} €{{expense.amount | year | amount(locale)}} €
{{strings.total[locale]}}{{expenses | sum | amount(locale)}} €{{expenses | sum | year | amount(locale)}} €
diff --git a/src/_includes/layouts/services.njk b/src/_includes/layouts/services.njk index 2ea3600..f15e7d6 100644 --- a/src/_includes/layouts/services.njk +++ b/src/_includes/layouts/services.njk @@ -6,5 +6,5 @@ layout: base.njk {{ content | safe }}
- {% include 'services-extended.html' %} + {% include "services-extended.html" %}
diff --git a/src/_includes/profiles.html b/src/_includes/profiles.html index 0187277..dba4605 100644 --- a/src/_includes/profiles.html +++ b/src/_includes/profiles.html @@ -1,18 +1,28 @@
diff --git a/src/_includes/services-extended.html b/src/_includes/services-extended.html index 97d7eef..ac4801c 100644 --- a/src/_includes/services-extended.html +++ b/src/_includes/services-extended.html @@ -6,7 +6,11 @@
TEST-PHASE
{% endif %}
+ {% if service.si %} + + {% else %} + {% endif %}

{{service.name}}{% if service.url %} {% endif %}

{% if service.status %} diff --git a/src/_includes/services-simple.html b/src/_includes/services-simple.html index 85f29bd..e0d1c44 100644 --- a/src/_includes/services-simple.html +++ b/src/_includes/services-simple.html @@ -6,7 +6,11 @@ {% if service.beta == true %}
TEST-PHASE
{% endif %} + {% if service.si %} + + {% else %} + {% endif %}

{{service.name}}{% if service.url %} {% endif %}

diff --git a/src/de/all-donations.html b/src/de/all-donations.html new file mode 100644 index 0000000..ef5510f --- /dev/null +++ b/src/de/all-donations.html @@ -0,0 +1,10 @@ +--- +layout: base.njk +key: all-donations +title: Unterstützen +--- +

Alle Spenden

+ +

➔ Unterstützen

+ +{% include "donations.html" %} diff --git a/src/de/contact.html b/src/de/contact.html index 0d13762..80879f4 100644 --- a/src/de/contact.html +++ b/src/de/contact.html @@ -20,23 +20,23 @@ eleventyNavigation: -
+
Folge mir auf Mastodon oder schicke mir dort eine Nachricht an @samuel_p@social.sp-codes.de
-
+
Schreibe mir auf Matrix an @samuel-p:matrix.sp-codes.de
-
+
Schreibe mir auf XMPP an @samuel-p:dismail.de
-
+
Schreibe mir auf Threema an die ID YSCU6F6U
diff --git a/src/de/donate.html b/src/de/donate.html index f0bad9a..f299062 100644 --- a/src/de/donate.html +++ b/src/de/donate.html @@ -14,7 +14,7 @@ eleventyNavigation: beteiligen oder mir eine kleine Anerkennung für meinen Blog zukommen lassen willst, kannst du mich über die folgenden Wege unterstützen1:

-
+

Empfehlen

@@ -29,7 +29,7 @@ eleventyNavigation: einen Dauerauftrag.
Banküberweisung {{ strings.supporters[locale] }} + src="https://shields.sp-codes.de/badge/{{ strings.supporters[locale] }}-{{ donations | banktransfers }}-active">
@@ -39,12 +39,12 @@ eleventyNavigation: href="/{{locale}}/imprint">Impressum senden.
Bargeld {{ strings.supporters[locale] }} + src="https://shields.sp-codes.de/badge/{{ strings.supporters[locale] }}-{{ donations | cash }}-inactive">
-

Open Collective

+

Open Collective

Gerne kannst du mir auch über Open Collective einen kleinen Betrag zukommen lassen. Wenn du willst, kannst du mich dort auch mit einer regelmäßigen Spende unterstützen. @@ -72,11 +72,13 @@ eleventyNavigation:
-
-

Eine aktuelle Liste aller eingegangenen Spenden pflege ich hier. -

-
+

Aktuelle Ausgaben

+{% include "expenses-current.html" %} + +

Spenden {{donations[0].year}}

+{% include "donations-current.html" %} + +

➔ Alle Spenden

1 Bei den geleisteten Zahlungen handelt sich um Schenkungen im Sinne von § 516 BGB, diff --git a/src/de/index.html b/src/de/index.html index a3ce08f..833ea88 100644 --- a/src/de/index.html +++ b/src/de/index.html @@ -31,7 +31,7 @@ eleventyNavigation: href="https://social.sp-codes.de/@sp_codes">@sp_codes@social.sp-codes.de

- {% include services-simple.html %} + {% include "services-simple.html" %}
@@ -44,4 +44,4 @@ eleventyNavigation:

-{% include profiles.html %} +{% include "profiles.html" %} diff --git a/src/de/services/gitea.md b/src/de/services/gitea.md index 77b3b2a..c6bed8e 100644 --- a/src/de/services/gitea.md +++ b/src/de/services/gitea.md @@ -3,7 +3,7 @@ layout: base.njk key: gitea title: Gitea --- -# Gitea +# Gitea Gitea ist eine einfache Code-Hosting-Plattform wie GitHub oder GitLab. Sie ist opensource und wird kontinuierlich weiterentwickelt. __Seit Ende 2019 betreibe ich eine eigene Gitea Instanz, in der ich meine Projekte verwalte.__ So zum Beispiel auch diese Webseite. Schau dir gerne mal den Quelltext an und lass mir Feedback da. diff --git a/src/de/services/jitsi.md b/src/de/services/jitsi.md index 854df79..d0171eb 100644 --- a/src/de/services/jitsi.md +++ b/src/de/services/jitsi.md @@ -3,7 +3,7 @@ layout: base.njk key: jitsi title: Jitsi Meet --- -# Jitsi Meet +# Jitsi Meet Jitsi-Meet ist eine Plattform für Videokonferenzen. Ohne Anmeldung können vollständig verschlüsselte Video-Chats gestartet werden. Zusätzlich bietet Jitsi-Meet die Möglichkeit den Bildschirm für die anderen Teilnehmer:innen freizugeben, neue Benutzer:innen einfach per Link einzuladen und Nachrichten im integrierten Chat zu verschicken. diff --git a/src/de/services/matrix.md b/src/de/services/matrix.md index 6e5c13f..3fb46bd 100644 --- a/src/de/services/matrix.md +++ b/src/de/services/matrix.md @@ -4,7 +4,7 @@ key: matrix title: Matrix --- -# Matrix +# Matrix [Matrix](https://matrix.org) ist eine moderne, quelloffene Software für dezentrale Kommunikation (wie E-Mail). Matrix bietet von Haus aus Sprach- und Videoanrufe, inklusive Ende-zu-Ende Verschlüsselung und vieles mehr. Das Entscheidende diff --git a/src/en/all-donations.html b/src/en/all-donations.html new file mode 100644 index 0000000..03ad175 --- /dev/null +++ b/src/en/all-donations.html @@ -0,0 +1,10 @@ +--- +layout: base.njk +key: all-donations +title: Unterstützen +--- +

All Donations

+ +

➔ Donate

+ +{% include "donations.html" %} diff --git a/src/en/contact.html b/src/en/contact.html index d645678..b48b357 100644 --- a/src/en/contact.html +++ b/src/en/contact.html @@ -19,22 +19,22 @@ eleventyNavigation: -
+
Follow me on Mastodon or send me a message to @samuel_p@social.sp-codes.de
-
+
Write me on Matrix to @samuel-p:matrix.sp-codes.de
-
+
Write me on XMPP to @samuel-p:dismail.de
-
+
Write me on Threema to the ID YSCU6F6U
diff --git a/src/en/donate.html b/src/en/donate.html index 4bc8d77..9d9103f 100644 --- a/src/en/donate.html +++ b/src/en/donate.html @@ -27,7 +27,7 @@ eleventyNavigation: will then send you my bank details as soon as possible. I am especially happy about a standing order.
Bank transfer {{ strings.supporters[locale] }} + src="https://shields.sp-codes.de/badge/{{ strings.supporters[locale] }}-{{ donations | banktransfers }}-active">
@@ -37,12 +37,12 @@ eleventyNavigation: href="/en/imprint">imprint.
Cash {{ strings.supporters[locale] }} + src="https://shields.sp-codes.de/badge/{{ strings.supporters[locale] }}-{{ donations | cash }}-inactive">
-

Open Collective

+

Open Collective

You are also welcome to send me a small amount via Open Collective. If you like you can also support me with a regular donation. @@ -70,9 +70,13 @@ eleventyNavigation:
-
-

I maintain a list of all received donations here.

-
+

Current Expenses

+{% include "expenses-current.html" %} + +

Donations {{donations[0].year}}

+{% include "donations-current.html" %} + +

➔ All Donations

1 The payments made are donations in terms of § 516 BGB, not tax-deductible donations in terms diff --git a/src/en/index.html b/src/en/index.html index fae8684..5f43784 100644 --- a/src/en/index.html +++ b/src/en/index.html @@ -30,7 +30,7 @@ eleventyNavigation: href="https://social.sp-codes.de/@sp_codes">@sp_codes@social.sp-codes.de

- {% include services-simple.html %} + {% include "services-simple.html" %}
@@ -44,4 +44,4 @@ eleventyNavigation: -{% include profiles.html %} +{% include "profiles.html" %} diff --git a/src/en/services/gitea.md b/src/en/services/gitea.md index 8ed3185..2c240cb 100644 --- a/src/en/services/gitea.md +++ b/src/en/services/gitea.md @@ -3,7 +3,7 @@ layout: base.njk key: gitea title: Gitea --- -# Gitea +# Gitea Gitea is a simple code hosting platform like GitHub or GitLab. It is open source and under continuous development. __Since the end of 2019 I have my own Gitea instance, to manage my projects.__ For example this website. Feel free to have a look at the source code and leave some feedback. diff --git a/src/en/services/jitsi.md b/src/en/services/jitsi.md index 3737603..126ecb4 100644 --- a/src/en/services/jitsi.md +++ b/src/en/services/jitsi.md @@ -3,7 +3,7 @@ layout: base.njk key: jitsi title: Jitsi Meet --- -# Jitsi Meet +# Jitsi Meet Jitsi-Meet is a platform for video conferences. You can start fully encrypted video chats without registration. Additionally, Jitsi-Meet offers the possibility to share the screen with other participants, invite new users with a simple link and send messages in the integrated chat. diff --git a/src/en/services/matrix.md b/src/en/services/matrix.md index 22eeced..9699a97 100644 --- a/src/en/services/matrix.md +++ b/src/en/services/matrix.md @@ -3,7 +3,7 @@ layout: base.njk key: matrix title: Matrix --- -# Matrix +# Matrix Matrix is a modern, open source software for decentralized communication (like e-mail). Matrix offers end-to-end encryption, voice and video calls and much more. However, the most important thing is that there is not one Matrix server that all users have to use, like WhatsApp, Telegram and many other popular messengers. diff --git a/src/img/bg-light.png b/src/img/bg-light.png deleted file mode 100644 index 190b85a..0000000 Binary files a/src/img/bg-light.png and /dev/null differ diff --git a/src/img/gitea.svg b/src/img/gitea.svg deleted file mode 100644 index 6ff0f33..0000000 --- a/src/img/gitea.svg +++ /dev/null @@ -1 +0,0 @@ -Gitea icon diff --git a/src/img/gitea-white.svg b/src/img/icon/gitea.svg similarity index 100% rename from src/img/gitea-white.svg rename to src/img/icon/gitea.svg diff --git a/src/img/icon/jitsi.svg b/src/img/icon/jitsi.svg new file mode 100644 index 0000000..f4b23b5 --- /dev/null +++ b/src/img/icon/jitsi.svg @@ -0,0 +1 @@ +Jitsi diff --git a/src/img/icon/mastodon.svg b/src/img/icon/mastodon.svg new file mode 100644 index 0000000..388ee96 --- /dev/null +++ b/src/img/icon/mastodon.svg @@ -0,0 +1 @@ +Mastodon diff --git a/src/img/matrix-white.svg b/src/img/icon/matrix.svg similarity index 100% rename from src/img/matrix-white.svg rename to src/img/icon/matrix.svg diff --git a/src/img/opencollective-white.svg b/src/img/icon/opencollective.svg similarity index 100% rename from src/img/opencollective-white.svg rename to src/img/icon/opencollective.svg diff --git a/src/img/threema-white.svg b/src/img/icon/threema.svg similarity index 100% rename from src/img/threema-white.svg rename to src/img/icon/threema.svg diff --git a/src/img/xmpp-white.svg b/src/img/icon/xmpp.svg similarity index 100% rename from src/img/xmpp-white.svg rename to src/img/icon/xmpp.svg diff --git a/src/img/matrix.svg b/src/img/matrix.svg deleted file mode 100644 index 1dcf4b6..0000000 --- a/src/img/matrix.svg +++ /dev/null @@ -1 +0,0 @@ -Matrix icon diff --git a/src/img/opencollective.svg b/src/img/opencollective.svg deleted file mode 100644 index eea0b36..0000000 --- a/src/img/opencollective.svg +++ /dev/null @@ -1 +0,0 @@ -Open Collective icon diff --git a/src/img/threema.svg b/src/img/threema.svg deleted file mode 100644 index a2e3619..0000000 --- a/src/img/threema.svg +++ /dev/null @@ -1 +0,0 @@ -Threema icon diff --git a/src/img/xmpp.svg b/src/img/xmpp.svg deleted file mode 100644 index 1b5e5b1..0000000 --- a/src/img/xmpp.svg +++ /dev/null @@ -1 +0,0 @@ -XMPP icon diff --git a/src/scss/icons.scss b/src/scss/icons.scss index 82fed8a..306e856 100644 --- a/src/scss/icons.scss +++ b/src/scss/icons.scss @@ -1,37 +1,38 @@ .si, .si::before { display: inline-block; - margin: 0 8px; - width: 4em; - height: 4em; + width: 1.25em; line-height: 1; box-sizing: border-box; } -@media (max-width: 767.98px) { - .si, .si::before { - margin: 0 4px; - width: 2em; - height: 2em; - } +.si-2x { + font-size: 2em; } -.h2si, .h2si::before { - margin: 0; - width: 30px; - height: 24px; +.si-3x { + font-size: 3em; +} + +.si-4x { + font-size: 4em; +} + +.si::before { + content: '\200b'; + background-repeat: no-repeat; + background-position: center; } @mixin svg-icon($name) { .si-#{$name}::before { - content: '\200b'; - background-image: url("../img/#{$name}-white.svg"); - background-repeat: no-repeat; - background-position: center; + background-image: url("../img/icon/#{$name}.svg"); } } -@include svg-icon('matrix'); @include svg-icon('gitea'); -@include svg-icon('xmpp'); -@include svg-icon('threema'); +@include svg-icon('jitsi'); +@include svg-icon('mastodon'); +@include svg-icon('matrix'); @include svg-icon('opencollective'); +@include svg-icon('threema'); +@include svg-icon('xmpp'); diff --git a/src/scss/main.scss b/src/scss/main.scss index 1aa1db9..07512ef 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -228,12 +228,6 @@ a { } &.flat { - color: $primary !important; - - &:hover { - color: $primary_dark !important; - } - .inner { flex-direction: row; text-decoration: none; @@ -241,10 +235,6 @@ a { h2 { margin-left: 0.5rem; } - - a { - color: #fff; - } } } } @@ -278,7 +268,19 @@ pre { max-width: 96px; max-height: 96px; } - .fa-4x { - font-size: 2em; +} + +table.table { + width: 100%; + margin-bottom: 16px; + background-color: #111; + + tr:nth-child(2n) { + background-color: #ffffff0b; + } + + td, th { + padding: 6px 13px; + border: 1px solid #444; } }