Added default cover image
This commit is contained in:
parent
36eb2ee149
commit
b305be5ae4
BIN
images/cover/default.jpg
Normal file
BIN
images/cover/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
BIN
images/cover/default.webp
Normal file
BIN
images/cover/default.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
13
main.go
13
main.go
@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/pages/airing"
|
||||
@ -45,6 +47,17 @@ func main() {
|
||||
app.Ajax("/airing", airing.Get)
|
||||
app.Ajax("/users", users.Get)
|
||||
|
||||
app.Get("/images/cover/:file", func(ctx *aero.Context) string {
|
||||
format := ".jpg"
|
||||
accept := ctx.GetRequestHeader("Accept")
|
||||
|
||||
if strings.Index(accept, "image/webp") != -1 {
|
||||
format = ".webp"
|
||||
}
|
||||
|
||||
return ctx.File("images/cover/" + ctx.Get("file") + format)
|
||||
})
|
||||
|
||||
// Favicon
|
||||
app.Get("/favicon.ico", func(ctx *aero.Context) string {
|
||||
return ctx.File("images/icons/favicon.ico")
|
||||
|
@ -1,6 +1,6 @@
|
||||
component Profile(viewUser *arn.User, user *arn.User)
|
||||
.profile
|
||||
//- .profile-cover(style=viewUser.CoverImageStyle())
|
||||
img.profile-cover(src=viewUser.CoverImageURL())
|
||||
|
||||
.image-container
|
||||
ProfileImage(viewUser)
|
||||
@ -36,7 +36,7 @@ component Profile(viewUser *arn.User, user *arn.User)
|
||||
p.profile-field.registration-date(title="Member since")
|
||||
Icon("calendar")
|
||||
//- span= time.Parse(time.RFC3339, viewUser.Registered)
|
||||
span= viewUser.Registered[:4]
|
||||
span= viewUser.RegisteredTime().Format("Jan 2006")
|
||||
//- span= monthNames[joined.getMonth()] + ' ' + joined.getFullYear()
|
||||
|
||||
if viewUser.Role != ""
|
||||
|
@ -33,7 +33,8 @@ animation appear
|
||||
width 100%
|
||||
height 100%
|
||||
z-index -1
|
||||
background-size cover
|
||||
object-fit cover
|
||||
// background-size cover
|
||||
overflow hidden
|
||||
|
||||
default-transition
|
||||
|
Loading…
Reference in New Issue
Block a user