Skip to content

Commit

Permalink
docs: viteconf 24 cta (#6414)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Aug 28, 2024
1 parent f6217a2 commit 122e4fe
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
73 changes: 73 additions & 0 deletions docs/.vitepress/components/AsideViteConf.vue
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/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) {
Expand All @@ -20,6 +21,7 @@ export default {
Layout() {
return h(DefaultTheme.Layout, null, {
'home-features-after': () => h(HomePage),
'aside-ads-before': () => h(AsideViteConf),
})
},
enhanceApp({ app }) {
Expand Down
24 changes: 24 additions & 0 deletions docs/public/viteconf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 122e4fe

Please sign in to comment.