no button on the nsfw warning goes to crouton.net

This commit is contained in:
rhiannon morris 2023-07-19 23:07:18 +02:00
parent f16c2f549a
commit fd216ae3dd
3 changed files with 21 additions and 6 deletions

View File

@ -7,7 +7,7 @@ data What = Single | Gallery
instance CanBuild What where
build Single = "this art"
build Gallery = "the art in this gallery"
build Gallery = "some of the art in this gallery"
script :: Maybe What -> Builder
@ -34,7 +34,9 @@ dialog (Just what) = [b|@0
<div class=dialog-buttons>
<button id=nsfw-yes class=yes>i am an adult</button>
<button id=nsfw-no class=no>i am not</button>
<a href=//crouton.net referrerpolicy=no-referrer>
<button id=nsfw-no class=no>i am not</button>
</a>
</div>
</div>
</div>

View File

@ -17,16 +17,19 @@ function yes() {
dismiss();
}
// now just a normal link
/*
function no() {
history.go(-1);
document.location = '//crouton.net';
}
*/
function setup() {
if (alreadyYes()) {
dismiss();
} else {
document.getElementById('nsfw-yes').onclick = yes;
document.getElementById('nsfw-no').onclick = no;
// document.getElementById('nsfw-no').onclick = no;
}
}

View File

@ -61,8 +61,8 @@
margin-top: 1em;
}
.dialog button + button {
margin-left: 1em;
.dialog-buttons > * {
margin: 0 1em;
}
.dialog button {
@ -74,6 +74,16 @@
font-weight: 600;
font-size: inherit;
color: black;
position: relative;
cursor: pointer;
}
.dialog button a {
inset: 0;
width: max-content;
text-decoration: none;
}
.dialog .yes {