_layout.scss 5.9 KB

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