website

Code for the bare sturcture of concealed.world.
git clone git://git.concealed.world/website
Log | Files | Refs | README | LICENSE

commit d99956c5b4d6d3ff8681cc685d24afd6e25cc4ff
parent 93f59cb5655628583d08ebe329a0862976affe2d
Author: Nixx <nixx@firemail.cc>
Date:   Fri,  6 Nov 2020 20:45:42 +0000

Giving the option of whether or not to display a scrollbar

Diffstat:
Mincludes/start.php | 2+-
Mindex.php | 7+++++++
Ascrollbar.php | 30++++++++++++++++++++++++++++++
Mstyles/default.css | 1-
4 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/includes/start.php b/includes/start.php @@ -2,7 +2,7 @@ require $root."includes/start-meta.php"; echo '<link rel="stylesheet" href="'.$root.'styles/default.css" />'; $usragent=$_SERVER['HTTP_USER_AGENT']; - if (!strpos($usragent, 'PaleMoon') !== false) { + if (!strpos($usragent, 'PaleMoon') !== false && $_COOKIE['scrollbar'] !== "true") { echo '<link rel="stylesheet" href="'.$root.'styles/noscroll.css" />'; } echo '<link rel="stylesheet" href="'.$root.'styles/fonts.css" />'; diff --git a/index.php b/index.php @@ -13,5 +13,12 @@ require $root."includes/start-meta.php"; </head> <body> <h1><span><a href="home.php">~$>connect</a></span></h1> + + <?php + $usragent=$_SERVER['HTTP_USER_AGENT']; + if (!strpos($usragent, 'PaleMoon') !== false) { + echo '<a href="scrollbar.php" style="position: absolute; right: 10px; bottom: 10px;">Display Scrollbar on this Site</a>'; + } + ?> </body> </html> diff --git a/scrollbar.php b/scrollbar.php @@ -0,0 +1,30 @@ +<?php +$title = "Show Scrollbar"; +$tags = "CSS, scrollbar"; +$root = ""; +setcookie("scrollbar", "true", time() + (86400 * 30), "/"); // 86400 - one day +require $root."includes/start-meta.php"; +?> + <link rel="stylesheet" href="styles/splash.css" /> + <link rel="stylesheet" href="styles/fonts.css" /> + <link rel="stylesheet" href="styles/cursor.css" /> + <style> + html, body {margin: 0; height: 100%; overflow: hidden} + </style> +</head> +<body> + <h1>Display Scrollbar on this Site</h1> + + <center><div style="width: 80%;"> + <p>This site hides the scrollbar by default as a stylistic choice.</p> + + <p>I have found Pale Moon cannot properly render my site because of this. I have attempted to fix this via detecting their user-agent and serving specific CSS, but some users may spoof their user-agent. If you are one of these people, or you use a browser I'm not aware of with the same problem, or you just like it better with one - using this allows you to view the site normally, with a scrollbar.</p> + + <p><b>Warning:</b> This implementation uses cookies. Your browser must be capable of at least utilising first-party cookies. This cookie tells me absolutely nothing about you, and is not logged anywhere - it merely means that you have visited this page.</p> + + <p>You can unset this option by entering 'document.cookies="scrollbar=false"' into your browser's JavaScript console, or otherwise clearing the cookies. It will automatically expire 30 days after your last visit of this page.</p> + + <a style="font-size: 1.8em;" href="home.php">Continue to Homepage</a> + </div></center> +</body> +</html> diff --git a/styles/default.css b/styles/default.css @@ -80,7 +80,6 @@ input[type="submit" i] { position: fixed; margin: 2px; max-height: var(--ver); - overflow-y: scroll; overflow-x: hidden; }