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
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
// originalLine := line
|
||||
|
@ -36,6 +36,10 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
|
||||
Quote(mainQuote, user)
|
||||
|
||||
.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
|
||||
if len(characterAnime) > 0
|
||||
|
@ -52,6 +52,12 @@
|
||||
.character-anime-item-image
|
||||
anime-mini-item-image
|
||||
|
||||
.character-spoiler-warning
|
||||
margin content-padding 0
|
||||
|
||||
.character-spoiler
|
||||
margin typography-margin 0
|
||||
|
||||
.character-quotes
|
||||
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