From 3b0adaf902920a06efc141df58abd0368bd724b6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 21 Oct 2020 17:41:10 +0200 Subject: fullscreen text --- .../player/components.fullscreen/fullscreen.text.js | 21 +++++++++++++++++++++ .../viewer/player/components.fullscreen/index.js | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.text.js (limited to 'animism-align/frontend/app/views/viewer/player/components.fullscreen') diff --git a/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.text.js b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.text.js new file mode 100644 index 0000000..d9f7117 --- /dev/null +++ b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.text.js @@ -0,0 +1,21 @@ +import React from 'react' + +export const FullscreenTextPlate = ({ element, transitionDuration }) => { + console.log(element) + const { color } = element + const style = { + backgroundColor: color.backgroundColor.replace('1.0', '0.8'), + color: color.textColor, + transitionDuration, + } + return ( +
+ + {element.annotation.text} + +
+ ) +} diff --git a/animism-align/frontend/app/views/viewer/player/components.fullscreen/index.js b/animism-align/frontend/app/views/viewer/player/components.fullscreen/index.js index 4f0b38b..0ac69c5 100644 --- a/animism-align/frontend/app/views/viewer/player/components.fullscreen/index.js +++ b/animism-align/frontend/app/views/viewer/player/components.fullscreen/index.js @@ -16,6 +16,10 @@ import { FullscreenCurtain } from './fullscreen.utility' +import { + FullscreenTextPlate +} from './fullscreen.text' + export const fullscreenComponents = { curtain: React.memo(FullscreenCurtain), video: React.memo(FullscreenVideo), @@ -23,4 +27,5 @@ export const fullscreenComponents = { gallery: React.memo(FullscreenGallery), carousel: React.memo(FullscreenCarousel), vitrine: React.memo(FullscreenVitrine), + text_plate: React.memo(FullscreenTextPlate), } -- cgit v1.2.3-70-g09d2