feat: add sfw to browse links across templates
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<div>
|
||||
<dt class="mb-1 text-xs font-normal text-foreground-muted">Studios</dt>
|
||||
<dd class="text-foreground">
|
||||
{{range $i, $s := $anime.Studios}}{{if $i}}, {{end}}<a href="/browse?studio={{$s.MalID}}" class="underline underline-offset-2 decoration-foreground-muted/60 text-foreground-muted transition-colors hover:text-foreground hover:decoration-foreground/70">{{$s.Name}}</a>{{end}}
|
||||
{{range $i, $s := $anime.Studios}}{{if $i}}, {{end}}<a href="/browse?studio={{$s.MalID}}&sfw=true" class="underline underline-offset-2 decoration-foreground-muted/60 text-foreground-muted transition-colors hover:text-foreground hover:decoration-foreground/70">{{$s.Name}}</a>{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -89,7 +89,7 @@
|
||||
<dt class="mb-1 text-xs font-normal text-foreground-muted">Genres</dt>
|
||||
<dd class="flex flex-wrap gap-2 pt-1">
|
||||
{{range $anime.Genres}}
|
||||
<a href="/browse?genres={{.MalID}}" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
<a href="/browse?genres={{.MalID}}&sfw=true" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@
|
||||
<dt class="mb-1 text-xs font-normal text-foreground-muted">Themes</dt>
|
||||
<dd class="flex flex-wrap gap-2 pt-1">
|
||||
{{range $anime.Themes}}
|
||||
<a href="/browse?genres={{.MalID}}" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
<a href="/browse?genres={{.MalID}}&sfw=true" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -109,7 +109,7 @@
|
||||
<dt class="mb-1 text-xs font-normal text-foreground-muted">Demographics</dt>
|
||||
<dd class="flex flex-wrap gap-2 pt-1">
|
||||
{{range $anime.Demographics}}
|
||||
<a href="/browse?genres={{.MalID}}" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
<a href="/browse?genres={{.MalID}}&sfw=true" class="bg-background-surface px-2.5 py-1 text-[11px] font-normal text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground">{{.Name}}</a>
|
||||
{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<p class="text-sm text-foreground">No anime found</p>
|
||||
<p class="text-sm">Try clearing filters or browsing what’s popular.</p>
|
||||
<div class="mt-2 flex gap-2">
|
||||
<a href="/browse" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Clear filters</a>
|
||||
<a href="/browse?order_by=popularity&sort=asc" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse popular</a>
|
||||
<a href="/browse?sfw=true" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Clear filters</a>
|
||||
<a href="/browse?order_by=popularity&sort=asc&sfw=true" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse popular</a>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div>
|
||||
<h2 class="text-base font-normal text-foreground">Airing & Popular</h2>
|
||||
</div>
|
||||
{{template "section_action" dict "Href" "/browse?status=airing&order_by=popularity&sort=asc" "Label" "View all"}}
|
||||
{{template "section_action" dict "Href" "/browse?status=airing&order_by=popularity&sort=asc&sfw=true" "Label" "View all"}}
|
||||
</div>
|
||||
<div hx-get="/api/catalog/airing" hx-trigger="load" hx-swap="outerHTML">
|
||||
{{template "catalog_skeleton"}}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<p class="text-sm">Add a few anime to your watchlist so the recommender has something to learn from.</p>
|
||||
<div class="mt-2 flex gap-2">
|
||||
<a href="/watchlist" class="inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Open watchlist</a>
|
||||
<a href="/browse" class="inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse anime</a>
|
||||
<a href="/browse?sfw=true" class="inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse anime</a>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<p class="text-sm text-foreground-muted">Start adding anime to keep track of what you want to watch.</p>
|
||||
<div class="mt-2 flex gap-3">
|
||||
<a href="/" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Go home</a>
|
||||
<a href="/browse" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse anime</a>
|
||||
<a href="/browse?sfw=true" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse anime</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user