From 68be2c7123c91616ad274a668821f6a204f0d7c1 Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:56:03 +0000 Subject: [PATCH] [terms] implement terms and conditions blur modal, fixes #1166 --- ext/terms/style.css | 19 +++++++++++++++++++ ext/terms/theme.php | 36 +++++++++++------------------------- 2 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 ext/terms/style.css diff --git a/ext/terms/style.css b/ext/terms/style.css new file mode 100644 index 00000000..f70f7f50 --- /dev/null +++ b/ext/terms/style.css @@ -0,0 +1,19 @@ +.terms-modal-enter { + margin: 10px; +} +#terms-modal { + margin: auto; + margin-top: 20vh; + padding: 5px 20px; + text-align: center; + width: fit-content; +} +#terms-modal-bg { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + backdrop-filter: blur(10px); +} \ No newline at end of file diff --git a/ext/terms/theme.php b/ext/terms/theme.php index 7708c4cc..4f592fde 100644 --- a/ext/terms/theme.php +++ b/ext/terms/theme.php @@ -8,30 +8,16 @@ class TermsTheme extends Themelet { public function display_page(Page $page, string $sitename, string $path, string $body): void { - $page->set_mode(PageMode::DATA); - $page->add_auto_html_headers(); - $hh = $page->get_all_html_headers(); - $page->set_data( - << - - - $sitename - - - $hh - - -
-

$sitename

- $body -
- -
-
- - -EOD - ); + $html = + "
+ +

$sitename

+ $body +
+ +
+
+
"; + $page->add_block(new Block(null, $html, "main", 1)); } }