mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
fix(ui): adjust card gradient, align buttons, and add read-on-open logic
This commit is contained in:
1 parent
b5aa076751
commit
5e73018e31
2 files changed
+10
-4
No files matched your search
@@ -36,7 +36,8 @@ export function ArticleCard({ article, onClick, onToggleRead, onToggleFavorite }
|
||||
|
||||
{/* Image Placeholder with Gradient Overlay */}
|
||||
<div className="aspect-[16/10] overflow-hidden rounded-t-xl rounded-b-none bg-carbon-light relative mb-6">
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-white via-white/40 to-transparent opacity-100 z-10"></div>
|
||||
{/* Gradient lowered to 50% height to avoid covering too much image */}
|
||||
<div className="absolute bottom-0 left-0 right-0 h-1/2 bg-gradient-to-t from-white via-white/80 to-transparent opacity-100 z-10"></div>
|
||||
|
||||
{/* Visual placeholder or real image */}
|
||||
<div
|
||||
@@ -59,7 +60,7 @@ export function ArticleCard({ article, onClick, onToggleRead, onToggleFavorite }
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="space-y-4 px-1">
|
||||
<div className="flex-1 flex flex-col px-1 gap-4">
|
||||
<h2 className={`text-xl font-serif italic transition-colors duration-300 group-hover:text-nature-light ${article.is_read ? 'text-paper-muted font-normal' : 'text-paper-white font-bold'}`}
|
||||
style={article.is_read ? {} : { textShadow: '0 1px 1px rgba(0,0,0,0.1)' }}
|
||||
>
|
||||
@@ -72,7 +73,7 @@ export function ArticleCard({ article, onClick, onToggleRead, onToggleFavorite }
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex items-center justify-between pt-2 border-t border-white/5 mt-4">
|
||||
<div className="mt-auto flex items-center justify-between pt-4 pb-2 border-t border-white/5">
|
||||
<div className="flex space-x-2">
|
||||
<button
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -96,7 +96,12 @@ export function DashboardPage({ selectedFeedId }: DashboardPageProps) {
|
||||
<div key={article.id} className={index % 6 === 0 ? 'md:col-span-2' : ''}>
|
||||
<ArticleCard
|
||||
article={article}
|
||||
onClick={setSelectedArticle}
|
||||
onClick={(article) => {
|
||||
setSelectedArticle(article);
|
||||
if (!article.is_read) {
|
||||
toggleReadMutation.mutate({ id: article.id, is_read: true });
|
||||
}
|
||||
}}
|
||||
onToggleRead={(id, is_read) => toggleReadMutation.mutate({ id, is_read })}
|
||||
onToggleFavorite={(id) => toggleFavoriteMutation.mutate(id)}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user