32 lines
970 B
Go
Raw Normal View History

2017-06-15 23:03:55 +02:00
package frontpage
import (
"github.com/aerogo/aero"
2019-06-03 18:32:43 +09:00
"github.com/animenotifier/notify.moe/arn"
2019-06-01 13:55:49 +09:00
"github.com/animenotifier/notify.moe/assets"
2017-06-15 23:03:55 +02:00
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/server/middleware"
2017-06-15 23:03:55 +02:00
)
// Get ...
2019-06-01 13:55:49 +09:00
func Get(ctx aero.Context) error {
2017-11-17 14:51:55 +01:00
description := "Anime list, tracker, database and notifier for new anime episodes. Create your own anime list and keep track of your progress as you watch."
2017-07-06 21:38:19 +02:00
2019-06-01 13:55:49 +09:00
customCtx := ctx.(*middleware.OpenGraphContext)
customCtx.OpenGraph = &arn.OpenGraph{
2017-07-06 21:38:19 +02:00
Tags: map[string]string{
2019-06-01 13:55:49 +09:00
"og:title": assets.Manifest.Name,
2017-07-06 21:38:19 +02:00
"og:description": description,
"og:type": "website",
2019-06-01 13:55:49 +09:00
"og:url": "https://" + assets.Domain,
"og:image": "https://" + assets.Domain + "/images/brand/220.png",
2017-07-06 21:38:19 +02:00
},
Meta: map[string]string{
"description": description,
"keywords": "anime,list,tracker,notifier",
},
}
2017-06-15 23:03:55 +02:00
return ctx.HTML(components.FrontPage())
}