2022-01-03 14:45:55 -05:00
|
|
|
module NsfwWarning (What (..), script, dialog) where
|
2020-10-06 16:07:39 -04:00
|
|
|
|
|
|
|
import BuilderQQ
|
|
|
|
|
|
|
|
|
2022-01-03 14:45:55 -05:00
|
|
|
data What = Single | Gallery
|
|
|
|
|
|
|
|
instance CanBuild What where
|
|
|
|
build Single = "this art"
|
|
|
|
build Gallery = "the art in this gallery"
|
|
|
|
|
|
|
|
|
|
|
|
script :: Maybe What -> Builder
|
|
|
|
script Nothing = ""
|
|
|
|
script (Just _) = [b|<script src=/script/nsfw-warning.js></script>|]
|
|
|
|
|
|
|
|
dialog :: Maybe What -> Builder
|
|
|
|
dialog Nothing = ""
|
|
|
|
dialog (Just what) = [b|@0
|
2020-10-06 16:07:39 -04:00
|
|
|
<div class=dialog id=nsfw-dialog>
|
|
|
|
<div class=dialog-inner>
|
2022-01-03 14:45:55 -05:00
|
|
|
<h1>cw: lewd art</h1>
|
2020-10-06 16:07:39 -04:00
|
|
|
|
|
|
|
<img class=dialog-icon src=/style/stop_hand.svg>
|
|
|
|
|
|
|
|
<div class=dialog-message>
|
2022-01-03 14:45:55 -05:00
|
|
|
<p>
|
|
|
|
$what contains pornographic content that is
|
|
|
|
<strong>not suitable for minors</strong>.
|
|
|
|
<p>
|
|
|
|
by continuing, you are confirming that you are at least
|
|
|
|
<strong>eighteen years old</strong>.
|
2020-10-06 16:07:39 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class=dialog-buttons>
|
2022-01-03 14:45:55 -05:00
|
|
|
<button id=nsfw-yes class=yes>i am an adult</button>
|
|
|
|
<button id=nsfw-no class=no>i am not</button>
|
2020-10-06 16:07:39 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|]
|