From 32640cac928c48b8ed86a27865db4c9b8273db3d Mon Sep 17 00:00:00 2001
From: James Panther <4462786+jpanther@users.noreply.github.com>
Date: Sat, 6 Nov 2021 13:05:29 +1100
Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Only=20output=20icon=20styles=20?=
=?UTF-8?q?if=20there=20is=20an=20icon?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 4 ++++
layouts/partials/icon.html | 10 +++++-----
layouts/shortcodes/icon.html | 14 +++++++-------
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f2d266c..54d08b61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
+### Fixed
+
+- Minor style issues
+
## [1.5.1] - 2021-11-04
### Fixed
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
index cde57b96..831697a1 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 }}
diff --git a/layouts/shortcodes/icon.html b/layouts/shortcodes/icon.html
index 3afb45b5..1db633d0 100644
--- a/layouts/shortcodes/icon.html
+++ b/layouts/shortcodes/icon.html
@@ -1,8 +1,8 @@
-
- {{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
- {{ if $icon }}
+{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
+{{ if $icon }}
+
{{ $icon.Content | safeHTML }}
- {{ else }}
- {{ i18n "shortcode.icon_none" }}
- {{ end }}
-
+
+{{ else }}
+ {{ i18n "shortcode.icon_none" }}
+{{ end }}