mirror of https://github.com/Trivernis/whooshy.git
Cookie Dialog
- added a cookie dialog - removed riddle (temporary) - removed users (temporary)pull/15/head
parent
a5af6cbb19
commit
e35cfabc49
@ -0,0 +1,29 @@
|
|||||||
|
@import ../vars
|
||||||
|
@import ../mixins
|
||||||
|
|
||||||
|
#content
|
||||||
|
display: grid
|
||||||
|
grid-template: 25% 50% 25% / 25% 50% 25%
|
||||||
|
height: 100%
|
||||||
|
width: 100%
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
|
|
||||||
|
#info
|
||||||
|
@include gridPosition(1, 2, 2, 3)
|
||||||
|
margin: auto
|
||||||
|
|
||||||
|
h1, p
|
||||||
|
margin: auto
|
||||||
|
|
||||||
|
#bingo-button
|
||||||
|
background-color: $secondary
|
||||||
|
height: 100%
|
||||||
|
width: 50vh
|
||||||
|
border-radius: 25rem
|
||||||
|
margin: auto
|
||||||
|
@include gridPosition(2, 3, 2, 3)
|
||||||
|
|
||||||
|
#bingo-button:hover
|
||||||
|
background-color: mix($secondary, $primary, 75%)
|
@ -1,9 +1,12 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
const globals = require('../lib/globals');
|
||||||
|
|
||||||
|
|
||||||
/* GET home page. */
|
/* GET home page. */
|
||||||
router.get('/', function(req, res) {
|
router.get('/', function(req, res) {
|
||||||
res.render('index', { title: 'Trivernis.net' });
|
let info = req.session.acceptedCookies? null: globals.cookieInfo;
|
||||||
|
res.render('index', { title: 'Trivernis.net', info: info});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
if info
|
||||||
|
div(class='infoContainer' id=info.id)
|
||||||
|
h1=info.headline
|
||||||
|
span= info.content
|
||||||
|
button(onclick=info.onclick)= info.button
|
@ -1,6 +1,10 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
h1= title
|
div(id='content')
|
||||||
p Welcome to #{title}
|
div(id='info')
|
||||||
button(onclick='window.location.href="/bingo"') Bingo
|
h1= title
|
||||||
|
p Welcome to #{title}
|
||||||
|
button(id='bingo-button' onclick='window.location.href="/bingo"') Bingo
|
||||||
|
|
||||||
|
include includes/info-container
|
||||||
|
Loading…
Reference in New Issue