From 24bddd64d196b3473a8c2ebcf6539e7390e7223a Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Mon, 4 Mar 2019 00:53:26 +0100 Subject: [PATCH] Rewrite open template to new style. --- public/foobar.css | 94 ------------------------------------------- public/index.php | 2 +- public/isGesloten.php | 16 -------- public/isOpen.php | 18 --------- src/base.scss | 3 ++ src/closed.scss | 1 + src/index.js | 1 + src/open.js | 1 + src/open.scss | 32 +++++++++++++++ templates/open.html | 18 +++++++++ 10 files changed, 57 insertions(+), 129 deletions(-) delete mode 100644 public/foobar.css delete mode 100644 public/isGesloten.php delete mode 100644 public/isOpen.php create mode 100644 src/base.scss create mode 100644 src/open.js create mode 100644 src/open.scss create mode 100644 templates/open.html diff --git a/public/foobar.css b/public/foobar.css deleted file mode 100644 index b51f0aa..0000000 --- a/public/foobar.css +++ /dev/null @@ -1,94 +0,0 @@ -@-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; -} - -* { - 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; -} diff --git a/public/index.php b/public/index.php index 89168ea..9bb1f79 100644 --- a/public/index.php +++ b/public/index.php @@ -2,7 +2,7 @@ require_once '../vendor/autoload.php'; if (\FooBar\Configuration::loadConfig()->isOpen()) { - require 'isOpen.php'; + require '../templates/open.html'; } else { require '../templates/closed.html'; } diff --git a/public/isGesloten.php b/public/isGesloten.php deleted file mode 100644 index b347fa6..0000000 --- a/public/isGesloten.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - -Nee... • IsDeFooBarOpen.nl - - - -

Nee. De FooBar is niet open.

-

Ik weet het. Ik voel je pijn.

-Voor zover een website voelt natuurlijk. - - - diff --git a/public/isOpen.php b/public/isOpen.php deleted file mode 100644 index 535fa1d..0000000 --- a/public/isOpen.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - -JA! • IsDeFooBarOpen.nl - - - -
-

JA! De FooBar is open.

-

Nu kun je weer rustig ademhalen.

-Kom gezellig even langs. - -
- - diff --git a/src/base.scss b/src/base.scss new file mode 100644 index 0000000..0df4640 --- /dev/null +++ b/src/base.scss @@ -0,0 +1,3 @@ +* { + font-family: verdana, sans-serif; +} diff --git a/src/closed.scss b/src/closed.scss index 3a0bab9..33fe91e 100644 --- a/src/closed.scss +++ b/src/closed.scss @@ -1,3 +1,4 @@ +@import "base"; @keyframes fadeOut { 0% { opacity: 1; diff --git a/src/index.js b/src/index.js index e87c5b4..452fc4e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ import {startClosedAnimation} from "./closed"; +import "./open" window.addEventListener('load', function () { if (document.body.classList.contains('open')) { diff --git a/src/open.js b/src/open.js new file mode 100644 index 0000000..d4d87c5 --- /dev/null +++ b/src/open.js @@ -0,0 +1 @@ +import './open.scss'; diff --git a/src/open.scss b/src/open.scss new file mode 100644 index 0000000..f926e21 --- /dev/null +++ b/src/open.scss @@ -0,0 +1,32 @@ +@import "base"; + +@keyframes starrotation { + 0% { + transform: rotate(0deg); + } + 25% { + transform: rotate(90deg); + } + 100% { + transform: rotate(360deg); + } +} + +body.open { + height: 100%; + background-color: #a3d165; + text-align: center; +} + +#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; +} diff --git a/templates/open.html b/templates/open.html new file mode 100644 index 0000000..e6c0078 --- /dev/null +++ b/templates/open.html @@ -0,0 +1,18 @@ + + + + + + JA! • IsDeFooBarOpen.nl + + + +
+

JA! De FooBar is open.

+

Nu kun je weer rustig ademhalen.

+ Kom gezellig even langs. + +
+ +