Improved assets
This commit is contained in:
parent
504993861b
commit
b0c70fc735
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.1 KiB |
@ -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")
|
||||
|
@ -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
|
||||
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
|
@ -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,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user