From d0c6a483347f725a6e0792121e4e8324ef649f67 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 24 Oct 2022 00:08:28 +0800 Subject: [PATCH] Fix Heroicons integration --- CHANGELOG.adoc | 5 +++++ assets/templates/heroicon.svg | 2 +- layouts/partials/components/post-meta.html | 2 +- layouts/partials/components/theme-button.html | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 6093b1f..ad5e34a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,6 +20,11 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version == Unreleased +=== Fixed + +- Heroicons integration. footnote:[This is what I get for doing things at night. Before sleep.] + + == [0.3.0] - 2022-10-23 diff --git a/assets/templates/heroicon.svg b/assets/templates/heroicon.svg index 327d71a..1bb5e93 100644 --- a/assets/templates/heroicon.svg +++ b/assets/templates/heroicon.svg @@ -2,7 +2,7 @@ This template applies an ID to an SVG from the Heroicons set to be used with `` element. */ -}} {{- $match := "\\s*(.*)\\s*" }} -{{- $icon := resources.Get (printf "svg/heroicons/solid/%s.svg" .) }} +{{- $icon := resources.Get (printf "svg/heroicons/24/solid/%s.svg" .) }} {{- $replaceWith := printf `${2}` . }} {{- replaceRE $match $replaceWith $icon.Content | safeHTML }} diff --git a/layouts/partials/components/post-meta.html b/layouts/partials/components/post-meta.html index a5eaf49..8150154 100644 --- a/layouts/partials/components/post-meta.html +++ b/layouts/partials/components/post-meta.html @@ -12,7 +12,7 @@ {{- if and .GitInfo (ne (.PublishDate.Format "2006-01-02") (.Lastmod.Format "2006-01-02")) }} {{- end }} diff --git a/layouts/partials/components/theme-button.html b/layouts/partials/components/theme-button.html index 7b9a75a..e92f999 100644 --- a/layouts/partials/components/theme-button.html +++ b/layouts/partials/components/theme-button.html @@ -4,7 +4,7 @@ */ -}} {{- if gt (len (index $.Site.Data "more-contentful").themes) 1 }}
- {{ partial "components/heroicon.html" "color-swatch" }} + {{ partial "components/heroicon.html" "swatch" }}
{{ $themes := (index $.Site.Data "more-contentful").themes }}