mirror of https://gitea.com/gitea/theme.git
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">
|
||||
<a class="title is-4" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<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 }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
</a>
|
||||
{{ if .Params.authors }}
|
||||
{{ $s := newScratch }}
|
||||
{{ $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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,9 +13,20 @@
|
|||
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
|
||||
{{ i18n "authored_by" }}
|
||||
<b>
|
||||
<a href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
</a>
|
||||
{{ if .Params.authors }}
|
||||
{{ $s := newScratch }}
|
||||
{{ $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>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ $tertiary: #4183c4;
|
|||
border-radius: 0.2em;
|
||||
|
||||
.media-content a{
|
||||
display: block;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue