Added spoilers to characters
This commit is contained in:
parent
007e2e90ec
commit
2730306cef
@ -83,6 +83,15 @@ func parseCharacterDescription(input string) (output string, attributes []*arn.C
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paragraph = strings.TrimSpace(paragraph)
|
||||||
|
|
||||||
|
// Skip paragraph if it's too short.
|
||||||
|
if len(paragraph) < 30 {
|
||||||
|
if !strings.HasSuffix(paragraph, ".") || strings.HasSuffix(paragraph, "...") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
finalParagraphs = append(finalParagraphs, paragraph)
|
finalParagraphs = append(finalParagraphs, paragraph)
|
||||||
|
|
||||||
// originalLine := line
|
// originalLine := line
|
||||||
|
@ -37,6 +37,10 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
|
|||||||
|
|
||||||
.character-description.mountable(data-mountable-type="header")!= markdown.Render(character.Description)
|
.character-description.mountable(data-mountable-type="header")!= markdown.Render(character.Description)
|
||||||
|
|
||||||
|
.character-spoilers
|
||||||
|
each spoiler in character.Spoilers
|
||||||
|
.spoiler.character-spoiler.mountable(data-mountable-type="header")!= markdown.Render(spoiler.Text)
|
||||||
|
|
||||||
.character-main-column
|
.character-main-column
|
||||||
if len(characterAnime) > 0
|
if len(characterAnime) > 0
|
||||||
.character-section
|
.character-section
|
||||||
|
@ -52,6 +52,12 @@
|
|||||||
.character-anime-item-image
|
.character-anime-item-image
|
||||||
anime-mini-item-image
|
anime-mini-item-image
|
||||||
|
|
||||||
|
.character-spoiler-warning
|
||||||
|
margin content-padding 0
|
||||||
|
|
||||||
|
.character-spoiler
|
||||||
|
margin typography-margin 0
|
||||||
|
|
||||||
.character-quotes
|
.character-quotes
|
||||||
justify-content flex-start
|
justify-content flex-start
|
||||||
|
|
||||||
|
6
styles/spoiler.scarlet
Normal file
6
styles/spoiler.scarlet
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.spoiler
|
||||||
|
transition filter 500ms ease, transform transition-speed ease
|
||||||
|
filter blur(2px)
|
||||||
|
|
||||||
|
:hover
|
||||||
|
filter blur(0)
|
Loading…
Reference in New Issue
Block a user