mirror of
https://github.com/Xevion/glance.git
synced 2025-12-10 02:07:20 -06:00
feat: add change detection module
This commit is contained in:
17
internal/assets/templates/changes.html
Normal file
17
internal/assets/templates/changes.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{ 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>
|
||||
</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 }}
|
||||
Reference in New Issue
Block a user