WelcomeView.styles.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. import { css } from '@emotion/react'
  2. import styled from '@emotion/styled'
  3. import { Link } from 'react-router-dom'
  4. import { SvgJoystreamLogoFull } from '@/assets/logos'
  5. import { GridItem, LayoutGrid } from '@/components/LayoutGrid'
  6. import { Text } from '@/components/Text'
  7. import { Button } from '@/components/_buttons/Button'
  8. import { cVar, media, sizes } from '@/styles'
  9. const XXS_IMAGE_WIDTH = 360
  10. const XXS_IMAGE_HEIGHT = 225
  11. const XS_IMAGE_WIDTH = 480
  12. const XS_IMAGE_HEIGHT = 300
  13. const SM_IMAGE_WIDTH = 720
  14. const SM_IMAGE_HEIGHT = 450
  15. export const LEFT_ANIMATION_MD = 'left-animation-md'
  16. export const OverflowHiddenContainer = styled.div`
  17. margin: 0 calc(-1 * var(--size-global-horizontal-padding)) 0;
  18. overflow: hidden;
  19. [data-aos=${LEFT_ANIMATION_MD}] {
  20. opacity: 0;
  21. transform: translateX(0);
  22. transition-property: transform, opacity;
  23. &.aos-animate {
  24. opacity: 1;
  25. transform: translateX(117px);
  26. }
  27. }
  28. `
  29. export const StyledContainer = styled.div`
  30. max-width: 1440px;
  31. padding-bottom: ${sizes(12)};
  32. ${media.md} {
  33. margin: 0 auto;
  34. padding: 0;
  35. }
  36. `
  37. export const ContentLayoutGrid = styled(LayoutGrid)`
  38. align-items: center;
  39. grid-row-gap: 0;
  40. margin: 0 ${sizes(4)};
  41. ${media.md} {
  42. margin: 0 ${sizes(8)};
  43. }
  44. `
  45. export const HeaderGridItem = styled(GridItem)`
  46. ${media.md} {
  47. margin: 0;
  48. padding: ${sizes(8)};
  49. }
  50. ${media.lg} {
  51. padding: ${sizes(8)} ${sizes(20)};
  52. }
  53. `
  54. export const ContentWrapper = styled.div`
  55. margin-top: ${sizes(12)};
  56. display: flex;
  57. justify-content: center;
  58. flex-direction: column;
  59. align-self: center;
  60. ${media.md} {
  61. margin-top: unset;
  62. }
  63. `
  64. export const ButtonGroup = styled.div`
  65. display: flex;
  66. flex-direction: column;
  67. flex-grow: 1;
  68. gap: ${sizes(6)};
  69. `
  70. export const StyledButton = styled(Button)`
  71. margin-bottom: ${sizes(6)};
  72. :last-of-type {
  73. margin-bottom: 0;
  74. }
  75. `
  76. export const SpecificComponentPlaceholer = styled.div`
  77. margin: ${sizes(3)} 0;
  78. ${media.md} {
  79. margin: ${sizes(4)} 0;
  80. }
  81. `
  82. export const SubTitle = styled(Text)`
  83. display: block;
  84. margin-top: ${sizes(4)};
  85. `
  86. const linkStyles = css`
  87. text-decoration: none;
  88. color: ${cVar('colorTextMuted')};
  89. align-items: center;
  90. display: flex;
  91. :hover,
  92. :focus {
  93. color: ${cVar('colorText')};
  94. }
  95. :hover path,
  96. :focus path {
  97. fill: ${cVar('colorText')};
  98. }
  99. `
  100. export const LinksGroupHeaderItem = styled(GridItem)`
  101. align-self: end;
  102. justify-content: start;
  103. display: flex;
  104. flex-wrap: wrap;
  105. color: ${cVar('colorTextMuted')};
  106. grid-auto-flow: column;
  107. align-items: center;
  108. margin: ${sizes(10)} 0 ${sizes(12)};
  109. ${media.md} {
  110. margin: 0;
  111. padding: ${sizes(8)};
  112. }
  113. ${media.lg} {
  114. padding: ${sizes(8)} ${sizes(20)};
  115. }
  116. `
  117. export const StyledAnchor = styled.a`
  118. ${linkStyles}
  119. `
  120. export const StyledSvgJoystreamLogoFull = styled(SvgJoystreamLogoFull)`
  121. height: 16px;
  122. margin-left: ${sizes(2)};
  123. width: unset;
  124. path {
  125. fill: ${cVar('colorTextMuted')};
  126. }
  127. `
  128. export const StyledLink = styled(Link)`
  129. ${linkStyles}
  130. `
  131. export const ImageGridItem = styled(GridItem)`
  132. display: flex;
  133. flex-direction: column;
  134. justify-content: center;
  135. ${media.md} {
  136. flex-direction: column-reverse;
  137. height: calc(100vh - 80px);
  138. }
  139. `
  140. type IllustrationWrapperProps = {
  141. moveToTheLeft?: boolean
  142. topMargin?: number
  143. }
  144. export const IllustrationWrapper = styled.div<IllustrationWrapperProps>`
  145. position: relative;
  146. height: ${XXS_IMAGE_HEIGHT}px;
  147. margin-top: ${({ topMargin }) => (topMargin ? sizes(topMargin) : 'unset')};
  148. ${media.xs} {
  149. height: ${XS_IMAGE_HEIGHT}px;
  150. }
  151. ${media.sm} {
  152. height: ${SM_IMAGE_HEIGHT}px;
  153. }
  154. `
  155. type StyledIllustrationProps = {
  156. stickToTheRightEdge?: boolean
  157. }
  158. export const StyledIllustration = styled.img<StyledIllustrationProps>`
  159. position: absolute;
  160. right: ${({ stickToTheRightEdge }) => (stickToTheRightEdge ? '0' : 'unset')};
  161. width: ${XXS_IMAGE_WIDTH}px;
  162. height: ${XXS_IMAGE_HEIGHT}px;
  163. ${media.xs} {
  164. height: ${XS_IMAGE_HEIGHT}px;
  165. width: ${XS_IMAGE_WIDTH}px;
  166. }
  167. ${media.sm} {
  168. height: ${SM_IMAGE_HEIGHT}px;
  169. width: ${SM_IMAGE_WIDTH}px;
  170. }
  171. ${media.md} {
  172. position: static;
  173. }
  174. `