diff --git a/jobs/sync-characters/sync-characters.go b/jobs/sync-characters/sync-characters.go index 76ad09a8..de487b3d 100644 --- a/jobs/sync-characters/sync-characters.go +++ b/jobs/sync-characters/sync-characters.go @@ -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
with two line breaks. + character.Description = strings.Replace(character.Description, "
", "\n\n", -1) character.Save() + + fmt.Printf("%s %s %s\n", color.GreenString("✔"), character.ID, character.Name) } color.Green("Finished.") diff --git a/pages/character/character.pixy b/pages/character/character.pixy index 2c437e44..3a8a1396 100644 --- a/pages/character/character.pixy +++ b/pages/character/character.pixy @@ -1,7 +1,10 @@ component CharacterDetails(character *arn.Character) - h1= character.Name - - p - img(src=character.Image, alt=character.Name) - - p.character-description= character.Description \ No newline at end of file + .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) + diff --git a/pages/character/character.scarlet b/pages/character/character.scarlet index 49043fb8..c507204e 100644 --- a/pages/character/character.scarlet +++ b/pages/character/character.scarlet @@ -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 - margin-top 1.6rem \ No newline at end of file + 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 \ No newline at end of file