Private
Public Access
Add the reading UI: stream, article detail, htmx actions
Implements the main reader surface: a filterable stream (Unread/All/ Starred/Saved) built on the lazy UserArticleState query pattern, an article detail view that marks articles read on open, and htmx-backed read/star/save-for-later toggles that update in place without a full page reload. Rule-hidden articles are excluded from every filter. Vendors htmx locally rather than loading it from a CDN, and adds mobile-first responsive CSS (verified at 375px width in-browser, plus dark mode via prefers-color-scheme). Verified live against the real Hacker News feed subscribed in the previous milestone: ingestion, filter switching, read/star/save toggles, and article detail all confirmed working in the browser, with two UI bugs fixed along the way (low-contrast message banners in dark mode, horizontal overflow from long URLs in article content). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d200ab80f7
commit
69e3520e3b
11 files changed
+478
-9
No files matched your search
+128
-2
@@ -21,8 +21,10 @@ body {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.message-success { background: #d1fae5; }
|
||||
.message-error { background: #fee2e2; }
|
||||
.message-success { background: #d1fae5; color: #065f46; }
|
||||
.message-error { background: #fee2e2; color: #991b1b; }
|
||||
.message-warning { background: #fef3c7; color: #92400e; }
|
||||
.message-info { background: #dbeafe; color: #1e40af; }
|
||||
|
||||
form p {
|
||||
display: flex;
|
||||
@@ -34,3 +36,127 @@ input, button {
|
||||
font-size: 1rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.stream-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.top-nav a {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.filter-tabs {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin: 1rem 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.filter-tabs a {
|
||||
padding: 0.5rem 0.75rem;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.filter-tabs a.active {
|
||||
border-bottom-color: currentColor;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.article-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.article-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.article-row.is-read .article-title {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.article-row-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.15rem;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.article-meta {
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.article-actions {
|
||||
display: flex;
|
||||
gap: 0.35rem;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
background: none;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 0.375rem;
|
||||
cursor: pointer;
|
||||
padding: 0.35rem 0.6rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.icon-btn.active {
|
||||
background: #fde68a;
|
||||
border-color: #f59e0b;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
opacity: 0.6;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
line-height: 1.6;
|
||||
margin-top: 1rem;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.article-content a {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.article-content img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.article-row {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user