mirror of
https://github.com/dergigi/boris.git
synced 2026-02-20 14:34:29 +01:00
feat: remove URL display from medium-sized bookmark cards
- Remove bookmark URLs section from CardView component - Remove unused urlsExpanded state variable - Clean up unused URL styling from CSS - Simplify card layout by removing URL display - Maintain all other card functionality (title, content, progress, author)
This commit is contained in:
@@ -48,7 +48,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
||||
|
||||
const [ogImage, setOgImage] = useState<string | null>(null)
|
||||
const [expanded, setExpanded] = useState(false)
|
||||
const [urlsExpanded, setUrlsExpanded] = useState(false)
|
||||
|
||||
const contentLength = (bookmark.content || '').length
|
||||
const shouldTruncate = !expanded && contentLength > 210
|
||||
@@ -157,33 +156,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
||||
<RichContent content={articleTitle} className="" />
|
||||
</h3>
|
||||
)}
|
||||
|
||||
{extractedUrls.length > 0 && (
|
||||
<div className="bookmark-urls">
|
||||
{(urlsExpanded ? extractedUrls : extractedUrls.slice(0, 1)).map((url, urlIndex) => {
|
||||
return (
|
||||
<button
|
||||
key={urlIndex}
|
||||
className="bookmark-url"
|
||||
onClick={(e) => { e.stopPropagation(); onSelectUrl?.(url) }}
|
||||
title="Open in reader"
|
||||
>
|
||||
{url}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
{extractedUrls.length > 1 && (
|
||||
<button
|
||||
className="expand-toggle-urls"
|
||||
onClick={(e) => { e.stopPropagation(); setUrlsExpanded(v => !v) }}
|
||||
aria-label={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
||||
title={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
||||
>
|
||||
{urlsExpanded ? `Hide ${extractedUrls.length - 1} more` : `Show ${extractedUrls.length - 1} more`}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isArticle && articleSummary ? (
|
||||
<RichContent content={articleSummary} className="bookmark-content article-summary" />
|
||||
|
||||
@@ -220,30 +220,6 @@
|
||||
transition: width 0.3s ease, background 0.3s ease;
|
||||
}
|
||||
|
||||
.card-content .bookmark-urls {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.card-content .bookmark-url {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 0.5rem;
|
||||
margin-bottom: 0.25rem;
|
||||
background: var(--color-bg-elevated);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
color: var(--color-primary);
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
word-break: break-all;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.card-content .bookmark-url:hover {
|
||||
background: var(--color-bg);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Large preview view */
|
||||
.individual-bookmark.large { padding: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-bg-elevated); }
|
||||
|
||||
Reference in New Issue
Block a user