mirror of https://gitea.com/gitea/theme.git
feat: infer from URL
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
57c764754b
commit
7c33619e3f
|
@ -15,13 +15,13 @@
|
|||
{{ $s.Set "len" (len .Params.authors) }}
|
||||
{{ $s.Add "len" -1 }}
|
||||
{{ range $idx, $author := .Params.authors -}}
|
||||
<a class="author" href="https://{{ $.Params.author_domain | default "gitea.com" }}/{{ $author | default $.Site.Params.author }}">
|
||||
{{ $author | default $.Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix $author "http" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||
{{ path.BaseName $author }}
|
||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
<a class="author" href="https://{{ .Params.author_domain | default "gitea.com" }}/{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix .Params.author "http" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
{{ $s.Set "len" (len .Params.authors) }}
|
||||
{{ $s.Add "len" -1 }}
|
||||
{{ range $idx, $author := .Params.authors -}}
|
||||
<a class="author" href="https://{{ $.Params.author_domain | default "gitea.com" }}/{{ $author | default $.Site.Params.author }}">
|
||||
{{ $author | default $.Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix $author "http" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||
{{ path.BaseName $author }}
|
||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
<a class="author" href="https://{{ .Params.author_domain | default "gitea.com" }}/{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix .Params.author "http" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</b>
|
||||
|
|
Loading…
Reference in New Issue