2024-04-27 21:10:24 +02:00
|
|
|
{{ template "widget-base.html" . }}
|
|
|
|
|
|
|
|
{{ define "widget-content" }}
|
2024-05-17 13:15:44 +02:00
|
|
|
<ul class="list list-gap-14 collapsible-container" data-collapse-after="{{ .CollapseAfter }}">
|
2024-05-16 21:41:50 +02:00
|
|
|
{{ range .Categories }}
|
|
|
|
<li class="twitch-category thumbnail-container">
|
2024-04-27 21:10:24 +02:00
|
|
|
<div class="flex gap-10 items-center">
|
2024-05-16 21:41:50 +02:00
|
|
|
<img class="twitch-category-thumbnail thumbnail" loading="lazy" src="{{ .AvatarUrl }}" alt="">
|
2024-04-27 21:10:24 +02:00
|
|
|
<div class="shrink min-width-0">
|
2024-05-16 21:41:50 +02:00
|
|
|
<a class="size-h3 color-highlight text-truncate block" href="https://www.twitch.tv/directory/category/{{ .Slug }}" target="_blank" rel="noreferrer">{{ .Name }}</a>
|
2024-04-27 21:10:24 +02:00
|
|
|
<ul class="list-horizontal-text">
|
2024-05-16 21:41:50 +02:00
|
|
|
<li>{{ .ViewersCount | formatViewerCount }} viewers</li>
|
|
|
|
{{ if .IsNew }}
|
2024-04-27 21:10:24 +02:00
|
|
|
<li class="color-primary">NEW</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
<ul class="list-horizontal-text flex-nowrap">
|
2024-05-16 21:41:50 +02:00
|
|
|
{{ range $i, $tag := .Tags }}
|
2024-04-27 21:10:24 +02:00
|
|
|
{{ if eq $i 0 }}
|
|
|
|
<li class="shrink-0">{{ $tag.Name }}</li>
|
|
|
|
{{ else }}
|
|
|
|
<li class="text-truncate shrink min-width-0">{{ $tag.Name }}</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|