From 1abb4ca68ff907fbf15119e2712674c35e11da4f Mon Sep 17 00:00:00 2001 From: Florian Knip Date: Sat, 24 Sep 2022 14:18:45 +0200 Subject: [PATCH 1/3] adding footer and img shortcode integration Signed-off-by: Florian Knip --- README.md | 6 ++++++ assets/css/components/_app.scss | 8 ++++++++ layouts/_default/baseof.html | 3 +++ layouts/partials/footer.html | 4 ++++ layouts/shortcodes/img.html | 4 ++++ 5 files changed, 25 insertions(+) create mode 100644 layouts/partials/footer.html create mode 100644 layouts/shortcodes/img.html diff --git a/README.md b/README.md index a2f883e3..2275fc53 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,12 @@ To change theme colors, add the following lines in `params`: If you want the above theme colors, you can see the [exampleSite/config.toml](/exampleSite/config.toml) file. +### Add Image in Post + +In your markdown: +```md +{{< img src="images/pgp-passphrase.png" alt="pgp passphrase">}} +``` ### Styling To override styles using scss, add a file called `_extra.scss` to `[path]/assets/css/` diff --git a/assets/css/components/_app.scss b/assets/css/components/_app.scss index 643f3ce8..6c1aaed3 100644 --- a/assets/css/components/_app.scss +++ b/assets/css/components/_app.scss @@ -4,6 +4,14 @@ text-align: center; } +.app-footer { + background: $darkest-color; + text-align: center; + position: fixed; + bottom: 0; + width: 100%; +} + .app-header-avatar { width: 15rem; height: 15rem; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 01ef5c4a..6fa386b3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -46,5 +46,8 @@

{{ .Site.Title }}

{{ .Content }} {{ end }} +
+ {{ partial "footer.html" . }} +
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 00000000..ee431847 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ + +
+ Impressum +
\ No newline at end of file diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 00000000..0b8d2681 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,4 @@ +{{ $image := resources.GetMatch (.Get "src") }} + + + From 64d8a4535c9ab2f55dc75760705ae43cdb20cd25 Mon Sep 17 00:00:00 2001 From: Florian Knip Date: Sat, 24 Sep 2022 14:27:36 +0200 Subject: [PATCH 2/3] change dummy name Signed-off-by: Florian Knip --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2275fc53..64d35cc4 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ If you want the above theme colors, you can see the [exampleSite/config.toml](/e In your markdown: ```md -{{< img src="images/pgp-passphrase.png" alt="pgp passphrase">}} +{{< img src="images/my-cool-picture.png" alt="my cool picture">}} ``` ### Styling From abbaeff685ba27308d3fd0ce480118fa9f95161d Mon Sep 17 00:00:00 2001 From: Florian Knip Date: Sat, 24 Sep 2022 14:32:44 +0200 Subject: [PATCH 3/3] impressume dummy page Signed-off-by: Florian Knip --- exampleSite/content/impressum.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 exampleSite/content/impressum.md diff --git a/exampleSite/content/impressum.md b/exampleSite/content/impressum.md new file mode 100644 index 00000000..60fcfef6 --- /dev/null +++ b/exampleSite/content/impressum.md @@ -0,0 +1,5 @@ ++++ +title = "About" ++++ + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lacinia lorem quis sodales auctor. Donec bibendum odio leo, bibendum iaculis lectus dapibus sit amet. Etiam ut euismod lectus, vel finibus metus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer quis vestibulum justo. Duis scelerisque ullamcorper sem, eget congue lorem ultrices mattis. Nam ut mollis tellus, id facilisis turpis. Duis ac egestas mi, a mattis dolor. Curabitur vestibulum est nec tortor hendrerit, vehicula malesuada quam tempor. Duis ornare tortor dapibus, scelerisque est lacinia, aliquet mi. Vivamus convallis malesuada augue ac viverra. Sed molestie erat at sem dapibus porttitor. Vestibulum lacinia, enim id feugiat varius, felis erat sollicitudin nisl, sit amet semper nisi nunc in nisl. Sed dapibus ullamcorper nulla, et molestie lacus accumsan ac. \ No newline at end of file