mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 23:24:22 +01:00
feat: remove type icon from medium-sized bookmark cards
- Remove contentTypeIcon from CardViewProps interface - Remove type icon display from bookmark footer - Replace contentTypeIcon with faLink in thumbnail placeholder - Simplify card interface by removing content type indicator - Clean up unused icon-related code
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'
|
import { faLink } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { IndividualBookmark } from '../../types/bookmarks'
|
import { IndividualBookmark } from '../../types/bookmarks'
|
||||||
import { formatDate, renderParsedContent } from '../../utils/bookmarkUtils'
|
import { formatDate, renderParsedContent } from '../../utils/bookmarkUtils'
|
||||||
import RichContent from '../RichContent'
|
import RichContent from '../RichContent'
|
||||||
@@ -22,7 +22,6 @@ interface CardViewProps {
|
|||||||
articleImage?: string
|
articleImage?: string
|
||||||
articleSummary?: string
|
articleSummary?: string
|
||||||
articleTitle?: string
|
articleTitle?: string
|
||||||
contentTypeIcon: IconDefinition
|
|
||||||
readingProgress?: number
|
readingProgress?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +37,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
|||||||
articleImage,
|
articleImage,
|
||||||
articleSummary,
|
articleSummary,
|
||||||
articleTitle,
|
articleTitle,
|
||||||
contentTypeIcon,
|
|
||||||
readingProgress
|
readingProgress
|
||||||
}) => {
|
}) => {
|
||||||
const firstUrl = hasUrls ? extractedUrls[0] : null
|
const firstUrl = hasUrls ? extractedUrls[0] : null
|
||||||
@@ -122,11 +120,11 @@ export const CardView: React.FC<CardViewProps> = ({
|
|||||||
style={cachedImage ? { backgroundImage: `url(${cachedImage})` } : undefined}
|
style={cachedImage ? { backgroundImage: `url(${cachedImage})` } : undefined}
|
||||||
onClick={() => handleReadNow({ preventDefault: () => {} } as React.MouseEvent<HTMLButtonElement>)}
|
onClick={() => handleReadNow({ preventDefault: () => {} } as React.MouseEvent<HTMLButtonElement>)}
|
||||||
>
|
>
|
||||||
{!cachedImage && firstUrl && (
|
{!cachedImage && firstUrl && (
|
||||||
<div className="thumbnail-placeholder">
|
<div className="thumbnail-placeholder">
|
||||||
<FontAwesomeIcon icon={contentTypeIcon} />
|
<FontAwesomeIcon icon={faLink} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="card-text-content">
|
<div className="card-text-content">
|
||||||
@@ -191,9 +189,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
|||||||
) : (
|
) : (
|
||||||
<span className="bookmark-date">{formatDate(bookmark.created_at ?? bookmark.listUpdatedAt)}</span>
|
<span className="bookmark-date">{formatDate(bookmark.created_at ?? bookmark.listUpdatedAt)}</span>
|
||||||
)}
|
)}
|
||||||
<span className="bookmark-type">
|
|
||||||
<FontAwesomeIcon icon={contentTypeIcon} className="content-type-icon" />
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user