From fd59564b8164fc8fa5c549bec52b3a432b218024 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 4 Nov 2021 18:56:42 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Clean=20up=20icon=20styles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/index.html | 8 +++++--- layouts/partials/icon.html | 10 +++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index c86585d..5f5a37a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -28,10 +28,12 @@ href="{{ $href }}" target="_blank" rel="me noopener noreferrer" - >
- {{ partial "icon.html" $icon }}{{ $text | emojify }} -
+ {{- with $icon -}} + {{ partial "icon.html" . }} + {{- end -}} + {{ $text | emojify }} + {{ end }} {{ end }} diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index cde57b9..831697a 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,6 +1,6 @@ - - {{ $icon := resources.Get (print "icons/" . ".svg") }} - {{ if $icon }} +{{ $icon := resources.Get (print "icons/" . ".svg") }} +{{ if $icon }} + {{ $icon.Content | safeHTML }} - {{ end }} - + +{{ end }}