glance/internal/assets/templates/changes.html
2024-05-09 08:32:27 +02:00

19 lines
1.1 KiB
HTML

{{ template "widget-base.html" . }}
{{ define "widget-content" }}
<ul class="list list-gap-14 list-collapsible">
{{ range $i, $watch := .ChangeDetections }}
<li {{ if shouldCollapse $i $.CollapseAfter }}class="list-collapsible-item" style="--animation-delay: {{ itemAnimationDelay $i $.CollapseAfter }};"{{ end }}>
<a class="size-h4 block text-truncate color-primary-if-not-visited" href="{{ $watch.URL }}" target="_blank" rel="noreferrer">{{ .Name }}</a>
<ul class="list-horizontal-text">
<li title="{{ $watch.LastChanged | formatTime }}" {{ dynamicRelativeTimeAttrs $watch.LastChanged }}>{{ $watch.LastChanged | relativeTime }}</li>
<li class="shrink min-width-0"><a class="visited-indicator text-truncate block" href="{{ $watch.DiffURL }}" target="_blank" rel="noreferrer">diff: {{ $watch.DiffDisplay | }}</a></li>
</ul>
</li>
{{ end }}
</ul>
{{ if gt (len .ChangeDetections) $.CollapseAfter }}
<label class="list-collapsible-label"><input type="checkbox" autocomplete="off" class="list-collapsible-input"></label>
{{ end }}
{{ end }}