From fa3f9b7a5192dec542e48cc749dcc172c562b6a4 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 9 Oct 2021 17:32:35 -0500 Subject: [PATCH] Use the actual svg instead of feather-sprite.svg for icons --- .gitmodules | 4 ++++ assets/feather | 1 + assets/icon/feather-sprite.svg | 1 - layouts/partials/icon.html | 10 +++++----- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 160000 assets/feather delete mode 100644 assets/icon/feather-sprite.svg diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..16dadbb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "assets/feather"] + path = assets/feather + url = https://github.com/feathericons/feather.git + branch = master diff --git a/assets/feather b/assets/feather new file mode 160000 index 0000000..734f3f5 --- /dev/null +++ b/assets/feather @@ -0,0 +1 @@ +Subproject commit 734f3f51144e383cfdc6d0916831be8d1ad2a749 diff --git a/assets/icon/feather-sprite.svg b/assets/icon/feather-sprite.svg deleted file mode 100644 index 19a2534..0000000 --- a/assets/icon/feather-sprite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index e7fc681..889dc27 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,5 +1,5 @@ -{{ $sprites := resources.Get "icon/feather-sprite.svg" | fingerprint "sha256" }} - - {{ . }} icon - - +{{ $icon_resource := resources.Get (printf "feather/icons/%s.svg" .) }} +{{ $icon := $icon_resource.Content }} +{{ $icon = replaceRE `` `{{ . }} icon` $icon }} +{{ $icon | safeHTML }}