mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf: remove extra spaces in plugin link
This commit is contained in:
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
||||
- :sparkles: Feat(highlight): add full support for Chroma highlighting languages in the [list](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages)
|
||||
- :sparkles: Feat: add optional parameter `noreferrer` for the shortcode `link`
|
||||
- :sparkles: Feat: update echarts theme config
|
||||
- :zap: Perf: remove extra spaces in plugin link
|
||||
- :wheelchair: Feat(accessibility): use `aria-hidden=true` on icons that AT should ignore
|
||||
- :bug: Fix: add function doc2unix to unify new lines symbol between Windows and Unix/Mac OS
|
||||
- :bug: Fix: author display error in post and markdown file
|
||||
|
||||
@@ -4,29 +4,20 @@
|
||||
{{- if eq .Noreferrer false -}}
|
||||
{{- $noreferrer = false -}}
|
||||
{{- end -}}
|
||||
{{- if (urls.Parse .Destination).Host | or .Newtab -}}
|
||||
{{- $rel = cond $noreferrer "external nofollow noopener noreferrer" "external nofollow" -}}
|
||||
{{- $external = true -}}
|
||||
{{- end -}}
|
||||
{{- $class := .Class | default "" -}}
|
||||
{{- if eq .Card true -}}
|
||||
{{- $class = trim (printf "%v %v" "card-link" $class) " " -}}
|
||||
{{- end -}}
|
||||
<a
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{ with .Title }}
|
||||
title="{{ . }}"
|
||||
{{ end }}
|
||||
{{ if (urls.Parse .Destination).Host | or .Newtab }}
|
||||
{{ $rel = cond $noreferrer "external nofollow noopener noreferrer" "external nofollow" }}
|
||||
{{ $external = true }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
{{ if $rel | or .Rel }}
|
||||
rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"
|
||||
{{ end }}
|
||||
{{ with $class }}
|
||||
class="{{ with $class }}{{ . }}{{ end }}"
|
||||
{{ end }}
|
||||
{{ with .Download }}
|
||||
download="{{ . }}"
|
||||
{{ end }}
|
||||
<a href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title }} title="{{ . }}"{{- end -}}
|
||||
{{- if $external -}} target="_blank"{{- end -}}
|
||||
{{- if $rel | or .Rel }} rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"{{- end -}}
|
||||
{{- with $class }} class="{{ with $class }}{{ . }}{{ end }}"{{- end -}}
|
||||
{{- with .Download }} download="{{ . }}"{{- end -}}
|
||||
>
|
||||
{{- if ne .Card true -}}
|
||||
{{- with .Icon -}}
|
||||
|
||||
Reference in New Issue
Block a user