make the warning dialog a <dialog>

This commit is contained in:
rhiannon morris 2024-08-05 23:36:30 +02:00
parent 5e64e9ea1b
commit 43af72aa4d
3 changed files with 97 additions and 122 deletions

View file

@ -17,27 +17,15 @@ script (Just _) = [b|<script src=/script/nsfw-warning.js type=module></script>|]
dialog :: Maybe What -> Builder
dialog Nothing = ""
dialog (Just what) = [b|@0
<div class=dialog id=nsfw-dialog>
<div class=dialog-inner>
<h1>cw: lewd art</h1>
<img class=dialog-icon src=/style/stop_hand.svg>
<div class=dialog-message>
<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>.
</div>
<div class=dialog-buttons>
<button id=nsfw-yes class=yes>i am an adult</button>
<a href=//crouton.net referrerpolicy=no-referrer>
<button id=nsfw-no class=no>i am not</button>
</a>
</div>
</div>
</div>
<dialog id=nsfw-dialog>
<h1>cw: lewd art</h1>
<img src=/style/stop_hand.svg>
<div> you must be an adult to view $what. no minors! </div>
<form>
<button id=nsfw-yes class=yes>i am an adult</button>
<a href=//crouton.net referrerpolicy=no-referrer>
<button id=nsfw-no class=no>i am not</button>
</a>
</form>
</dialog>
|]