feat(shortcode): person

css

allow named params

document
This commit is contained in:
Evgeny Kuznetsov
2020-06-12 08:53:58 +03:00
parent 96cf051546
commit 49d6a58a2f
4 changed files with 69 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
{{- $url := cond .IsNamedParams (.Get "url") (.Get 0) -}}
{{- $name := cond .IsNamedParams (.Get "name") (.Get 1) -}}
{{- $text := cond .IsNamedParams (.Get "text") (.Get 2) -}}
{{- $pic := cond .IsNamedParams (.Get "picture") (.Get 3) -}}
{{- $p := dict "Class" "person-mention" "Name" $name "URL" $url "Text" $text "Image" $pic -}}{{- partial "plugin/h-card" $p -}}