mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 15:14:20 +01:00
style(ui): use full-width slim chevron toggle; keep IconButton square for actions
This commit is contained in:
@@ -99,13 +99,14 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{extractedUrls.length > 3 && (
|
{extractedUrls.length > 3 && (
|
||||||
<IconButton
|
<button
|
||||||
icon={urlsExpanded ? faChevronUp : faChevronDown}
|
className="expand-toggle"
|
||||||
ariaLabel={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
|
||||||
title={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
|
||||||
onClick={() => setUrlsExpanded(v => !v)}
|
onClick={() => setUrlsExpanded(v => !v)}
|
||||||
size={32}
|
aria-label={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
||||||
/>
|
title={urlsExpanded ? 'Collapse URLs' : 'Expand URLs'}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={urlsExpanded ? faChevronUp : faChevronDown} />
|
||||||
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -123,33 +124,33 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{contentLength > 210 && (
|
{contentLength > 210 && (
|
||||||
<IconButton
|
<button
|
||||||
icon={expanded ? faChevronUp : faChevronDown}
|
className="expand-toggle"
|
||||||
ariaLabel={expanded ? 'Collapse' : 'Expand'}
|
|
||||||
title={expanded ? 'Collapse' : 'Expand'}
|
|
||||||
onClick={() => setExpanded(v => !v)}
|
onClick={() => setExpanded(v => !v)}
|
||||||
size={32}
|
aria-label={expanded ? 'Collapse' : 'Expand'}
|
||||||
/>
|
title={expanded ? 'Collapse' : 'Expand'}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={expanded ? faChevronUp : faChevronDown} />
|
||||||
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="bookmark-meta">
|
<div className="bookmark-meta">
|
||||||
{eventNevent ? (
|
{eventNevent ? (
|
||||||
<IconButton
|
<a
|
||||||
icon={getKindIcon(bookmark.kind)}
|
|
||||||
ariaLabel="Open event in search"
|
|
||||||
title="Open event in search"
|
|
||||||
href={`https://search.dergigi.com/e/${eventNevent}`}
|
href={`https://search.dergigi.com/e/${eventNevent}`}
|
||||||
variant="ghost"
|
target="_blank"
|
||||||
size={32}
|
rel="noopener noreferrer"
|
||||||
/>
|
className="kind-icon-link"
|
||||||
|
title="Open event in search"
|
||||||
|
>
|
||||||
|
<span className="kind-icon">
|
||||||
|
<FontAwesomeIcon icon={getKindIcon(bookmark.kind)} />
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<IconButton
|
<span className="kind-icon">
|
||||||
icon={getKindIcon(bookmark.kind)}
|
<FontAwesomeIcon icon={getKindIcon(bookmark.kind)} />
|
||||||
ariaLabel="Event kind"
|
</span>
|
||||||
title="Event kind"
|
|
||||||
variant="ghost"
|
|
||||||
size={32}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
<span>
|
<span>
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -542,11 +542,16 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expand-toggle {
|
.expand-toggle {
|
||||||
margin-top: 0.25rem;
|
margin: 0.25rem 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: #888;
|
color: #888;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
width: 100%;
|
||||||
|
height: 22px; /* half of default icon button */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expand-toggle:hover {
|
.expand-toggle:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user