Port the old system to a more advanced setup.

This commit is contained in:
2019-03-03 16:16:31 +01:00
parent 04ae63035a
commit bfea8896de
14 changed files with 168 additions and 33 deletions

100
public/foobar.css Normal file
View File

@@ -0,0 +1,100 @@
@-webkit-keyframes starrotation {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-moz-keyframes starrotation {
0% {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-moz-transform: rotate(90deg);
transform: rotate(90deg);
}
100% {
-moz-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-o-keyframes starrotation {
0% {
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
100% {
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes starrotation {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(90deg);
}
100% {
transform: rotate(360deg);
}
}
body.open {
height:100%;
background-color: #a3d165;
text-align: center;
}
body.closed {
background: #f66;
text-align: center;
}
* {
font-family: verdana, sans-serif;
}
#wrapper {
margin: auto;
width: 999px;
height:999px;
padding-top: 400px;
margin-top: -200px;
background-image: url(star.png);
background-repeat: no-repeat;
animation:starrotation 10s;
animation-iteration-count: infinite;
animation-timing-function: linear;
-moz-animation:starrotation 10s; /* Firefox */
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-webkit-animation:starrotation 10s; /* Safari and Chrome */
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-o-animation:starration 10s; /* Opera */
-o-animation-iteration-count: infinite;
-o-animation-timing-function: linear;
}

8
public/index.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
require_once '../vendor/autoload.php';
if (\FooBar\Configuration::loadConfig()->isOpen()) {
require 'isOpen.php';
} else {
require 'isGesloten.php';
}

16
public/isGesloten.php Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="creator" value="Genetic Lifeform and Beer Operating System - GLaBOS">
<title>Nee... &bull; IsDeFooBarOpen.nl</title>
<link rel="stylesheet" href="foobar.css" type="text/css">
</head>
<body class="closed">
<h1>Nee. De FooBar is niet open.</h1>
<h2>Ik weet het. Ik voel je pijn.</h2>
<strong id="greatest">Voor zover een website voelt natuurlijk.</strong>
<!-- This is not the greatest strong in the world, no no.
This is just attribute. -->
</body>
</html>

18
public/isOpen.php Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="creator" value="Genetic Lifeform and Beer Operating System - GLaBOS">
<title>JA! &bull; IsDeFooBarOpen.nl</title>
<link rel="stylesheet" href="foobar.css" type="text/css">
</head>
<body class="open">
<div id="wrapper">
<h1>JA! De FooBar is open.</h1>
<h2>Nu kun je weer rustig ademhalen.</h2>
<strong id="greatest">Kom gezellig even langs.</strong>
<!-- This is not the greatest strong in the world, no no.
This is just attribute. -->
</div>
</body>
</html>

BIN
public/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

31
public/toggle.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
require_once '../vendor/autoload.php';
$configuration = \FooBar\Configuration::loadConfig();
if (isset($_POST['toggle']) && $configuration->isAuthorized()) {
$file = $configuration->stateFile();
if ($configuration->isOpen()) {
unlink($file);
} else {
touch($file);
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Verander de status van de foobar</title>
</head>
<body>
<h1>De foobar is nu
<?php
echo $configuration->isOpen() ? ' ' : ' niet ';
?>
open.</h1>
<form method="post">
<input type="submit" name="toggle" value="Verander dit">
</form>
</body>
</html>