From a358c732b0fff6e1894b3e7830988edcd3a4474c Mon Sep 17 00:00:00 2001 From: Jeppe Ernst Date: Sat, 24 Mar 2018 14:34:12 +0100 Subject: [PATCH] first try at a donation counter needs more work on mobile --- _config.yml | 4 + _data/da/common.yml | 3 + _data/en/common.yml | 5 +- _layouts/indexpage.html | 5 + _plugins/humanize.rb | 257 +++++++++++++++++++++++++++++ _scss/module/_donationCounter.scss | 45 +++++ _scss/module/_indexpage.scss | 49 ++++-- assets/style/main.scss | 5 + 8 files changed, 357 insertions(+), 16 deletions(-) create mode 100644 _plugins/humanize.rb create mode 100644 _scss/module/_donationCounter.scss diff --git a/_config.yml b/_config.yml index 299dde51..7d46b524 100644 --- a/_config.yml +++ b/_config.yml @@ -20,6 +20,10 @@ description: >- # this means to ignore newlines until "baseurl:" Nu gør vi noget ved det! #ulovligLogning baseurl: "" # the subpath of your site, e.g. /blog url: "https://ulovliglogning.dk" # the base hostname & protocol for your site, e.g. http://example.com +donationCounter: + donated: 110000 + goal: 250000 + unit: DKK # multilanguage support languages: ["da", "en"] diff --git a/_data/da/common.yml b/_data/da/common.yml index bd4edde2..f9e3be70 100644 --- a/_data/da/common.yml +++ b/_data/da/common.yml @@ -12,4 +12,7 @@ global: langs: da: Dansk en: Engelsk + donation: + text: doneret af + currency: ",-" \ No newline at end of file diff --git a/_data/en/common.yml b/_data/en/common.yml index c020e352..30f5bf43 100644 --- a/_data/en/common.yml +++ b/_data/en/common.yml @@ -11,4 +11,7 @@ global: Write us an email at [info@ulovliglogning.dk](mailto:info@ulovliglogning.dk) langs: da: Danish - en: English \ No newline at end of file + en: English + donation: + text: donated of + currency: " DKK" \ No newline at end of file diff --git a/_layouts/indexpage.html b/_layouts/indexpage.html index 4fcb7f8d..7c4ad814 100644 --- a/_layouts/indexpage.html +++ b/_layouts/indexpage.html @@ -5,6 +5,11 @@ layout: default {% for section in page.sections %}
{% if forloop.first %} +
+ + {{ site.donationCounter.donated | intcomma: '.' }}{{ global.donation.currency }} {{ global.donation.text }} {{ site.donationCounter.goal | intcomma: '.' }}{{ global.donation.currency }} + +