File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <script setup>
2+ import { useData } from ' vitepress'
3+
4+ const { isDark } = useData ()
5+ </script >
6+
7+ <template >
8+ <div class =" sa-badge" >
9+ <a
10+ href =" https://www.simpleanalytics.com/?utm_source=&utm_content=badge"
11+ referrerpolicy =" origin"
12+ target =" _blank"
13+ >
14+ <img
15+ :src =" isDark
16+ ? 'https://simpleanalyticsbadges.com/?mode=dark&background=1a1a1a&text=ff6b6b'
17+ : 'https://simpleanalyticsbadges.com/?mode=light&background=d33c43&text=ffffff'"
18+ loading =" lazy"
19+ referrerpolicy =" no-referrer"
20+ crossorigin =" anonymous"
21+ alt =" Simple Analytics"
22+ />
23+ </a >
24+ </div >
25+ </template >
26+
27+ <style scoped>
28+ .sa-badge {
29+ margin-top : 2rem ;
30+ padding-top : 1rem ;
31+ }
32+
33+ .sa-badge img {
34+ display : block ;
35+ margin : 0 auto ;
36+ }
37+ </style >
Original file line number Diff line number Diff line change 11import DefaultTheme from 'vitepress/theme-without-fonts'
22import PageLoader from "./components/PageLoader.vue" ;
3+ import SimpleAnalyticsBadge from "./components/SimpleAnalyticsBadge.vue" ;
34import './custom.css'
45import { h } from "vue" ;
56
@@ -8,6 +9,7 @@ export default {
89 Layout ( ) {
910 return h ( DefaultTheme . Layout , null , {
1011 'layout-top' : ( ) => h ( PageLoader ) ,
12+ 'aside-outline-after' : ( ) => h ( SimpleAnalyticsBadge ) ,
1113 } )
1214 }
1315}
You can’t perform that action at this time.
0 commit comments