summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.fullscreen
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-11 19:38:53 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-11 19:38:53 +0200
commit6a4d95f988e7782080de3056fe60522404ea4a12 (patch)
tree214a6c478ccf7e6f4f4419b2963c8e32c2d2c2a6 /animism-align/frontend/app/views/viewer/player/components.fullscreen
parent5f7315b1512ecb36be73ab91b52a178257337dd7 (diff)
adding vitrine
Diffstat (limited to 'animism-align/frontend/app/views/viewer/player/components.fullscreen')
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js41
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.fullscreen/index.js6
2 files changed, 47 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js
new file mode 100644
index 0000000..31a4176
--- /dev/null
+++ b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js
@@ -0,0 +1,41 @@
+import React from 'react'
+
+import { MediaCitation, Vitrine } from '../components.utility'
+
+export const FullscreenVitrine = ({ element, media, transitionDuration }) => {
+ const { color } = element
+ const item = media.lookup[element.settings.media_id]
+ const style = {
+ backgroundColor: color.backgroundColor,
+ color: color.textColor,
+ transitionDuration,
+ }
+ console.log(item)
+ return (
+ <div
+ className='fullscreen-element vitrine'
+ style={style}
+ >
+ {element.settings.title && <div className='heading'>{element.settings.title}</div>}
+ <Vitrine media={item} />
+ <MediaCitation media={item} />
+ </div>
+ )
+}
+
+export const FullscreenGallery = ({ element, media, transitionDuration }) => {
+ const { color } = element
+ const item = media.lookup[element.settings.media_id]
+ const style = {
+ backgroundColor: color.backgroundColor,
+ color: color.textColor,
+ transitionDuration,
+ }
+ return (
+ <div
+ className='fullscreen-element gallery'
+ style={style}
+ >
+ </div>
+ )
+}
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 f533123..538632f 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
@@ -9,6 +9,10 @@ import {
} from './fullscreen.video'
import {
+ FullscreenVitrine
+} from './fullscreen.gallery'
+
+import {
FullscreenCurtain
} from './fullscreen.utility'
@@ -16,4 +20,6 @@ export const fullscreenComponents = {
curtain: React.memo(FullscreenCurtain),
video: React.memo(FullscreenVideo),
image: React.memo(FullscreenImage),
+ // gallery: React.memo(FullscreenGallery),
+ vitrine: React.memo(FullscreenVitrine),
}