This commit is contained in:
William 2023-02-12 14:54:12 +01:00
parent 59a42c2028
commit f1b09039a6
13 changed files with 19 additions and 543 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -5,8 +5,8 @@
onclick = (e) => {
let element = e.target;
if (element.tagName == 'A') {
navigate(element.href).then(function () {
window.history.pushState('', '', element.href);
navigate(element.href).then(function(url) {
window.history.pushState('', '', url);
});
return false; // prevent default action and stop event propagation
}
@ -17,17 +17,19 @@ onpopstate = () => {
};
function navigate(href) {
document.body.className = 'leaving';
return new Promise((resolve) => {
fetch(href)
.then((response) => {
return response.text();
}).then(function (html) {
.then(async (response) => {
html = await response.text();
//var parser = new DOMParser();
//var doc = parser.parseFromString(html, 'text/html');
//document.getElementById('pageContent').innerHTML = doc.getElementById('pageContent').innerHTML;
document.body.parentNode.innerHTML = html;
resolve();
setTimeout(() => {
document.body.parentNode.innerHTML = html;
document.body.className = 'entering';
}, 250);
resolve(response.url);
}).catch(function (err) {
// There was an error
console.warn('Something went wrong.', err);

View File

@ -1,7 +1,8 @@
body {
font-size: 1rem;
font-family: DejaVu Serif, 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;
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;
font-weight: bold;
}
code, pre {

View File

@ -4,7 +4,7 @@ html, body {
body {
background-color: darkblue;
background: url('../img/stars.png');
background: url('../img/darkskullsbg.png');
text-align: center;
color: white;
image-rendering: pixelated;

View File

@ -35,12 +35,5 @@ App::group('/chat', function() {
ChatController::sync(...));
});
App::group('/blog', function() {
App::get('/',
fn() => view('pages/blog/home'));
App::get('/test',
fn() => view('pages/blog/test'));
});
http_response_code(404);
view('errors/404');

View File

@ -1,5 +0,0 @@
<?=view('templates/blog/header')?>
<h1>What is there to life?</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam commodo dignissim orci faucibus pellentesque. Cras sit amet leo libero. Morbi at maximus arcu, ac consectetur nunc. Nunc pharetra semper augue sed aliquet. Nunc pretium lorem quis nulla interdum, vestibulum sollicitudin lectus eleifend. Duis leo erat, consectetur nec convallis vitae, faucibus vel ipsum. Donec sed lectus ut lorem pellentesque posuere. Vivamus et iaculis ante, nec elementum sapien. Donec semper magna a nisi porttitor varius. Cras consequat pharetra sapien interdum finibus. </p>
<a href="<?=url('./test')?>">Read more</a>
<?=view('templates/blog/footer')?>

View File

@ -1,8 +0,0 @@
<?=view('templates/blog/header')?>
<h1>This is test page</h1>
<p>Or is it? Maybe. I'm just trying to fill this with some text right now using the noise from my brain but I'm not really that good at it.. FUCK</p>
<h2>H2</h2>
<h3>H3</h3>
<pre><code>This is a code block</code></pre>
<a href="./">go back</a>
<?=view('templates/blog/footer')?>

View File

@ -47,11 +47,12 @@
<p>We love you! xoxo</p>
<img src="<?=url('/static/img/lovebar.gif')?>" alt="">
<?php
//<h1>Awesome webring</h1>
<h1>Awesome webring</h1>
//<p>Check out any of these other aweeesome websites!</p>
<p>Check out any of these other aweeesome websites!</p>
?>
<a href="http://www.shdf.gov.cn/shdf/channels/740.html?spm=a2141.241046-no.1997523009.54.5ec96f11lmnroP"><img src="<?=url('/static/img/TB1SKn6MAY2gK0jSZFgXXc5OFXa-249-40.jpg')?>" alt="Website has been verified by The National Office Of Eliminating Pornography And Illegal Publications Working Committee"></a>
<?=view('templates/footer')?>

View File

@ -1,194 +0,0 @@
</main>
</div>
<style>
#mydiv {
position: absolute;
z-index: 9;
background: #1111119e;
text-align: center;
border: 1px solid #d3d3d3;
width: 300px;
height: 500px;
bottom: 10px;
right: 10px;
}
#mydivheader {
padding: 10px;
cursor: move;
z-index: 10;
background: #000;
color: #fff;
}
#mydivinner {
padding: .75rem;
height: 100%;
}
</style>
<body>
<div id="mydiv">
<div id="mydivheader">LIVE CHAT SUPPORT</div>
<div id="mydivinner">
<style>
.willychat {
width: 100%;
height: 100%;
}
</style>
<iframe class="willychat" src="<?=url('/chat/')?>" frameborder="0" scrolling="no"></iframe>
</div>
</div>
<script>
//Make the DIV element draggagle:
dragElement(document.getElementById("mydiv"));
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
if (document.getElementById(elmnt.id + "header")) {
/* if present, the header is where you move the DIV from:*/
document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
} else {
/* otherwise, move the DIV from anywhere inside the DIV:*/
elmnt.onmousedown = dragMouseDown;
}
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}
function closeDragElement() {
/* stop moving when mouse button is released:*/
document.onmouseup = null;
document.onmousemove = null;
}
}
</script>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var fScriptTag = document.getElementsByTagName('script')[0];
fScriptTag.parentNode.insertBefore(tag, fScriptTag);
var player;
function startTheThang() {
myModal.style.display = 'none';
player = new YT.Player('player', {
height: '0',
width: '0',
videoId: 'p0jTwrI774o',
playerVars:{'mute' : 0,'autoplay':1},
events: { }
});
}
</script>
<div id="player"></div>
<script>
// this isbetter than react
document.onclick = function (e) {
e = e || window.event;
var element = e.target || e.srcElement;
if (element.tagName == 'A') {
changePage(element.href)
return false; // prevent default action and stop event propagation
}
};
window.addEventListener('popstate', (event) => {
changePage(document.location);
});
function changePage(href) {
fetch(href).then(function (response) {
// The API call was successful!
return response.text();
}).then(function (html) {
// Convert the HTML string into a document object
var parser = new DOMParser();
var doc = parser.parseFromString(html, 'text/html');
document.getElementById('pageContent').animate([
// keyframes
{ transform: 'scale(100%)' },
{ transform: 'scale(0%)' }
], {
// timing options
duration: 500,
iterations: 1
});
setTimeout(() => {
document.getElementById('pageContent').animate([
// keyframes
{ transform: 'scale(0%)' },
{ transform: 'scale(100%)' }
], {
// timing options
duration: 500,
iterations: 1
});
document.getElementById('pageContent').innerHTML = doc.getElementById('pageContent').innerHTML;
}, 500);
window.history.pushState('fart', 'Title', href);
}).catch(function (err) {
// There was an error
console.warn('Something went wrong.', err);
});
}
</script>
<style>
.changePage {
animation: booooom 1s linear infinite;
}
@keyframes booooom {
0% {
font-size: 1rem;
}
100% {
font-size: 10rem;
}
}
</style>
</html>

View File

@ -1,314 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blog</title>
</head>
<body>
<style>
/* The Modal (background) */
.modal {
display: none;
position: fixed; /* Stay in place */
z-index: 10; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.75); /* Black w/ opacity */
}
/* Modal Content */
.modal-content {
margin: auto;
background: #222;
padding: 20px;
border-radius: 1rem;
width: 80%;
color: white;
}
.modal-content>button {
align-items: center;
background-color: green;
border: 0;
border-radius: 100px;
height: 100%;
box-sizing: border-box;
color: #ffffff;
cursor: pointer;
display: inline-flex;
font-family: -apple-system, system-ui, system-ui, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
font-size: 16px;
font-weight: 600;
justify-content: center;
line-height: 20px;
max-width: 480px;
min-height: 40px;
min-width: 0px;
overflow: hidden;
padding: 0px;
padding-right: 0px;
padding-left: 0px;
padding-left: 20px;
padding-right: 20px;
text-align: center;
touch-action: manipulation;
transition: background-color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s, box-shadow 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s, color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s;
user-select: none;
-webkit-user-select: none;
vertical-align: middle;
}
.modal-content>button:hover {
background: darkgreen;
}
</style>
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<p>This website uses cookies, including third party ones, to allow for analysis of how people use our website in order to improve your experience and our services. By continuing to use our website, you agree to the use of such cookies. <a href="http://arngren.net">Click here</a> for more information on our Cookie Policy and Privacy Policy.</p>
<button onclick="startTheThang()">I OBEY</button>
</div>
</div>
<script>
document.body.onload = function() {
document.getElementById('myModal').style.display = 'block'
}
</script>
<style>
html, body {
height: 100%;
}
body {
font-family: sans-serif;
color: white;
margin: 0;
line-height: 1.5;
animation: aids 4s linear infinite;
background: url(https://media.tenor.com/DDX8ev9aqOEAAAAC/astolfo-norway.gif);
text-align: center;
}
.div-torule-them-all {
backdrop-filter: blur(10px);
height: 100%;
}
a {
color: lightblue;
}
.container {
max-width: 60rem;
margin: auto;
padding-left: 1rem;
padding-right: 1rem;
}
main {
backdrop-filter: blur(20px);
padding: .75rem;
border-radius: .75rem;
}
@keyframes aids {
0% {
background-position: 0px 0px;
}
100% {
background-position: 498px 270px;
}
}
.hero-text {
text-transform: uppercase;
background-image: linear-gradient(
-225deg,
#231557 0%,
#44107a 29%,
#ff1361 67%,
#fff800 100%
);
background-size: auto auto;
background-clip: border-box;
background-size: 200% auto;
color: #fff;
background-clip: text;
text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: textclip 2s linear infinite;
display: inline-block;
font-size: 3rem;
}
@keyframes textclip {
to {
background-position: 200% center;
}
}
.hero-text {
position: relative;
-webkit-box-reflect: below -20px linear-gradient(transparent, rgba(0,0,0,.2));
font-size: 60px;
}
.hero-text span {
position: relative;
display: inline-block;
color: #fff;
text-transform: uppercase;
animation: waviy 1s infinite;
animation-delay: calc(.1s * var(--i));
white-space: pre-wrap;
}
@keyframes waviy {
0%,40%,100% {
transform: translateY(0)
}
20% {
transform: translateY(-20px)
}
}
</style>
<div class="div-torule-them-all">
<script>
// Amount of Snowflakes
var snowMax = 16;
// Snowflake Colours
var snowColor = ["#fff"];
// Snow Entity
var snowEntity = "8==D";
// Falling Velocity
var snowSpeed = 0.75;
// Minimum Flake Size
var snowMinSize = 8;
// Maximum Flake Size
var snowMaxSize = 16;
// Refresh Rate (in milliseconds)
var snowRefresh = 25;
// 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);
</script>
<header style="
padding-top: 1rem;
padding-bottom: 1rem;
backdrop-filter: blur(20px);
">
<nav class="container">
<a href="./">Homopage</a>
</nav>
</header>
<div style="
padding-top: 2rem;
padding-bottom: 2rem;
">
<div class="container">
<h1 class="hero-text">
<?php $hero_text = 'Faggot Homosex Blog'; ?>
<?php for ($i=0; $i < strlen($hero_text); $i++): ?><span style="--i:<?=$i?>"><?=htmlspecialchars($hero_text[$i])?></span><?php endfor; ?>
</h1>
<p>There are no limits to what you can accomplish, except the limits you place on your own thinking. </p>
</div>
</div>
<main class="container" id="pageContent">

View File

@ -3,7 +3,7 @@
<hr>
<h1 id="message-board">Message board</h1>
<img src="<?=url('/static/img/tower.gif')?>" alt="">
<p>Racism <s>not</s> allowed</p>
<p>Remember, be kind to each other</p>
<style>
.willychat {
max-width: 30rem;

View File

@ -1,6 +1,6 @@
<?php
function special_events(): string {
if (in_array(date('m'), ['12', '1', '2'])) {
if (in_array(date('m'), ['12', '1'])) {
return 'Winter';
}
return 'Nothing';