File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ ![ ] ( preview.png )
2+
3+ ``` yml
4+ - type : custom-api
5+ title : Latest Community Widgets
6+ cache : 1d
7+ url : https://raw.githubusercontent.com/glanceapp/community-widgets/refs/heads/main/registry/widgets.json
8+ template : |
9+ <ul class="list list-gap-14 collapsible-container" data-collapse-after="3">
10+ {{ $widgets := .JSON.Array "" | sortByTime "time_added" "rfc3339" "desc" }}
11+ {{ if gt (len $widgets) 10 }}
12+ {{ $widgets = slice $widgets 0 10 }}
13+ {{ end }}
14+ {{ range $widgets }}
15+ <li>
16+ <a class="size-h4 block text-truncate color-primary-if-not-visited" href="https://github.com/glanceapp/community-widgets/blob/main/widgets/{{ .String "directory" }}/README.md" target="_blank" rel="noreferrer">{{ .String "title" }}</a>
17+ <p class="text-truncate-2-lines margin-top-3">{{ .String "description" }}</p>
18+ <ul class="list-horizontal-text margin-top-3">
19+ <li {{ .String "time_added" | parseRelativeTime "rfc3339" }}></li>
20+ <li>{{ .String "author" }}</li>
21+ </ul>
22+ </li>
23+ {{ end }}
24+ </ul>
25+ ` ` `
Original file line number Diff line number Diff line change 1+ title : Latest Community Widgets
2+ description : show a list of the most recently added community widgets
3+ author : svilenmarkov
You can’t perform that action at this time.
0 commit comments