30 lines
729 B
Haskell
30 lines
729 B
Haskell
{-# OPTIONS_GHC -fdefer-typed-holes #-}
|
||
|
||
module NsfwWarning (script, dialog) where
|
||
|
||
import BuilderQQ
|
||
|
||
script :: Bool -> Builder
|
||
script False = ""
|
||
script True = [b|<script src=/script/nsfw-warning.js></script>|]
|
||
|
||
dialog :: Bool -> Builder
|
||
dialog False = ""
|
||
dialog True = [b|@0
|
||
<div class=dialog id=nsfw-dialog>
|
||
<div class=dialog-inner>
|
||
<h1>cw: lewd</h1>
|
||
|
||
<img class=dialog-icon src=/style/stop_hand.svg>
|
||
|
||
<div class=dialog-message>
|
||
are you an adult? <br> if not please don't look!
|
||
</div>
|
||
|
||
<div class=dialog-buttons>
|
||
<button id=nsfw-yes class=yes>yes i am and i wanna see</button>
|
||
<button id=nsfw-no class=no>no i’m not</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|]
|