mirror of
https://gitea.com/gitea/theme.git
synced 2024-06-02 09:51:23 +05:30
feat: multiple authors
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
9237f02532
commit
7890d3276f
|
@ -10,9 +10,20 @@
|
||||||
<div class="media-content">
|
<div class="media-content">
|
||||||
<a class="title is-4" href="{{ .Permalink }}">{{ .Title }}</a>
|
<a class="title is-4" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
<p class="subtitle is-6">{{ .Date.Format "Mon Jan 2, 2006" }} {{ i18n "authored_by" }}
|
<p class="subtitle is-6">{{ .Date.Format "Mon Jan 2, 2006" }} {{ i18n "authored_by" }}
|
||||||
<a href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
{{ if .Params.authors }}
|
||||||
{{ .Params.author | default .Site.Params.author }}
|
{{ $s := newScratch }}
|
||||||
</a>
|
{{ $s.Set "len" (len .Params.authors) }}
|
||||||
|
{{ $s.Add "len" -1 }}
|
||||||
|
{{ range $idx, $author := .Params.authors -}}
|
||||||
|
<a href="https://gitea.com/{{ $author | default $.Site.Params.author }}">
|
||||||
|
{{ $author | default $.Site.Params.author }}
|
||||||
|
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||||
|
{{- end }}
|
||||||
|
{{ else }}
|
||||||
|
<a href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
||||||
|
{{ .Params.author | default .Site.Params.author }}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,9 +13,20 @@
|
||||||
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
|
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
|
||||||
{{ i18n "authored_by" }}
|
{{ i18n "authored_by" }}
|
||||||
<b>
|
<b>
|
||||||
<a href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
{{ if .Params.authors }}
|
||||||
{{ .Params.author | default .Site.Params.author }}
|
{{ $s := newScratch }}
|
||||||
</a>
|
{{ $s.Set "len" (len .Params.authors) }}
|
||||||
|
{{ $s.Add "len" -1 }}
|
||||||
|
{{ range $idx, $author := .Params.authors -}}
|
||||||
|
<a href="https://gitea.com/{{ $author | default $.Site.Params.author }}">
|
||||||
|
{{ $author | default $.Site.Params.author }}
|
||||||
|
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||||
|
{{- end }}
|
||||||
|
{{ else }}
|
||||||
|
<a href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
||||||
|
{{ .Params.author | default .Site.Params.author }}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ $tertiary: #4183c4;
|
||||||
border-radius: 0.2em;
|
border-radius: 0.2em;
|
||||||
|
|
||||||
.media-content a{
|
.media-content a{
|
||||||
display: block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue