๐Ÿ“ฆ payloadcms / custom-website-series

๐Ÿ“„ study.ts ยท 87 lines
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
87import { createUseStyles } from 'react-jss';
import { base } from '../base';
import colors from '../colors';
import queries from '../queries';
import { headerHeight, large } from '../sizes';
import { h2, label } from '../type';

const objectFit = {
  width: '100%',
  height: '100%',
  position: 'absolute',
  top: 0,
  left: 0,
  objectFit: 'cover',
  objectPosition: 'center',
};

export default createUseStyles({
  studies: {
    height: '100%',
    paddingTop: headerHeight,
  },
  header: {
    marginBottom: base(3),
  },
  label: {
    ...label,
    color: colors.gray,
    textDecoration: 'none',
  },
  title: {
    ...h2,
  },
  featuredMediaWrap: {
    paddingTop: base(20),
    position: 'relative',
    overflow: 'hidden',
    zIndex: 1,
  },
  featuredMediaGutter: {
    position: 'absolute',
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
  },
  featuredMedia: {
    '@global': {
      img: objectFit,
      video: objectFit,
    },
  },
  meta: {
    position: 'relative',
    zIndex: 2,
    listStyle: 'none',
    margin: 0,
    padding: `${base(4)} 0`,
    display: 'flex',
    '&:before': {
      content: '""',
      position: 'absolute',
      zIndex: -1,
      top: 0,
      width: '100vw',
      bottom: 0,
      left: 0,
      backgroundColor: colors.antique,
    },
    [queries.m]: {
      padding: `${base(3)} 0`,
    },
  },
  metaLabel: {
    opacity: 0.5,
    marginBottom: base(),
    [queries.m]: {
      marginBottom: 0,
    },
  },
  backgroundNoise: {
    width: '100vw',
    overflow: 'hidden',
    pointerEvents: 'none',
  },
});