Skip to content

Add links for Mastering Pinia and Vue Certificate #2036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions packages/docs/.vitepress/theme/components/AsideSponsors.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<script setup>
const banners = [
{
id: 1,
name: 'Vue.js Certification',
link: 'https://certificates.dev/vuejs?friend=VUEROUTER',
image: '/banners/vuejs-certification.svg',
},
{
id: 2,
name: 'Mastering Pinia',
link: 'https://masteringpinia.com',
image: '/banners/mastering-pinia.png',
},
]
</script>

<template>
<a
v-for="banner in banners"
:key="banner.id"
:href="banner.link"
target="_blank"
:class="`banner_image_${banner.id}`"
>
<img :src="banner.image" :alt="banner.name" />
</a>
</template>

<style scoped>
.banner_image_1 {
padding: 25px 10px 0px 0px;
}

.banner_image_2 {
padding: 15px 10px 15px 0px;
}
</style>
15 changes: 8 additions & 7 deletions packages/docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { h } from 'vue'
import { Theme, useData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
// import AsideSponsors from './components/AsideSponsors.vue'
import AsideSponsors from './components/AsideSponsors.vue'
// import HomeSponsors from './components/HomeSponsors.vue'
import './styles/vars.css'
import './styles/sponsors.css'
Expand All @@ -9,12 +10,12 @@ import VueMasteryLogoLink from './components/VueMasteryLogoLink.vue'

const theme: Theme = {
...DefaultTheme,
// Layout() {
// return h(DefaultTheme.Layout, null, {
// 'home-features-after': () => h(HomeSponsors),
// 'aside-ads-before': () => h(AsideSponsors),
// })
// },
Layout() {
return h(DefaultTheme.Layout, null, {
// 'home-features-after': () => h(HomeSponsors),
'aside-ads-before': () => h(AsideSponsors),
})
},

enhanceApp({ app }) {
app.component('VueSchoolLink', VueSchoolLink)
Expand Down
Binary file added packages/docs/public/banners/mastering-pinia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading