mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat: default to fixed width icons with icon shortcode
This commit is contained in:
parent
581faa19e7
commit
2f00beab89
2 changed files with 4 additions and 3 deletions
|
@ -57,8 +57,8 @@
|
|||
sri = "sha256-pB/deHc9CGfFpJRjC43imB29Rse8tak+5eXqntO94ck="
|
||||
url = "https://cdnjs.cloudflare.com/ajax/libs/anchor-js/%s/anchor.min.js"
|
||||
[js.mermaid]
|
||||
version = "8.4.3"
|
||||
sri = "" # SRI unavailable.
|
||||
version = "8.4.4"
|
||||
sri = "sha256-JEqEejGt4tR35L0a1zodzsV0/PJ6GIf7J4yDtywdrH8="
|
||||
url = "https://cdnjs.cloudflare.com/ajax/libs/mermaid/%s/mermaid.min.js"
|
||||
[js.lazysizes]
|
||||
version = "5.1.2"
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
{{- if in (slice "fab" "fas" "far" "fal") $pack -}}
|
||||
{{- $pack_prefix = "fa" -}}
|
||||
{{- end -}}
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ $icon }} {{with (.Get "padding_left")}}pl-{{.}}{{end}} {{with (.Get "padding_right")}}pr-{{.}}{{end}}"></i>
|
||||
{{- $padding_right := (.Get "padding_right") | default 1 -}}{{/* Defaulting to 1 prevents no spacing when minimizing HTML. */}}
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ $icon }} {{with (.Get "padding_left")}}pl-{{.}}{{end}} {{with $padding_right}}pr-{{.}}{{end}} {{if ne (.Get "fixed_width") "false"}}fa-fw{{end}}"></i>
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue