From 6a4d95f988e7782080de3056fe60522404ea4a12 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 11 Aug 2020 19:38:53 +0200 Subject: adding vitrine --- animism-align/frontend/app/common/app.css | 6 +- animism-align/frontend/app/constants.js | 3 +- .../frontend/app/utils/annotation.utils.js | 2 +- .../components/annotations/annotation.form.js | 3 +- .../annotationForms/annotationForm.gallery.js | 69 ++++++++++++++++++++++ .../annotationForms/annotationForm.image.js | 13 ++++ .../annotationForms/annotationForm.utility.js | 27 ++++++--- .../annotationForms/annotationForm.video.js | 10 ++++ .../annotations/annotationForms/index.js | 7 +++ .../annotationTypes/annotationTypes.gallery.js | 50 ++++++++++++++++ .../annotations/annotationTypes/index.js | 7 +++ .../views/paragraph/components/paragraph.list.js | 4 +- .../frontend/app/views/viewer/nav/nav.css | 9 +++ .../frontend/app/views/viewer/nav/viewer.icons.js | 10 ++++ .../frontend/app/views/viewer/nav/viewer.router.js | 7 +-- .../components.fullscreen/fullscreen.gallery.js | 41 +++++++++++++ .../viewer/player/components.fullscreen/index.js | 6 ++ .../player/components.inline/inline.image.js | 27 +-------- .../player/components.inline/inline.video.js | 7 +-- .../viewer/player/components.utility/index.js | 14 +++++ .../player/components.utility/media.citation.js | 29 +++++++++ .../player/components.utility/media.vitrine.js | 30 ++++++++++ .../app/views/viewer/player/player.fullscreen.css | 65 ++++++++++++++++++++ .../transcript/components/elementTypes.gallery.js | 22 +++++++ .../views/viewer/transcript/components/index.js | 7 +++ 25 files changed, 423 insertions(+), 52 deletions(-) create mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js create mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.gallery.js create mode 100644 animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js create mode 100644 animism-align/frontend/app/views/viewer/player/components.utility/index.js create mode 100644 animism-align/frontend/app/views/viewer/player/components.utility/media.citation.js create mode 100644 animism-align/frontend/app/views/viewer/player/components.utility/media.vitrine.js create mode 100644 animism-align/frontend/app/views/viewer/transcript/components/elementTypes.gallery.js (limited to 'animism-align/frontend/app') diff --git a/animism-align/frontend/app/common/app.css b/animism-align/frontend/app/common/app.css index e9efdc3..cca40fd 100644 --- a/animism-align/frontend/app/common/app.css +++ b/animism-align/frontend/app/common/app.css @@ -80,7 +80,7 @@ li { /* headings */ h1 { - color: #eee; + /*color: #eee;*/ margin-bottom: 1.25rem; font-size: 1.5rem; font-weight: normal; @@ -90,12 +90,12 @@ div:first-child > h1:first-child, margin-top: 0; } h2 { - color: #eee; + /*color: #eee;*/ font-size: 1.25rem; font-weight: normal; } h3 { - color: #eee; + /*color: #eee;*/ margin-top: 0; margin-bottom: 1.25rem; font-size: 1.0rem; diff --git a/animism-align/frontend/app/constants.js b/animism-align/frontend/app/constants.js index 1acdf5b..69f2b44 100644 --- a/animism-align/frontend/app/constants.js +++ b/animism-align/frontend/app/constants.js @@ -43,7 +43,7 @@ export const TEXT_ANNOTATION_TYPES = new Set([ ]) export const MEDIA_ANNOTATION_TYPES = new Set([ - 'image', 'carousel', 'grid', + 'image', 'carousel', 'grid', 'gallery', 'video', 'vitrine', ]) @@ -66,6 +66,7 @@ export const FULLSCREEN_UTILITY_ANNOTATION_TYPES = new Set([ export const CURTAIN_COLORS = [ { label: 'white', backgroundColor: '#ffffff', textColor: '#000000' }, + { label: 'light gray', backgroundColor: '#eeeeee', textColor: '#000000' }, { label: 'dark blue', backgroundColor: '#1a1f33', textColor: '#ffffff' }, { label: 'dark gray', backgroundColor: '#222222', textColor: '#ffffff' }, { label: 'black', backgroundColor: '#000000', textColor: '#ffffff' }, diff --git a/animism-align/frontend/app/utils/annotation.utils.js b/animism-align/frontend/app/utils/annotation.utils.js index 6dab36d..1af08a2 100644 --- a/animism-align/frontend/app/utils/annotation.utils.js +++ b/animism-align/frontend/app/utils/annotation.utils.js @@ -17,7 +17,7 @@ export const annotationFadeTimings = annotation => { } export const thumbnailURL = media => { - console.log(media) + // console.log(media) switch (media.type) { case 'video': return media.settings.video.thumbnail_url case 'image': return media.settings.thumbnail.url diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js index 80a960f..caf64be 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js @@ -15,7 +15,8 @@ import { annotationFormLookup } from './annotationForms' const ANNOTATION_TYPES = [ 'sentence', 'section_heading', 'heading_text', 'paragraph_end', 'video', - 'image', 'image_carousel', + 'image', + 'gallery', 'grid', 'vitrine', 'curtain', 'intro', ].map(name => ({ name, label: capitalize(name.replace('_', ' ')) })) diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js new file mode 100644 index 0000000..e85c6f3 --- /dev/null +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js @@ -0,0 +1,69 @@ +import React, { Component } from 'react' + +import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' +import { TextInput, Select, Checkbox } from 'app/common' +import { AnnotationFormFullscreen } from './annotationForm.utility' + +export const AnnotationFormGallery = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { + if (!media.lookup) return
+ const { lookup, order } = media + const image_list_items = order.filter(id => lookup[id].type === 'gallery').map(id => { + const image = lookup[id] + return { + name: image.id, + label: image.author + ' - ' + image.title + } + }) + return ( +
+ + + {(annotation.settings.fullscreen && !annotation.settings.inline) && ( + + )} +
+ ) +} diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js index 9ca5295..285dbcc 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' +import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' import { Select, Checkbox } from 'app/common' import { AnnotationFormFullscreen } from './annotationForm.utility' @@ -23,18 +24,30 @@ export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, h defaultOption='Choose an image' onChange={handleSettingsSelect} /> + + + + + + - +