108 lines
4.2 KiB
HTML
108 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<!-- Copyright © 2026 Olaf Kolkman -->
|
|
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>New Entry - LinkLog</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="/static/style.css" />
|
|
</head>
|
|
<body>
|
|
<header class="site-header">
|
|
<div class="container">
|
|
<div class="header-row">
|
|
<div>
|
|
<img class="site-logo" src="/static/logo.svg" alt="LinkLog" />
|
|
<p>New Entry</p>
|
|
</div>
|
|
<div class="header-tools">
|
|
<div class="header-actions">
|
|
<button id="new-entry-button" class="new-entry-button hidden" type="button"><a href="/new-entry">New entry</a></button>
|
|
<button class="menu-toggle" type="button" aria-expanded="false" aria-controls="auth-menu">Menu</button>
|
|
<nav id="auth-menu" class="auth-menu hidden" aria-label="Account menu">
|
|
<a id="auth-home-link" href="/">Home</a>
|
|
<a id="auth-about-link" href="/about">About</a>
|
|
<a id="auth-login-button" href="/login">Sign in</a>
|
|
<a id="auth-profile-link" class="hidden" href="/profile">Profile</a>
|
|
<a id="auth-labels-link" class="hidden" href="/labels">Labels</a>
|
|
<a id="auth-admin-link" class="hidden" href="/admin">Admin</a>
|
|
<div id="auth-session" class="auth-session hidden">
|
|
<a id="auth-username" class="user-name" href="/"></a>
|
|
</div>
|
|
<button id="logout-button" class="logout-button hidden" type="button">Sign out</button>
|
|
<div id="theme-submenu-container" class="theme-submenu-container hidden">
|
|
<button type="button" class="submenu-title" aria-expanded="false" aria-controls="theme-options">Themes</button>
|
|
<div id="theme-options" class="submenu-options hidden"></div>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="container">
|
|
<div id="auth-required" class="error-message hidden">
|
|
<p>You must be signed in to create a new entry. <a href="/login">Sign in here</a>.</p>
|
|
</div>
|
|
|
|
<form id="entry-form" class="entry-form hidden">
|
|
<div class="form-section">
|
|
<label>
|
|
<span>URL</span>
|
|
<input id="url-input" name="url" type="url" required placeholder="https://example.com" />
|
|
</label>
|
|
<button id="scrape-button" class="secondary" type="button">Auto-fill Title</button>
|
|
<div id="scrape-status" class="status hidden" aria-live="polite"></div>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<label>
|
|
<span>Title</span>
|
|
<input id="title-input" name="title" type="text" required />
|
|
</label>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<label>
|
|
<span>Comment</span>
|
|
<textarea id="comment-input" name="comment" rows="4" placeholder="Optional comment about this link"></textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<fieldset class="form-section">
|
|
<legend>Tags</legend>
|
|
<div id="existing-tags" class="tag-options"></div>
|
|
<label>
|
|
<span>Add new tags</span>
|
|
<input id="new-tags-input" type="text" pattern="#[^, ]+(,\s*#[^, ]+)*" placeholder="#tag1, #tag2" />
|
|
</label>
|
|
</fieldset>
|
|
|
|
<fieldset class="form-section">
|
|
<legend>Mastodon Publishing</legend>
|
|
<label>
|
|
<input id="mastodon-enabled" type="checkbox" />
|
|
Post to Mastodon (if configured)
|
|
</label>
|
|
</fieldset>
|
|
|
|
<div class="form-actions">
|
|
<button id="submit-button" type="submit">Save Entry</button>
|
|
<a href="/" class="secondary button">Cancel</a>
|
|
</div>
|
|
|
|
<div id="submit-status" class="status hidden" aria-live="polite"></div>
|
|
</form>
|
|
</main>
|
|
|
|
<footer class="site-footer">
|
|
<span>Copyright © 2026 Olaf Kolkman</span> · <a href="https://git.kolkman.org/olaf/Link-Log">Repository</a>
|
|
</footer>
|
|
|
|
<script src="/static/auth-header.js"></script>
|
|
<script src="/static/new-entry.js"></script>
|
|
</body>
|
|
</html>
|