2020-11-02 08:53:37 +00:00
|
|
|
{{- /*
|
2021-01-26 16:51:05 +00:00
|
|
|
Here's where all of the inline partials are defined.
|
|
|
|
If the partial is short enough, it should be put here.
|
2020-11-02 08:53:37 +00:00
|
|
|
*/ -}}
|
|
|
|
|
2021-01-26 16:51:05 +00:00
|
|
|
{{- /*
|
2023-04-03 03:40:24 +00:00
|
|
|
A partial that aliases the Heroicon template from the icon partial.
|
2021-01-26 16:51:05 +00:00
|
|
|
*/ -}}
|
2023-04-03 03:40:24 +00:00
|
|
|
{{- define "partials/components/heroicon.html" }}
|
|
|
|
{{ $name := default .id .name }}
|
|
|
|
{{- $res := resources.ExecuteAsTemplate (printf "icons/generic/%s.svg" .id)
|
|
|
|
(dict "id" .id
|
|
|
|
"name" $name)
|
|
|
|
(resources.Get "templates/heroicon.svg") }}
|
2023-03-18 06:54:27 +00:00
|
|
|
<svg class="site__icon">
|
2023-04-03 03:40:24 +00:00
|
|
|
<use href="{{ $res.Permalink }}#{{ $name }}"></use>
|
2020-11-02 08:53:37 +00:00
|
|
|
</svg>
|
2023-04-03 03:40:24 +00:00
|
|
|
{{ end }}
|
2020-11-02 08:53:37 +00:00
|
|
|
|
2021-01-26 16:51:05 +00:00
|
|
|
{{- /*
|
2023-04-03 03:40:24 +00:00
|
|
|
A partial for easily using icons from Simple Icons set.
|
2021-01-26 16:51:05 +00:00
|
|
|
*/ -}}
|
2023-04-03 03:40:24 +00:00
|
|
|
{{- define "partials/components/simple-icon.html" }}
|
|
|
|
{{ $name := default .id .name }}
|
|
|
|
{{- $res := resources.ExecuteAsTemplate (printf "icons/brand/%s.svg" .id)
|
|
|
|
(dict "id" .id
|
|
|
|
"name" $name)
|
|
|
|
(resources.Get "templates/simple-icon.svg") }}
|
|
|
|
<svg class="site__icon">
|
|
|
|
<use href="{{ $res.Permalink }}#{{ $name }}"></use>
|
|
|
|
</svg>
|
|
|
|
{{- end }}
|