276 lines
14 KiB
HTML
276 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<meta name="description" content="LinkDing - Your Link Collection">
|
|
<meta name="theme-color" content="#6366f1">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="LinkDing">
|
|
<title>LinkDing - Your Link Collection</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="apple-touch-icon" href="/icon-192.png">
|
|
<link rel="stylesheet" href="styles.css">
|
|
</head>
|
|
<body>
|
|
<header class="top-header-bar">
|
|
<div class="header-container">
|
|
<div class="header-row">
|
|
<div class="header-left">
|
|
<h1 class="app-title" id="appLogo">
|
|
<span class="title-text"><img src="/icon-192.png" alt="LinkDing" class="title-icon"></span>
|
|
</h1>
|
|
</div>
|
|
<div class="header-right">
|
|
<button id="addLinkToggle" class="add-link-toggle-btn" title="Add link">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
</svg>
|
|
</button>
|
|
<button id="listsToggle" class="lists-toggle-btn" title="Manage lists">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="5" y1="6" x2="19" y2="6"></line>
|
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
<line x1="5" y1="18" x2="19" y2="18"></line>
|
|
<line x1="2" y1="6" x2="2.01" y2="6"></line>
|
|
<line x1="2" y1="12" x2="2.01" y2="12"></line>
|
|
<line x1="2" y1="18" x2="2.01" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
<div class="layout-toggle-wrapper">
|
|
<button id="layoutToggle" class="layout-toggle-btn" title="Change layout">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="3" width="7" height="7"></rect>
|
|
<rect x="14" y="3" width="7" height="7"></rect>
|
|
<rect x="14" y="14" width="7" height="7"></rect>
|
|
<rect x="3" y="14" width="7" height="7"></rect>
|
|
</svg>
|
|
</button>
|
|
<div class="layout-dropdown" id="layoutDropdown">
|
|
<button class="layout-option" data-layout="masonry">
|
|
<span>Masonry</span>
|
|
<svg class="check-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
</button>
|
|
<button class="layout-option" data-layout="detail">
|
|
<span>Detail</span>
|
|
<svg class="check-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
</button>
|
|
<button class="layout-option" data-layout="list">
|
|
<span>List</span>
|
|
<svg class="check-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<button id="searchToggle" class="search-toggle-btn" title="Toggle search">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="11" cy="11" r="8"></circle>
|
|
<path d="m21 21-4.35-4.35"></path>
|
|
</svg>
|
|
</button>
|
|
<button id="loginToggle" class="login-toggle-btn" title="Login">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
</button>
|
|
<div id="userInfo" class="user-info" style="display: none;">
|
|
<span id="usernameDisplay"></span>
|
|
<button id="logoutBtn" class="logout-btn" title="Logout">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
|
<polyline points="16 17 21 12 16 7"></polyline>
|
|
<line x1="21" y1="12" x2="9" y2="12"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="header-fields-container">
|
|
<div class="add-link-wrapper" id="addLinkWrapper">
|
|
<form id="linkForm" class="link-form">
|
|
<div class="input-wrapper">
|
|
<svg class="input-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
</svg>
|
|
<input
|
|
type="url"
|
|
id="linkInput"
|
|
placeholder="Paste a link to add..."
|
|
required
|
|
autocomplete="off"
|
|
>
|
|
<button type="submit" id="addButton" class="btn-add" data-tooltip="Add link">
|
|
<span class="btn-text">Add</span>
|
|
<span class="btn-loader" style="display: none;">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M21 12a9 9 0 1 1-6.219-8.56"/>
|
|
</svg>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="search-wrapper" id="searchWrapper">
|
|
<svg class="search-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="11" cy="11" r="8"></circle>
|
|
<path d="m21 21-4.35-4.35"></path>
|
|
</svg>
|
|
<input
|
|
type="text"
|
|
id="searchInput"
|
|
placeholder="Search links..."
|
|
autocomplete="off"
|
|
>
|
|
</div>
|
|
<div class="list-filter-wrapper" id="listFilterWrapper">
|
|
<div class="list-filter-header">
|
|
<span class="list-filter-label"><b>Lists</b></span>
|
|
<div class="list-filter-actions">
|
|
<label class="archive-toggle-switch" title="Show archived links">
|
|
<input type="checkbox" id="archiveToggle">
|
|
<span class="archive-toggle-slider"></span>
|
|
<span class="archive-toggle-label">Archive</span>
|
|
</label>
|
|
<button id="editListsBtn" class="edit-lists-btn" title="Manage lists">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
|
|
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
|
|
</svg>
|
|
<span>Edit</span>
|
|
</button>
|
|
<button id="clearListFilters" class="clear-list-filters-btn" title="Clear filters">Clear</button>
|
|
</div>
|
|
</div>
|
|
<div class="list-filter-chips" id="listFilterChips">
|
|
<!-- List filter chips will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Login Modal -->
|
|
<div id="loginModal" class="login-modal">
|
|
<div class="login-modal-content">
|
|
<div class="login-modal-header">
|
|
<h2>Login</h2>
|
|
<button id="closeLoginModal" class="close-modal-btn">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="login-modal-body">
|
|
<form id="loginForm" class="login-form">
|
|
<div class="form-group">
|
|
<label for="loginUsername">Username</label>
|
|
<input
|
|
type="text"
|
|
id="loginUsername"
|
|
placeholder="Enter username"
|
|
required
|
|
autocomplete="username"
|
|
>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="loginPassword">Password</label>
|
|
<input
|
|
type="password"
|
|
id="loginPassword"
|
|
placeholder="Enter password"
|
|
required
|
|
autocomplete="current-password"
|
|
>
|
|
</div>
|
|
<div id="loginError" class="login-error" style="display: none;"></div>
|
|
<button type="submit" id="loginSubmitBtn" class="btn-login">
|
|
<span class="btn-text">Login</span>
|
|
<span class="btn-loader" style="display: none;">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M21 12a9 9 0 1 1-6.219-8.56"/>
|
|
</svg>
|
|
</span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Lists Management Modal -->
|
|
<div id="listsModal" class="lists-modal">
|
|
<div class="lists-modal-content">
|
|
<div class="lists-modal-header">
|
|
<h2>Manage Lists</h2>
|
|
<button id="closeListsModal" class="close-modal-btn">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="lists-modal-body">
|
|
<div class="create-list-form">
|
|
<input
|
|
type="text"
|
|
id="newListName"
|
|
placeholder="Enter list name..."
|
|
autocomplete="off"
|
|
>
|
|
<button id="createListBtn" class="btn-create-list">Create List</button>
|
|
</div>
|
|
<div class="lists-list" id="listsList">
|
|
<!-- Lists will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- List Selection Overlay -->
|
|
<div id="listSelectionOverlay" class="list-selection-overlay">
|
|
<div class="list-selection-content">
|
|
<div class="list-selection-header">
|
|
<h3>Add to Lists</h3>
|
|
<button id="closeListSelection" class="close-overlay-btn">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="list-selection-body" id="listSelectionBody">
|
|
<!-- List checkboxes will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div id="linksContainer" class="links-container">
|
|
<div class="empty-state">
|
|
<p>No links yet. Add your first link to get started!</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="toastContainer" class="toast-container"></div>
|
|
|
|
<button id="scrollToTopBtn" class="scroll-to-top-btn" title="Scroll to top">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M18 15l-6-6-6 6"/>
|
|
</svg>
|
|
</button>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|
|
|