Turn calendar download link into an icon, vendor font awesome for that.
This commit is contained in:
parent
281a987904
commit
01054e1419
2895 changed files with 3114 additions and 16 deletions
4
layouts/_partials/calendar-script.html
Normal file
4
layouts/_partials/calendar-script.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{{- /* Script for the calendar shortcode, included by the base templates on pages that use it. */ -}}
|
||||
{{- with resources.Get "js/calendar.js" | minify | fingerprint -}}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{- end -}}
|
||||
10
layouts/_partials/fa-icon.html
Normal file
10
layouts/_partials/fa-icon.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{{- /*
|
||||
A Font Awesome icon as inline SVG, decorative (hidden from screen readers) and drawn in the
|
||||
current text colour. Param: the icon as "style/name", e.g. "regular/calendar-plus"; the files
|
||||
are in assets/vendor/fontawesome/. The SVG keeps its attribution comment (CC BY 4.0).
|
||||
*/ -}}
|
||||
{{- with resources.Get (printf "vendor/fontawesome/%s.svg" .) -}}
|
||||
{{- replace .Content "<svg " `<svg class="fa-icon" aria-hidden="true" focusable="false" ` 1 | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- errorf "fa-icon: no icon %q in assets/vendor/fontawesome/" . -}}
|
||||
{{- end -}}
|
||||
Loading…
Reference in a new issue