summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js')
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
index 91ea506..70cf91a 100644
--- a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
+++ b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
@@ -26,6 +26,35 @@ export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAn
)
}
+export const Pullquote = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => {
+ if (paragraph.hidden) return null
+ let className = paragraph.type
+ if (className !== 'paragraph') className += ' paragraph'
+ if (currentParagraph) className += ' current'
+ const firstAnnotation = paragraph.annotations[0]
+ return (
+ <div
+ className={className}
+ >
+ <div className="speaker-icon" onClick={e => onAnnotationClick(e, paragraph, firstAnnotation)}>{SpeakerIcon}</div>
+ {paragraph.annotations.map(annotation => (
+ <span
+ key={annotation.id}
+ className={
+ annotation.type === 'pullquote_credit'
+ ? 'pullquote_credit'
+ : annotation.id === currentAnnotation
+ ? 'current'
+ : ''
+ }
+ onClick={e => onAnnotationClick(e, paragraph, firstAnnotation)}
+ dangerouslySetInnerHTML={{ __html: ' ' + annotation.text + ' ' }}
+ />
+ ))}
+ </div>
+ )
+}
+
export const SectionHeading = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => {
if (paragraph.hidden) return null
let className = currentParagraph ? 'section_heading current' : 'section_heading'