Improved meta data
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
|
||||
const maxEpisodes = 26
|
||||
const maxEpisodesLongSeries = 5
|
||||
const maxDescriptionLength = 170
|
||||
|
||||
// Get anime page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
@ -40,16 +41,23 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
// Open Graph
|
||||
description := anime.Summary
|
||||
|
||||
if len(description) > maxDescriptionLength {
|
||||
description = description[:maxDescriptionLength-3] + "..."
|
||||
}
|
||||
|
||||
openGraph := &arn.OpenGraph{
|
||||
Tags: map[string]string{
|
||||
"og:title": anime.Title.Canonical,
|
||||
"og:image": anime.Image.Large,
|
||||
"og:url": "https://" + ctx.App.Config.Domain + anime.Link(),
|
||||
"og:site_name": "notify.moe",
|
||||
"og:description": anime.Summary,
|
||||
"og:description": description,
|
||||
},
|
||||
Meta: map[string]string{
|
||||
"description": anime.Summary,
|
||||
"description": description,
|
||||
"keywords": anime.Title.Canonical + ",anime",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -7,13 +7,13 @@ component Anime(anime *arn.Anime, tracks []*arn.SoundTrack, user *arn.User, epis
|
||||
.space
|
||||
|
||||
.anime-info
|
||||
h2.anime-title(title=anime.Type)= anime.Title.Canonical
|
||||
h1.anime-title(title=anime.Type)= anime.Title.Canonical
|
||||
|
||||
//- if user && user.titleLanguage === "japanese"
|
||||
//- span.second-title(title=anime.Title.English !== anime.Title.Romaji ? anime.Title.English : null)= anime.Title.Romaji
|
||||
//- else
|
||||
if anime.Title.Japanese != anime.Title.Canonical
|
||||
.anime-alternative-title
|
||||
h2.anime-alternative-title
|
||||
a(href="http://jisho.org/search/" + anime.Title.Japanese, target="_blank", title="Look up reading on jisho.org", rel="nofollow")= anime.Title.Japanese
|
||||
|
||||
//- h3.anime-section-name.anime-summary-header Summary
|
||||
|
@ -38,7 +38,11 @@
|
||||
|
||||
.anime-alternative-title
|
||||
font-size 0.9em
|
||||
margin-top 0
|
||||
margin-bottom 0.5rem
|
||||
text-align left
|
||||
font-weight normal
|
||||
line-height content-line-height
|
||||
a
|
||||
color rgba(60, 60, 60, 0.5) !important
|
||||
|
||||
|
@ -2,10 +2,27 @@ package frontpage
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
description := "Anime list and notifier for new anime episodes. Create your own anime list and keep track of your progress as you watch."
|
||||
|
||||
ctx.Data = &arn.OpenGraph{
|
||||
Tags: map[string]string{
|
||||
"og:title": ctx.App.Config.Title,
|
||||
"og:description": description,
|
||||
"og:type": "website",
|
||||
"og:url": "https://" + ctx.App.Config.Domain,
|
||||
"og:image": "https://" + ctx.App.Config.Domain + "/images/brand/600",
|
||||
},
|
||||
Meta: map[string]string{
|
||||
"description": description,
|
||||
"keywords": "anime,list,tracker,notifier",
|
||||
},
|
||||
}
|
||||
|
||||
return ctx.HTML(components.FrontPage())
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
component FrontPage
|
||||
.frontpage.mountable
|
||||
h2 notify.moe
|
||||
h1 notify.moe
|
||||
|
||||
p Your home for everything about anime.
|
||||
h2 Your home for everything about anime.
|
||||
|
||||
//- img.action.screenshot(src="/images/elements/extension-screenshot.png", alt="Screenshot of the browser extension", title="Click to install the Chrome Extension", data-action="installExtension", data-trigger="click")
|
||||
|
||||
|
@ -6,19 +6,21 @@
|
||||
left 50%
|
||||
transform translateX(-50%) translateY(-50%)
|
||||
|
||||
a, h2, p
|
||||
a, h1, h2
|
||||
color white !important
|
||||
text-shadow 0px 0px 4px rgb(0, 0, 0, 0.75)
|
||||
|
||||
h2
|
||||
h1
|
||||
font-size 2.5rem
|
||||
font-weight normal
|
||||
letter-spacing 5px
|
||||
text-transform uppercase
|
||||
line-height 1.2em
|
||||
|
||||
p
|
||||
h2
|
||||
font-size 2rem
|
||||
font-weight normal
|
||||
margin-top 0
|
||||
margin-bottom 1em
|
||||
line-height 1.2em
|
||||
text-align center
|
||||
|
Reference in New Issue
Block a user