_layout.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. @function section-divider($color) {
  2. @return url-svg(
  3. '<svg viewBox="0 0 1920 60"><path fill="#{$color}" d="M1920,60H0V0S387,59,960,59,1920,0,1920,0Z"/></svg>'
  4. );
  5. }
  6. .section {
  7. --section-bg: transparent;
  8. --section-bg-rgb: 255, 255, 255;
  9. background: var(--section-bg);
  10. position: relative;
  11. padding: $gap-6 0;
  12. @include media-breakpoint-up(lg) {
  13. padding: $gap-7 0;
  14. }
  15. }
  16. .section-sm {
  17. padding: $gap-6 0;
  18. }
  19. .section-white {
  20. --section-bg: #{$color-white};
  21. --section-bg-rgb: #{to-rgb($color-white)};
  22. }
  23. .section-light {
  24. --section-bg: #{$color-gray};
  25. --section-bg-rgb: #{to-rgb($color-gray)};
  26. }
  27. .section-primary {
  28. --section-bg: #{$color-primary};
  29. --section-bg-rgb: #{to-rgb($color-primary)};
  30. }
  31. .section-primary-light {
  32. --section-bg: #{mix($color-primary, #fff, 8%)};
  33. --section-bg-rgb: #{to-rgb(mix($color-primary, #fff, 8%))};
  34. }
  35. .section-dark {
  36. --section-bg-rgb: #{to-rgb($color-dark)};
  37. color: $color-white;
  38. background: $color-dark;
  39. --color-headings: #{$color-white};
  40. --color-muted: #{mix($color-dark, $color-white, 40%)};
  41. }
  42. @keyframes move-forever1 {
  43. 0% {
  44. transform: translate(85px, 0%);
  45. }
  46. 100% {
  47. transform: translate(-90px, 0%);
  48. }
  49. }
  50. @keyframes move-forever2 {
  51. 0% {
  52. transform: translate(-90px, 0%);
  53. }
  54. 100% {
  55. transform: translate(85px, 0%);
  56. }
  57. }
  58. @keyframes move-forever3 {
  59. 0% {
  60. transform: translate(-90px, 0%);
  61. }
  62. 100% {
  63. transform: translate(85px, 0%);
  64. }
  65. }
  66. //
  67. // Section divider
  68. //
  69. .section-divider {
  70. position: absolute;
  71. bottom: 100%;
  72. pointer-events: none;
  73. height: 5rem;
  74. width: 100%;
  75. path {
  76. fill: var(--section-bg);
  77. }
  78. .wave-1 {
  79. animation: move-forever1 30s linear infinite;
  80. animation-delay: -2s;
  81. }
  82. .wave-2 {
  83. animation: move-forever2 24s linear infinite;
  84. opacity: .5;
  85. animation-delay: -2s;
  86. }
  87. .wave-3 {
  88. animation: move-forever3 18s linear infinite;
  89. opacity: .3;
  90. animation-delay: -2s;
  91. }
  92. }
  93. .section-divider-auto {
  94. height: auto;
  95. }
  96. //
  97. // Section header
  98. //
  99. .section-header,
  100. .page-header {
  101. text-align: center;
  102. max-width: 45rem;
  103. margin: 0 auto $gap-6;
  104. }
  105. .page-header {
  106. margin-bottom: $gap-7;
  107. }
  108. .page-title {
  109. font-size: $font-size-h1;
  110. line-height: $line-height-h1;
  111. margin-bottom: $gap-3;
  112. font-weight: $font-weight-bold;
  113. + .page-description {
  114. margin-top: -$gap-2;
  115. }
  116. }
  117. .section-title {
  118. font-size: $font-size-h2;
  119. font-weight: $font-weight-bold;
  120. line-height: $line-height-h2;
  121. &-lg {
  122. font-size: $font-size-h1;
  123. line-height: $line-height-h1;
  124. font-weight: $font-weight-black;
  125. }
  126. }
  127. .section-description,
  128. .page-description {
  129. color: $color-muted;
  130. margin: 1rem auto 0;
  131. font-weight: normal;
  132. .section-header & {
  133. max-width: 40rem;
  134. }
  135. }
  136. //
  137. // Footer
  138. //
  139. .footer {
  140. margin-top: auto;
  141. color: $color-muted;
  142. background: $color-white;
  143. }
  144. //
  145. // Content
  146. //
  147. .content {
  148. display: flex;
  149. flex-direction: column;
  150. min-height: 100vh;
  151. }
  152. //
  153. // Header
  154. //
  155. .header {
  156. height: $header-height;
  157. position: sticky;
  158. top: 0;
  159. left: 0;
  160. right: 0;
  161. padding: 0;
  162. display: flex;
  163. align-items: center;
  164. transition: .6s background-color, .6s height, .6s border-color, .6s box-shadow;
  165. z-index: $zindex-header + 30;
  166. }
  167. .header-docs {
  168. background-color: $color-white;
  169. box-shadow: 0 0 0 1px $color-border;
  170. }
  171. .header-sticky {
  172. box-shadow: 0 0 0 1px $color-border, 0 0.375rem 1.25rem -0.25rem rgba($color-text, 0.06);
  173. &:not(.header-docs) {
  174. background-color: rgba($color-white, .9);
  175. backdrop-filter: blur(3px);
  176. }
  177. }
  178. //
  179. // Main
  180. //
  181. .main {
  182. }
  183. //
  184. // Side
  185. //
  186. .side {
  187. position: fixed;
  188. left: 0;
  189. top: 0;
  190. bottom: 0;
  191. width: $aside-width;
  192. background: $color-white;
  193. border-right: 1px solid $color-border;
  194. ~ .main {
  195. margin-left: $aside-width;
  196. }
  197. }
  198. //
  199. // Hero
  200. //
  201. .hero {
  202. text-align: center;
  203. padding: $gap-5 0;
  204. @include media-breakpoint-up(md) {
  205. padding: $gap-7 0;
  206. }
  207. }
  208. .hero-subheader {
  209. text-transform: uppercase;
  210. color: $color-muted;
  211. font-weight: $font-weight-medium;
  212. font-size: $font-size-h7;
  213. margin-bottom: $gap-3;
  214. letter-spacing: $tracking-wide;
  215. }
  216. .hero-title {
  217. font-size: $font-size-h2;
  218. line-height: $line-height-h2;
  219. font-weight: $font-weight-black;
  220. letter-spacing: $tracking-tight;
  221. @include media-breakpoint-up(sm) {
  222. font-size: $font-size-h1;
  223. line-height: $line-height-h1;
  224. }
  225. @include media-breakpoint-up(lg) {
  226. font-size: $font-size-h0;
  227. line-height: $line-height-h0;
  228. }
  229. }
  230. .hero-description {
  231. color: $color-muted;
  232. font-size: $font-size-h5;
  233. line-height: 1.5;
  234. margin: 0 auto;
  235. max-width: 47rem;
  236. @include media-breakpoint-up(sm) {
  237. font-size: $font-size-h4;
  238. }
  239. @include media-breakpoint-up(lg) {
  240. font-size: $font-size-h3;
  241. }
  242. }
  243. .hero-img {
  244. margin: $gap-7 auto;
  245. max-width: 67.5rem;
  246. border-radius: $border-radius-lg;
  247. position: relative;
  248. z-index: 1;
  249. box-shadow: 0 10px 15px -3px rgba($color-text, 0.1),
  250. 0 4px 6px -2px rgba($color-text, 0.05);
  251. img,
  252. svg {
  253. max-width: 100%;
  254. height: auto;
  255. display: block;
  256. position: relative;
  257. }
  258. }
  259. .hero-img-side {
  260. img,
  261. svg {
  262. max-width: 100%;
  263. height: auto;
  264. display: block;
  265. }
  266. }
  267. .sticky-top {
  268. position: sticky;
  269. top: $header-height + 1rem;
  270. }
  271. $img-overlap-space: 8rem;
  272. .img-overlap-margin {
  273. margin-bottom: -($img-overlap-space);
  274. }
  275. .img-overlap-padding {
  276. padding-top: $img-overlap-space;
  277. }
  278. .img-gradient {
  279. background-color: #f6f7fb;
  280. mask: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><linearGradient id="a" x1="0" x2="0" y1="0" y2="1"><stop stop-color="black" offset="0%" /><stop stop-color="rgba(0, 0, 0, 1)" offset="50%" /><stop stop-color="rgba(0, 0, 0, .6)" offset="80%" /><stop stop-color="transparent" offset="100%" /></linearGradient></defs><rect x="0" y="0" width="100" height="100" fill="url(%23a)" /></svg>') no-repeat;
  281. mask-size: 100% 100%;
  282. }