_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: .3s background-color, .3s height, .6s box-shadow, .3s background;
  165. z-index: $zindex-header + 30;
  166. }
  167. .header-static,
  168. .header-bordered {
  169. box-shadow: 0 0 0 1px $color-border;
  170. }
  171. .header-docs {
  172. background-color: $color-white;
  173. box-shadow: 0 0 0 1px $color-border;
  174. }
  175. .header-sticky {
  176. box-shadow: 0 0 0 1px $color-border, 0 0.375rem 1.25rem -0.25rem rgba($color-text, 0.06);
  177. &:not(.header-docs) {
  178. background-color: rgba($color-white, .9);
  179. backdrop-filter: blur(3px);
  180. }
  181. }
  182. //
  183. // Side
  184. //
  185. .side {
  186. position: fixed;
  187. left: 0;
  188. top: 0;
  189. bottom: 0;
  190. width: $aside-width;
  191. background: $color-white;
  192. border-right: 1px solid $color-border;
  193. ~ .main {
  194. margin-left: $aside-width;
  195. }
  196. }
  197. //
  198. // Hero
  199. //
  200. .hero {
  201. text-align: center;
  202. padding: $gap-5 0;
  203. @include media-breakpoint-up(md) {
  204. padding: $gap-7 0;
  205. }
  206. }
  207. .hero-subheader {
  208. text-transform: uppercase;
  209. color: $color-muted;
  210. font-weight: $font-weight-medium;
  211. font-size: $font-size-h7;
  212. margin-bottom: $gap-3;
  213. letter-spacing: $tracking-wide;
  214. }
  215. .hero-title {
  216. font-size: $font-size-h2;
  217. line-height: $line-height-h2;
  218. font-weight: $font-weight-black;
  219. letter-spacing: $tracking-tight;
  220. @include media-breakpoint-up(sm) {
  221. font-size: $font-size-h1;
  222. line-height: $line-height-h1;
  223. }
  224. @include media-breakpoint-up(lg) {
  225. font-size: $font-size-h0;
  226. line-height: $line-height-h0;
  227. }
  228. }
  229. .hero-description {
  230. color: $color-muted;
  231. font-size: $font-size-h5;
  232. line-height: 1.5;
  233. margin: 0 auto;
  234. max-width: 47rem;
  235. @include media-breakpoint-up(sm) {
  236. font-size: $font-size-h4;
  237. }
  238. @include media-breakpoint-up(lg) {
  239. font-size: $font-size-h3;
  240. }
  241. }
  242. .hero-img {
  243. margin: $gap-7 auto;
  244. max-width: 65rem;
  245. border-radius: $border-radius-lg;
  246. position: relative;
  247. z-index: 1;
  248. box-shadow: 0 10px 15px -3px rgba($color-text, 0.1),
  249. 0 4px 6px -2px rgba($color-text, 0.05);
  250. img,
  251. svg {
  252. max-width: 100%;
  253. height: auto;
  254. display: block;
  255. position: relative;
  256. }
  257. }
  258. .hero-img-side {
  259. img,
  260. svg {
  261. max-width: 100%;
  262. height: auto;
  263. display: block;
  264. }
  265. }
  266. .sticky-top {
  267. position: sticky;
  268. top: $header-height + 1rem;
  269. }
  270. $img-overlap-space: 8rem;
  271. .img-overlap-margin {
  272. margin-bottom: -($img-overlap-space);
  273. }
  274. .img-overlap-padding {
  275. padding-top: $img-overlap-space;
  276. }
  277. .img-gradient {
  278. background-color: #f6f7fb;
  279. 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;
  280. mask-size: 100% 100%;
  281. }