gallery/make-pages/NsfwWarning.hs

31 lines
729 B
Haskell
Raw Normal View History

2020-10-06 16:07:39 -04:00
{-# 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 im not</button>
</div>
</div>
</div>
|]