From 7eae10b4bf04ed2df3fdc41e493fcb8c459e21b2 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Fri, 29 Jul 2022 13:53:36 +0100 Subject: [PATCH] Testing out flyout menus --- css/master.css | 42 ++++++++++++++++++++++++++++++++++++++++++ image.php | 5 ++++- scripts/flyout.js | 13 +++++++++++++ ui/flyout.php | 14 ++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 scripts/flyout.js create mode 100644 ui/flyout.php diff --git a/css/master.css b/css/master.css index 2bb2af6..a6778f9 100644 --- a/css/master.css +++ b/css/master.css @@ -370,6 +370,48 @@ a.btn { text-align: center; } +/* + -=-=-= FLYOUT =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +*/ +.flyout { + margin: 0; padding: 0.5rem 0.5rem 1.5rem; + + max-width: 621px; width: calc(100% - 2.5rem + 3px); + max-height: 50vh; height: auto; + + bottom: -50vh; left: 50%; + + transform: translateX(-50%); + + position: fixed; z-index: 99999; + + overflow-y: auto; + + border: 0.2rem solid var(--green); + border-bottom: none; + border-radius: inherit inherit none none; + + word-wrap: break-word; + + transition: bottom 0.5s cubic-bezier(.19,1,.22,1); +} + +.flyout-dim { + margin: 0; padding: 0; + + width: 100vw; height: 100vh; + + left: 0; top: 0; + + position: fixed; z-index: 99998; + + opacity: 0.8; + + display: none; + + background: var(--bg); +} + /* -=-=-= FONT SIZES =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */ diff --git a/image.php b/image.php index c4092a7..e4438a3 100644 --- a/image.php +++ b/image.php @@ -106,11 +106,12 @@ // Image download echo "Download image"; ?> +

Tags

-
+
diff --git a/scripts/flyout.js b/scripts/flyout.js new file mode 100644 index 0000000..9a1c147 --- /dev/null +++ b/scripts/flyout.js @@ -0,0 +1,13 @@ +document.querySelector(".flyout-close").onclick = () =>{ + document.querySelector("html").style.overflow= "auto"; + + document.querySelector(".flyout").style.bottom= "-50vh"; + document.querySelector(".flyout-dim").style.display= "none"; +} + +document.querySelector(".flyout-display").onclick = () =>{ + document.querySelector("html").style.overflow= "hidden"; + + document.querySelector(".flyout").style.bottom= "-1rem"; + document.querySelector(".flyout-dim").style.display= "block"; +} diff --git a/ui/flyout.php b/ui/flyout.php new file mode 100644 index 0000000..9730a84 --- /dev/null +++ b/ui/flyout.php @@ -0,0 +1,14 @@ +
+
+
+ Dialog

This is a very cool flyout that does nothing but be annoying right now! Sowwy for taking up your screenspace with this box!

This is just being tested as a better alternative to some things, sowwy!

Accept the world is cruel"; + echo $flyout_content; + } + ?> + Cancel +
+