diff --git a/package.json b/package.json index 0586d23..c9b4d99 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,15 @@ "author": "Bert Peters ", "license": "GPLv3", "private": true, - "dependencies": { - }, + "dependencies": {}, "devDependencies": { + "autoprefixer": "^9.4.9", + "css-loader": "^2.1.0", + "node-sass": "^4.11.0", + "postcss": "^7.0.14", + "postcss-loader": "^3.0.0", + "sass-loader": "^7.1.0", + "style-loader": "^0.23.1", "webpack": "^4.29.6", "webpack-cli": "^3.2.3" } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..7cbe76d --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +}; diff --git a/public/foobar.css b/public/foobar.css index a2a2a29..b51f0aa 100644 --- a/public/foobar.css +++ b/public/foobar.css @@ -61,27 +61,12 @@ transform: rotate(360deg); } } -@keyframes fadeOut { - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -} - body.open { height:100%; background-color: #a3d165; text-align: center; } -body.closed { -background: #f66; - text-align: center; -} - * { font-family: verdana, sans-serif; } @@ -107,13 +92,3 @@ animation:starrotation 10s; -o-animation-iteration-count: infinite; -o-animation-timing-function: linear; } - -.closed_notice { - position: absolute; - font-weight: bold; - font-size: 16pt; - text-transform: uppercase; - animation: fadeOut 3s forwards; - animation-timing-function: linear; - animation-iteration-count: 1; -} diff --git a/public/stop.svg b/public/stop.svg new file mode 100644 index 0000000..08d6e36 --- /dev/null +++ b/public/stop.svg @@ -0,0 +1,25 @@ + + + + + + STOP + De bar is nog + niet open + diff --git a/src/closed.js b/src/closed.js index b61f279..f820f94 100644 --- a/src/closed.js +++ b/src/closed.js @@ -3,6 +3,7 @@ * * In it, we fill the screen evenly with "closed" messages. The locations are */ +require('./closed.scss'); /** * Contains the state for this demo. * diff --git a/src/closed.scss b/src/closed.scss new file mode 100644 index 0000000..11d26bd --- /dev/null +++ b/src/closed.scss @@ -0,0 +1,34 @@ +@keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +body.closed { + background: #f66; + text-align: center; + + .closed_notice { + position: absolute; + font-weight: bold; + font-size: 16pt; + text-transform: uppercase; + animation: fadeOut 3s forwards; + animation-timing-function: linear; + animation-iteration-count: 1; + } + + #stop-overlay { + z-index: 1; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-size: contain; + } +} diff --git a/templates/closed.html b/templates/closed.html index 7e98ef6..4e5c88f 100644 --- a/templates/closed.html +++ b/templates/closed.html @@ -8,5 +8,8 @@ +
+
+
diff --git a/webpack.config.js b/webpack.config.js index 801c42e..3c4b962 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,5 +5,16 @@ module.exports = { output: { filename: 'bundle.js', path: path.resolve(__dirname, 'public') + }, + module: { + rules: [{ + test: /\.scss$/, + use: [ + "style-loader", // creates style nodes from JS strings + "css-loader", // translates CSS into CommonJS + "postcss-loader", // Will run auto-prefixer for compatibility + "sass-loader" // compiles Sass to CSS, using Node Sass by default + ] + }] } -}; \ No newline at end of file +};