WavePattern.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <div class="overflow-hidden full-height" v-bind="$attrs">
  3. <div class="element-with-wave"></div>
  4. </div>
  5. </template>
  6. <style lang="scss" scoped>
  7. @use "sass:map";
  8. @use "src/css/quasar.variables.scss";
  9. .element-with-wave {
  10. position: relative;
  11. background: rgba(map.get($colors-dark, "primary"), 1) !important;
  12. margin-top: 60dvh;
  13. width: 100%;
  14. height: 100dvh;
  15. transform: translateZ(0);
  16. }
  17. .element-with-wave::before {
  18. content: "";
  19. position: absolute;
  20. top: -240px;
  21. left: 0;
  22. width: 100%;
  23. height: 240px;
  24. background-color: rgba(map.get($colors-dark, "primary"), 1) !important;
  25. will-change: clip-path;
  26. animation: organic-swell 20s ease-in-out infinite alternate;
  27. clip-path: polygon(
  28. 0% 100%,
  29. 0% 50%,
  30. 5% 45%,
  31. 10% 55%,
  32. 18% 40%,
  33. 25% 60%,
  34. 33% 45%,
  35. 42% 60%,
  36. 50% 40%,
  37. 58% 60%,
  38. 67% 45%,
  39. 75% 60%,
  40. 82% 40%,
  41. 91% 60%,
  42. 100% 50%,
  43. 100% 100%
  44. );
  45. }
  46. @keyframes organic-swell {
  47. 0% {
  48. clip-path: polygon(
  49. 0% 100%,
  50. 0% 50%,
  51. 5% 45%,
  52. 10% 55%,
  53. 18% 40%,
  54. 25% 60%,
  55. 33% 45%,
  56. 42% 60%,
  57. 50% 40%,
  58. 58% 60%,
  59. 67% 45%,
  60. 75% 60%,
  61. 82% 40%,
  62. 91% 60%,
  63. 100% 50%,
  64. 100% 100%
  65. );
  66. }
  67. 12.5% {
  68. clip-path: polygon(
  69. 0% 100%,
  70. 0% 10%,
  71. 5% 20%,
  72. 10% 15%,
  73. 18% 30%,
  74. 25% 40%,
  75. 33% 35%,
  76. 42% 50%,
  77. 50% 55%,
  78. 58% 65%,
  79. 67% 60%,
  80. 75% 70%,
  81. 82% 65%,
  82. 91% 75%,
  83. 100% 60%,
  84. 100% 100%
  85. );
  86. }
  87. 25% {
  88. clip-path: polygon(
  89. 0% 100%,
  90. 0% 40%,
  91. 5% 30%,
  92. 10% 50%,
  93. 18% 20%,
  94. 25% 30%,
  95. 33% 15%,
  96. 42% 40%,
  97. 50% 50%,
  98. 58% 60%,
  99. 67% 55%,
  100. 75% 65%,
  101. 82% 60%,
  102. 91% 70%,
  103. 100% 55%,
  104. 100% 100%
  105. );
  106. }
  107. 37.5% {
  108. clip-path: polygon(
  109. 0% 100%,
  110. 0% 30%,
  111. 5% 25%,
  112. 10% 35%,
  113. 18% 20%,
  114. 25% 25%,
  115. 33% 20%,
  116. 42% 30%,
  117. 50% 20%,
  118. 58% 35%,
  119. 67% 25%,
  120. 75% 30%,
  121. 82% 20%,
  122. 91% 35%,
  123. 100% 30%,
  124. 100% 100%
  125. );
  126. }
  127. 50% {
  128. clip-path: polygon(
  129. 0% 100%,
  130. 0% 60%,
  131. 5% 70%,
  132. 10% 60%,
  133. 18% 50%,
  134. 25% 40%,
  135. 33% 30%,
  136. 42% 10%,
  137. 50% 20%,
  138. 58% 30%,
  139. 67% 40%,
  140. 75% 50%,
  141. 82% 60%,
  142. 91% 70%,
  143. 100% 60%,
  144. 100% 100%
  145. );
  146. }
  147. 62.5% {
  148. clip-path: polygon(
  149. 0% 100%,
  150. 0% 80%,
  151. 5% 75%,
  152. 10% 85%,
  153. 18% 70%,
  154. 25% 80%,
  155. 33% 65%,
  156. 42% 75%,
  157. 50% 60%,
  158. 58% 50%,
  159. 67% 35%,
  160. 75% 25%,
  161. 82% 40%,
  162. 91% 20%,
  163. 100% 30%,
  164. 100% 100%
  165. );
  166. }
  167. 75% {
  168. clip-path: polygon(
  169. 0% 100%,
  170. 0% 70%,
  171. 5% 85%,
  172. 10% 75%,
  173. 18% 90%,
  174. 25% 80%,
  175. 33% 85%,
  176. 42% 70%,
  177. 50% 80%,
  178. 58% 75%,
  179. 67% 85%,
  180. 75% 80%,
  181. 82% 90%,
  182. 91% 75%,
  183. 100% 80%,
  184. 100% 100%
  185. );
  186. }
  187. 87.5% {
  188. clip-path: polygon(
  189. 0% 100%,
  190. 0% 55%,
  191. 5% 50%,
  192. 10% 55%,
  193. 18% 50%,
  194. 25% 55%,
  195. 33% 50%,
  196. 42% 55%,
  197. 50% 50%,
  198. 58% 55%,
  199. 67% 50%,
  200. 75% 55%,
  201. 82% 50%,
  202. 91% 55%,
  203. 100% 50%,
  204. 100% 100%
  205. );
  206. }
  207. 100% {
  208. clip-path: polygon(
  209. 0% 100%,
  210. 0% 45%,
  211. 5% 40%,
  212. 10% 50%,
  213. 18% 35%,
  214. 25% 55%,
  215. 33% 40%,
  216. 42% 55%,
  217. 50% 35%,
  218. 58% 55%,
  219. 67% 40%,
  220. 75% 55%,
  221. 82% 35%,
  222. 91% 55%,
  223. 100% 45%,
  224. 100% 100%
  225. );
  226. }
  227. }
  228. </style>