Started main quote with bool types for EditForm.

This commit is contained in:
Scott
2018-04-10 14:17:10 +02:00
parent b1580348a9
commit b9b164eb89
4 changed files with 15 additions and 4 deletions

View File

@ -37,7 +37,14 @@ func Get(ctx *aero.Context) string {
})
// Quotes
var mainQuote *arn.Quote
quotes := character.Quotes()
for i, quote := range quotes {
if quote.IsMainQuote {
mainQuote = quote
quotes = append(quotes[:i], quotes[i+1:]...)
}
}
arn.SortQuotesPopularFirst(quotes)
// Set OpenGraph attributes
@ -65,5 +72,5 @@ func Get(ctx *aero.Context) string {
},
}
return ctx.HTML(components.CharacterDetails(character, characterAnime, quotes, user))
return ctx.HTML(components.CharacterDetails(character, characterAnime, quotes, mainQuote, user))
}