messing with the nsfw warning

This commit is contained in:
Rhiannon Morris 2022-01-03 20:45:55 +01:00
parent 9d45b520e7
commit 5c2a50760a
6 changed files with 46 additions and 18 deletions

View file

@ -7,6 +7,7 @@ import Records ()
import qualified NsfwWarning
import Control.Exception
import Control.Monad
import Data.List (sort)
import Data.Maybe (fromMaybe)
import qualified Data.Text as Strict
@ -92,8 +93,9 @@ make' root prefix nsfw dataDir dir info@(Info {date, title, artist, bg}) = do
let updated = formatLong d in
[b|<br> <span class=updated>updated $updated</span>|]
let nsfwScript = NsfwWarning.script nsfw
let nsfwDialog = NsfwWarning.dialog nsfw
let nsfw' = NsfwWarning.Single <$ guard nsfw
let nsfwScript = NsfwWarning.script nsfw'
let nsfwDialog = NsfwWarning.dialog nsfw'
pure [b|@0
<!DOCTYPE html>