mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
24 lines
1.3 KiB
HTML
24 lines
1.3 KiB
HTML
{{- $destination := cond .IsNamedParams (.Get "href") (.Get 0) -}}
|
|
{{- with dict "Path" $destination | partial "function/resource.html" -}}
|
|
{{- $destination = .RelPermalink -}}
|
|
{{- end -}}
|
|
{{- $options := dict "Destination" $destination "Page" .Page -}}
|
|
{{- if .IsNamedParams -}}
|
|
{{- $options = dict "Content" (.Get "content") | merge $options -}}
|
|
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
|
{{- $options = dict "Class" (.Get "class") | merge $options -}}
|
|
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
|
|
{{- $options = dict "Download" (.Get "download") | merge $options -}}
|
|
{{- $options = dict "Card" (.Get "card") | merge $options -}}
|
|
{{- $options = dict "CardIcon" (.Get "card-icon") | merge $options -}}
|
|
{{- $options = dict "Noreferrer" (.Get "noreferrer") | merge $options -}}
|
|
{{- $options = dict "ExternalIcon" (.Get "external-icon") | merge $options -}}
|
|
{{- $options = dict "IsGuarded" (.Get "isGuarded") | merge $options -}}
|
|
{{- else -}}
|
|
{{- $options = dict "Content" (.Get 1 | default (.Get 0)) | merge $options -}}
|
|
{{- $options = dict "Title" (.Get 2) | merge $options -}}
|
|
{{- $options = dict "Card" (.Get 3) | merge $options -}}
|
|
{{- $options = dict "CardIcon" (.Get 4) | merge $options -}}
|
|
{{- end -}}
|
|
{{- partial "plugin/link.html" $options -}}
|