add default warning for nsfw stuff

This commit is contained in:
Rhiannon Morris 2021-06-04 04:07:05 +02:00
parent 3bbe9d6109
commit bf381cba7a

View file

@ -68,7 +68,12 @@ make' root prefix nsfw dataDir dir info@(Info {date, title, artist, bg}) = do
</figcaption>
|]
let warning' = ifJust (#warning image0) makeWarning
let defWarning = "oops i forgot to put one, sorry!<br>\
\if you can let me know i'd appreciate it" :: Text
let warning'
| Just w <- #warning image0 = makeWarning w
| #nsfw image0 = makeWarning defWarning
| otherwise = mempty
let warningT = makeWarning [b|.|]
let bgStyle = ifJust bg \col -> [b|@0