mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
Use the actual svg instead of feather-sprite.svg for icons
This commit is contained in:
parent
c74ce0597c
commit
fa3f9b7a51
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
[submodule "assets/feather"]
|
||||
path = assets/feather
|
||||
url = https://github.com/feathericons/feather.git
|
||||
branch = master
|
1
assets/feather
Submodule
1
assets/feather
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 734f3f51144e383cfdc6d0916831be8d1ad2a749
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 53 KiB |
@ -1,5 +1,5 @@
|
||||
{{ $sprites := resources.Get "icon/feather-sprite.svg" | fingerprint "sha256" }}
|
||||
<svg class="icon" fill="none" stroke="lightgray" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<title>{{ . }} icon</title>
|
||||
<use href="{{ printf "%s#%s" $sprites.Permalink . | relURL }}" />
|
||||
</svg>
|
||||
{{ $icon_resource := resources.Get (printf "feather/icons/%s.svg" .) }}
|
||||
{{ $icon := $icon_resource.Content }}
|
||||
{{ $icon = replaceRE `<svg` `<svg class="icon"` $icon }}
|
||||
{{ $icon = replaceRE `</svg>` `<title>{{ . }} icon</title></svg>` $icon }}
|
||||
{{ $icon | safeHTML }}
|
||||
|
Loading…
Reference in New Issue
Block a user