mirror of
https://github.com/tjsga/scavenger-hunt-2022.git
synced 2025-04-09 23:00:16 -04:00
initial commit
This commit is contained in:
parent
d032b2d493
commit
942a493064
BIN
hunt/.README.md.un~
Normal file
BIN
hunt/.README.md.un~
Normal file
Binary file not shown.
0
Pipfile.lock → hunt/Pipfile.lock
generated
0
Pipfile.lock → hunt/Pipfile.lock
generated
2
hunt/README.md
Normal file
2
hunt/README.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# scavenger-hunt-2022
|
||||||
|
"now in color!"
|
0
manage.py → hunt/manage.py
Executable file → Normal file
0
manage.py → hunt/manage.py
Executable file → Normal file
7
run.sh
Normal file
7
run.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
source /root/.local/share/virtualenvs/public-RqHYzL15/bin/activate
|
||||||
|
|
||||||
|
gunicorn hunt.wsgi -b $HOST:$PORT -w 1
|
||||||
|
|
||||||
|
# source /site/public/venv/bin/activate
|
||||||
|
|
||||||
|
# gunicorn app:app -b $HOST:$PORT -w 1
|
9
waiting/app.py
Normal file
9
waiting/app.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
from flask import Flask, render_template
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def home():
|
||||||
|
return render_template('index.html')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run()
|
158
waiting/templates/index.html
Normal file
158
waiting/templates/index.html
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
<html><head>
|
||||||
|
<title>Scavenger Hunt</title>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* general styling */
|
||||||
|
:root {
|
||||||
|
--smaller: .75;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
align-items: center;
|
||||||
|
background-color: #ffd54f;
|
||||||
|
display: flex;
|
||||||
|
font-family: -apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
Oxygen-Sans,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
"Helvetica Neue",
|
||||||
|
sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
color: #333;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-weight: normal;
|
||||||
|
letter-spacing: .125rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1.5em;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 1em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
li span {
|
||||||
|
display: block;
|
||||||
|
font-size: 4.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
display: none;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji span {
|
||||||
|
font-size: 4rem;
|
||||||
|
padding: 0 .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 768px) {
|
||||||
|
h1 {
|
||||||
|
font-size: calc(1.5rem * var(--smaller));
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
font-size: calc(1.125rem * var(--smaller));
|
||||||
|
}
|
||||||
|
|
||||||
|
li span {
|
||||||
|
font-size: calc(3.375rem * var(--smaller));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head><body>
|
||||||
|
<div class="container">
|
||||||
|
<div id="countdown">
|
||||||
|
<ul>
|
||||||
|
<li><span id="days"></span>days</li>
|
||||||
|
<li><span id="hours"></span>Hours</li>
|
||||||
|
<li><span id="minutes"></span>Minutes</li>
|
||||||
|
<li><span id="seconds"></span>Seconds</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="content" class="emoji">
|
||||||
|
<span>🥳</span>
|
||||||
|
<span>🎉</span>
|
||||||
|
<span>🎂</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>(function () {
|
||||||
|
const second = 1000,
|
||||||
|
minute = second * 60,
|
||||||
|
hour = minute * 60,
|
||||||
|
day = hour * 24;
|
||||||
|
|
||||||
|
//I'm adding this section so I don't have to keep updating this pen every year :-)
|
||||||
|
//remove this if you don't need it
|
||||||
|
let today = new Date(),
|
||||||
|
dd = String(today.getDate()).padStart(2, "0"),
|
||||||
|
mm = String(today.getMonth() + 1).padStart(2, "0"),
|
||||||
|
yyyy = today.getFullYear(),
|
||||||
|
nextYear = yyyy + 1,
|
||||||
|
dayMonth = "09/19/",
|
||||||
|
birthday = dayMonth + yyyy;
|
||||||
|
|
||||||
|
today = mm + "/" + dd + "/" + yyyy;
|
||||||
|
if (today > birthday) {
|
||||||
|
birthday = dayMonth + nextYear;
|
||||||
|
}
|
||||||
|
//end
|
||||||
|
|
||||||
|
const countDown = new Date(birthday).getTime(),
|
||||||
|
x = setInterval(function() {
|
||||||
|
|
||||||
|
const now = new Date().getTime(),
|
||||||
|
distance = countDown - now;
|
||||||
|
|
||||||
|
document.getElementById("days").innerText = Math.floor(distance / (day)),
|
||||||
|
document.getElementById("hours").innerText = Math.floor((distance % (day)) / (hour)),
|
||||||
|
document.getElementById("minutes").innerText = Math.floor((distance % (hour)) / (minute)),
|
||||||
|
document.getElementById("seconds").innerText = Math.floor((distance % (minute)) / second);
|
||||||
|
|
||||||
|
//do something later when date is reached
|
||||||
|
if (distance < 0) {
|
||||||
|
document.getElementById("headline").innerText = "It's scavenger hunt!";
|
||||||
|
document.getElementById("countdown").style.display = "none";
|
||||||
|
document.getElementById("content").style.display = "block";
|
||||||
|
clearInterval(x);
|
||||||
|
}
|
||||||
|
//seconds
|
||||||
|
}, 0)
|
||||||
|
}());</script>
|
||||||
|
</body></html>
|
Loading…
Reference in New Issue
Block a user