summaryrefslogtreecommitdiff
path: root/deps/npm/docs/src/components/home/cubes.js
blob: 65a2b8bd953f2bab97f1f8e4ba68539addbbfcdd (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import styled, {css, keyframes} from 'styled-components'
import purpleCube from '../../images/purple-cube.svg'
import orangeCube from '../../images/orange-cube.svg'
import redCube from '../../images/red-cube.svg'
import purpleGradientCube from '../../images/purple-gradient-cube.svg'
import pinkGradientCube from '../../images/pink-gradient-cube.svg'

const commonCubeStyles = css`
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
`

const wiggle = keyframes`
  0% {
    transform: rotate(0deg);
  }
  33% {
    transform: rotate(8deg);
  }
  100% {
    transform: rotate(0deg);
  }
`

export const CubeTopLeft = styled.div`
  ${commonCubeStyles};
  background-image: url(${purpleCube});
  height: 35px;
  width: 35px;
  top: 10%;
  left: 8%;

  animation-name: ${wiggle};
  animation-duration: 2.5s;
  animation-delay: .5s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: ease-in-out;
`

export const CubeMiddleLeft = styled.span`
  ${commonCubeStyles};
  background-image: url(${orangeCube});
  height: 30px;
  width: 30px;
  top: 40%;
  left: 17%;

  animation-name: ${wiggle};
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: ease-in-out;
`

export const CubeBottomLeft = styled.span`
  ${commonCubeStyles};
  background-image: url(${redCube});
  height: 45px;
  width: 45px;
  top: 78%;
  left: 12%;

  animation-name: ${wiggle};
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: ease-in-out;
`

export const CubeBottomRight = styled.span`
  ${commonCubeStyles};
  background-image: url(${pinkGradientCube});
  height: 40px;
  width: 40px;
  top: 70%;
  right: 12%;

  animation-name: ${wiggle};
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  animation-delay: .3s;
  animation-fill-mode: both;
  animation-timing-function: ease-in-out;
`

export const CubeTopRight = styled.span`
  ${commonCubeStyles};
  background-image: url(${purpleGradientCube});
  height: 40px;
  width: 40px;
  top: 14%;
  right: 12%;

  animation-name: ${wiggle};
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-timing-function: ease-in-out;
`