121 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Stimulant Tracker</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 1000px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
}
.container {
background-color: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #333;
text-align: center;
}
.stimulant-info {
display: flex;
justify-content: space-around;
margin: 20px 0;
}
.stimulant-box {
background-color: #f9f9f9;
padding: 20px;
border-radius: 8px;
text-align: center;
width: 45%;
}
.stimulant-box h2 {
margin-top: 0;
color: #555;
}
.amount {
font-size: 2em;
font-weight: bold;
margin: 10px 0;
}
.caffeine { color: #0066cc; }
.amphetamine { color: #cc0000; }
.buttons {
display: flex;
justify-content: center;
gap: 20px;
margin: 30px 0;
}
button {
padding: 12px 30px;
font-size: 16px;
border: none;
border-radius: 5px;
cursor: pointer;
color: white;
font-weight: bold;
}
.caffeine-btn { background-color: #0066cc; }
.amphetamine-btn { background-color: #cc0000; }
button:hover {
opacity: 0.9;
}
.graph-container {
margin-top: 30px;
}
.graph-container img {
width: 100%;
border-radius: 8px;
border: 1px solid #ddd;
}
.disclaimer {
margin-top: 30px;
padding: 15px;
background-color: #fff8e1;
border-left: 4px solid #ffc107;
font-size: 0.9em;
color: #856404;
}
</style>
</head>
<body>
<div class="container">
<h1>Stimulant Tracker</h1>
<div class="stimulant-info">
<div class="stimulant-box">
<h2>Caffeine</h2>
<div class="amount caffeine">{{ caffeine_amount }} mg</div>
</div>
<div class="stimulant-box">
<h2>Amphetamine</h2>
<div class="amount amphetamine">{{ amphetamine_amount }} mg</div>
</div>
</div>
<div class="buttons">
<form action="/add_dose" method="post">
<input type="hidden" name="type" value="caffeine">
<button type="submit" class="caffeine-btn">Add 10mg Caffeine</button>
</form>
<form action="/add_dose" method="post">
<input type="hidden" name="type" value="amphetamine">
<button type="submit" class="amphetamine-btn">Add 10mg Amphetamine</button>
</form>
</div>
<div class="graph-container">
<h2>Stimulant Levels (Past 24 Hours)</h2>
<img src="data:image/png;base64,{{ graph_url }}" alt="Stimulant Levels Graph">
</div>
<div class="disclaimer">
CAFFEINE_ABSORPTION_RATE half-life ~30 min, CAFFEINE_ELIMINATION_RATE half-life ~5 hours, AMPHETAMINE_ABSORPTION_RATE half-life ~30 min, AMPHETAMINE_ELIMINATION_RATE half-life ~9 hours
</div>
</div>
</body>
</html>