diff --git a/assets/icons/mastodon.svg b/assets/icons/mastodon.svg new file mode 100644 index 0000000..ca16949 --- /dev/null +++ b/assets/icons/mastodon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/shortcodes/_icons.scss b/assets/shortcodes/_icons.scss new file mode 100644 index 0000000..b8ecb8a --- /dev/null +++ b/assets/shortcodes/_icons.scss @@ -0,0 +1,5 @@ +.icon { + width: 2rem; + height: 2rem; + fill: currentColor; +} \ No newline at end of file diff --git a/assets/shortcodes/_index.scss b/assets/shortcodes/_index.scss index be86844..00b695f 100644 --- a/assets/shortcodes/_index.scss +++ b/assets/shortcodes/_index.scss @@ -1 +1,2 @@ -@import "verticalposts"; \ No newline at end of file +@import "verticalposts"; +@import "icons"; \ No newline at end of file diff --git a/assets/sidebar.scss b/assets/sidebar.scss index fc3dfb9..6a0a1ea 100644 --- a/assets/sidebar.scss +++ b/assets/sidebar.scss @@ -34,6 +34,15 @@ #information { margin: 0; font-size: .8em; + #social-links { + list-style: none; + margin: 0; + padding: 0; + img { + height: 2em; + fill: var(--vriish-rose); + } + } } } #sidebar-menu { diff --git a/layouts/partials/helpers/icons.html b/layouts/partials/helpers/icons.html new file mode 100644 index 0000000..b9e2db2 --- /dev/null +++ b/layouts/partials/helpers/icons.html @@ -0,0 +1,9 @@ +{{ $svg := . }} +{{ $class := print $svg "-icon" }} +{{ $match := "(.*)" }} + +{{ $replaceWith := printf `${2}` $class }} +{{ return (replaceRE $match $replaceWith (printf "/assets/icons/%s.svg" $svg | readFile) | safeHTML) }} + +{{/* Taken from https://bitbanged.com/posts/how-to-use-inline-svgs-with-hugo/ */}} +{{/* Only works if SVG is on one line! */}} \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 3861f5f..29064b5 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -4,9 +4,11 @@

{{ .Site.Params.displayName }}

-

- {{ .Site.Params.username }} -

+
+ +