diff --git a/assets.go b/assets.go index 9c0946b8..e4bfa579 100644 --- a/assets.go +++ b/assets.go @@ -44,8 +44,7 @@ func init() { // Brand icons app.Get("/images/brand/:file", func(ctx *aero.Context) string { - file := strings.TrimSuffix(ctx.Get("file"), ".webp") - return ctx.TryWebP("images/brand/"+file, ".png") + return ctx.File("images/brand/" + ctx.Get("file")) }) // Cover image diff --git a/config.json b/config.json index 6b208020..c3bbc092 100644 --- a/config.json +++ b/config.json @@ -35,20 +35,20 @@ "background_color": "#ffffff", "icons": [ { - "src": "images/brand/64", + "src": "images/brand/64.png", "sizes": "64x64" }, { - "src": "images/brand/144", + "src": "images/brand/144.png", "sizes": "144x144", "type": "image/png" }, { - "src": "images/brand/300", + "src": "images/brand/300.png", "sizes": "300x300" }, { - "src": "images/brand/600", + "src": "images/brand/600.png", "sizes": "600x600" } ] diff --git a/images/elements/noise-strong.png b/images/elements/noise-strong.png index 3672d82f..836dbcea 100644 Binary files a/images/elements/noise-strong.png and b/images/elements/noise-strong.png differ diff --git a/mixins/Sidebar.pixy b/mixins/Sidebar.pixy index 8ba102b8..00ea9327 100644 --- a/mixins/Sidebar.pixy +++ b/mixins/Sidebar.pixy @@ -3,7 +3,7 @@ component Sidebar(user *arn.User) if user != nil Avatar(user) else - img.user-image.lazy(data-src="/images/brand/64", alt="Anime Notifier") + img.user-image.lazy(data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier") if user != nil SidebarButton("Home", "/animelist/watching", "home") diff --git a/mixins/StatusTabs.pixy b/mixins/StatusTabs.pixy index a526a69b..c714b0ab 100644 --- a/mixins/StatusTabs.pixy +++ b/mixins/StatusTabs.pixy @@ -1,21 +1,12 @@ component StatusTabs(urlPrefix string) .tabs.status-tabs - a.tab.status-tab.action(href=urlPrefix + "/watching", data-action="diff", data-trigger="click") - Icon("play") - span.tab-text Watching - - a.tab.status-tab.action(href=urlPrefix + "/completed", data-action="diff", data-trigger="click") - Icon("check") - span.tab-text Completed + StatusTab("Watching", "play", urlPrefix + "/watching") + StatusTab("Completed", "check", urlPrefix + "/completed") + StatusTab("Planned", "forward", urlPrefix + "/planned") + StatusTab("On Hold", "pause", urlPrefix + "/hold") + StatusTab("Dropped", "stop", urlPrefix + "/dropped") - a.tab.status-tab.action(href=urlPrefix + "/planned", data-action="diff", data-trigger="click") - Icon("forward") - span.tab-text Planned - - a.tab.status-tab.action(href=urlPrefix + "/hold", data-action="diff", data-trigger="click") - Icon("pause") - span.tab-text On Hold - - a.tab.status-tab.action(href=urlPrefix + "/dropped", data-action="diff", data-trigger="click") - Icon("stop") - span.tab-text Dropped \ No newline at end of file +component StatusTab(label string, icon string, url string) + a.tab.status-tab.action(href=url, data-action="diff", data-trigger="click", aria-label=label) + Icon(icon) + span.tab-text= label \ No newline at end of file diff --git a/pages/frontpage/frontpage.go b/pages/frontpage/frontpage.go index 81cbf7d0..d8a69afb 100644 --- a/pages/frontpage/frontpage.go +++ b/pages/frontpage/frontpage.go @@ -16,7 +16,7 @@ func Get(ctx *aero.Context) string { "og:description": description, "og:type": "website", "og:url": "https://" + ctx.App.Config.Domain, - "og:image": "https://" + ctx.App.Config.Domain + "/images/brand/600", + "og:image": "https://" + ctx.App.Config.Domain + "/images/brand/600.png", }, Meta: map[string]string{ "description": description, diff --git a/pages/notifications/notifications.go b/pages/notifications/notifications.go index 0ff4fc4d..787c0716 100644 --- a/pages/notifications/notifications.go +++ b/pages/notifications/notifications.go @@ -19,7 +19,7 @@ func Test(ctx *aero.Context) string { notification := &arn.Notification{ Title: "Anime Notifier", Message: "Yay, it works!", - Icon: "https://" + ctx.App.Config.Domain + "/images/brand/300", + Icon: "https://" + ctx.App.Config.Domain + "/images/brand/300.png", } user.SendNotification(notification)