Tweaks, generating icons
This commit is contained in:
parent
38cf394916
commit
3757454f3a
9 changed files with 718 additions and 356 deletions
356
style.css
356
style.css
|
|
@ -1,46 +1,87 @@
|
|||
/* ── Design tokens ─────────────────────────────────────────────────────── */
|
||||
/* Colours: Radix Sand (neutrals) + Radix Brown (accent) */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--surface: #f4f4f7;
|
||||
--border: #e2e2ea;
|
||||
--text: #18181b;
|
||||
--muted: #71717a;
|
||||
--accent: #7c3aed;
|
||||
--accent-dim: #ede9fe;
|
||||
--accent-fg: #ffffff;
|
||||
--danger: #dc2626;
|
||||
--success: #16a34a;
|
||||
--r: 14px;
|
||||
--r-sm: 8px;
|
||||
--safe-t: env(safe-area-inset-top, 0px);
|
||||
--safe-b: env(safe-area-inset-bottom, 0px);
|
||||
--bg: #fdfdfc; /* sand-1 */
|
||||
--surface: #f1f0ef; /* sand-3 */
|
||||
--border: #dad9d6; /* sand-6 */
|
||||
--text: #21201c; /* sand-12 */
|
||||
--muted: #63635e; /* sand-11 */
|
||||
--accent: #ad7f58; /* brown-9 */
|
||||
--accent-dim: #f6eee7; /* brown-3 */
|
||||
--accent-fg: #ffffff;
|
||||
--danger: #dc2626;
|
||||
--success: #16a34a;
|
||||
--r: 14px;
|
||||
--r-sm: 8px;
|
||||
--safe-t: env(safe-area-inset-top, 0px);
|
||||
--safe-b: env(safe-area-inset-bottom, 0px);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #0f0f13;
|
||||
--surface: #17171f;
|
||||
--border: #2a2a38;
|
||||
--text: #f0f0f8;
|
||||
--muted: #8b8ba0;
|
||||
--accent: #a78bfa;
|
||||
--accent-dim: #2d1f5e;
|
||||
--accent-fg: #0f0f13;
|
||||
--danger: #f87171;
|
||||
--success: #4ade80;
|
||||
--bg: #111110; /* sand-1 dark */
|
||||
--surface: #222221; /* sand-3 dark */
|
||||
--border: #3b3a37; /* sand-6 dark */
|
||||
--text: #eeeeec; /* sand-12 dark */
|
||||
--muted: #b5b3ad; /* sand-11 dark */
|
||||
--accent: #ad7f58; /* brown-9 (same in light/dark) */
|
||||
--accent-dim: #322922; /* brown-4 dark */
|
||||
--accent-fg: #ffffff;
|
||||
--danger: #f87171;
|
||||
--success: #4ade80;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Reset & base ──────────────────────────────────────────────────────── */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
/* Explicit theme overrides (beat the media query via attribute specificity) */
|
||||
:root[data-theme="light"] {
|
||||
--bg: #fdfdfc;
|
||||
--surface: #f1f0ef;
|
||||
--border: #dad9d6;
|
||||
--text: #21201c;
|
||||
--muted: #63635e;
|
||||
--accent: #ad7f58;
|
||||
--accent-dim: #f6eee7;
|
||||
--accent-fg: #ffffff;
|
||||
--danger: #dc2626;
|
||||
--success: #16a34a;
|
||||
}
|
||||
|
||||
html { height: 100%; }
|
||||
:root[data-theme="dark"] {
|
||||
--bg: #111110;
|
||||
--surface: #222221;
|
||||
--border: #3b3a37;
|
||||
--text: #eeeeec;
|
||||
--muted: #b5b3ad;
|
||||
--accent: #ad7f58;
|
||||
--accent-dim: #322922;
|
||||
--accent-fg: #ffffff;
|
||||
--danger: #f87171;
|
||||
--success: #4ade80;
|
||||
}
|
||||
|
||||
/* ── Reset & base ──────────────────────────────────────────────────────── */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
font-family:
|
||||
system-ui,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
"Segoe UI",
|
||||
sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
|
@ -55,6 +96,30 @@ body {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* ── Footer ────────────────────────────────────────────────────────────── */
|
||||
footer {
|
||||
padding: 12px 20px calc(12px + var(--safe-b));
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.footer-link {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 4px 8px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
text-decoration: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.footer-link:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* ── Header ────────────────────────────────────────────────────────────── */
|
||||
header {
|
||||
display: flex;
|
||||
|
|
@ -80,13 +145,6 @@ header {
|
|||
.logo-mark {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-fg);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.9rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
|
@ -102,16 +160,20 @@ header {
|
|||
cursor: pointer;
|
||||
font-size: 1.05rem;
|
||||
color: var(--muted);
|
||||
transition: background 0.15s, color 0.15s;
|
||||
transition:
|
||||
background 0.15s,
|
||||
color 0.15s;
|
||||
position: relative;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.settings-btn:active { background: var(--border); }
|
||||
.settings-btn:active {
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
/* Red dot when credentials missing */
|
||||
.settings-btn.needs-setup::after {
|
||||
content: '';
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: -3px;
|
||||
|
|
@ -151,13 +213,21 @@ main {
|
|||
font-size: 3.25rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: transform 0.12s, border-color 0.15s, background 0.15s;
|
||||
transition:
|
||||
transform 0.12s,
|
||||
border-color 0.15s,
|
||||
background 0.15s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.emoji-display:active { transform: scale(0.94); }
|
||||
.emoji-display:hover { border-color: var(--accent); background: var(--accent-dim); }
|
||||
.emoji-display:active {
|
||||
transform: scale(0.94);
|
||||
}
|
||||
.emoji-display:hover {
|
||||
border-color: var(--accent);
|
||||
background: var(--accent-dim);
|
||||
}
|
||||
|
||||
/* Visible emoji text input — slides in when picking */
|
||||
.emoji-picker-input {
|
||||
|
|
@ -172,8 +242,11 @@ main {
|
|||
opacity: 0;
|
||||
pointer-events: none;
|
||||
border-color: transparent;
|
||||
transition: max-height 0.2s ease, padding 0.18s ease,
|
||||
opacity 0.15s ease, border-color 0.15s ease;
|
||||
transition:
|
||||
max-height 0.2s ease,
|
||||
padding 0.18s ease,
|
||||
opacity 0.15s ease,
|
||||
border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.emoji-section.picking .emoji-picker-input {
|
||||
|
|
@ -198,6 +271,29 @@ main {
|
|||
gap: 7px;
|
||||
}
|
||||
|
||||
.toggle-row {
|
||||
padding-block: 2px;
|
||||
}
|
||||
.toggle-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 0.92rem;
|
||||
font-weight: 400;
|
||||
color: var(--text);
|
||||
text-transform: none;
|
||||
letter-spacing: 0;
|
||||
user-select: none;
|
||||
}
|
||||
.toggle-label input[type="checkbox"] {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
accent-color: var(--accent);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
|
|
@ -219,7 +315,9 @@ input[type="password"] {
|
|||
padding: 13px 15px;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +335,9 @@ textarea {
|
|||
}
|
||||
|
||||
textarea::placeholder,
|
||||
input::placeholder { color: var(--muted); }
|
||||
input::placeholder {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.char-count {
|
||||
font-size: 0.78rem;
|
||||
|
|
@ -246,7 +346,9 @@ input::placeholder { color: var(--muted); }
|
|||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.char-count.warn { color: var(--danger); }
|
||||
.char-count.warn {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
/* ── Post button ───────────────────────────────────────────────────────── */
|
||||
.post-btn {
|
||||
|
|
@ -264,12 +366,19 @@ input::placeholder { color: var(--muted); }
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
transition: opacity 0.15s, transform 0.1s;
|
||||
transition:
|
||||
opacity 0.15s,
|
||||
transform 0.1s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.post-btn:active:not(:disabled) { transform: scale(0.98); }
|
||||
.post-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
.post-btn:active:not(:disabled) {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.post-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 18px;
|
||||
|
|
@ -282,10 +391,18 @@ input::placeholder { color: var(--muted); }
|
|||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.post-btn.loading .spinner { display: block; }
|
||||
.post-btn.loading .btn-label { display: none; }
|
||||
.post-btn.loading .spinner {
|
||||
display: block;
|
||||
}
|
||||
.post-btn.loading .btn-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Toast ─────────────────────────────────────────────────────────────── */
|
||||
#toast {
|
||||
|
|
@ -310,9 +427,23 @@ input::placeholder { color: var(--muted); }
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#toast.show { transform: translateX(-50%) translateY(0); }
|
||||
#toast.success { background: var(--success); color: #fff; }
|
||||
#toast.error { background: var(--danger); color: #fff; }
|
||||
#toast.show {
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
#toast.success {
|
||||
background: var(--success);
|
||||
color: #fff;
|
||||
}
|
||||
#toast.error {
|
||||
background: var(--danger);
|
||||
color: #fff;
|
||||
}
|
||||
#toast.show.clickable {
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#toast.show.clickable:hover { filter: brightness(1.1); }
|
||||
|
||||
/* ── Settings modal ────────────────────────────────────────────────────── */
|
||||
.overlay {
|
||||
|
|
@ -321,10 +452,12 @@ input::placeholder { color: var(--muted); }
|
|||
background: rgba(0, 0, 0, 0.48);
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.25s;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.overlay.open {
|
||||
|
|
@ -334,25 +467,25 @@ input::placeholder { color: var(--muted); }
|
|||
|
||||
.modal {
|
||||
background: var(--bg);
|
||||
border-radius: 22px 22px 0 0;
|
||||
border-radius: 22px;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding-bottom: calc(20px + var(--safe-b));
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
|
||||
max-height: 92vh;
|
||||
max-width: 440px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
transform: scale(0.95) translateY(8px);
|
||||
opacity: 0;
|
||||
transition:
|
||||
transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
|
||||
opacity 0.2s;
|
||||
}
|
||||
|
||||
.overlay.open .modal { transform: translateY(0); }
|
||||
.overlay.open .modal {
|
||||
transform: scale(1) translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal-grip {
|
||||
width: 40px;
|
||||
height: 4px;
|
||||
background: var(--border);
|
||||
border-radius: 2px;
|
||||
margin: 10px auto 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
|
|
@ -382,7 +515,9 @@ input::placeholder { color: var(--muted); }
|
|||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.close-btn:active { background: var(--border); }
|
||||
.close-btn:active {
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 20px;
|
||||
|
|
@ -405,7 +540,22 @@ input::placeholder { color: var(--muted); }
|
|||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.privacy-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
|
||||
.privacy-icon {
|
||||
font-size: 1.1rem;
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.modal-body a {
|
||||
color: var(--accent);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
|
||||
.modal-body a:hover {
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
/* API key with eye toggle */
|
||||
.input-wrap {
|
||||
|
|
@ -413,7 +563,9 @@ input::placeholder { color: var(--muted); }
|
|||
display: flex;
|
||||
}
|
||||
|
||||
.input-wrap input { padding-right: 48px; }
|
||||
.input-wrap input {
|
||||
padding-right: 48px;
|
||||
}
|
||||
|
||||
.eye-btn {
|
||||
position: absolute;
|
||||
|
|
@ -445,26 +597,40 @@ input::placeholder { color: var(--muted); }
|
|||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.save-btn:active { opacity: 0.8; }
|
||||
|
||||
/* ── Tablet / desktop ──────────────────────────────────────────────────── */
|
||||
@media (min-width: 520px) {
|
||||
.overlay { align-items: center; }
|
||||
|
||||
.modal {
|
||||
border-radius: 22px;
|
||||
margin: 20px;
|
||||
width: calc(100% - 40px);
|
||||
max-height: 80vh;
|
||||
transform: scale(0.96) translateY(10px);
|
||||
opacity: 0;
|
||||
transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.2s;
|
||||
}
|
||||
|
||||
.overlay.open .modal {
|
||||
transform: scale(1) translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal-grip { display: none; }
|
||||
.save-btn:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* ── Theme segmented control ───────────────────────────────────────────── */
|
||||
.theme-toggle {
|
||||
display: flex;
|
||||
background: var(--surface);
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--r);
|
||||
padding: 3px;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
flex: 1;
|
||||
padding: 8px 10px;
|
||||
border: none;
|
||||
border-radius: calc(var(--r) - 5px);
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
font-family: inherit;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 0.15s,
|
||||
color 0.15s,
|
||||
box-shadow 0.15s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.theme-btn.active {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue