44 lines
1.5 KiB
Plaintext

component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime, quotes []*arn.Quote, user *arn.User)
.character-page
.character-left-column
.character-header
.character-image-container
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
.character-description-container
h1.character-name= character.Name.Canonical
.anime-alternative-title
if character.Name.Japanese != ""
Japanese(character.Name.Japanese)
else
Japanese("日本語の名前無し")
.character-description!= markdown.Render(character.Description)
h3 Anime
.character-anime
each anime in characterAnime
a.character-anime-item(href=anime.Link(), title=anime.Title.ByUser(user))
img.character-anime-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
if len(quotes) >0
h3 Quotes
.character-quotes
each quote in quotes
.character-quote
Quote(quote)
if len(character.Attributes) > 0
.character-sidebar
h3 Information
table.character-attributes
each attribute in character.Attributes
tr.mountable(data-mountable-type="info")
td.character-attributes-name= attribute.Name + ":"
if strings.Contains(attribute.Value, "<")
td.character-attributes-value!= markdown.Render(attribute.Value)
else
td.character-attributes-value= attribute.Value