Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Digital Days Off</title> | |
<style> | |
* { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; | |
} | |
body { | |
background: linear-gradient(135deg, #83a4d4, #b6fbff); | |
min-height: 100vh; | |
padding: 20px; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
} | |
.container { | |
max-width: 600px; | |
width: 100%; | |
text-align: center; | |
} | |
h1 { | |
color: #2d3436; | |
margin: 30px 0; | |
font-size: 2.5rem; | |
} | |
.motivation-text { | |
background: rgba(255, 255, 255, 0.9); | |
padding: 25px; | |
border-radius: 15px; | |
margin-bottom: 30px; | |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
} | |
p { | |
font-size: 1.1rem; | |
line-height: 1.6; | |
margin-bottom: 15px; | |
color: #2d3436; | |
} | |
.tracker-container { | |
display: grid; | |
grid-template-columns: 1fr 1fr; | |
gap: 20px; | |
margin: 30px 0; | |
} | |
.tracker-box { | |
background: white; | |
padding: 25px; | |
border-radius: 15px; | |
box-shadow: 0 4px 6px rgba(0, 0, 255, 0.1); | |
} | |
.count { | |
font-size: 3rem; | |
font-weight: bold; | |
color: #0984e3; | |
margin: 10px 0; | |
} | |
button { | |
background: #00b894; | |
color: white; | |
border: none; | |
padding: 15px 30px; | |
border-radius: 25px; | |
font-size: 1.1rem; | |
margin: 10px; | |
cursor: pointer; | |
transition: transform 0.2s; | |
} | |
button:hover { | |
transform: scale(1.05); | |
} | |
#message { | |
margin-top: 20px; | |
font-weight: bold; | |
color: #d63031; | |
min-height: 24px; | |
} | |
.quote { | |
margin-top: 30px; | |
font-style: italic; | |
color: #636e72; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>π± Digital Days Off</h1> | |
<div class="motivation-text"> | |
<p>Research PROVES the power of small, simple habits and how tiny changes can lead to significant improvements over time.</p> | |
<p>Do what you can, as you can, and watch the results speak for themselves.</p> | |
<p>You will feel AMAZING.</p> | |
<p>You got this!</p> | |
</div> | |
<div class="tracker-container"> | |
<div class="tracker-box"> | |
<h2>Full Days Off</h2> | |
<div class="count" id="fullDays">0</div> | |
<button onclick="logDay(true)">I DID IT! π</button> | |
</div> | |
<div class="tracker-box"> | |
<h2>Minimal Use Days</h2> | |
<div class="count" id="minDays">0</div> | |
<button onclick="logDay(false)">I MANAGED IT! β¨</button> | |
</div> | |
</div> | |
<div id="message"></div> | |
<div class="quote" id="dailyQuote"></div> | |
</div> | |
<script> | |
let fullDays = localStorage.getItem('fullDays') || 0; | |
let minDays = localStorage.getItem('minDays') || 0; | |
const messages = { | |
full: [ | |
"INCREDIBLE! You're crushing it! π", | |
"WHO'S AMAZING? YOU ARE! πͺ", | |
"DAY MASTER! Keep it up! π", | |
"SUPERHERO STATUS ACHIEVED! π¦Έ" | |
], | |
min: [ | |
"PROUD OF YOU! Every bit counts! π±", | |
"GREAT BALANCE! You're learning! βοΈ", | |
"NICE WORK! Progress over perfection! π", | |
"WAY TO ADULT RESPONSIBLY! π" | |
] | |
}; | |
const quotes = [ | |
"Small steps lead to big changes", | |
"Consistency is the key to mastery", | |
"Your future self will thank you", | |
"Progress, not perfection" | |
]; | |
function updateDisplay() { | |
document.getElementById('fullDays').textContent = fullDays; | |
document.getElementById('minDays').textContent = minDays; | |
} | |
function showMessage(type) { | |
const msgArray = messages[type]; | |
const randomMsg = msgArray[Math.floor(Math.random() * msgArray.length)]; | |
const messageEl = document.getElementById('message'); | |
messageEl.textContent = randomMsg; | |
setTimeout(() => messageEl.textContent = '', 3000); | |
} | |
function logDay(isFullDay) { | |
if(isFullDay) { | |
fullDays++; | |
localStorage.setItem('fullDays', fullDays); | |
} else { | |
minDays++; | |
localStorage.setItem('minDays', minDays); | |
} | |
updateDisplay(); | |
showMessage(isFullDay ? 'full' : 'min'); | |
} | |
// Initial setup | |
updateDisplay(); | |
document.getElementById('dailyQuote').textContent = quotes[Math.floor(Math.random() * quotes.length)]; | |
</script> | |
</body> | |
</html> |