Files
vega/src/index.css
T
Jure ab7af96c45 Add long-form article reader (Phase 1 #1, NIP-23)
- fetchArticle(naddr): fetches kind 30023 by d-tag + author pubkey
- fetchAuthorArticles(pubkey): for future profile articles tab
- ArticleView: cover image, title, italic summary, author row (avatar +
  name + date), tag pills, full markdown body (DOMPurify sanitized),
  zap author button in header and footer, copy nostr: link, njump.me
  fallback on fetch error
- prose-article CSS: reader-optimised typography (15px base, 1.8 line
  height, h2 border, styled blockquote/code/pre/links/images)
- NoteContent: naddr1 clicks for kind 30023 now open ArticleView
  instead of falling through to njump.me
- openArticle(naddr) added to UI store with previousView tracking

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 20:42:13 +01:00

101 lines
4.3 KiB
CSS

@import "tailwindcss";
@theme {
--color-bg: #0a0a0a;
--color-bg-raised: #111111;
--color-bg-hover: #1a1a1a;
--color-border: #222222;
--color-border-subtle: #1a1a1a;
--color-text: #e0e0e0;
--color-text-muted: #777777;
--color-text-dim: #555555;
--color-accent: #8b5cf6;
--color-accent-hover: #7c3aed;
--color-zap: #f59e0b;
--color-danger: #ef4444;
--color-success: #22c55e;
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
}
* {
-webkit-user-select: none;
user-select: none;
}
/* Allow text selection in note content */
.note-content {
-webkit-user-select: text;
user-select: text;
}
body {
background: var(--color-bg);
color: var(--color-text);
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.5;
margin: 0;
overflow: hidden;
}
/* Allow text selection in article editor */
.article-editor textarea,
.article-editor input {
-webkit-user-select: text;
user-select: text;
}
/* Article preview prose styles */
.article-preview {
-webkit-user-select: text;
user-select: text;
}
.article-preview h1 { font-size: 1.6em; font-weight: bold; margin: 1.2em 0 0.5em; }
.article-preview h2 { font-size: 1.3em; font-weight: bold; margin: 1.2em 0 0.5em; }
.article-preview h3 { font-size: 1.1em; font-weight: bold; margin: 1em 0 0.4em; }
.article-preview p { margin: 0.8em 0; line-height: 1.75; }
.article-preview ul { list-style: disc; padding-left: 1.5em; margin: 0.8em 0; }
.article-preview ol { list-style: decimal; padding-left: 1.5em; margin: 0.8em 0; }
.article-preview li { margin: 0.3em 0; line-height: 1.7; }
.article-preview blockquote { border-left: 3px solid var(--color-accent); padding-left: 1em; color: var(--color-text-muted); margin: 1em 0; }
.article-preview code { font-family: var(--font-mono); background: var(--color-bg-raised); padding: 0.1em 0.4em; font-size: 0.9em; border-radius: 2px; }
.article-preview pre { background: var(--color-bg-raised); border: 1px solid var(--color-border); padding: 1em; overflow-x: auto; margin: 1em 0; }
.article-preview pre code { background: none; padding: 0; }
.article-preview a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.article-preview hr { border: none; border-top: 1px solid var(--color-border); margin: 1.5em 0; }
.article-preview strong { color: var(--color-text); font-weight: 600; }
.article-preview img { max-width: 100%; border-radius: 2px; margin: 0.5em 0; }
/* Article reader — slightly larger type than the editor preview */
.prose-article { -webkit-user-select: text; user-select: text; color: var(--color-text); font-size: 15px; line-height: 1.8; }
.prose-article h1 { font-size: 1.7em; font-weight: bold; margin: 1.4em 0 0.5em; }
.prose-article h2 { font-size: 1.35em; font-weight: bold; margin: 1.4em 0 0.5em; border-bottom: 1px solid var(--color-border); padding-bottom: 0.3em; }
.prose-article h3 { font-size: 1.15em; font-weight: bold; margin: 1.2em 0 0.4em; }
.prose-article p { margin: 0.9em 0; }
.prose-article ul { list-style: disc; padding-left: 1.6em; margin: 0.9em 0; }
.prose-article ol { list-style: decimal; padding-left: 1.6em; margin: 0.9em 0; }
.prose-article li { margin: 0.35em 0; }
.prose-article blockquote { border-left: 3px solid var(--color-accent); padding-left: 1.1em; color: var(--color-text-muted); margin: 1.2em 0; font-style: italic; }
.prose-article code { font-family: var(--font-mono); background: var(--color-bg-raised); padding: 0.15em 0.4em; font-size: 0.88em; border-radius: 2px; }
.prose-article pre { background: var(--color-bg-raised); border: 1px solid var(--color-border); padding: 1.1em; overflow-x: auto; margin: 1.2em 0; border-radius: 2px; }
.prose-article pre code { background: none; padding: 0; }
.prose-article a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose-article hr { border: none; border-top: 1px solid var(--color-border); margin: 2em 0; }
.prose-article strong { color: var(--color-text); font-weight: 600; }
.prose-article img { max-width: 100%; border-radius: 2px; margin: 1em 0; }
/* Scrollbar — thin, minimal */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--color-border);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-text-dim);
}