From 03d1f66503abd29744e7ae4019822cc099d47205 Mon Sep 17 00:00:00 2001 From: B Kleinen Date: Fri, 24 Sep 2021 11:23:11 +0200 Subject: [PATCH] add photo credit --- content/about/index.md | 2 +- data/features.json | 17 ----------------- data/photocredit.json | 27 +++++++++++++++++++-------- layouts/_default/photocredit.html | 26 ++++++++++++++++++++++++++ layouts/partials/photo.html | 12 ++++++++++++ 5 files changed, 58 insertions(+), 26 deletions(-) delete mode 100644 data/features.json create mode 100644 layouts/partials/photo.html diff --git a/content/about/index.md b/content/about/index.md index db1c774..ea74f6b 100644 --- a/content/about/index.md +++ b/content/about/index.md @@ -8,4 +8,4 @@ heroBackground: 'images/unsplash/claudio-schwarz-WKWcvKj1uko-unsplash.jpg' layout: 'photocredit' --- -Die meisten Fotos auf dieser Seite sind von unsplash: +Quellen der verwendeten Fotos: diff --git a/data/features.json b/data/features.json deleted file mode 100644 index 6ecd964..0000000 --- a/data/features.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "title": "Free Consultation", - "description": "New clients recieve an obligation free consultation.", - "image": "features/noun_branding_1885335.svg" - }, - { - "title": "Certified Accountants", - "description": "All members of our team are certified accountants.", - "image": "features/noun_The Process_1885341.svg" - }, - { - "title": "Tax Compliance", - "description": "We stay up to date on the latest changes to the tax code.", - "image": "features/noun_3d modeling_1885342.svg" - } -] diff --git a/data/photocredit.json b/data/photocredit.json index 37494bf..cb7ee75 100644 --- a/data/photocredit.json +++ b/data/photocredit.json @@ -1,21 +1,32 @@ [ { - "link": "images/adam-vradenburg-TK5I5L5JGxY-unsplash.jpg", - "preview": "adam-vradenburg-TK5I5L5JGxY-unsplash-preview.jpg", + "link": "images/unsplash/adam-vradenburg-TK5I5L5JGxY-unsplash.jpg", + "preview": "images/unsplash/adam-vradenburg-TK5I5L5JGxY-unsplash-preview.jpg", "url": "https://unsplash.com/photos/TK5I5L5JGxY", "credit": "Photo by Adam Vradenburg on Unsplash" }, - { - - "link": "images/unsplash/piero-nigro-tiXfq1WHBGU-unsplash.jpg", - "preview": "images/unsplash/piero-nigro-tiXfq1WHBGU-unsplash-preview.jpg", - "credit": "Photo by Piero Nigro on Unsplash" - }, { "link": "images/unsplash/claudio-schwarz-WKWcvKj1uko-unsplash.jpg", "preview": "images/unsplash/claudio-schwarz-WKWcvKj1uko-unsplash-preview.jpg", "url": "https://unsplash.com/photos/WKWcvKj1uko", "credit": "Photo by Claudio Schwarz on Unsplash" + }, + { + + "link": "images/unsplash/piero-nigro-tiXfq1WHBGU-unsplash.jpg", + "preview": "images/unsplash/piero-nigro-tiXfq1WHBGU-unsplash-preview.jpg", + "url": "https://unsplash.com/photos/tiXfq1WHBGU", + "credit": "Photo by Piero Nigro on Unsplash" + }, + + { + "link": "images/htw.png", + "preview": "images/htw.png", + "url": "https://nikolas-fahlbusch.de/", + "credit": "Photo by Nikolas Fahlbusch, HTW Berlin" } + + + ] diff --git a/layouts/_default/photocredit.html b/layouts/_default/photocredit.html index 630202a..8f0aff6 100644 --- a/layouts/_default/photocredit.html +++ b/layouts/_default/photocredit.html @@ -13,6 +13,32 @@ +{{ $template := . }} +{{if .Site.Data.photocredit }} +
+
+ {{ range .Site.Data.photocredit }} +
{{ partial "photo" . }}
+ {{ end }} +
+
+{{ end }} + +{{if .Site.Data.contact.hours }} +

Business Hours

+ + {{ range .Site.Data.contact.hours }} + + + + + + + {{ end }} +
{{ .day }}{{ .open }}-{{ .close }}
+{{ end }} + + {{ end }} {{ define "footer_js" }} diff --git a/layouts/partials/photo.html b/layouts/partials/photo.html new file mode 100644 index 0000000..6fe0a22 --- /dev/null +++ b/layouts/partials/photo.html @@ -0,0 +1,12 @@ +
+ + + {{ if .preview }} +
+ foto +
+ {{ end }} +

+ {{ .credit | safeHTML }} +

+