Upload files to "web"
This commit is contained in:
102
web/index.html
Normal file
102
web/index.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>life-manager</title>
|
||||
|
||||
<!-- PWA: theme color (matches manifest) -->
|
||||
<meta name="theme-color" content="#0f1014">
|
||||
|
||||
<!-- PWA: manifest -->
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<div style="flex: 1; margin-right: 30px;">
|
||||
<h1>Life Manager</h1>
|
||||
<!-- NEW: Search Input similar to OS Site -->
|
||||
<input type="search" id="search-input" placeholder="Search entries..." autocomplete="off"
|
||||
style="width: 100%; max-width: 400px; padding: 10px; margin-bottom: 15px; border-radius: 8px; border: 1px solid #333; background: #0f1014; color: white;">
|
||||
|
||||
<div id="tag-filter-bar" class="filter-bar">
|
||||
<!-- Buttons injected via JS -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; gap:10px; align-items: flex-start;">
|
||||
|
||||
<!-- NEW: Data Controls -->
|
||||
<div class="view-toggle">
|
||||
<button class="toggle-btn" onclick="downloadData()" title="Download Backup">💾</button>
|
||||
<button class="toggle-btn" onclick="triggerImport()" title="Import Backup">📂</button>
|
||||
</div>
|
||||
|
||||
<!-- Existing View Toggles -->
|
||||
<div class="view-toggle">
|
||||
<button id="view-list" class="toggle-btn active" onclick="switchView('list')">List</button>
|
||||
<button id="view-cal" class="toggle-btn" onclick="switchView('calendar')">Calendar</button>
|
||||
</div>
|
||||
|
||||
<button onclick="openNew()" class="btn-primary" style="font-size:1.1rem;">+ New Entry</button>
|
||||
</div>
|
||||
|
||||
<!-- NEW: Hidden Input for File Upload -->
|
||||
<input type="file" id="import-file" accept=".json" style="display:none" onchange="handleFileImport(this)">
|
||||
</header>
|
||||
|
||||
<div id="grid" class="grid"></div>
|
||||
|
||||
<div id="calendar-view" class="calendar-container hidden">
|
||||
<div class="cal-header">
|
||||
<button onclick="changeMonth(-1)">←</button>
|
||||
<h2 id="cal-month-name">Month Year</h2>
|
||||
<button onclick="changeMonth(1)">→</button>
|
||||
</div>
|
||||
<div class="cal-grid-header">
|
||||
<div>Sun</div><div>Mon</div><div>Tue</div><div>Wed</div><div>Thu</div><div>Fri</div><div>Sat</div>
|
||||
</div>
|
||||
<div id="cal-days" class="cal-grid-days">
|
||||
<!-- Javascript will inject days here -->
|
||||
</div>
|
||||
<div id="mobile-day-details" class="mobile-day-details hidden">
|
||||
<h3 id="mobile-selected-date-title">Select a day...</h3>
|
||||
<div id="mobile-event-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Wizard Modal -->
|
||||
<div id="modal" class="modal">
|
||||
<div class="wizard-box">
|
||||
<button onclick="closeModal()" style="float:right; background:none; border:none; color:#666; cursor:pointer; font-size:1.2rem;">×</button>
|
||||
<div id="wizard-body">
|
||||
<!-- Injected via JS -->
|
||||
</div>
|
||||
<div style="display:flex; justify-content:space-between; margin-top:30px;">
|
||||
<button id="prev-btn" class="hidden" onclick="moveWizard(-1)" style="background:none; border:none; color:#888; cursor:pointer;">Back</button>
|
||||
<button id="next-btn" class="hidden btn-primary" onclick="moveWizard(1)">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.catch(err => {
|
||||
console.error('SW registration failed', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user