From e24c0c7befaf015f84a937485b6eda7ac7d37f4c Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Wed, 24 May 2023 08:18:25 +0100 Subject: [PATCH] Add emoji to posts list --- themes/hello-friend-ng/assets/scss/_list.scss | 13 +++++++++++++ themes/hello-friend-ng/layouts/_default/list.html | 1 + 2 files changed, 14 insertions(+) diff --git a/themes/hello-friend-ng/assets/scss/_list.scss b/themes/hello-friend-ng/assets/scss/_list.scss index e431b37d..b8b257c9 100644 --- a/themes/hello-friend-ng/assets/scss/_list.scss +++ b/themes/hello-friend-ng/assets/scss/_list.scss @@ -73,6 +73,11 @@ align-items: baseline; padding: 12px 0; text-decoration: none; + position: relative; + + &:hover .post-emoji { + opacity: 1; + } } } @@ -81,5 +86,13 @@ margin-left: 1em; @include dimmed; } + + &-emoji { + position: absolute; + left: -1.5em; + line-height: 1.8em; + opacity: 0; + transition: opacity 0.2s ease-in-out; + } } } diff --git a/themes/hello-friend-ng/layouts/_default/list.html b/themes/hello-friend-ng/layouts/_default/list.html index fdb1301d..1c6bd426 100644 --- a/themes/hello-friend-ng/layouts/_default/list.html +++ b/themes/hello-friend-ng/layouts/_default/list.html @@ -16,6 +16,7 @@ {{ range .Pages }}
  • + {{ if .Params.emoji }}{{ .Params.emoji }}{{ end }} {{ if .Title }}{{.Title}}{{ else }}Untitled post{{ end }} {{ if .Site.Params.dateformShort }}