32 lines
970 B
Go
Raw Normal View History

2017-06-15 21:03:55 +00:00
package frontpage
import (
"github.com/aerogo/aero"
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
2019-06-01 04:55:49 +00:00
"github.com/animenotifier/notify.moe/assets"
2017-06-15 21:03:55 +00:00
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/server/middleware"
2017-06-15 21:03:55 +00:00
)
// Get ...
2019-06-01 04:55:49 +00:00
func Get(ctx aero.Context) error {
2017-11-17 13:51:55 +00: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 19:38:19 +00:00
2019-06-01 04:55:49 +00:00
customCtx := ctx.(*middleware.OpenGraphContext)
customCtx.OpenGraph = &arn.OpenGraph{
2017-07-06 19:38:19 +00:00
Tags: map[string]string{
2019-06-01 04:55:49 +00:00
"og:title": assets.Manifest.Name,
2017-07-06 19:38:19 +00:00
"og:description": description,
"og:type": "website",
2019-06-01 04:55:49 +00:00
"og:url": "https://" + assets.Domain,
"og:image": "https://" + assets.Domain + "/images/brand/220.png",
2017-07-06 19:38:19 +00:00
},
Meta: map[string]string{
"description": description,
"keywords": "anime,list,tracker,notifier",
},
}
2017-06-15 21:03:55 +00:00
return ctx.HTML(components.FrontPage())
}