Improved character pages
This commit is contained in:
parent
094fd51873
commit
b2c188d337
@ -21,6 +21,7 @@ func main() {
|
|||||||
Name: kitsuCharacter.Attributes.Name,
|
Name: kitsuCharacter.Attributes.Name,
|
||||||
Image: kitsu.FixImageURL(kitsuCharacter.Attributes.Image.Original),
|
Image: kitsu.FixImageURL(kitsuCharacter.Attributes.Image.Original),
|
||||||
Description: kitsuCharacter.Attributes.Description,
|
Description: kitsuCharacter.Attributes.Description,
|
||||||
|
Attributes: []*arn.CharacterAttribute{},
|
||||||
}
|
}
|
||||||
|
|
||||||
// We use markdown, so replace <br/> with two line breaks.
|
// We use markdown, so replace <br/> with two line breaks.
|
||||||
@ -59,6 +60,11 @@ func main() {
|
|||||||
|
|
||||||
value = strings.TrimSpace(value)
|
value = strings.TrimSpace(value)
|
||||||
|
|
||||||
|
character.Attributes = append(character.Attributes, &arn.CharacterAttribute{
|
||||||
|
Name: key,
|
||||||
|
Value: value,
|
||||||
|
})
|
||||||
|
|
||||||
fmt.Println(color.CyanString(key), color.YellowString(value))
|
fmt.Println(color.CyanString(key), color.YellowString(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
component CharacterDetails(character *arn.Character)
|
component CharacterDetails(character *arn.Character)
|
||||||
.character-header
|
.character-page
|
||||||
.character-image-container
|
.character-header
|
||||||
img.character-image-fullsize(src=character.Image, alt=character.Name)
|
.character-image-container
|
||||||
.character-description-container
|
img.character-image-fullsize(src=character.Image, alt=character.Name)
|
||||||
h1.character-name= character.Name
|
.character-description-container
|
||||||
.anime-alternative-title
|
h1.character-name= character.Name
|
||||||
Japanese("日本語の名前無し")
|
.anime-alternative-title
|
||||||
.character-description!= markdown.Render(character.Description)
|
Japanese("日本語の名前無し")
|
||||||
|
.character-description!= markdown.Render(character.Description)
|
||||||
|
|
||||||
|
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 + ":"
|
||||||
|
td.character-attributes-value= attribute.Value
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
.character-page
|
||||||
|
vertical
|
||||||
|
|
||||||
.character-header
|
.character-header
|
||||||
vertical
|
vertical
|
||||||
|
|
||||||
@ -12,10 +15,26 @@
|
|||||||
margin-bottom 1rem
|
margin-bottom 1rem
|
||||||
|
|
||||||
.character-description
|
.character-description
|
||||||
max-width 700px
|
|
||||||
margin-top 1.6rem
|
margin-top 1.6rem
|
||||||
|
|
||||||
|
.character-sidebar
|
||||||
|
vertical
|
||||||
|
margin-left 0
|
||||||
|
margin-top 1rem
|
||||||
|
|
||||||
|
.character-attributes
|
||||||
|
margin 0
|
||||||
|
|
||||||
|
.character-attributes-name
|
||||||
|
opacity 0.8
|
||||||
|
|
||||||
|
.character-attributes-value
|
||||||
|
text-align right
|
||||||
|
|
||||||
> 1250px
|
> 1250px
|
||||||
|
.character-page
|
||||||
|
horizontal
|
||||||
|
|
||||||
.character-header
|
.character-header
|
||||||
horizontal
|
horizontal
|
||||||
|
|
||||||
@ -26,4 +45,13 @@
|
|||||||
padding 0 content-padding
|
padding 0 content-padding
|
||||||
|
|
||||||
.character-description
|
.character-description
|
||||||
margin-top typography-margin
|
margin-top typography-margin
|
||||||
|
|
||||||
|
.character-sidebar
|
||||||
|
margin-left content-padding
|
||||||
|
margin-top 0
|
||||||
|
min-width 270px
|
||||||
|
|
||||||
|
> 1400px
|
||||||
|
.character-sidebar
|
||||||
|
min-width 300px
|
Loading…
Reference in New Issue
Block a user