feat: custom aside layout and add qrcode

This commit is contained in:
zchengo
2023-01-24 19:49:12 +08:00
parent 1959e04dfd
commit b86d67a41d
2 changed files with 40 additions and 1 deletions
+37
View File
@@ -0,0 +1,37 @@
<script setup>
import DefaultTheme from 'vitepress/theme'
const { Layout } = DefaultTheme
</script>
<template>
<Layout>
<template #aside-ads-before>
<div class="contaniner">
<img src="../../public/sponsor.png"/>
<p style="font-size: 10px;margin: 20px 0 5px;">微信扫一扫赞赏码赞赏支持作者</p>
</div>
</template>
</Layout>
</template>
<style scoped>
.contaniner{
margin-top: 24px;
display: flex;
align-items: center;
flex-direction: column;
border-radius: 12px;
min-height: 256px;
padding: 15px;
text-align: center;
line-height: 18px;
font-size: 12px;
font-weight: 500;
background-color: var(--vp-c-bg-soft);
}
.contaniner img {
border-radius: 10px;
}
</style>
@@ -1,6 +1,8 @@
import Theme from 'vitepress/theme'
import './index.css'
import adsense from './adsense.vue'
export default {
...Theme
...Theme,
Layout: adsense
}