Display submission date for late submissions

rust
Elnu 2 years ago
parent 95a5e52ddf
commit e39c958e8b

@ -3,7 +3,7 @@
{{ if .image }} {{ if .image }}
{{ $thumbnail := .image.Resize "500x" }} {{ $thumbnail := .image.Resize "500x" }}
<a href="{{ .image.RelPermalink }}" target="_blank"><img src="{{ $thumbnail.RelPermalink }}" style="aspect-ratio: {{ .image.Width }} / {{ .image.Height }}" title="{{ .submission.username }}'s submission"></a> <a href="{{ .image.RelPermalink }}" target="_blank"><img src="{{ $thumbnail.RelPermalink }}" style="aspect-ratio: {{ .image.Width }} / {{ .image.Height }}" title="{{ .submission.username }}'s submission"></a>
<figcaption><a href="https://discord.com/users/{{ .submission.id }}"><img class="svg-inline" src="/discord.svg"> {{ .submission.username }}</a>{{ if .submission.late }} (Late){{ end }}</figcaption> <figcaption><a href="https://discord.com/users/{{ .submission.id }}"><img class="svg-inline" src="/discord.svg"> {{ .submission.username }}</a>{{ if .submission.late }} (Late&nbsp;{{ time.Format "2006/01/02" (int (mul -0.001 (int (index (findRE `-([1-9]){5,}\w+` .image.Name 1) 0)))) }}){{ end }}</figcaption>
{{ else }} {{ else }}
<figcaption>Image not found!</figcaption> <figcaption>Image not found!</figcaption>
{{ end }} {{ end }}

Loading…
Cancel
Save