mirror of
https://gitea.com/gitea/theme.git
synced 2024-06-02 09:51:23 +05:30
chore: check for https:// prefix
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
7c33619e3f
commit
15406ce8ac
|
@ -15,12 +15,12 @@
|
||||||
{{ $s.Set "len" (len .Params.authors) }}
|
{{ $s.Set "len" (len .Params.authors) }}
|
||||||
{{ $s.Add "len" -1 }}
|
{{ $s.Add "len" -1 }}
|
||||||
{{ range $idx, $author := .Params.authors -}}
|
{{ range $idx, $author := .Params.authors -}}
|
||||||
<a class="author" href="{{ if hasPrefix $author "http" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
<a class="author" href="{{ if hasPrefix $author "https://" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||||
{{ path.BaseName $author }}
|
{{ path.BaseName $author }}
|
||||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="author" href="{{ if hasPrefix .Params.author "http" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
<a class="author" href="{{ if hasPrefix .Params.author "https://" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
{{ $s.Set "len" (len .Params.authors) }}
|
{{ $s.Set "len" (len .Params.authors) }}
|
||||||
{{ $s.Add "len" -1 }}
|
{{ $s.Add "len" -1 }}
|
||||||
{{ range $idx, $author := .Params.authors -}}
|
{{ range $idx, $author := .Params.authors -}}
|
||||||
<a class="author" href="{{ if hasPrefix $author "http" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
<a class="author" href="{{ if hasPrefix $author "https://" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||||
{{ path.BaseName $author }}
|
{{ path.BaseName $author }}
|
||||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="author" href="{{ if hasPrefix .Params.author "http" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
<a class="author" href="{{ if hasPrefix .Params.author "https://" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue