refactor: remove discover page
This commit is contained in:
@@ -76,8 +76,9 @@ func (h *AnimeHandler) HandleCommandPalette(c *gin.Context) {
|
||||
|
||||
func (h *AnimeHandler) commandPaletteNavigationItems(query string) []commandPaletteItem {
|
||||
all := []commandPaletteItem{
|
||||
{ID: "nav:discover", Type: "navigation", Label: "Go to Discover", Subtitle: "Navigation", Href: "/discover", Icon: "compass"},
|
||||
{ID: "nav:home", Type: "navigation", Label: "Go to Home", Subtitle: "Navigation", Href: "/", Icon: "home"},
|
||||
{ID: "nav:watchlist", Type: "navigation", Label: "Go to Watchlist", Subtitle: "Navigation", Href: "/watchlist", Icon: "bookmark"},
|
||||
{ID: "nav:schedule", Type: "navigation", Label: "Open Broadcast Guide", Subtitle: "External broadcast metadata", Href: "/schedule", Icon: "calendar"},
|
||||
{ID: "nav:popular", Type: "navigation", Label: "Browse popular", Subtitle: "Browse", Href: "/browse?order_by=popularity&sort=asc", Icon: "trending"},
|
||||
{ID: "nav:airing", Type: "navigation", Label: "Currently airing", Subtitle: "Browse", Href: "/browse?status=airing&order_by=popularity&sort=asc", Icon: "play"},
|
||||
}
|
||||
|
||||
@@ -316,11 +316,7 @@ func (h *AnimeHandler) renderCatalogSection(c *gin.Context, section string) {
|
||||
}
|
||||
|
||||
func (h *AnimeHandler) HandleDiscover(c *gin.Context) {
|
||||
user := server.CurrentUser(c)
|
||||
c.HTML(http.StatusOK, "discover.gohtml", gin.H{
|
||||
"CurrentPath": "/discover",
|
||||
"User": user,
|
||||
})
|
||||
c.Redirect(http.StatusSeeOther, "/")
|
||||
}
|
||||
|
||||
func (h *AnimeHandler) HandleDiscoverTopPicksForYou(c *gin.Context) {
|
||||
|
||||
@@ -66,8 +66,6 @@
|
||||
{{$isCollapsed := .IsCollapsed}}
|
||||
{{$navItems := list
|
||||
(dict "key" "home" "href" "/" "label" "Home" "isActive" (eq $currentPath "/"))
|
||||
(dict "key" "discover" "href" "/discover" "label" "Discover" "isActive" (eq $currentPath "/discover"))
|
||||
(dict "key" "schedule" "href" "/schedule" "label" "Schedule" "isActive" (eq $currentPath "/schedule"))
|
||||
(dict "key" "watchlist" "href" "/watchlist" "label" "Watchlist" "isActive" (eq $currentPath "/watchlist"))
|
||||
}}
|
||||
|
||||
@@ -93,6 +91,7 @@
|
||||
{{template "nav_item" dict "key" .key "href" .href "label" .label "isActive" .isActive "isCollapsed" $isCollapsed}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
{{end}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h1 class="text-xl font-normal tracking-[-0.02em] text-foreground">Top Picks for You</h1>
|
||||
<p class="mt-1 text-sm text-foreground-muted">The full ranked list from your current watchlist profile.</p>
|
||||
</div>
|
||||
<a href="/discover" class="text-sm text-foreground-muted transition-colors hover:text-foreground">Back to Discover</a>
|
||||
<a href="/" class="text-sm text-foreground-muted transition-colors hover:text-foreground">Back to Home</a>
|
||||
</div>
|
||||
|
||||
{{if eq (len .Animes) 0}}
|
||||
@@ -17,7 +17,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="/discover" 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">Discover anime</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>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div class="mt-2 flex flex-wrap items-center justify-center gap-3">
|
||||
<a href="/browse?status=airing" class="inline-flex h-9 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 airing</a>
|
||||
<a href="/discover" class="inline-flex h-9 items-center justify-center bg-transparent px-4 text-sm font-normal text-foreground-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Discover</a>
|
||||
<a href="/browse" class="inline-flex h-9 items-center justify-center bg-transparent px-4 text-sm font-normal text-foreground-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse</a>
|
||||
<a href="/watchlist" class="inline-flex h-9 items-center justify-center bg-transparent px-4 text-sm font-normal text-foreground-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Open watchlist</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
<p class="text-sm text-foreground">Your watchlist is empty.</p>
|
||||
<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">Browse anime</a>
|
||||
<a href="/discover" 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">Discover new</a>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user