- Wallabag v2 API compatible (OAuth2, entries CRUD, tags) - Express + SQLite (better-sqlite3), zero extra deps - Gated web UI with session auth - PWA: service worker, manifest, offline support - Mobile-first design, dark mode, FAB + modal
514 lines
13 KiB
CSS
514 lines
13 KiB
CSS
/* ── Variables ─────────────────────────────────────────────────────────────── */
|
|
:root {
|
|
--bg: #f8f8f6;
|
|
--bg2: #ffffff;
|
|
--bg3: #eeecea;
|
|
--border: #e0ddd8;
|
|
--text: #1a1916;
|
|
--text2: #6b6860;
|
|
--text3: #9b9890;
|
|
--accent: #2563eb;
|
|
--accent-h: #1d4ed8;
|
|
--danger: #dc2626;
|
|
--star: #f59e0b;
|
|
--radius: 10px;
|
|
--shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
|
|
--shadow-lg: 0 10px 25px rgba(0,0,0,.12);
|
|
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
--transition: .15s ease;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--bg: #141413;
|
|
--bg2: #1e1e1c;
|
|
--bg3: #2a2a28;
|
|
--border: #333330;
|
|
--text: #f0ede8;
|
|
--text2: #9b9890;
|
|
--text3: #6b6860;
|
|
--shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
|
|
}
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--bg: #141413;
|
|
--bg2: #1e1e1c;
|
|
--bg3: #2a2a28;
|
|
--border: #333330;
|
|
--text: #f0ede8;
|
|
--text2: #9b9890;
|
|
--text3: #6b6860;
|
|
--shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
|
|
}
|
|
|
|
/* ── Reset ─────────────────────────────────────────────────────────────────── */
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
|
|
body {
|
|
font-family: var(--font);
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
min-height: 100dvh;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
|
|
button {
|
|
font-family: var(--font);
|
|
cursor: pointer;
|
|
border: none;
|
|
background: none;
|
|
color: inherit;
|
|
}
|
|
|
|
input {
|
|
font-family: var(--font);
|
|
font-size: 1rem;
|
|
background: var(--bg2);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: .5rem .75rem;
|
|
outline: none;
|
|
width: 100%;
|
|
transition: border-color var(--transition);
|
|
}
|
|
input:focus { border-color: var(--accent); }
|
|
|
|
/* ── Login Page ────────────────────────────────────────────────────────────── */
|
|
.login-page {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100dvh;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.login-card {
|
|
background: var(--bg2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
box-shadow: var(--shadow-lg);
|
|
padding: 2.5rem 2rem;
|
|
width: 100%;
|
|
max-width: 360px;
|
|
}
|
|
|
|
.login-card h1 {
|
|
font-size: 1.6rem;
|
|
font-weight: 700;
|
|
letter-spacing: -.03em;
|
|
margin-bottom: .25rem;
|
|
}
|
|
|
|
.login-card .tagline {
|
|
color: var(--text2);
|
|
font-size: .9rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.login-card label {
|
|
display: block;
|
|
font-size: .85rem;
|
|
font-weight: 500;
|
|
color: var(--text2);
|
|
margin-bottom: .35rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.login-card label:first-of-type { margin-top: 0; }
|
|
|
|
.btn-primary {
|
|
display: block;
|
|
width: 100%;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-radius: var(--radius);
|
|
padding: .65rem 1rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
transition: background var(--transition);
|
|
margin-top: 1.5rem;
|
|
}
|
|
.btn-primary:hover { background: var(--accent-h); }
|
|
|
|
.login-error {
|
|
background: #fef2f2;
|
|
border: 1px solid #fecaca;
|
|
color: var(--danger);
|
|
border-radius: var(--radius);
|
|
padding: .6rem .85rem;
|
|
font-size: .875rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
[data-theme="dark"] .login-error {
|
|
background: #3b1515;
|
|
border-color: #7f1d1d;
|
|
}
|
|
|
|
/* ── App Layout ────────────────────────────────────────────────────────────── */
|
|
#app { display: flex; flex-direction: column; min-height: 100dvh; }
|
|
|
|
.navbar {
|
|
background: var(--bg2);
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.navbar-inner {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
height: 52px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .75rem;
|
|
}
|
|
|
|
.nav-brand {
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
letter-spacing: -.03em;
|
|
color: var(--text);
|
|
flex: 1;
|
|
}
|
|
|
|
.nav-btn {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text2);
|
|
transition: background var(--transition), color var(--transition);
|
|
}
|
|
.nav-btn:hover { background: var(--bg3); color: var(--text); }
|
|
|
|
/* ── Filter tabs ───────────────────────────────────────────────────────────── */
|
|
.tabs {
|
|
background: var(--bg2);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 0 1rem;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
}
|
|
.tabs::-webkit-scrollbar { display: none; }
|
|
|
|
.tabs-inner {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
gap: 0;
|
|
}
|
|
|
|
.tab-btn {
|
|
padding: .65rem 1rem;
|
|
font-size: .875rem;
|
|
font-weight: 500;
|
|
color: var(--text2);
|
|
border-bottom: 2px solid transparent;
|
|
white-space: nowrap;
|
|
transition: color var(--transition), border-color var(--transition);
|
|
}
|
|
.tab-btn:hover { color: var(--text); }
|
|
.tab-btn.active {
|
|
color: var(--accent);
|
|
border-bottom-color: var(--accent);
|
|
}
|
|
|
|
/* ── Entry list ────────────────────────────────────────────────────────────── */
|
|
.content {
|
|
flex: 1;
|
|
padding: .75rem 1rem;
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.entries-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: .5rem;
|
|
}
|
|
|
|
.entry-card {
|
|
background: var(--bg2);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: .85rem 1rem;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: .75rem;
|
|
box-shadow: var(--shadow);
|
|
transition: box-shadow var(--transition);
|
|
position: relative;
|
|
}
|
|
.entry-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
|
|
.entry-card.archived { opacity: .55; }
|
|
|
|
.entry-favicon {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 4px;
|
|
flex-shrink: 0;
|
|
margin-top: 2px;
|
|
background: var(--bg3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: .65rem;
|
|
color: var(--text3);
|
|
overflow: hidden;
|
|
}
|
|
.entry-favicon img { width: 100%; height: 100%; object-fit: cover; }
|
|
|
|
.entry-body { flex: 1; min-width: 0; }
|
|
|
|
.entry-title {
|
|
font-size: .9375rem;
|
|
font-weight: 500;
|
|
color: var(--text);
|
|
line-height: 1.35;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
margin-bottom: .2rem;
|
|
}
|
|
|
|
.entry-meta {
|
|
font-size: .78rem;
|
|
color: var(--text3);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.entry-domain { color: var(--accent); font-weight: 500; }
|
|
|
|
.entry-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .15rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.action-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 7px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text3);
|
|
transition: background var(--transition), color var(--transition);
|
|
font-size: .8rem;
|
|
}
|
|
.action-btn:hover { background: var(--bg3); color: var(--text); }
|
|
.action-btn.active-star { color: var(--star); }
|
|
.action-btn.active-archive { color: var(--accent); }
|
|
.action-btn.danger:hover { color: var(--danger); background: #fef2f2; }
|
|
|
|
[data-theme="dark"] .action-btn.danger:hover { background: #3b1515; }
|
|
|
|
/* ── Empty state ───────────────────────────────────────────────────────────── */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 4rem 1rem;
|
|
color: var(--text3);
|
|
}
|
|
.empty-state svg { margin-bottom: 1rem; opacity: .4; }
|
|
.empty-state p { font-size: 1rem; }
|
|
.empty-state small { font-size: .85rem; }
|
|
|
|
/* ── Loading ───────────────────────────────────────────────────────────────── */
|
|
.loading {
|
|
text-align: center;
|
|
padding: 3rem 1rem;
|
|
color: var(--text3);
|
|
}
|
|
.spinner {
|
|
width: 28px; height: 28px;
|
|
border: 3px solid var(--border);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin .7s linear infinite;
|
|
margin: 0 auto 1rem;
|
|
}
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
/* ── FAB ───────────────────────────────────────────────────────────────────── */
|
|
.fab {
|
|
position: fixed;
|
|
bottom: calc(1.5rem + env(safe-area-inset-bottom));
|
|
right: 1.5rem;
|
|
width: 52px;
|
|
height: 52px;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
box-shadow: 0 4px 14px rgba(37,99,235,.4);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.4rem;
|
|
transition: background var(--transition), transform var(--transition);
|
|
z-index: 200;
|
|
}
|
|
.fab:hover { background: var(--accent-h); transform: scale(1.05); }
|
|
.fab:active { transform: scale(.96); }
|
|
|
|
/* ── Modal ─────────────────────────────────────────────────────────────────── */
|
|
.modal-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,.45);
|
|
z-index: 300;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
.modal-overlay.open { display: flex; }
|
|
|
|
.modal {
|
|
background: var(--bg2);
|
|
border-radius: 16px 16px 0 0;
|
|
padding: 1.5rem 1.25rem;
|
|
width: 100%;
|
|
max-width: 540px;
|
|
animation: slide-up .22s ease;
|
|
}
|
|
|
|
@media (min-width: 540px) {
|
|
.modal-overlay { align-items: center; padding: 1rem; }
|
|
.modal { border-radius: 16px; }
|
|
}
|
|
|
|
@keyframes slide-up {
|
|
from { transform: translateY(24px); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
|
|
.modal h2 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: .75rem;
|
|
margin-top: 1.25rem;
|
|
}
|
|
|
|
.btn-secondary {
|
|
flex: 1;
|
|
padding: .6rem 1rem;
|
|
background: var(--bg3);
|
|
border-radius: var(--radius);
|
|
font-size: .9375rem;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
transition: background var(--transition);
|
|
}
|
|
.btn-secondary:hover { background: var(--border); }
|
|
|
|
.btn-primary-sm {
|
|
flex: 1;
|
|
padding: .6rem 1rem;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-radius: var(--radius);
|
|
font-size: .9375rem;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
transition: background var(--transition);
|
|
}
|
|
.btn-primary-sm:hover { background: var(--accent-h); }
|
|
|
|
.modal label {
|
|
display: block;
|
|
font-size: .85rem;
|
|
font-weight: 500;
|
|
color: var(--text2);
|
|
margin-bottom: .4rem;
|
|
margin-top: .9rem;
|
|
}
|
|
.modal label:first-of-type { margin-top: 0; }
|
|
|
|
/* ── Toast ─────────────────────────────────────────────────────────────────── */
|
|
.toast-container {
|
|
position: fixed;
|
|
bottom: calc(5rem + env(safe-area-inset-bottom));
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 500;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: .5rem;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast {
|
|
background: var(--text);
|
|
color: var(--bg);
|
|
padding: .6rem 1.1rem;
|
|
border-radius: 100px;
|
|
font-size: .875rem;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
animation: toast-in .2s ease;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
@keyframes toast-in {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ── Offline banner ────────────────────────────────────────────────────────── */
|
|
.offline-banner {
|
|
display: none;
|
|
background: var(--text);
|
|
color: var(--bg);
|
|
text-align: center;
|
|
font-size: .8rem;
|
|
padding: .4rem;
|
|
font-weight: 500;
|
|
}
|
|
.offline-banner.show { display: block; }
|
|
|
|
/* ── Pagination ────────────────────────────────────────────────────────────── */
|
|
.pagination {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: .5rem;
|
|
margin-top: 1.25rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.page-btn {
|
|
padding: .45rem .9rem;
|
|
border-radius: 8px;
|
|
font-size: .875rem;
|
|
font-weight: 500;
|
|
background: var(--bg2);
|
|
border: 1px solid var(--border);
|
|
color: var(--text2);
|
|
transition: background var(--transition), color var(--transition);
|
|
}
|
|
.page-btn:hover:not(:disabled) { background: var(--bg3); color: var(--text); }
|
|
.page-btn:disabled { opacity: .4; cursor: default; }
|
|
.page-info { font-size: .8rem; color: var(--text3); }
|