summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.gallery.js
blob: 7ba63f43cf369174249788fb4ffbcb0000a70e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import React from 'react'

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
  const item = media.lookup[element.settings.media_id]
  const style = {
    backgroundColor: color.backgroundColor,
    color: color.textColor,
    transitionDuration,
  }
  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>
  )
}

export const FullscreenCarousel = ({ element, media, transitionDuration }) => {
  const item = media.lookup[element.settings.media_id]
  const color = element.color || CURTAIN_COLOR_LOOKUP.white
  const style = {
    backgroundColor: color.backgroundColor,
    color: color.textColor,
    transitionDuration,
  }
  return (
    <div
      className={'fullscreen-element carousel ' + color.label}
      style={style}
    >
      {element.settings.title && <div className='heading'>{element.settings.title}</div>}
      <Carousel element={element} media={item} withCitation />
    </div>
  )
}