Spaces:
Running
Running
Download index.html from mrhappynice/lifeman: direct link, hf CLI and curl.
- Browser
- Download file 5.47 kB
-
https://huggingface.co/spaces/mrhappynice/lifeman/resolve/main/index.html
- Command line
-
hf download hf://spaces/mrhappynice/lifeman/index.html
-
curl -L -o index.html https://huggingface.co/spaces/mrhappynice/lifeman/resolve/main/index.html
5.47 kB
| <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> | |
| <button class="toggle-btn" onclick="openUrlModal()" title="Load from URL">π</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> | |
| <div id="url-modal" class="modal"> | |
| <div class="wizard-box" style="height: auto;"> | |
| <button onclick="closeUrlModal()" style="float:right; background:none; border:none; color:#666; cursor:pointer; font-size:1.2rem;">×</button> | |
| <h2 style="margin-top:0; text-align:center;">Load Remote Data</h2> | |
| <p style="color:#888; text-align:center; font-size:0.9rem;"> | |
| Enter a JSON URL or load the example data. | |
| </p> | |
| <div class="form-group"> | |
| <label>JSON File URL</label> | |
| <input type="text" id="import-url-input" placeholder="https://example.com/data.json"> | |
| </div> | |
| <button onclick="loadCustomUrl()" class="btn-primary" style="width:100%;">Fetch & Load</button> | |
| <div style="display:flex; align-items:center; gap:10px; margin: 20px 0;"> | |
| <div style="flex:1; height:1px; background:#333;"></div> | |
| <span style="color:#666; font-size:0.8rem;">OR</span> | |
| <div style="flex:1; height:1px; background:#333;"></div> | |
| </div> | |
| <button onclick="loadExampleData()" class="btn-primary" style="width:100%; background: #2c303a; border:1px solid #444;"> | |
| π Load Example Data (GitHub) | |
| </button> | |
| </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> | |