Files
OpenTimeTracker/templates/layout.html
2026-02-10 19:46:25 +01:00

184 lines
6.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenTimeTracker</title>
<style>
:root {
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
--bg-body: #ffffff;
--bg-input: #f7f7f5;
--text-primary: #37352f;
--text-secondary: #787774;
--border-dim: #ededed;
--border-focus: #aebfd1;
--primary-color: #2383e2;
--danger-color: #eb5757;
}
body {
font-family: var(--font-family);
background: var(--bg-body);
color: var(--text-primary);
margin: 0;
padding: 0;
line-height: 1.6;
}
/* Modern Navigation */
nav {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
padding: 0.8rem 1.5rem;
border-bottom: 1px solid var(--border-dim);
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 1000;
}
.brand {
font-weight: 600;
font-size: 1.1rem;
color: var(--text-primary);
letter-spacing: -0.02em;
display: flex; align-items: center; gap: 8px;
}
nav a {
color: var(--text-secondary);
text-decoration: none;
margin-left: 20px;
font-size: 0.9rem;
font-weight: 500;
transition: color 0.15s;
}
nav a:hover { color: var(--text-primary); }
.container { max-width: 900px; margin: 3rem auto; padding: 0 1.5rem; }
/* Clean Notion-style Cards */
.card {
background: white;
padding: 2rem;
border: 1px solid var(--border-dim);
border-radius: 4px;
margin-bottom: 1.5rem;
}
h2, h3, h4 { margin-top: 0; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; }
/* Beautiful Input Fields */
label {
display: block;
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 0.5rem;
margin-top: 1.2rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
label:first-child { margin-top: 0; }
input[type="text"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
width: 100%;
padding: 10px 12px;
margin-bottom: 10px;
box-sizing: border-box;
border: 1px solid transparent;
border-radius: 4px;
background: var(--bg-input);
font-size: 0.95rem;
color: var(--text-primary);
font-family: inherit;
transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
outline: none;
background: white;
border-color: var(--border-focus);
box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.1);
}
/* Minimalist Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 16px;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
color: white;
background: var(--text-primary); /* Modern black buttons */
transition: opacity 0.2s, transform 0.1s;
text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn-danger { background: transparent; border: 1px solid var(--border-dim); color: var(--danger-color); }
.btn-danger:hover { background: #fff5f5; border-color: #ffb3b3; }
/* Grid for Activities */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.activity-card {
height: 100px; display: flex; align-items: center; justify-content: center;
border-radius: 6px; color: white; font-weight: 600; cursor: pointer; text-align: center;
flex-direction: column; transition: transform 0.1s;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.activity-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
/* Specific Overrides */
.timer-display { font-size: 3.5rem; font-weight: 700; text-align: center; margin: 1.5rem 0; font-variant-numeric: tabular-nums; }
.active-section { border: 1px solid var(--primary-color); background: white; box-shadow: 0 4px 12px rgba(35, 131, 226, 0.1); }
small { color: var(--text-secondary); }
</style>
</head>
<body>
<nav>
<div class="brand">
<!-- Simple SVG Icon -->
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
OpenTimeTracker
</div>
<div>
{% if session.user_id %}
<a href="{{ url_for('index') }}">Tracker</a>
<a href="{{ url_for('tasks') }}">Tasks</a>
<a href="{{ url_for('goals') }}">Goals</a>
<a href="{{ url_for('logbook') }}">Logbook</a>
<a href="{{ url_for('logout') }}">Logout</a>
{% else %}
<a href="{{ url_for('login') }}">Login</a>
<a href="{{ url_for('register') }}">Register</a>
{% endif %}
</div>
</nav>
<div class="container">
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div style="background: white; border: 1px solid var(--border-dim); color: var(--text-primary); padding: 12px; border-radius: 4px; margin-bottom: 20px; font-size: 0.9rem;">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</div>
</body>
</html>