Improved character pages
This commit is contained in:
parent
383a1545e2
commit
21155a09f4
@ -121,6 +121,7 @@ component AnimePopularity(anime *arn.Anime)
|
|||||||
component AnimeLinks(anime *arn.Anime, user *arn.User)
|
component AnimeLinks(anime *arn.Anime, user *arn.User)
|
||||||
section.anime-section.mountable
|
section.anime-section.mountable
|
||||||
h3.anime-section-name Links
|
h3.anime-section-name Links
|
||||||
|
|
||||||
.light-button-group
|
.light-button-group
|
||||||
each link in anime.Links
|
each link in anime.Links
|
||||||
a.light-button(href=link.URL, target="_blank", rel="noopener")
|
a.light-button(href=link.URL, target="_blank", rel="noopener")
|
||||||
|
@ -2,36 +2,40 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
|
|||||||
.character-page
|
.character-page
|
||||||
.character-left-column
|
.character-left-column
|
||||||
.character-header
|
.character-header
|
||||||
.character-image-container
|
.character-image-container.mountable
|
||||||
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
|
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
|
||||||
.character-description-container
|
|
||||||
h1.character-name= character.Name.Canonical
|
|
||||||
|
|
||||||
.anime-alternative-title
|
.character-description-container
|
||||||
|
h1.character-name.mountable= character.Name.Canonical
|
||||||
|
|
||||||
|
.anime-alternative-title.mountable
|
||||||
if character.Name.Japanese != ""
|
if character.Name.Japanese != ""
|
||||||
Japanese(character.Name.Japanese)
|
Japanese(character.Name.Japanese)
|
||||||
else
|
else
|
||||||
Japanese("日本語の名前無し")
|
Japanese("日本語の名前無し")
|
||||||
|
|
||||||
.character-description!= markdown.Render(character.Description)
|
.character-description.mountable!= markdown.Render(character.Description)
|
||||||
|
|
||||||
h3 Anime
|
h3.mountable Anime
|
||||||
.character-anime
|
|
||||||
|
.character-anime.mountable
|
||||||
each anime in characterAnime
|
each anime in characterAnime
|
||||||
a.character-anime-item(href=anime.Link(), title=anime.Title.ByUser(user))
|
a.character-anime-item.mountable(href=anime.Link(), title=anime.Title.ByUser(user), data-mountable-type="anime")
|
||||||
img.character-anime-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=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
|
if len(quotes) >0
|
||||||
h3 Quotes
|
h3.mountable Quotes
|
||||||
.character-quotes
|
|
||||||
|
.character-quotes.mountable
|
||||||
each quote in quotes
|
each quote in quotes
|
||||||
.character-quote
|
.character-quote
|
||||||
Quote(quote)
|
Quote(quote)
|
||||||
|
|
||||||
if len(character.Attributes) > 0
|
|
||||||
.character-sidebar
|
.character-sidebar
|
||||||
h3 Information
|
if len(character.Attributes) > 0
|
||||||
table.character-attributes
|
h3.mountable Information
|
||||||
|
|
||||||
|
table.character-attributes.mountable
|
||||||
each attribute in character.Attributes
|
each attribute in character.Attributes
|
||||||
tr.mountable(data-mountable-type="info")
|
tr.mountable(data-mountable-type="info")
|
||||||
td.character-attributes-name= attribute.Name + ":"
|
td.character-attributes-name= attribute.Name + ":"
|
||||||
@ -41,3 +45,11 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
|
|||||||
else
|
else
|
||||||
td.character-attributes-value= attribute.Value
|
td.character-attributes-value= attribute.Value
|
||||||
|
|
||||||
|
if character.GetMapping("myanimelist/character") != ""
|
||||||
|
h3.mountable Links
|
||||||
|
|
||||||
|
.light-button-group.mountable
|
||||||
|
a.light-button(href="https://myanimelist.net/character/" + character.GetMapping("myanimelist/character"), target="_blank", rel="noopener")
|
||||||
|
Icon("external-link")
|
||||||
|
span MAL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user