feat: add sign name shortcode
usage: 1. position param: {{< sign-name 你的名字 >}} {{< sign-name 你的名字 你的Github用户名 >}} 2. named param: {{< sign-name name="你的名字" githubname="你的Github用户名" imgsrc="图片URL" >}} githubname imgsrc 有且只能有一个pull/78/head
parent
77ac2521f6
commit
e0bf2919c9
|
@ -0,0 +1,5 @@
|
|||
{{ if .IsNamedParams }}
|
||||
<p style="text-align: right;">由<img src="{{ if .Get "imgsrc" }}{{ .Get "imgsrc" }}{{ else }}https://avatars.githubusercontent.com/{{ if .Get "githubname" }}{{ .Get "githubname" }}{{ else }}{{ .Get "name" }}{{ end }}?v=4?s=64{{ end }}" style="display: inline; height:2em;vertical-align: middle; border-radius: 50%;"/><u>{{ .Get "name" }}</u>投稿</p>
|
||||
{{ else }}
|
||||
<p style="text-align: right;">由{{ if len .Params | eq 2 }}<img src="https://avatars.githubusercontent.com/{{ .Get 1 }}?v=4?s=64" style="display: inline; height:2em;vertical-align: middle; border-radius: 50%;"/>{{ else }}{{ end }}<u>{{ .Get 0 }}</u>投稿</p>
|
||||
{{ end }}
|
Loading…
Reference in New Issue