mirror of
https://github.com/dergigi/boris.git
synced 2026-01-01 14:04:19 +01:00
feat(highlights): add comment icon to highlight comments
- Import and use faComment icon - Display comment icon next to comment text - Style with flexbox layout and slight opacity - Icon aligns to top with comment text - Visual indicator that distinguishes comments from highlights
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faQuoteLeft, faExternalLinkAlt, faPlane, faSpinner, faHighlighter, faTrash, faEllipsisH, faMobileAlt } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faQuoteLeft, faExternalLinkAlt, faPlane, faSpinner, faHighlighter, faTrash, faEllipsisH, faMobileAlt, faComment } from '@fortawesome/free-solid-svg-icons'
|
||||
import { Highlight } from '../types/highlights'
|
||||
import { useEventModel } from 'applesauce-react/hooks'
|
||||
import { Models, IEventStore } from 'applesauce-core'
|
||||
@@ -346,6 +346,7 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({
|
||||
|
||||
{highlight.comment && (
|
||||
<div className="highlight-comment">
|
||||
<FontAwesomeIcon icon={faComment} className="highlight-comment-icon" />
|
||||
{highlight.comment}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -129,7 +129,8 @@
|
||||
.highlight-content { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; padding: 2.25rem 0.75rem 2.5rem; }
|
||||
.highlight-text { margin: 0; padding: 0 0 0 1.25rem; font-style: italic; color: var(--color-text); line-height: 1.6; border-left: none; font-size: 0.95rem; }
|
||||
.highlight-citation { margin-left: 1.25rem; font-size: 0.8rem; color: var(--color-text-secondary); font-style: normal; padding-top: 0.25rem; }
|
||||
.highlight-comment { margin-top: 0.5rem; margin-left: 1.25rem; padding: 0.75rem; border-left: 3px solid; border-radius: 4px; font-size: 0.875rem; color: var(--color-text); line-height: 1.5; }
|
||||
.highlight-comment { margin-top: 0.5rem; margin-left: 1.25rem; padding: 0.75rem; border-left: 3px solid; border-radius: 4px; font-size: 0.875rem; color: var(--color-text); line-height: 1.5; display: flex; gap: 0.5rem; align-items: flex-start; }
|
||||
.highlight-comment-icon { flex-shrink: 0; margin-top: 0.125rem; opacity: 0.7; }
|
||||
|
||||
/* Level-colored comments */
|
||||
.highlight-item.level-mine .highlight-comment { background: color-mix(in srgb, var(--highlight-color-mine, #ffff00) 10%, transparent); border-left-color: var(--highlight-color-mine, #ffff00); }
|
||||
|
||||
Reference in New Issue
Block a user