This commit is contained in:
William 2023-08-14 23:03:24 +02:00
parent 91e6a8fb54
commit 1f8e65dc1f
16 changed files with 183 additions and 239 deletions

View File

@ -1,3 +1,3 @@
# Website # OOooohhhhh
The fourth redesign of my website, finally a solid base I can build upon... Yeah hello

BIN
public/banner.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
public/cat-love-letter.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" style="enable-background:new 0 0 640 640" xml:space="preserve" width="32" height="32"><path style="fill:#fff" d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12z"/><path style="fill:#609926" d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6zM125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1zm300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1z"/><path style="fill:#609926" d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8-1.9 8 2 16.3 9.1 20 7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3 7.8 4 17.4 1.7 22.5-5.3 5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8l-24.6 50.4z"/></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,4 +1,5 @@
<?php <?php
function route(string $uri, callable $callback) { function route(string $uri, callable $callback) {
if (urldecode(strtok($_SERVER['REQUEST_URI'], '?')) !== $uri) if (urldecode(strtok($_SERVER['REQUEST_URI'], '?')) !== $uri)
return; return;
@ -6,18 +7,12 @@ function route(string $uri, callable $callback) {
die(); die();
} }
/**
* Loads a view from the view directory
*/
function view(string $_view, array $_data = []) { function view(string $_view, array $_data = []) {
$_path = __DIR__ . '/../view/' . $_view . '.php'; $_path = __DIR__ . '/../view/' . $_view . '.php';
extract($_data); extract($_data);
require $_path; require $_path;
} }
/**
* Use for prefixing URLs so that they work in nested subdirectories
*/
function url(string $url, bool $full = false): string { function url(string $url, bool $full = false): string {
$dir = dirname($_SERVER['SCRIPT_NAME']); $dir = dirname($_SERVER['SCRIPT_NAME']);
if ($dir === '/') $dir = ''; if ($dir === '/') $dir = '';
@ -28,8 +23,5 @@ function url(string $url, bool $full = false): string {
route('/', fn() => route('/', fn() =>
view('home')); view('home'));
route('/test', fn() =>
view('test'));
http_response_code(404); http_response_code(404);
view('404'); view('404');

97
public/snow.js Normal file
View File

@ -0,0 +1,97 @@
// Cool snow that was TOTALLY NOT stolen from someone else :-)
// Amount of Snowflakes
var snowMax = 64;
// Snowflake Colours
var snowColor = ["#fff"];
// Snow Entity
var snowEntity = "*";
// Falling Velocity
var snowSpeed = 0.75;
// Minimum Flake Size
var snowMinSize = 16;
// Maximum Flake Size
var snowMaxSize = 32;
// Refresh Rate (in milliseconds)
var snowRefresh = 75;
// Additional Styles
var snowStyles = "z-index: 0; cursor: default; user-select: none;";
/*
// End of Configuration
// ----------------------------------------
// Do not modify the code below this line
*/
var snow = [],
pos = [],
coords = [],
lefr = [],
marginBottom,
marginRight;
function randomise(range) {
rand = Math.floor(range * Math.random());
return rand;
}
function initSnow() {
var snowSize = snowMaxSize - snowMinSize;
marginBottom = document.body.scrollHeight - 5;
marginRight = document.body.clientWidth - 15;
for (i = 0; i <= snowMax; i++) {
coords[i] = 0;
lefr[i] = Math.random() * 15;
pos[i] = 0.03 + Math.random() / 10;
snow[i] = document.getElementById("flake" + i);
snow[i].style.fontFamily = "inherit";
snow[i].size = randomise(snowSize) + snowMinSize;
snow[i].style.fontSize = snow[i].size + "px";
snow[i].style.color = snowColor[randomise(snowColor.length)];
snow[i].style.zIndex = -1;
snow[i].sink = snowSpeed * snow[i].size / 5;
snow[i].posX = randomise(marginRight - snow[i].size);
snow[i].posY = randomise(2 * marginBottom - marginBottom - 2 * snow[i].size);
snow[i].style.left = snow[i].posX + "px";
snow[i].style.top = snow[i].posY + "px";
}
moveSnow();
}
function resize() {
marginBottom = document.body.scrollHeight - 5;
marginRight = document.body.clientWidth - 15;
}
function moveSnow() {
for (i = 0; i <= snowMax; i++) {
coords[i] += pos[i];
snow[i].posY += snow[i].sink;
snow[i].style.left = snow[i].posX + lefr[i] * Math.sin(coords[i]) + "px";
snow[i].style.top = snow[i].posY + "px";
if (snow[i].posY >= marginBottom - 2 * snow[i].size || parseInt(snow[i].style.left) > (marginRight - 3 * lefr[i])) {
snow[i].posX = randomise(marginRight - snow[i].size);
snow[i].posY = 0;
}
}
setTimeout("moveSnow()", snowRefresh);
}
for (i = 0; i <= snowMax; i++) {
document.write("<span id='flake" + i + "' style='" + snowStyles + "position:absolute;top:-" + snowMaxSize + "'>" + snowEntity + "</span>");
}
window.addEventListener('resize', resize);
window.addEventListener('load', initSnow);

BIN
public/stars.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,92 +1,56 @@
:root { html, body {
--primary: #fff; height: 100%;
--secondary: #eee;
--border: #ccc;
--text: #111;
--links: #00f;
}
@media (prefers-color-scheme: dark) {
:root {
--primary: #111;
--secondary: #222;
--border: #444;
--text: #eee;
--links: #aaf;
}
img {
filter: brightness(90%);
}
} }
body { body {
background: var(--primary); background-color: black;
color: var(--text); background: url('stars.gif');
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; text-align: center;
font-size: 1rem; color: white;
margin: 0; image-rendering: pixelated;
font-size: 1rem;
font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
line-height: 1.5;
} }
main, header > nav { hr {
padding: .75rem; display: none;
max-width: 40rem;
margin: auto;
}
header {
background: #335;
}
header > nav > a {
color: #eee;
text-decoration: none;
} }
a { a {
color: var(--links); color: #0f0;
}
h1 {
border-bottom: .25rem double yellow;
color: yellow;
} }
img { img {
display: block; height: auto;
height: auto; max-width: 100%;
max-width: 100%; }
max-height: 30rem;
code {
display: block;
max-width: min-content;
margin: auto;
background: black;
color: greenyellow;
padding: .75rem;
overflow-x: auto;
overflow-y: hidden;
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
} }
table { table {
display: block;
border-collapse: collapse; border-collapse: collapse;
overflow: auto; margin: auto;
background: black;
} }
tbody {
display: table; td, th {
width: 100%; border: 1px solid white;
}
td,
th {
text-align: left; text-align: left;
padding: .375rem;
}
tr:nth-child(even) {
background: var(--secondary);
}
pre,
code {
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
background: var(--secondary);
}
pre {
padding: .75rem;
max-width: 100%;
display: block;
overflow-x: auto;
overflow-y: hidden;
}
blockquote {
font-style: italic;
padding: .5rem; padding: .5rem;
padding-left: 1.25rem;
border-left: .25rem solid var(--border);
margin: 0;
} }

BIN
public/wc.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,17 +1,4 @@
<?= view('header', ['title' => 'Page not found']) ?> <?=view('header')?>
<h1>oopsie woopsieee</h1>
<p>Sorry, the page you requested could not be found on this server.</p> <a href="<?=url('/')?>">GO HOME</a>
<?=view('footer')?>
<?php
if (!isset($_SERVER['HTTP_REFERER'])) {
$referer = url('/');
} else {
$referer = $_SERVER['HTTP_REFERER'];
}
?>
<p>
You may choose to <a href="<?=htmlspecialchars($referer)?>">go back</a> or ponder.
</p>
<?= view('footer') ?>

View File

@ -1,3 +1,8 @@
</main> </main>
<footer>
<img src="<?=url('wc.gif')?>" alt="">
<br>
<p><small>Copyeverything © 2020-infinity</small></p>
</footer>
</body> </body>
</html> </html>

View File

@ -1,27 +1,14 @@
<?php
if (!isset($is_index)) {
$is_index = false;
}
?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?=url('/')?>style.css"> <title><?=htmlspecialchars($title)?> - The Willy Club</title>
<?php if ($is_index): ?> <link rel="stylesheet" href="<?=url('/style.css')?>">
<title>Willy's Website</title> <link rel="shortcut icon" href="<?=url('/wc.gif')?>" type="image/x-icon">
<?php else: ?>
<title><?=$title?> | Willy's Website</title>
<?php endif; ?>
</head> </head>
<body> <body>
<header> <!-- Lol -->
<nav> <script src="<?=url('/snow.js')?>"></script>
<a href="<?=url('/')?>">Willy's Website</a> <main>
</nav>
</header>
<main>
<?php if (!$is_index): ?>
<h1><?=$title?></h1>
<?php endif; ?>

View File

@ -1,66 +1,46 @@
<?= view('header', ['is_index' => true]) ?> <?=view('header', ['title' => 'Welcomeee!'])?>
<img style="transform: skewY(3deg)" src="banner.gif" alt="Welcome to willy.club">
<p><blockquote>More than just willies! Some of the time.</blockquote></p> <br>
<small style="color: gray;">wow very creative and original use of cooltext.com!!</small>
<h1>More than just willies! Some of the time.</h1>
<p>Welcome to my webserver! Your bits have traveled through the pipes that make up the internet all the way to my laptop situated in Southern Norway, Kristiansand.</p> <p>Welcome to my webserver! Your bits have traveled through the pipes that make up the internet all the way to my laptop situated in Southern Norway, Kristiansand.</p>
<p>Not at all associated with thewilly.club ASSHOLES squatting my domain name with their shitty NFTs, this is the original.</p>
<p>Isn't she beautiful? Released in 2008 is a ThinkPad R400 that's been <a href="//libreboot.org">librebooted</a> and equipped with:</p>
<ul>
<li>Intel Core2 Duo P8700 2x@2.53GHz</li>
<li>8 Gigabytes of dedotaded wam</li>
<li>Dual 480GB SSD in ZFS mirror</li>
</ul>
<p><img src="<?=url('/img/laptop.jpg')?>" alt=""></p>
<h2>Now, where would you like to go?</h2> <h2>Now, where would you like to go?</h2>
<p>The server serves some services; couple being publicly accessible.</p> <p>The server serves some services; couple being publicly accessible.</p>
<div style=" <table>
padding: .75rem; <tr>
padding-left: 3rem; <td><a href="//git.willy.club">Gitea</a></td>
margin-bottom: .75rem; <td>Version control hosting for projects</td>
background: url('img/gitea.svg') no-repeat left center; </tr>
background-position-x: .75rem; <tr>
background-size: 1.5rem; <td><a href="mumble://mumble.willy.club">Mumble</a></td>
background-color: var(--secondary); <td>Low-latency, high-quality voice chat</td>
"> </tr>
<a href="//git.willy.club">Gitea</a> - Version control hosting for projects </table>
</div>
<div style="
padding: .75rem;
padding-left: 3rem;
margin-bottom: .75rem;
background: url('img/mumble.png') no-repeat left center;
background-position-x: .75rem;
background-size: 1.5rem;
background-color: var(--secondary);
">
<a href="mumble://mumble.willy.club">Mumble</a> - Low-latency, high-quality voice chat
</div>
<h2>Touch?</h2> <h2>Touch?</h2>
<p>Join the room on Matrix: <a href="https://matrix.to/#/#lobby:willy.club">#lobby:willy.club</a></p> <p>You can join the room on Matrix: <a href="https://matrix.to/#/#lobby:willy.club">#lobby:willy.club</a></p>
<h2>Other than that?</h2> <p>Be nice to each other! Or something</p>
<p>Here are some things that I find interesting.</p> <img src="<?=url('/cat-love-letter.gif')?>" alt="">
<h3>Collapse</h3> <h1>Other than that?</h1>
<p>Recently I have taken great interest in the potential for near-term civilizational collapse, or to put it more bluntly; doomscrolling, and it has overshadowed many of my other interests.</p> <p>Here <s>are some things</s> is something that I find interesting.</p>
<p>Here are some resources. Get redicalized.</p> <h2>I AM DOOMER</h2>
<ul> <p>Overpopulation, peak oil, climate change, pollution and or whatever</p>
<li>Sid Smith - <a href="https://www.youtube.com/watch?v=5WPB2u8EzL8">How to Enjoy the End of the World</a><br>- Presentation about the predicament.</li>
<li>Nate Hagens - <a href="https://www.youtube.com/watch?v=-xr9rIQxwj4">The Great Simplification</a><br>- Nifty animated movie about the predicament in a more optimistic tone.</li>
</ul>
<p>I'm a little depressed. 🤷</p> <p>But lets not fritter away the hours writing our own obituary, WE WILL FIND A WAY OUT (lmao)</p>
<?= view('footer') ?> <p>I LOVE YOUUU! REMEMBER TO LOVE EACH OTHER</p>
<p><small>I give everyone an explicit and unconditional consent to behave sexually towards me.</small></p>
<?=view('footer')?>

View File

@ -1,67 +0,0 @@
<?= view('header', ['title' => 'The Illusion of Meaning']) ?>
<blockquote>Quote</blockquote>
<p>Ah, the art of filling up pages with words that sound meaningful but ultimately lead nowhere. It's a skill that many have mastered, but few are willing to admit. After all, what's the point of writing if you're not actually saying anything?</p>
<a href="/non-existing-page">Click here to test the functionality of the go back button</a>
<p>
<img src="https://images.vy.no/4ay35n74hs/Vossebanen.jpeg" alt="">
</p>
<h2>Lol</h2>
<pre>
ob_list_handlers
oh yeah
this is a pre! pretty cool
</pre>
<p>
This is <code>inline</code>
</p>
<p>Thus, I must regretfully decline your request for a flatulence joke, and instead offer you my sincerest wishes for a pleasant and productive day. May the blessings of wisdom and enlightenment guide your path, and may your endeavors be met with success and fulfillment.</p>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Roland Mendel</td>
<td>Austria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>Helen Bennett</td>
<td>UK</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Yoshi Tannamuri</td>
<td>Canada</td>
</tr>
<tr>
<td>Magazzini Alimentari Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
</table>
<?= view('footer') ?>