Better character description
This commit is contained in:
parent
a71d30de5c
commit
41062b3be5
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/kitsu"
|
||||
@ -19,12 +20,14 @@ func main() {
|
||||
ID: kitsuCharacter.ID,
|
||||
Name: kitsuCharacter.Attributes.Name,
|
||||
Image: kitsu.FixImageURL(kitsuCharacter.Attributes.Image.Original),
|
||||
Description: arn.FixAnimeDescription(kitsuCharacter.Attributes.Description),
|
||||
Description: kitsuCharacter.Attributes.Description,
|
||||
}
|
||||
|
||||
fmt.Printf("%s %s\n", character.ID, character.Name)
|
||||
|
||||
// We use markdown, so replace <br/> with two line breaks.
|
||||
character.Description = strings.Replace(character.Description, "<br/>", "\n\n", -1)
|
||||
character.Save()
|
||||
|
||||
fmt.Printf("%s %s %s\n", color.GreenString("✔"), character.ID, character.Name)
|
||||
}
|
||||
|
||||
color.Green("Finished.")
|
||||
|
@ -1,7 +1,10 @@
|
||||
component CharacterDetails(character *arn.Character)
|
||||
h1= character.Name
|
||||
.character-header
|
||||
.character-image-container
|
||||
img.character-image-fullsize(src=character.Image, alt=character.Name)
|
||||
.character-description-container
|
||||
h1.character-name= character.Name
|
||||
.anime-alternative-title
|
||||
Japanese("日本語の名前無し")
|
||||
.character-description!= markdown.Render(character.Description)
|
||||
|
||||
p
|
||||
img(src=character.Image, alt=character.Name)
|
||||
|
||||
p.character-description= character.Description
|
@ -1,4 +1,29 @@
|
||||
.character-header
|
||||
vertical
|
||||
|
||||
.character-name
|
||||
text-align center
|
||||
margin-bottom 0.5rem
|
||||
|
||||
.character-image-container
|
||||
vertical
|
||||
justify-content flex-start
|
||||
align-items center
|
||||
margin-bottom 1rem
|
||||
|
||||
.character-description
|
||||
max-width 800px
|
||||
margin 0 auto
|
||||
max-width 700px
|
||||
margin-top 1.6rem
|
||||
|
||||
> 1250px
|
||||
.character-header
|
||||
horizontal
|
||||
|
||||
.character-name
|
||||
text-align left
|
||||
|
||||
.character-description-container
|
||||
padding 0 content-padding
|
||||
|
||||
.character-description
|
||||
margin-top typography-margin
|
Loading…
Reference in New Issue
Block a user