From fd216ae3ddd9e9a6b2ca2a350122d5e87cbec60c Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Wed, 19 Jul 2023 23:07:18 +0200 Subject: [PATCH] no button on the nsfw warning goes to crouton.net --- make-pages/NsfwWarning.hs | 6 ++++-- script/nsfw-warning.js | 7 +++++-- style/shiny/nsfw-warning.css | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/make-pages/NsfwWarning.hs b/make-pages/NsfwWarning.hs index fcfabb5..5e820ab 100644 --- a/make-pages/NsfwWarning.hs +++ b/make-pages/NsfwWarning.hs @@ -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
- + + +
diff --git a/script/nsfw-warning.js b/script/nsfw-warning.js index 4f32770..493f36b 100644 --- a/script/nsfw-warning.js +++ b/script/nsfw-warning.js @@ -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; } } diff --git a/style/shiny/nsfw-warning.css b/style/shiny/nsfw-warning.css index 081128d..9ceeea0 100644 --- a/style/shiny/nsfw-warning.css +++ b/style/shiny/nsfw-warning.css @@ -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 {