186 lines
5.8 KiB
HTML
186 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ro">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="icon" type="image/svg+xml" href="/echo/favicon.svg">
|
|
<title>Echo · Habit Tracker</title>
|
|
<link rel="stylesheet" href="/echo/common.css">
|
|
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
|
|
<script src="/echo/swipe-nav.js"></script>
|
|
<style>
|
|
.main {
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
padding: var(--space-5);
|
|
}
|
|
|
|
.page-header {
|
|
margin-bottom: var(--space-5);
|
|
}
|
|
|
|
.page-title {
|
|
font-size: var(--text-xl);
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.page-subtitle {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Empty state */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: var(--space-6) var(--space-4);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state svg {
|
|
width: 64px;
|
|
height: 64px;
|
|
margin-bottom: var(--space-3);
|
|
opacity: 0.5;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state-message {
|
|
font-size: var(--text-base);
|
|
margin-bottom: var(--space-4);
|
|
}
|
|
|
|
/* Add habit button */
|
|
.add-habit-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-3) var(--space-5);
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.add-habit-btn:hover {
|
|
filter: brightness(1.1);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.add-habit-btn svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
/* Habits list (for future use) */
|
|
.habits-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-3);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header class="header">
|
|
<a href="/echo/index.html" class="logo">
|
|
<i data-lucide="circle-dot"></i>
|
|
Echo
|
|
</a>
|
|
<nav class="nav">
|
|
<a href="/echo/index.html" class="nav-item">
|
|
<i data-lucide="layout-dashboard"></i>
|
|
<span>Dashboard</span>
|
|
</a>
|
|
<a href="/echo/workspace.html" class="nav-item">
|
|
<i data-lucide="code"></i>
|
|
<span>Workspace</span>
|
|
</a>
|
|
<a href="/echo/notes.html" class="nav-item">
|
|
<i data-lucide="file-text"></i>
|
|
<span>KB</span>
|
|
</a>
|
|
<a href="/echo/files.html" class="nav-item">
|
|
<i data-lucide="folder"></i>
|
|
<span>Files</span>
|
|
</a>
|
|
<a href="/echo/habits.html" class="nav-item active">
|
|
<i data-lucide="target"></i>
|
|
<span>Habits</span>
|
|
</a>
|
|
<button class="theme-toggle" onclick="toggleTheme()" title="Schimbă tema">
|
|
<i data-lucide="sun" id="themeIcon"></i>
|
|
</button>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="main">
|
|
<div class="page-header">
|
|
<h1 class="page-title">Habit Tracker</h1>
|
|
<p class="page-subtitle">Urmărește-ți obiceiurile zilnice și săptămânale</p>
|
|
</div>
|
|
|
|
<!-- Habits container -->
|
|
<div id="habitsContainer">
|
|
<!-- Empty state -->
|
|
<div class="empty-state">
|
|
<i data-lucide="target"></i>
|
|
<p class="empty-state-message">Nicio obișnuință încă. Creează prima!</p>
|
|
<button class="add-habit-btn" onclick="showAddHabitModal()">
|
|
<i data-lucide="plus"></i>
|
|
<span>Adaugă obișnuință</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Habits list (hidden initially) -->
|
|
<div class="habits-list" id="habitsList" style="display: none;">
|
|
<!-- Habits will be populated here by JavaScript -->
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script>
|
|
// Theme management
|
|
function initTheme() {
|
|
const saved = localStorage.getItem('theme') || 'dark';
|
|
document.documentElement.setAttribute('data-theme', saved);
|
|
updateThemeIcon(saved);
|
|
}
|
|
|
|
function toggleTheme() {
|
|
const current = document.documentElement.getAttribute('data-theme') || 'dark';
|
|
const next = current === 'dark' ? 'light' : 'dark';
|
|
document.documentElement.setAttribute('data-theme', next);
|
|
localStorage.setItem('theme', next);
|
|
updateThemeIcon(next);
|
|
}
|
|
|
|
function updateThemeIcon(theme) {
|
|
const icon = document.getElementById('themeIcon');
|
|
if (icon) {
|
|
icon.setAttribute('data-lucide', theme === 'dark' ? 'sun' : 'moon');
|
|
lucide.createIcons();
|
|
}
|
|
}
|
|
|
|
// Initialize theme and icons
|
|
initTheme();
|
|
lucide.createIcons();
|
|
|
|
// Placeholder function for add habit modal (to be implemented in future stories)
|
|
function showAddHabitModal() {
|
|
alert('Funcționalitatea de adăugare obișnuință va fi implementată în următoarea fază!');
|
|
}
|
|
|
|
// Load habits (placeholder for future API integration)
|
|
async function loadHabits() {
|
|
// Will be implemented when API is integrated
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|