From 30ec64dd667fca3f49eb1ae9d474e426da86c8e2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 11 Aug 2023 08:07:02 -0700 Subject: [PATCH 01/10] Adjust Mastodon icon down 1 px --- assets/styles/root/050_site_header.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/styles/root/050_site_header.css b/assets/styles/root/050_site_header.css index 6f9f5b0..a0a33ad 100644 --- a/assets/styles/root/050_site_header.css +++ b/assets/styles/root/050_site_header.css @@ -104,7 +104,12 @@ padding: 0 0.5rem; } - #social-menu-mastodon img { content: var(--mastodon-icon); } + #social-menu-mastodon img { + content: var(--mastodon-icon); + position: relative; + top: 1px; + } + #social-menu-github img { content: var(--github-icon); } #social-menu-instagram img { content: var(--instagram-icon); } #social-menu-feed img { content: var(--feed-icon); } From 345d5175c91054a0a147cf6477816e05988c1bb6 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 11 Aug 2023 08:11:08 -0700 Subject: [PATCH 02/10] Copy over the viewBox, width, and height attributes of the light social icons to dark icons --- static/icons/feed-dark.svg | 5 +++-- static/icons/github-dark.svg | 4 +--- static/icons/github.svg | 2 +- static/icons/instagram-dark.svg | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/static/icons/feed-dark.svg b/static/icons/feed-dark.svg index cbd310c..4fa54bc 100644 --- a/static/icons/feed-dark.svg +++ b/static/icons/feed-dark.svg @@ -3,8 +3,9 @@ Date: Fri, 11 Aug 2023 08:21:50 -0700 Subject: [PATCH 03/10] Fix all the dark icons --- static/icons/feed-dark.svg | 52 ++------------------------------- static/icons/feed.svg | 48 ++---------------------------- static/icons/instagram-dark.svg | 37 ++--------------------- static/icons/instagram.svg | 4 ++- 4 files changed, 11 insertions(+), 130 deletions(-) diff --git a/static/icons/feed-dark.svg b/static/icons/feed-dark.svg index 4fa54bc..54b2e6c 100644 --- a/static/icons/feed-dark.svg +++ b/static/icons/feed-dark.svg @@ -1,51 +1,5 @@ - - - - - - - - + + + diff --git a/static/icons/feed.svg b/static/icons/feed.svg index 4d46b35..730535e 100644 --- a/static/icons/feed.svg +++ b/static/icons/feed.svg @@ -1,48 +1,6 @@ - - - - - - + + + diff --git a/static/icons/instagram-dark.svg b/static/icons/instagram-dark.svg index c92fd1e..1a3a946 100644 --- a/static/icons/instagram-dark.svg +++ b/static/icons/instagram-dark.svg @@ -1,36 +1,3 @@ - - - - - + + diff --git a/static/icons/instagram.svg b/static/icons/instagram.svg index 0b84ead..8c14924 100644 --- a/static/icons/instagram.svg +++ b/static/icons/instagram.svg @@ -1 +1,3 @@ - + + + From 931afe5b6830cce577a16ae9d55504adb9c0e23f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 11 Aug 2023 08:23:43 -0700 Subject: [PATCH 04/10] [post] Mastodon Icon --- content/blog/2023/mastodon-icon/index.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 content/blog/2023/mastodon-icon/index.md diff --git a/content/blog/2023/mastodon-icon/index.md b/content/blog/2023/mastodon-icon/index.md new file mode 100644 index 0000000..d9f794a --- /dev/null +++ b/content/blog/2023/mastodon-icon/index.md @@ -0,0 +1,6 @@ +--- +title: "Mastodon Icon" +date: 2023-08-11T08:23:25-07:00 +draft: true +--- + From 755de7d9383e5dfce4e92544e5ed103c21ead471 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 11 Aug 2023 08:28:19 -0700 Subject: [PATCH 05/10] [post] Mastodon Icon, remove draft --- content/blog/2023/mastodon-icon/index.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/blog/2023/mastodon-icon/index.md b/content/blog/2023/mastodon-icon/index.md index d9f794a..4e2750c 100644 --- a/content/blog/2023/mastodon-icon/index.md +++ b/content/blog/2023/mastodon-icon/index.md @@ -1,6 +1,15 @@ --- title: "Mastodon Icon" date: 2023-08-11T08:23:25-07:00 -draft: true +categories: ["Tech"] +tags: ["Meta", "Erynwells.me", "Web"] --- +I finally got around to replacing the Twitter icon in the site's header with a +link to my Mastodon page. It was surprisingly tricky because of how I styled and +layed out those icons. I was able to clean up the SVGs a little bit too. + +These days I have [way too many social media accounts][where-to-find-me]. I'm +mostly on Mastodon and Instagram. + +[where-to-find-me]: {{< ref "/about/where-am-i" >}} From 77f6e16d9a72cc5166190a19c8adff0652eac330 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 19 Sep 2023 16:05:17 -0700 Subject: [PATCH 06/10] Fix the IsSet warning when building the site --- layouts/partials/photos/thumbnail.html | 24 ++++++++++++++++++++---- layouts/partials/table_of_contents.html | 2 +- layouts/photos/atom_entry.atom | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/layouts/partials/photos/thumbnail.html b/layouts/partials/photos/thumbnail.html index dbd9e1f..831c669 100644 --- a/layouts/partials/photos/thumbnail.html +++ b/layouts/partials/photos/thumbnail.html @@ -1,3 +1,19 @@ +{{/* + Renders a photo thumbnail. If neither a target height or target width are + given, and the image is already in the correct orientation, no image + processing is performed. + + Arguments + --------- + "Page" : A reference to the current Page + "Height" : The target height of the image + "Width" : The target width of the image + + Returns + ------- + The processed thumbnail image resource +*/}} + {{- $thumbnailResource := .Page.Resources.GetMatch (index .Page.Params "thumbnail" | default "[tT]humbnail*") | default (index (.Page.Resources.ByType "image") 0) -}} @@ -9,15 +25,15 @@ {{ $orientation := partial "images/orientation_angle.html" $thumbnailResource }} {{ $targetWidth := 0 }} -{{ if isset . "Width" }} - {{ $targetWidth = .Width }} +{{ with .Width }} + {{ $targetWidth = . }} {{ else }} {{ $targetWidth = $thumbnailResource.Width }} {{ end }} {{ $targetHeight := 0 }} -{{ if isset . "Height" }} - {{ $targetHeight = .Height }} +{{ with .Height }} + {{ $targetHeight = . }} {{ else }} {{ $targetHeight = $thumbnailResource.Height }} {{ end }} diff --git a/layouts/partials/table_of_contents.html b/layouts/partials/table_of_contents.html index e6fa931..f1dcb62 100644 --- a/layouts/partials/table_of_contents.html +++ b/layouts/partials/table_of_contents.html @@ -1,4 +1,4 @@ -{{ if and (gt .WordCount 400) (isset .Params "toc") .Params.toc }} +{{ if and (gt .WordCount 400) (.Params.toc | default false) }}