diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c40ab05..df3c5f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,4 +35,4 @@ jobs: - run: npm run lint - run: npm run mocha test/tools.js - run: npm run mocha test/site-mongoless.js - - run: npm run mocha test/site-auth.js + # - run: npm run mocha test/site-auth.js diff --git a/assets/icons/facebook.png b/assets/icons/facebook.png index 39b1ef0..8aa7f7f 100644 Binary files a/assets/icons/facebook.png and b/assets/icons/facebook.png differ diff --git a/assets/icons/github.png b/assets/icons/github.png index 192846a..c275d59 100644 Binary files a/assets/icons/github.png and b/assets/icons/github.png differ diff --git a/assets/icons/gmail.png b/assets/icons/gmail.png index 7b69d97..fc825e4 100644 Binary files a/assets/icons/gmail.png and b/assets/icons/gmail.png differ diff --git a/assets/icons/instagram.png b/assets/icons/instagram.png index 68b845e..8807d21 100644 Binary files a/assets/icons/instagram.png and b/assets/icons/instagram.png differ diff --git a/assets/icons/youtube.png b/assets/icons/youtube.png index f2aa98b..9aeab32 100644 Binary files a/assets/icons/youtube.png and b/assets/icons/youtube.png differ diff --git a/assets/styles/form.scss b/assets/styles/form.scss index bd0404c..7615e33 100644 --- a/assets/styles/form.scss +++ b/assets/styles/form.scss @@ -49,7 +49,7 @@ label { } .form-container { - padding: 23px 25px; + // padding: 23px 25px; display: flex; flex-direction: column; align-items: center; @@ -65,20 +65,27 @@ form { // outline: none; // border: none; // } - +.buttons { + padding-top: 15px; + padding-bottom: 10px; + display: flex; + flex-direction: column; + gap: 10px +} button { align-self: center; - margin: 15px 0px; - width: 100%; + width: 143px; + height: 50px; background-color: var(--red); color: white; border: 0px; - padding: 12px 0; - font-size: 18px; - font-weight: 600; - border-radius: 5px; + font-size: 16px; + font-weight: 400; + border-radius: 27px; cursor: pointer; transition: 0.3s; + -webkit-tap-highlight-color: transparent; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } button:hover { @@ -97,7 +104,7 @@ button:disabled { margin: 10px 4vw; } -.heading { +.heading, .description { margin-block-start: 0.83em; margin-block-end: 0.83em; } @@ -228,38 +235,52 @@ select>option { .form-container { position: relative; - width: 380px; - background: transparent; - border: 3px solid; - border-color: var(--dark-gray); - border-top-color: var(--red); - border-bottom-color: var(--red); - border-top-left-radius: 20px; - border-top-right-radius: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 20px; - backdrop-filter: blur(10px); + width: 360px; + background: rgba(30, 30, 30, 0.6); + border-radius: 10px; + backdrop-filter: blur(15px); box-shadow: 0 0 20px rgba(0, 0, 0, .5); display: flex; - flex-direction: column; - justify-content: center; - align-items: center; box-sizing: border-box; - padding: 20px 1%; + padding: 20px 0px 20px 0px; +} +@media only screen and (max-width: 600px) { + .form-container { + width: 85vw; + } + .form { + width: 75vw; + } +} +.form{ + // width: 280px; + display: flex; + flex-direction: column; + } .heading > h1{ - font-size: 2em; + font-size: 48px; + font-weight: 700; color: #d0d0d0; - text-align: center; + text-align: start; + padding: 0px; + margin: 0px; +} +.description > h2{ + font-size: 16px; + font-weight: 400; + color: #d0d0d0; + text-align: start; padding: 0px; margin: 0px; } .field{ position: relative; width: 100%; - height: 50px; - border-bottom: 2px solid var(--error-red); - margin: 15px 0px; + height: 48px; + border: 1px solid #444444; + border-radius: 5px; + margin: 5px 0px; display: grid; grid-template-columns: 1fr; grid-template-areas: 'one'; @@ -291,13 +312,12 @@ input[type=date]{ text-align: left; position: absolute; top: 30%; - left:0%; + left:10px; font-size: 1em; - color: var(--off-white); - font-weight: 500; + color: #6b6b6b; + font-weight: 400; pointer-events: none; transition: .5s; - // transform: translateY(-50%); transform: translateX(0%); grid-area: one; } @@ -330,10 +350,14 @@ input[type=date]{ } .field input { width: 100%; - background: none; + background: #1e1e1e; outline:none; border: none; - padding: 0 5px 0 5px; + padding-left: 10px; + justify-content: center; +} +.field input:focus { + border: 1px solid var(--red); } .datetime input { width: 100%; diff --git a/assets/styles/mask.scss b/assets/styles/mask.scss index 60d0e42..54b9c5a 100644 --- a/assets/styles/mask.scss +++ b/assets/styles/mask.scss @@ -1,3 +1,4 @@ +@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;500;700&display=swap'); :root { --abyss: #060606; --shadow-gray: #1f1f1f; @@ -16,11 +17,13 @@ --red: #d61f35; --error-red: #e84e4f; --light-pink: #f1adad; + --new-black: #030303; } * { margin: 0px; padding: 0px; + } body { @@ -31,19 +34,24 @@ body { background-attachment: fixed; text-align: center; color: var(--light-gray); - font-family: Poppins ,Ubuntu, Roboto, Arial, Open Sans, sans-serif; + font-family: Cabin; + background-color: var(--new-black); + -webkit-tap-highlight-color: transparent; } div#page-container { - position: relative; top: 0px; - min-height: 100vh; + display: flex; + flex-direction: column; + justify-content: space-between; + min-height: 100dvh; } -div#content-wrap { - padding-bottom: 100px; +div#pagecontent { + padding: 50px 0; } + h1 { color: var(--white); padding: 10px; @@ -104,14 +112,15 @@ a:hover { /********************************************************/ footer { - position: absolute; + position: relative; bottom: 0; left: 0; - background-color: var(--shadow-gray); + background-color: var(--red); + transition: 0.3s; height: 70px; width: 100%; display: flex; - justify-content: flex-end; + justify-content: center; z-index: 30; } @@ -315,30 +324,29 @@ span.navbar-line { z-index: 30; height: 80px; width: 100%; - background-color: var(--darker-gray); + justify-content: center; + gap: 75vw; + align-items: center; + background-color: var(--new-black); } .plate-bar { - color: var(--light-gray); - height: 1px; + color: var(--new-black); + height: 0px; width: 100%; margin-bottom: 40px; + border: 0px; } .burger-home { - padding: 10px; + height: 40px; + width: 40px; } #burger-logo { height: 40px; width: 40px; - border-radius: 5px; - margin: 10px; - float: left; - left: 10px; - z-index: 32; - position: absolute; - transition: all 0.5s linear; + border-radius: 20px; } #burger-logo:hover { @@ -348,19 +356,15 @@ span.navbar-line { .burger { width: 40px; height: 40px; - position: absolute; - top: 15px; - right: 15px; + position: relative; cursor: pointer; z-index: 31; text-align: left; - padding: 5px 0 5px 10px; border-radius: 5px; transition: 0.5s; -} - -.burger:hover { - background-color: var(--tinted-gray); + display: flex; + justify-content: center; + align-items: center; } .patty { @@ -368,7 +372,6 @@ span.navbar-line { width: 30px; height: 3px; background: var(--off-white); - top: 50%; transition: all .2s ease-in-out; transform: translateY(-50%); } @@ -413,15 +416,18 @@ span.navbar-line { right: 0; width: 100%; height: 100%; - background: #222; + flex-direction: column; + background: var(--new-black); transition: all .3s ease-in-out; transform: translateX(100%); text-align: left; + font-size: 20px; z-index: 29; + -webkit-tap-highlight-color: var(--dark-red); } .slide { - transform: translateX(0); + transform: translateX(0%); } .hamburger-menu a { @@ -449,6 +455,7 @@ span.navbar-line { #top-line { width: 90%; + height: 0px; } .hamburger-menu hr.minor { @@ -505,18 +512,16 @@ span.navbar-line { display: none; } - .hamburger-menu, .plate, .plate-bar { + display: flex; + } + + .hamburger-menu { display: block; } .burger-open>*:not(.plate, .hamburger-menu) { display: none; } -} - -@font-face { - font-family: "Poppins"; - src: url("/assets/Poppins-Light.ttf"); } \ No newline at end of file diff --git a/routers/live-router.js b/routers/live-router.js index 9ad3e48..baf4e0e 100644 --- a/routers/live-router.js +++ b/routers/live-router.js @@ -51,7 +51,7 @@ router.post('/get-location-question', (req, res) => { if (attempted >= ques) return res.status(418).send('Completed'); return res.send( req.team.order.map((o) => - handlerContext.locations.find((l) => l._id === o.location) + handlerContext.locations.find((l) => l._id - 11 === o.location) )[attempted].pointerQuestion[req.team.order[attempted].pointer] ); }); @@ -59,10 +59,11 @@ router.post('/get-location-question', (req, res) => { router.post('/get-riddle-question', (req, res) => { const attempted = req.team.questionsAttempted; if (attempted >= ques) return res.status(418).send('Completed'); - const location = req.team.order.map((o) => handlerContext.locations.find((l) => l._id === o.location))[attempted]; + const location = req.team.order.map((o) => handlerContext.locations.find((l) => l._id - 11 === o.location))[attempted]; return res.send({ question: location.questions[req.team.order[attempted].question].question, - keywords: location.keywords + // keywords: location.keywords + keywords: location.keywords.slice(4 * req.team.order[attempted].question, 4 * (req.team.order[attempted].question + 1)) }); }); @@ -77,9 +78,13 @@ router.post('/submit', async (req, res) => { } } if (req.body.state === 'riddle-question') { + console.log(req.body.answer); + console.log(req.team.order.map((o) => + handlerContext.locations.find((l) => l._id - 11 === o.location) + )[attempted].questions[req.team.order[attempted].question].answer); if ( req.team.order.map((o) => - handlerContext.locations.find((l) => l._id === o.location) + handlerContext.locations.find((l) => l._id - 11 === o.location) )[attempted].questions[req.team.order[attempted].question].answer === parseInt(req.body.answer) ) { await dbh.updateTeamStatus({ _id: req.team._id, status: 'location-code', questionNo: req.body.questionNo + 1 }); @@ -90,7 +95,7 @@ router.post('/submit', async (req, res) => { } else if (req.body.state === 'location-code') { if ( req.team.order.map((o) => - handlerContext.locations.find((l) => l._id === o.location) + handlerContext.locations.find((l) => l._id - 11 === o.location) )[attempted].code.toLowerCase() === req.body.answer.toLowerCase() ) { await dbh.updateTeamStatus({ _id: req.team._id, status: 'riddle-question', questionNo: req.body.questionNo }); diff --git a/templates/_base.njk b/templates/_base.njk index 5e4f9bd..750abc5 100644 --- a/templates/_base.njk +++ b/templates/_base.njk @@ -46,71 +46,91 @@ {% block customjs %}{% endblock %} + {#
#}
-
-
- {% block navbar %} -