Files
PostTracker/web/daily-bookmarks.html
2025-12-02 21:21:08 +01:00

185 lines
8.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daily Bookmarks</title>
<link rel="icon" type="image/png" sizes="32x32" href="assets/app-icon-64.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="daily-bookmarks.css">
</head>
<body>
<div class="daily-shell">
<header class="hero">
<a class="back-link" href="index.html">← Zurück zur App</a>
<h1 class="hero__title">Daily Bookmarks</h1>
<div class="hero__controls">
<div class="day-switch">
<button class="ghost-btn" id="prevDayBtn" aria-label="Vorheriger Tag"></button>
<div class="day-switch__label">
<div id="dayLabel" class="day-switch__day">Heute</div>
<div id="daySubLabel" class="day-switch__sub"></div>
</div>
<button class="ghost-btn" id="nextDayBtn" aria-label="Nächster Tag"></button>
<button class="ghost-btn ghost-btn--today" id="todayBtn">Heute</button>
</div>
<div class="hero__actions">
<div class="bulk-actions">
<label for="bulkCountSelect">Anzahl</label>
<select id="bulkCountSelect">
<option value="1">1</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
</select>
<button class="secondary-btn" id="bulkOpenBtn" type="button">Öffnen & abhaken</button>
</div>
<button class="primary-btn" id="openCreateBtn" type="button">+ Bookmark</button>
<button class="secondary-btn" id="openImportBtn" type="button">Liste importieren</button>
<button class="ghost-btn" id="refreshBtn" type="button">Aktualisieren</button>
<span id="heroStats" class="hero__stats"></span>
</div>
</div>
</header>
<main class="panel list-panel">
<header class="panel__header panel__header--row">
<div>
<p class="panel__eyebrow">Tägliche Liste</p>
<h2 class="panel__title">Alle Bookmarks</h2>
</div>
<div class="list-summary" id="listSummary"></div>
</header>
<div id="listStatus" class="list-status" role="status" aria-live="polite"></div>
<div class="table-wrapper">
<table class="bookmark-table">
<thead>
<tr>
<th class="col-url">
<button type="button" class="sort-btn" data-sort-key="url_template">URL (aufgelöst)</button>
</th>
<th class="col-marker">
<button type="button" class="sort-btn" data-sort-key="marker">Marker</button>
</th>
<th class="col-last">
<button type="button" class="sort-btn" data-sort-key="last_completed_at">Letzte Erledigung</button>
</th>
<th>Aktionen</th>
</tr>
<tr class="table-filter-row">
<th></th>
<th>
<label class="visually-hidden" for="markerFilter">Nach Marker filtern</label>
<select id="markerFilter">
<option value="">Alle Marker</option>
<option value="__none">Ohne Marker</option>
</select>
</th>
<th colspan="2" class="filter-hint">
<span>Filter & Sortierung werden gespeichert</span>
<button type="button" class="ghost-btn ghost-btn--tiny" id="resetViewBtn">Zurücksetzen</button>
</th>
</tr>
</thead>
<tbody id="tableBody"></tbody>
</table>
</div>
</main>
</div>
<div id="bookmarkModal" class="modal" hidden>
<div class="modal__backdrop"></div>
<div class="modal__content" role="dialog" aria-modal="true" aria-labelledby="modalTitle">
<header class="modal__header">
<div>
<p class="panel__eyebrow" id="formModeLabel">Neues Bookmark</p>
<h2 id="modalTitle" class="panel__title">Bookmark pflegen</h2>
<p class="panel__subtitle">Titel optional, URL-Template erforderlich. Platzhalter werden für den gewählten Tag aufgelöst.</p>
</div>
<button class="ghost-btn modal__close" type="button" id="modalCloseBtn" aria-label="Schließen">×</button>
</header>
<form id="bookmarkForm" class="bookmark-form" autocomplete="off">
<label class="field">
<span>Titel (optional)</span>
<input id="titleInput" type="text" name="title" maxlength="160" placeholder="z.B. Daily Gewinnspielrunde">
</label>
<label class="field">
<span>URL-Template *</span>
<input id="urlInput" type="url" name="url_template" maxlength="800" placeholder="https://www.test.de/tag-{{day}}/" required>
</label>
<div id="urlSuggestionBox" class="suggestion-box" hidden></div>
<label class="field">
<span>Notiz (optional)</span>
<textarea id="notesInput" name="notes" maxlength="800" rows="3" placeholder="Kurze Hinweise oder To-do für diesen Link"></textarea>
</label>
<label class="field">
<span>Marker (optional)</span>
<input id="markerInput" type="text" name="marker" maxlength="120" placeholder="z.B. März-Import oder Kampagne A">
</label>
<div class="form-preview">
<div>
<p class="form-preview__label">Aufgelöste URL für den gewählten Tag:</p>
<a id="previewLink" class="form-preview__link" href="#" target="_blank" rel="noopener"></a>
</div>
<div class="form-preview__actions">
<button class="secondary-btn" type="button" id="resetBtn">Zurücksetzen</button>
<button class="primary-btn" type="submit" id="submitBtn">Speichern</button>
</div>
</div>
<div class="placeholder-help">
<p class="placeholder-help__title">Dynamische Platzhalter</p>
<ul class="placeholder-help__list">
<li><code>{{day}}</code> Tag des Monats (131), <code>{{dd}}</code> zweistellig</li>
<li><code>{{date}}</code> liefert <code>YYYY-MM-DD</code></li>
<li><code>{{mm}}</code> Monat zweistellig, <code>{{yyyy}}</code> Jahr</li>
<li><code>{{day+1}}</code> oder <code>{{date-2}}</code> verschieben um Tage</li>
<li><code>{{counter:477}}</code> Basiswert + aktueller Tag, z.B. <code>https://www.test.de/sweepstakes/{{counter:477}}/</code></li>
</ul>
</div>
<div id="formStatus" class="form-status" role="status" aria-live="polite"></div>
</form>
</div>
</div>
<div id="importModal" class="modal" hidden>
<div class="modal__backdrop"></div>
<div class="modal__content" role="dialog" aria-modal="true" aria-labelledby="importModalTitle">
<header class="modal__header">
<div>
<p class="panel__eyebrow">Masseneingabe</p>
<h2 id="importModalTitle" class="panel__title">Viele Bookmarks importieren</h2>
<p class="panel__subtitle">Füge hunderte Links gleichzeitig hinzu und vergebe einen gemeinsamen Marker.</p>
</div>
<button class="ghost-btn modal__close" type="button" id="importCloseBtn" aria-label="Schließen">×</button>
</header>
<form id="importForm" class="bookmark-form" autocomplete="off">
<label class="field">
<span>Liste der URL-Templates *</span>
<textarea id="importInput" name="import_urls" maxlength="120000" rows="8" placeholder="Jeder Link in eine neue Zeile, z.B. https://example.com/{{date}}/"></textarea>
</label>
<label class="field">
<span>Marker für alle Einträge (optional)</span>
<input id="importMarkerInput" type="text" name="import_marker" maxlength="120" placeholder="z.B. Batch März 2024">
</label>
<p class="import-hint">Doppelte oder ungültige Zeilen werden automatisch übersprungen.</p>
<div class="form-preview">
<div>
<p class="form-preview__label">Filter und Sortierung gelten auch beim Batch-Öffnen.</p>
</div>
<div class="form-preview__actions">
<button class="secondary-btn" type="button" id="importResetBtn">Zurücksetzen</button>
<button class="primary-btn" type="submit" id="importSubmitBtn">Import starten</button>
</div>
</div>
<div id="importStatus" class="form-status" role="status" aria-live="polite"></div>
</form>
</div>
</div>
<script src="daily-bookmarks.js"></script>
</body>
</html>