From c68b193b4f9537b2a62a542915fd6393720d68c8 Mon Sep 17 00:00:00 2001
From: patak <583075+patak-dev@users.noreply.github.com>
Date: Wed, 28 Aug 2024 13:49:12 +0200
Subject: [PATCH] docs: viteconf 24 cta (#6414) (#6416)

---
 docs/.vitepress/components.d.ts              |  1 +
 docs/.vitepress/components/AsideViteConf.vue | 73 ++++++++++++++++++++
 docs/.vitepress/theme/index.ts               |  2 +
 docs/public/viteconf.svg                     | 24 +++++++
 4 files changed, 100 insertions(+)
 create mode 100644 docs/.vitepress/components/AsideViteConf.vue
 create mode 100644 docs/public/viteconf.svg

diff --git a/docs/.vitepress/components.d.ts b/docs/.vitepress/components.d.ts
index b509b57215f9..5863edbb5838 100644
--- a/docs/.vitepress/components.d.ts
+++ b/docs/.vitepress/components.d.ts
@@ -7,6 +7,7 @@ export {}
 /* prettier-ignore */
 declare module 'vue' {
   export interface GlobalComponents {
+    AsideViteConf: typeof import('./components/AsideViteConf.vue')['default']
     Contributors: typeof import('./components/Contributors.vue')['default']
     CourseLink: typeof import('./components/CourseLink.vue')['default']
     FeaturesList: typeof import('./components/FeaturesList.vue')['default']
diff --git a/docs/.vitepress/components/AsideViteConf.vue b/docs/.vitepress/components/AsideViteConf.vue
new file mode 100644
index 000000000000..a2c1f544679d
--- /dev/null
+++ b/docs/.vitepress/components/AsideViteConf.vue
@@ -0,0 +1,73 @@
+<template>
+  <a
+    class="viteconf"
+    href="https://viteconf.org/?utm=vitest-sidebar"
+    target="_blank"
+  >
+    <img width="22" height="22" src="/viteconf.svg">
+    <span>
+      <p class="extra-info">Building Together</p>
+      <p class="heading">ViteConf 24 - Oct 3</p>
+      <p class="extra-info">Get your free ticket!</p>
+    </span>
+  </a>
+</template>
+
+<style scoped>
+.viteconf {
+  margin-top: 1rem;
+  margin-bottom: 1rem;
+  border-radius: 14px;
+  padding-top: 0.4rem;
+  padding-bottom: 0.4rem;
+  position: relative;
+  font-size: 0.9rem;
+  font-weight: 700;
+  line-height: 1.1rem;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  gap: 1rem;
+  background-color: var(--vp-c-bg-soft);
+  border: 2px solid var(--vp-c-bg-soft);
+  transition: border-color 0.5s;
+  filter: grayscale(1);
+}
+.viteconf:hover {
+  border: 2px solid #9499ff;
+  filter: none;
+}
+.viteconf img {
+  transition: transform 0.5s;
+  transform: scale(1.25);
+}
+.viteconf:hover img {
+  transform: scale(1.75);
+}
+
+.viteconf .heading {
+  color: var(--vt-c-text-1);
+}
+.viteconf:hover .heading {
+  background-image: linear-gradient(
+    120deg,
+    #b047ff 16%,
+    #9499ff,
+    #9499ff
+  );
+  background-clip: text;
+  -webkit-background-clip: text;
+  -webkit-text-fill-color: transparent;
+}
+.viteconf .extra-info {
+  color: var(--vp-c-text-1);
+  opacity: 0;
+  font-size: 0.7rem;
+  padding-left: 0.1rem;
+  transition: opacity 0.5s;
+}
+.viteconf:hover .extra-info {
+  opacity: 0.9;
+}
+</style>
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
index cbbf93372ef4..e15d05a7bb85 100644
--- a/docs/.vitepress/theme/index.ts
+++ b/docs/.vitepress/theme/index.ts
@@ -8,6 +8,7 @@ import 'uno.css'
 import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
 import HomePage from '../components/HomePage.vue'
 import Version from '../components/Version.vue'
+import AsideViteConf from '../components/AsideViteConf.vue'
 import '@shikijs/vitepress-twoslash/style.css'
 
 if (inBrowser) {
@@ -19,6 +20,7 @@ export default {
   Layout() {
     return h(DefaultTheme.Layout, null, {
       'home-features-after': () => h(HomePage),
+      'aside-ads-before': () => h(AsideViteConf),
     })
   },
   enhanceApp({ app }) {
diff --git a/docs/public/viteconf.svg b/docs/public/viteconf.svg
new file mode 100644
index 000000000000..2ca20c23f890
--- /dev/null
+++ b/docs/public/viteconf.svg
@@ -0,0 +1,24 @@
+<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="path-1-outside-1_840_7" maskUnits="userSpaceOnUse" x="0" y="2.88574" width="30" height="27" fill="black">
+<rect fill="white" y="2.88574" width="30" height="27"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7897 16.031L22.4537 8.73304C22.5784 8.48484 22.3634 8.20193 22.0903 8.25452L19.4735 8.75865C19.2273 8.80596 19.0184 8.57734 19.0874 8.33735L19.681 6.28374L27.4762 4.89992C28.0343 4.79846 28.4586 5.39103 28.1817 5.88502L15.8421 27.9073C15.5874 28.3619 14.9325 28.3647 14.674 27.9122L2.08968 5.88714C1.80806 5.39409 2.23049 4.79686 2.78996 4.8968L10.0465 6.19118L10.874 6.33781L10.4453 13.5694C10.442 13.6214 10.4509 13.6733 10.4717 13.7211C10.4921 13.769 10.5238 13.8113 10.5635 13.8449C10.6032 13.8784 10.6504 13.9023 10.7009 13.9145C10.7514 13.9268 10.8044 13.9271 10.8554 13.9154L13.3977 13.3298C13.6358 13.275 13.8503 13.4841 13.8016 13.7229L13.0461 17.4145C12.9956 17.663 13.2289 17.8754 13.4723 17.8016L15.0425 17.3255C15.2858 17.2518 15.5198 17.4648 15.4683 17.7134L14.2681 23.5121C14.193 23.8748 14.6763 24.0726 14.8781 23.7617L15.0128 23.554L15.8421 21.9021V22.1734L18.7897 16.031Z"/>
+</mask>
+<path d="M18.7897 16.031L17.896 15.5823L17.892 15.5903L17.8882 15.5983L18.7897 16.031ZM22.4537 8.73304L21.5602 8.28396L21.56 8.28436L22.4537 8.73304ZM22.0903 8.25452L21.9012 7.27256L21.9011 7.27258L22.0903 8.25452ZM19.4735 8.75865L19.6622 9.74069L19.6626 9.7406L19.4735 8.75865ZM19.0874 8.33735L18.1267 8.05968L18.1263 8.06107L19.0874 8.33735ZM19.681 6.28374L19.5062 5.29913L18.8932 5.40795L18.7203 6.00607L19.681 6.28374ZM27.4762 4.89992L27.651 5.88453L27.6551 5.88379L27.4762 4.89992ZM28.1817 5.88502L27.3094 5.39599L27.3093 5.3962L28.1817 5.88502ZM15.8421 27.9073L14.9697 27.4185L14.9697 27.4185L15.8421 27.9073ZM14.674 27.9122L15.5423 27.4162L15.5423 27.4161L14.674 27.9122ZM2.08968 5.88714L1.22135 6.38313L1.22141 6.38324L2.08968 5.88714ZM2.78996 4.8968L2.6141 5.88122L2.61436 5.88126L2.78996 4.8968ZM10.0465 6.19118L9.87086 7.17564L9.872 7.17585L10.0465 6.19118ZM10.874 6.33781L11.8723 6.39699L11.925 5.50844L11.0485 5.35315L10.874 6.33781ZM10.4453 13.5694L11.4433 13.633L11.4436 13.6286L10.4453 13.5694ZM10.4717 13.7211L11.3923 13.3304L11.3884 13.3213L10.4717 13.7211ZM10.5635 13.8449L9.91754 14.6083L9.91754 14.6083L10.5635 13.8449ZM10.7009 13.9145L10.9366 12.9427L10.9359 12.9425L10.7009 13.9145ZM10.8554 13.9154L11.0787 14.8902L11.0799 14.8899L10.8554 13.9154ZM13.3977 13.3298L13.1734 12.3553L13.1732 12.3553L13.3977 13.3298ZM13.8016 13.7229L14.7813 13.9234L14.7815 13.9226L13.8016 13.7229ZM13.0461 17.4145L12.0664 17.214L12.0661 17.2153L13.0461 17.4145ZM13.4723 17.8016L13.7624 18.7586L13.7625 18.7586L13.4723 17.8016ZM15.0425 17.3255L14.7525 16.3685L14.7523 16.3685L15.0425 17.3255ZM15.4683 17.7134L14.4891 17.5106L14.489 17.5107L15.4683 17.7134ZM14.2681 23.5121L15.2473 23.7149L15.2474 23.7148L14.2681 23.5121ZM14.8781 23.7617L15.717 24.306L15.7171 24.3057L14.8781 23.7617ZM15.0128 23.554L15.8518 24.098L15.8818 24.0519L15.9065 24.0027L15.0128 23.554ZM15.8421 21.9021H16.8421L14.9484 21.4534L15.8421 21.9021ZM15.8421 22.1734H14.8421L16.7437 22.6061L15.8421 22.1734ZM19.6834 16.4797L23.3474 9.18172L21.56 8.28436L17.896 15.5823L19.6834 16.4797ZM23.3472 9.18212C23.8472 8.18722 22.9834 7.06419 21.9012 7.27256L22.2794 9.23648C21.7435 9.33968 21.3096 8.78247 21.5602 8.28396L23.3472 9.18212ZM21.9011 7.27258L19.2843 7.77671L19.6626 9.7406L22.2795 9.23647L21.9011 7.27258ZM19.2847 7.77662C19.7691 7.68355 20.1862 8.13448 20.0485 8.61363L18.1263 8.06107C17.8506 9.0202 18.6855 9.92837 19.6622 9.74069L19.2847 7.77662ZM20.0481 8.61502L20.6417 6.56141L18.7203 6.00607L18.1267 8.05968L20.0481 8.61502ZM19.8558 7.26834L27.651 5.88452L27.3014 3.91531L19.5062 5.29913L19.8558 7.26834ZM27.6551 5.88379C27.3858 5.93276 27.1701 5.64435 27.3094 5.39599L29.0539 6.37404C29.7471 5.13771 28.6828 3.66416 27.2973 3.91604L27.6551 5.88379ZM27.3093 5.3962L14.9697 27.4185L16.7145 28.3962L29.054 6.37383L27.3093 5.3962ZM14.9697 27.4185C15.095 27.195 15.415 27.1933 15.5423 27.4162L13.8057 28.4083C14.45 29.5362 16.0798 29.5288 16.7145 28.3961L14.9697 27.4185ZM15.5423 27.4161L2.95795 5.39104L1.22141 6.38324L13.8057 28.4083L15.5423 27.4161ZM2.95801 5.39115C3.09906 5.63809 2.8859 5.92978 2.6141 5.88122L2.96583 3.91239C1.57508 3.66393 0.517051 5.1501 1.22135 6.38313L2.95801 5.39115ZM2.61436 5.88126L9.87086 7.17564L10.2221 5.20672L2.96557 3.91234L2.61436 5.88126ZM9.872 7.17585L10.6996 7.32248L11.0485 5.35315L10.2209 5.20652L9.872 7.17585ZM9.87579 6.27863L9.44708 13.5103L11.4436 13.6286L11.8723 6.39699L9.87579 6.27863ZM9.44735 13.5059C9.43412 13.7136 9.46954 13.9246 9.55512 14.1208L11.3884 13.3213C11.4323 13.422 11.4499 13.5292 11.4433 13.633L9.44735 13.5059ZM9.55121 14.1118C9.63485 14.3088 9.76279 14.4773 9.91754 14.6083L11.2094 13.0815C11.2847 13.1452 11.3493 13.2291 11.3923 13.3304L9.55121 14.1118ZM9.91754 14.6083C10.0769 14.7431 10.265 14.8379 10.4658 14.8865L10.9359 12.9425C11.0357 12.9667 11.1294 13.0138 11.2094 13.0814L9.91754 14.6083ZM10.4652 14.8863C10.6671 14.9353 10.8771 14.9363 11.0787 14.8902L10.6322 12.9407C10.7316 12.9179 10.8358 12.9183 10.9366 12.9427L10.4652 14.8863ZM11.0799 14.8899L13.6221 14.3043L13.1732 12.3553L10.631 12.9409L11.0799 14.8899ZM13.6219 14.3044C13.153 14.4123 12.7247 13.9992 12.8218 13.5231L14.7815 13.9226C14.9759 12.969 14.1187 12.1378 13.1734 12.3553L13.6219 14.3044ZM12.8219 13.5224L12.0664 17.214L14.0258 17.615L14.7813 13.9234L12.8219 13.5224ZM12.0661 17.2153C11.8643 18.2078 12.7965 19.0514 13.7624 18.7586L13.1823 16.8446C13.6613 16.6994 14.1268 17.1181 14.026 17.6138L12.0661 17.2153ZM13.7625 18.7586L15.3327 18.2825L14.7523 16.3685L13.1822 16.8447L13.7625 18.7586ZM15.3324 18.2826C14.8539 18.4275 14.3858 18.0091 14.4891 17.5106L16.4475 17.9163C16.6538 16.9205 15.7178 16.0761 14.7525 16.3685L15.3324 18.2826ZM14.489 17.5107L13.2889 23.3094L15.2474 23.7148L16.4475 17.9161L14.489 17.5107ZM13.2889 23.3093C12.9871 24.7662 14.9192 25.5354 15.717 24.306L14.0392 23.2173C14.4335 22.6097 15.3988 22.9834 15.2473 23.7149L13.2889 23.3093ZM15.7171 24.3057L15.8518 24.098L14.1737 23.0099L14.0391 23.2176L15.7171 24.3057ZM15.9065 24.0027L16.7358 22.3508L14.9484 21.4534L14.1191 23.1053L15.9065 24.0027ZM14.8421 21.9021V22.1734H16.8421V21.9021H14.8421ZM16.7437 22.6061L19.6913 16.4636L17.8882 15.5983L14.9405 21.7408L16.7437 22.6061Z" fill="url(#paint0_linear_840_7)" mask="url(#path-1-outside-1_840_7)"/>
+<mask id="path-3-outside-2_840_7" maskUnits="userSpaceOnUse" x="9.74902" y="0" width="14" height="25" fill="black">
+<rect fill="white" x="9.74902" width="14" height="25"/>
+<path d="M20.1587 2.00645L11.535 3.78897C11.4663 3.80319 11.4037 3.84114 11.3573 3.89693C11.3114 3.95271 11.2842 4.02315 11.2797 4.09706L10.7497 13.5479C10.7465 13.5997 10.7549 13.6515 10.7746 13.6992C10.7938 13.747 10.8237 13.7892 10.8612 13.8228C10.8987 13.8563 10.9433 13.8801 10.991 13.8923C11.0387 13.9045 11.0887 13.9049 11.1369 13.8932L13.5377 13.3087C13.7626 13.254 13.9651 13.4627 13.9192 13.701L13.2057 17.3857C13.158 17.6337 13.3783 17.8458 13.6082 17.7721L15.091 17.2969C15.3208 17.2233 15.5417 17.4359 15.4931 17.6841L14.3597 23.4719C14.2887 23.8339 14.7452 24.0314 14.9357 23.721L15.0629 23.5137L22.0897 8.72051C22.2075 8.47278 22.0045 8.1904 21.7466 8.24289L19.2753 8.74608C19.0429 8.7933 18.8456 8.5651 18.9108 8.32556L20.5239 2.42691C20.5894 2.18667 20.3912 1.95842 20.1587 2.00645Z"/>
+</mask>
+<path d="M20.1587 2.00645L11.535 3.78897C11.4663 3.80319 11.4037 3.84114 11.3573 3.89693C11.3114 3.95271 11.2842 4.02315 11.2797 4.09706L10.7497 13.5479C10.7465 13.5997 10.7549 13.6515 10.7746 13.6992C10.7938 13.747 10.8237 13.7892 10.8612 13.8228C10.8987 13.8563 10.9433 13.8801 10.991 13.8923C11.0387 13.9045 11.0887 13.9049 11.1369 13.8932L13.5377 13.3087C13.7626 13.254 13.9651 13.4627 13.9192 13.701L13.2057 17.3857C13.158 17.6337 13.3783 17.8458 13.6082 17.7721L15.091 17.2969C15.3208 17.2233 15.5417 17.4359 15.4931 17.6841L14.3597 23.4719C14.2887 23.8339 14.7452 24.0314 14.9357 23.721L15.0629 23.5137L22.0897 8.72051C22.2075 8.47278 22.0045 8.1904 21.7466 8.24289L19.2753 8.74608C19.0429 8.7933 18.8456 8.5651 18.9108 8.32556L20.5239 2.42691C20.5894 2.18667 20.3912 1.95842 20.1587 2.00645Z" fill="url(#paint1_linear_840_7)"/>
+<path d="M20.1587 2.00645L11.535 3.78897C11.4663 3.80319 11.4037 3.84114 11.3573 3.89693C11.3114 3.95271 11.2842 4.02315 11.2797 4.09706L10.7497 13.5479C10.7465 13.5997 10.7549 13.6515 10.7746 13.6992C10.7938 13.747 10.8237 13.7892 10.8612 13.8228C10.8987 13.8563 10.9433 13.8801 10.991 13.8923C11.0387 13.9045 11.0887 13.9049 11.1369 13.8932L13.5377 13.3087C13.7626 13.254 13.9651 13.4627 13.9192 13.701L13.2057 17.3857C13.158 17.6337 13.3783 17.8458 13.6082 17.7721L15.091 17.2969C15.3208 17.2233 15.5417 17.4359 15.4931 17.6841L14.3597 23.4719C14.2887 23.8339 14.7452 24.0314 14.9357 23.721L15.0629 23.5137L22.0897 8.72051C22.2075 8.47278 22.0045 8.1904 21.7466 8.24289L19.2753 8.74608C19.0429 8.7933 18.8456 8.5651 18.9108 8.32556L20.5239 2.42691C20.5894 2.18667 20.3912 1.95842 20.1587 2.00645Z" stroke="#07070C" stroke-width="2" mask="url(#path-3-outside-2_840_7)"/>
+<defs>
+<linearGradient id="paint0_linear_840_7" x1="9.15963" y1="1.88944" x2="22.8125" y2="18.2874" gradientUnits="userSpaceOnUse">
+<stop stop-color="#57CCFF"/>
+<stop offset="1" stop-color="#AF48FF"/>
+</linearGradient>
+<linearGradient id="paint1_linear_840_7" x1="11.4363" y1="4.48795" x2="21.1359" y2="16.7437" gradientUnits="userSpaceOnUse">
+<stop stop-color="#B047FF"/>
+<stop offset="0.75" stop-color="#FFD0D0"/>
+<stop offset="0.916667" stop-color="#FFF3E6"/>
+</linearGradient>
+</defs>
+</svg>