From 0a6a7fb9b49a2180a68f6c96815ebd9b7f6b5ab7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 8 Sep 2020 16:05:54 +0200 Subject: section 2 carousel --- .../components.fullscreen/fullscreen.gallery.js | 22 +++++++++++++++++++++- .../viewer/player/components.fullscreen/index.js | 7 +++++-- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/player/components.fullscreen') 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 index 0549f09..9cd2787 100644 --- 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 @@ -1,6 +1,7 @@ import React from 'react' -import { MediaCitation, Vitrine } from '../components.media' +import { CURTAIN_COLOR_LOOKUP } from 'app/constants' +import { MediaCitation, Vitrine, Gallery, Carousel, Grid } from '../components.media' export const FullscreenVitrine = ({ element, media, transitionDuration }) => { const { color } = element @@ -38,3 +39,22 @@ export const FullscreenGallery = ({ element, media, transitionDuration }) => { ) } + +export const FullscreenCarousel = ({ element, media, transitionDuration }) => { + const { color } = element + const item = media.lookup[element.settings.media_id] + const style = { + backgroundColor: color.backgroundColor, + color: color.textColor, + transitionDuration, + } + return ( +
+ {element.settings.title &&
{element.settings.title}
} + +
+ ) +} 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 538632f..25fbc83 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,7 +9,9 @@ import { } from './fullscreen.video' import { - FullscreenVitrine + FullscreenVitrine, + FullscreenGallery, + FullscreenCarousel } from './fullscreen.gallery' import { @@ -20,6 +22,7 @@ export const fullscreenComponents = { curtain: React.memo(FullscreenCurtain), video: React.memo(FullscreenVideo), image: React.memo(FullscreenImage), - // gallery: React.memo(FullscreenGallery), + gallery: React.memo(FullscreenGallery), + carousel: React.memo(FullscreenCarousel), vitrine: React.memo(FullscreenVitrine), } -- cgit v1.2.3-70-g09d2