website

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

commit 2ef389f7ae786128a3841b92ced870f433900353
parent 9e2ca0c45db027c3b2cb6723ee154ed482a89924
Author: Nixx <nixx@firemail.cc>
Date:   Sat, 29 Aug 2020 18:55:41 +0100

New backgrounds, new heads to display

Diffstat:
Aimages/backgrounds/arcade-bg.gif | 0
Aimages/backgrounds/bridge-bg.gif | 0
Rimages/space-bg.gif -> images/backgrounds/moon-bg.gif | 0
Aimages/backgrounds/mountain-bg.gif | 0
Aimages/backgrounds/saturn-bg.gif | 0
Aimages/backgrounds/tv-bg.gif | 0
Mimages/head3.gif | 0
Dimages/head4.gif | 0
Dimages/splash.gif | 0
Mincludes/aside.php | 3+--
Aincludes/bg.php | 23+++++++++++++++++++++++
Mstyles/default.css | 4++--
12 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/images/backgrounds/arcade-bg.gif b/images/backgrounds/arcade-bg.gif Binary files differ. diff --git a/images/backgrounds/bridge-bg.gif b/images/backgrounds/bridge-bg.gif Binary files differ. diff --git a/images/space-bg.gif b/images/backgrounds/moon-bg.gif Binary files differ. diff --git a/images/backgrounds/mountain-bg.gif b/images/backgrounds/mountain-bg.gif Binary files differ. diff --git a/images/backgrounds/saturn-bg.gif b/images/backgrounds/saturn-bg.gif Binary files differ. diff --git a/images/backgrounds/tv-bg.gif b/images/backgrounds/tv-bg.gif Binary files differ. diff --git a/images/head3.gif b/images/head3.gif Binary files differ. diff --git a/images/head4.gif b/images/head4.gif Binary files differ. diff --git a/images/splash.gif b/images/splash.gif Binary files differ. diff --git a/includes/aside.php b/includes/aside.php @@ -5,8 +5,7 @@ if (!$root) { $returnlink = $root; } $indexfile = "_index.php"; -#$heads = array("head.gif", "head2.gif", "head3.gif", "head4.gif"); -$heads = array ("head.gif"); +$heads = array("head.gif", "head2.gif", "head3.gif"); $usehead = array_rand($heads); function asideLink ($linkname, $page, $root) { diff --git a/includes/bg.php b/includes/bg.php @@ -0,0 +1,23 @@ +<?php +if(is_null($root)){ // handling if you're looking at the literal bg.php page - it's not being loaded by another page + $root = "../"; +} + +$dir = $root."images/backgrounds/"; +$files = scandir($dir); +$images = array_diff($files, array('.', '..')); +$name = $images[array_rand($images)]; +// open the file in a binary mode +$fp = fopen($dir . $name, 'rb'); + +// send the right headers +header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1 +header('Pragma: no-cache'); // HTTP 1.0 +header('Expires: 0'); // Proxies +header('Content-Type: ' . $fp['type']); +header('Content-Length: ' . $fp['bytes']); + +// dump the picture and stop the script +fpassthru($fp); +exit; +?> diff --git a/styles/default.css b/styles/default.css @@ -20,7 +20,7 @@ } body { - background: url("../images/space-bg.gif") no-repeat var(--bg-col); + background: url("/includes/bg.php") no-repeat var(--bg-col); background-size: cover; background-attachment: fixed; background-position: bottom; @@ -73,7 +73,7 @@ input[type="submit" i] { } .aside, .article, .section, .mobilemenu { background: var(--bg-col); - opacity: 0.85; + opacity: 0.9; transition: 0.3s; padding: 10px; border: 1px solid var(--main-col);