diff options
Diffstat (limited to 'animism-align/frontend/app/views/paragraph')
4 files changed, 15 insertions, 7 deletions
diff --git a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/index.js b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/index.js index 62b4a49..038820f 100644 --- a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/index.js +++ b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/index.js @@ -1,7 +1,7 @@ import React from 'react' import { - Paragraph, ParagraphHeader + Paragraph, ParagraphHeading } from './paragraphTypes.text' import { @@ -16,7 +16,8 @@ export const paragraphElementLookup = { paragraph: React.memo(Paragraph), hidden: React.memo(Paragraph), blockquote: React.memo(Paragraph), - header: React.memo(ParagraphHeader), + section_heading: React.memo(ParagraphHeading), + heading_text: React.memo(ParagraphHeading), video: React.memo(MediaVideo), image: React.memo(MediaImage), } diff --git a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.text.js b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.text.js index be5818a..8825479 100644 --- a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.text.js +++ b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.text.js @@ -23,7 +23,7 @@ export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAn ) } -export const ParagraphHeader = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick, onDoubleClick }) => { +export const ParagraphHeading = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick, onDoubleClick }) => { let className = currentParagraph ? 'header current' : 'header' const text = paragraph.annotations.map(annotation => annotation.text).join(' ') return ( diff --git a/animism-align/frontend/app/views/paragraph/paragraph.css b/animism-align/frontend/app/views/paragraph/paragraph.css index 8cd502c..1263ee8 100644 --- a/animism-align/frontend/app/views/paragraph/paragraph.css +++ b/animism-align/frontend/app/views/paragraph/paragraph.css @@ -23,7 +23,11 @@ /* paragraph subtypes */ -.paragraphs .header { +.paragraphs .section_heading { + font-size: 32px; +} + +.paragraphs .heading_text { font-size: 32px; } diff --git a/animism-align/frontend/app/views/paragraph/transcript.actions.js b/animism-align/frontend/app/views/paragraph/transcript.actions.js index 7539343..5905cc5 100644 --- a/animism-align/frontend/app/views/paragraph/transcript.actions.js +++ b/animism-align/frontend/app/views/paragraph/transcript.actions.js @@ -36,7 +36,7 @@ export const buildParagraphs = () => dispatch => { return } // if this annotation is from a different paragraph, make a new paragraph - if (annotation.type === 'header' || annotation.paragraph_id !== currentParagraph.id) { + if (annotation.type === 'section_heading' || annotation.type === 'heading_text' || annotation.paragraph_id !== currentParagraph.id) { const paragraph_type = getParagraphType(annotation, paragraph) currentParagraph = { id: annotation.paragraph_id || ('index_' + i), @@ -45,7 +45,7 @@ export const buildParagraphs = () => dispatch => { end_ts: 0, annotations: [], } - if (annotation.type === 'header') { + if (annotation.type === 'section_heading') { currentParagraph.sectionIndex = sectionCount++ currentParagraph.id = 'section_' + currentParagraph.sectionIndex } @@ -69,7 +69,10 @@ export const buildParagraphs = () => dispatch => { } const getParagraphType = (annotation, paragraph) => { - if (annotation.type === 'header') { + if (annotation.type === 'section_heading') { + return annotation.type + } + if (annotation.type === 'heading_text') { return annotation.type } if (!paragraph) { |
