intro.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. @import "../variables";
  2. @import "variables";
  3. @import "terminal";
  4. @import "storefront";
  5. @import "admin-ui";
  6. @import "cube";
  7. @import "data-flow";
  8. .vendure-intro {
  9. --color-top: #17c1ff;
  10. --color-left: #30c6fd;
  11. --color-right: #13b7f3;
  12. --color-shadow: rgba(94, 94, 94, 0);
  13. --width-unit: 9vw;
  14. --border-width: calc(.0 * var(--width-unit));
  15. --border-style: dashed;
  16. --front-border-width: 0;
  17. --border-color: rgb(95, 95, 95);
  18. background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 56%, #d7d8d1 100%);
  19. margin: 0;
  20. overflow: hidden;
  21. box-sizing: border-box;
  22. height: 100vh;
  23. padding-top: 10vh;
  24. transition: padding-top 0.2s;
  25. @media all and (max-width: $sm-breakpoint) {
  26. padding-top: 10vh;
  27. }
  28. @media all and (min-height: 1000px) {
  29. padding-top: 5vh;
  30. }
  31. @media all and (min-width: $lg-breakpoint) {
  32. // --width-unit: 10vh;
  33. }
  34. }
  35. .intro-container {
  36. max-width: $container-max-width;
  37. margin: auto;
  38. position: relative;
  39. transition: opacity 1s;
  40. opacity: 0;
  41. &.visible {
  42. opacity: 1;
  43. }
  44. }
  45. .scene {
  46. perspective: calc(10 * var(--width-unit));
  47. transform-style: preserve-3d;
  48. display: flex;
  49. align-items: center;
  50. justify-content: center;
  51. height: 40vw;
  52. transform: rotateX(-45deg);
  53. transition: transform $transition-duration, perspective $transition-duration;
  54. font-family: sans-serif;
  55. @media all and (min-height: 1000px) {
  56. height: 50vw;
  57. }
  58. }
  59. .intro-title {
  60. top: 18vw;
  61. right: 36px;
  62. position: absolute;
  63. text-align: right;
  64. max-width: $lg-breakpoint;
  65. margin: auto;
  66. opacity: 0;
  67. transform: translateY(-20px);
  68. visibility: hidden;
  69. transition: visibility 0s, opacity 2s, transform 2.5s ease-out;
  70. &.visible {
  71. opacity: 1;
  72. transform: translateY(0);
  73. visibility: visible;
  74. }
  75. a:link, a:visited {
  76. color: $color-link;
  77. text-decoration: none;
  78. }
  79. a:hover {
  80. color: $color-link;
  81. }
  82. h1 {
  83. color: $brand-color;
  84. font-size: calc(0.9 * var(--width-unit));
  85. margin: 0 0 15px;
  86. font-family: $brand-font-face;
  87. }
  88. .subhead {
  89. max-width: calc(4 * var(--width-unit));
  90. font-size: calc(0.3 * var(--width-unit));
  91. color: desaturate($brand-color, 50%);
  92. margin: auto;
  93. }
  94. .more-icon {
  95. width: calc(1 * var(--width-unit));
  96. transform: rotateZ(180deg);
  97. opacity: 0.1;
  98. }
  99. @media all and (min-width: $lg-breakpoint) {
  100. h1 {
  101. font-size: 6em;
  102. }
  103. .subhead {
  104. font-size: 2em;
  105. }
  106. .more-icon {
  107. width: 7em;
  108. };
  109. }
  110. @media all and (min-height: 1000px) {
  111. top: 26vw;
  112. }
  113. @media all and (max-width: $sm-breakpoint) {
  114. top: 60vw;
  115. right: 0;
  116. text-align: center;
  117. padding: 0 24px;
  118. h1 {
  119. font-size: 4em;
  120. }
  121. .subhead {
  122. font-size: 1.5em;
  123. max-width: 100%;
  124. }
  125. }
  126. }
  127. .intro-controls {
  128. z-index: 1;
  129. text-align: center;
  130. .jump {
  131. button {
  132. border-radius: 50%;
  133. border: 1px;
  134. padding: 0;
  135. background-color: $gray-100;
  136. width: 16px;
  137. height: 16px;
  138. transition: background-color 0.8s;
  139. &.active {
  140. background-color: $gray-200;
  141. }
  142. }
  143. }
  144. button#replay {
  145. border: none;
  146. background: none;
  147. opacity: 0;
  148. transition: opacity 4s;
  149. &.visible {
  150. opacity: 0.3;
  151. }
  152. }
  153. }
  154. .intro-gql-logo {
  155. filter: saturate(0%);
  156. }
  157. /*
  158. * Makes the cubes aligned in a row
  159. */
  160. @mixin aligned {
  161. &.scene {
  162. transform: rotateX(0);
  163. }
  164. .cube {
  165. transform: rotateY(0);
  166. margin: calc(0.5 * var(--width-unit));
  167. }
  168. .cube__face {
  169. background-color: transparent;
  170. }
  171. .cube__face--front {
  172. background-color: $terminal-color;
  173. box-shadow: $shadow;
  174. }
  175. }
  176. @mixin focus-terminal {
  177. .cube1, .cube3 {
  178. max-width: 0px;
  179. .cube__face {
  180. background-color: transparent;
  181. box-shadow: 0px 6px 15px -2px transparent;
  182. }
  183. }
  184. .cube2 {
  185. .cube__face {
  186. background-color: transparent;
  187. box-shadow: 0px 6px 15px -2px transparent;
  188. }
  189. }
  190. .intro-terminal {
  191. font-size: calc(0.24 * var(--width-unit));
  192. width: calc(4 * var(--width-unit));
  193. height: calc(4 * var(--width-unit));
  194. top: calc(-1 * var(--width-unit));
  195. left: calc(-1 * var(--width-unit));
  196. box-shadow: $shadow;
  197. }
  198. .intro-text-area {
  199. padding: calc(0.4 * var(--width-unit)) calc(0.18 * var(--width-unit));
  200. }
  201. .intro-terminal-controls {
  202. position: relative;
  203. margin-left: calc(0.21 * var(--width-unit));
  204. margin-top: calc(0.07 * var(--width-unit));
  205. width: calc(0.1 * var(--width-unit));
  206. height: calc(0.1 * var(--width-unit));
  207. &:before {
  208. left: calc(-0.15 * var(--width-unit));
  209. width: calc(0.1 * var(--width-unit));
  210. height: calc(0.1 * var(--width-unit));
  211. }
  212. &:after {
  213. left: calc(0.15 * var(--width-unit));
  214. width: calc(0.1 * var(--width-unit));
  215. height: calc(0.1 * var(--width-unit));
  216. }
  217. }
  218. }
  219. @mixin dataFlowing {
  220. .data-flow-left {
  221. width: calc(1 * var(--width-unit));
  222. left: calc(-1 * var(--width-unit));
  223. transition: width 0.5s 0.3s, left 0.5s 0.3s;
  224. }
  225. .data-flow-right {
  226. width: calc(1 * var(--width-unit));
  227. right: calc(-1 * var(--width-unit));
  228. transition: width 0.5s 0.6s, right 0.5s 0.6s;
  229. }
  230. .cube1 {
  231. .cube__face--front {
  232. background-color: $brand-color;
  233. transition: background-color 0.3s 0.8s;
  234. }
  235. }
  236. .cube3 {
  237. .cube__face--front {
  238. background-color: $brand-color;
  239. transition: background-color 0.3s 1.1s;
  240. }
  241. }
  242. .intro-gql-logo {
  243. opacity: 1;
  244. transition: opacity 4.6s;
  245. img {
  246. transform: translateY(0);
  247. }
  248. }
  249. }
  250. .scene-0 {
  251. @include aligned;
  252. @include focus-terminal;
  253. .intro-admin-ui, .intro-storefront {
  254. opacity: 0;
  255. }
  256. }
  257. .scene-1 {
  258. @include aligned;
  259. @include focus-terminal;
  260. .intro-admin-ui, .intro-storefront {
  261. opacity: 0;
  262. }
  263. }
  264. .scene-2 {
  265. @include aligned;
  266. .intro-admin-ui, .intro-storefront {
  267. opacity: 0;
  268. }
  269. .cube__face--front {
  270. background-color: $terminal-color;
  271. }
  272. .cube1 {
  273. .cube__face {
  274. transition: background-color 0.8s 0s, box-shadow 0.5s 0s;
  275. }
  276. }
  277. .cube2 {
  278. .cube__face {
  279. transition: background-color 0.8s 1s, box-shadow 0.5s 0.4s;
  280. }
  281. }
  282. .cube3 {
  283. .cube__face {
  284. transition: background-color 0.8s 0.3s, box-shadow 0.5s 0.3s;
  285. }
  286. }
  287. }
  288. .scene-3 {
  289. @include aligned;
  290. @include dataFlowing;
  291. .intro-admin-ui, .intro-storefront {
  292. opacity: 0;
  293. }
  294. }
  295. .scene-4 {
  296. @include aligned;
  297. @include dataFlowing;
  298. .intro-admin-ui {
  299. opacity: 1;
  300. transition: opacity 0.8s 0.3s;
  301. }
  302. .intro-storefront {
  303. opacity: 1;
  304. transition: opacity 0.8s 0.5s;
  305. }
  306. }
  307. .scene-5 {
  308. .intro-admin-ui {
  309. opacity: 0;
  310. transition: opacity 0.2s;
  311. }
  312. .intro-storefront {
  313. opacity: 0;
  314. transition: opacity 0.2s;
  315. }
  316. .intro-gql-logo {
  317. opacity: 1;
  318. }
  319. .intro-terminal {
  320. opacity: 0;
  321. }
  322. .cube2, .cube3 {
  323. .cube__face--front {
  324. background-color: var(--color-right);
  325. }
  326. }
  327. $cube-easing: cubic-bezier(.11,.73,.84,.55);
  328. $cube-duration: 0.5s;
  329. .cube1 {
  330. .cube__face {
  331. transition: transform $cube-duration, background-color 0.1s 0.1s;
  332. }
  333. }
  334. .cube2 {
  335. .cube__face {
  336. transition: transform $cube-duration, background-color 0.3s 0.1s;
  337. }
  338. }
  339. .cube3 {
  340. .cube__face {
  341. transition: transform $cube-duration, background-color 0.1s 0.1s;
  342. }
  343. }
  344. .cube__face {
  345. --projection: 1.3;
  346. &.cube__face--front {
  347. animation: projectFront;
  348. animation-duration: $cube-duration;
  349. animation-fill-mode: both;
  350. animation-timing-function: $cube-easing;
  351. }
  352. &.cube__face--right {
  353. transform: rotateY( 90deg) translateZ(calc(1 * var(--width-unit)));
  354. }
  355. &.cube__face--back {
  356. transform: rotateY(180deg) translateZ(calc(1 * var(--width-unit)));
  357. }
  358. &.cube__face--left {
  359. animation: projectLeft;
  360. animation-duration: $cube-duration;
  361. animation-fill-mode: both;
  362. animation-timing-function: $cube-easing;
  363. }
  364. &.cube__face--top {
  365. animation: projectTop;
  366. animation-duration: $cube-duration;
  367. animation-fill-mode: both;
  368. animation-timing-function: $cube-easing;
  369. }
  370. &.cube__face--bottom {
  371. transform: rotateX(-90deg) translateZ(calc(1 * var(--width-unit)));
  372. }
  373. }
  374. }
  375. .scene-6 {
  376. @media all and (min-width: $sm-breakpoint) {
  377. transform: rotateX(-45deg) translateX(calc(-2 * var(--width-unit)));
  378. }
  379. .cube {
  380. transition: none;
  381. }
  382. .intro-admin-ui {
  383. opacity: 0;
  384. transition: opacity 0.2s;
  385. }
  386. .intro-storefront {
  387. opacity: 0;
  388. transition: opacity 0.2s;
  389. }
  390. .intro-gql-logo {
  391. opacity: 1;
  392. }
  393. .intro-terminal {
  394. opacity: 0;
  395. }
  396. .cube2, .cube3 {
  397. .cube__face--front {
  398. background-color: var(--color-right);
  399. }
  400. }
  401. .cube__face {
  402. transition: none;
  403. }
  404. $shimmerDuration: 8s;
  405. $shimmerTiming: ease-in-out;
  406. .cube1 {
  407. .cube__face--top { animation: shimmerTop $shimmerDuration $shimmerTiming $shimmerDuration * 0.02 infinite; }
  408. .cube__face--left { animation: shimmerLeft $shimmerDuration $shimmerTiming infinite; }
  409. }
  410. .cube2 {
  411. .cube__face--top { animation: shimmerTop $shimmerDuration $shimmerTiming $shimmerDuration * 0.05 infinite; }
  412. .cube__face--left { animation: shimmerLeft $shimmerDuration $shimmerTiming $shimmerDuration * 0.05 infinite; }
  413. .cube__face--front { animation: shimmerRight $shimmerDuration $shimmerTiming $shimmerDuration * 0.082 infinite; }
  414. }
  415. .cube3 {
  416. .cube__face--top { animation: shimmerTop $shimmerDuration $shimmerTiming $shimmerDuration * 0.1 infinite; }
  417. .cube__face--front { animation: shimmerRight $shimmerDuration $shimmerTiming $shimmerDuration * 0.12 infinite; }
  418. }
  419. }
  420. @keyframes projectFront {
  421. 0% {
  422. transform: rotateY(0deg) translateZ(calc(1 * var(--width-unit)));
  423. }
  424. 20% {
  425. transform: rotateY(0deg) translateZ(calc(var(--projection) * var(--width-unit)));
  426. }
  427. 100% {
  428. transform: rotateY(0deg) translateZ(calc(1 * var(--width-unit)));
  429. }
  430. }
  431. @keyframes projectLeft {
  432. 0% {
  433. transform: rotateY(-90deg) translateZ(calc(1 * var(--width-unit)));
  434. }
  435. 20% {
  436. transform: rotateY(-90deg) translateZ(calc(var(--projection) * var(--width-unit)));
  437. }
  438. 100% {
  439. transform: rotateY(-90deg) translateZ(calc(1 * var(--width-unit)));
  440. }
  441. }
  442. @keyframes projectTop {
  443. 0% {
  444. transform: rotateX( 90deg) translateZ(calc(1 * var(--width-unit)));
  445. }
  446. 20% {
  447. transform: rotateX( 90deg) translateZ(calc(var(--projection) * var(--width-unit)));
  448. }
  449. 100% {
  450. transform: rotateX( 90deg) translateZ(calc(1 * var(--width-unit)));
  451. }
  452. }
  453. @keyframes shimmerTop {
  454. 10% {
  455. background-color: #99e9ff;
  456. }
  457. 20% {
  458. background-color: var(--color-top);
  459. }
  460. }
  461. @keyframes shimmerLeft {
  462. 10% {
  463. background-color: #99e4ff;;
  464. }
  465. 20% {
  466. background-color: var(--color-left);
  467. }
  468. }
  469. @keyframes shimmerRight {
  470. 10% {
  471. background-color: #40ccff;;
  472. }
  473. 20% {
  474. background-color: var(--color-right);
  475. }
  476. }