Skip to content

Commit 186793c

Browse files
refactor(multi): added product hunt details.
1 parent 7a37663 commit 186793c

File tree

9 files changed

+61
-12
lines changed

9 files changed

+61
-12
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
"emmet.includeLanguages": {
2121
"markdown": "html",
2222
},
23+
"commentAnchors.tagHighlights.enabled": false,
2324
}

content/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export default defineConfig({
5050
['meta', { property: 'twitter:creator', content: '@Theme_Selection' }],
5151
['meta', { property: 'keywords', content: 'Vue 3 Cheatsheet, VueJS Cheatsheet, Vue JS Cheatsheet' }],
5252
['meta', { property: 'google-site-verification', content: 'Eb4Y887SF6gMOy33YpMZEZLJuVfQHW9E3b8QjoSTDhw' }],
53+
['script', { src: 'https://buttons.github.io/buttons.js' }]
5354
],
5455
themeConfig: {
5556
logo: { src: '/vue-cheatsheet-logo.png', alt: 'Vue Cheatsheet' },
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
<script lang="ts" setup>
2+
import { useData } from 'vitepress';
3+
4+
const { isDark } = useData()
5+
</script>
16
<template>
2-
<div class="mt-4">
7+
<div class="mt-4 flex items-center gap-x-3">
8+
<a data-v-0c3feb32="" data-v-2270f7fa="" class="VPButton medium brand" href="/vue/basic.html">Let's Start</a>
39
<a href="https://www.producthunt.com/posts/vue-cheatsheet?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-vue&#0045;cheatsheet"
410
target="_blank"><img
5-
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=445414&theme=neutral"
11+
:src="`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=445414&theme=${isDark ? 'dark' : 'light'}`"
612
alt="Vue&#0032;CheatSheet - The&#0032;Ultimate&#0032;Vue&#0032;CheatSheet&#0032;For&#0032;Vue&#0044;&#0032;Vue&#0032;Router&#0032;&#0038;&#0032;Pinia | Product Hunt"
7-
style="width: 250px; height: 54px;" width="250" height="54" /></a>
13+
style="width: auto; height: 40px;border: 1px solid #fff;border-radius: 6px;" width="auto"
14+
height="40" /></a>
815
</div>
916
</template>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<script lang="ts" setup>
2+
import { useData } from 'vitepress';
3+
import GithubButton from 'vue-github-button';
4+
5+
const { isDark } = useData()
6+
7+
console.log('theme :>> ', isDark.value);
8+
</script>
9+
10+
<template>
11+
<div class="widget">
12+
<!-- Place this tag where you want the button to render. -->
13+
<github-button href="https://github.com/themeselection/vue-cheatsheet"
14+
:data-color-scheme="`no-preference: ${isDark ? 'dark' : 'light'};light: ${isDark ? 'dark' : 'light'} ; dark: ${isDark ? 'dark' : 'light'}`"
15+
data-icon="octicon-star" data-size="large" data-show-count="true"
16+
aria-label="Star themeselection/vue-cheatsheet on GitHub">Star</github-button>
17+
</div>
18+
</template>
19+
20+
<style lang="scss">
21+
.widget {
22+
display: block;
23+
margin-inline-start: 0.75rem;
24+
margin-block-start: 0.375rem;
25+
26+
.social-count {
27+
display: none;
28+
}
29+
}
30+
</style>

content/.vitepress/theme/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import DefaultTheme from 'vitepress/theme';
22
import { h } from 'vue';
33
import DocFooter from './components/DocFooter.vue';
44
import ProductHuntButton from './components/ProductHuntButton.vue';
5+
import SocialMediaBtn from './components/SocialMediaBtn.vue';
56
import SubscribeAlert from './components/SubscribeAlert.vue';
67
import HomeVueThemesCallOut from './components/VueThemesCallOut.vue';
78
import './custom.scss';
@@ -14,7 +15,8 @@ export default {
1415
'home-features-before': h(HomeVueThemesCallOut),
1516
'doc-after': h(DocFooter),
1617
'home-hero-before': h(SubscribeAlert),
17-
'home-hero-actions-after': h(ProductHuntButton)
18+
'home-hero-actions-after': h(ProductHuntButton),
19+
'nav-bar-content-after': h(SocialMediaBtn),
1820
})
1921
}
2022
}

content/index.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ hero:
88
image:
99
src: /hero-image.png
1010
alt: Vue Cheatsheet
11-
actions:
12-
- theme: brand
13-
text: Let's Start
14-
link: /vue/basic
15-
- theme: alt
16-
text: Other Free Resources
17-
link: https://themeselection.com/item/category/freebies/
1811

1912
features:
2013
- title: Vue
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-site-verification: google6f658ffc1e5996cb.html

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"dependencies": {
1818
"markdown-it-mathjax3": "^4.3.2",
19-
"vue": "^3.4.15"
19+
"vue": "^3.4.15",
20+
"vue-github-button": "^3.1.0"
2021
}
2122
}

pnpm-lock.yaml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)