Skip to content

Commit 1eb4f4a

Browse files
committed
2 parents a0b2ad5 + 3239f7b commit 1eb4f4a

27 files changed

+133
-40
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ run-name: 🚀 Deploy
33

44
on:
55
workflow_dispatch:
6-
# push:
7-
# branches:
8-
# - main
6+
push:
7+
branches:
8+
- main
99

1010
jobs:
1111
deployment:
1212
runs-on: ubuntu-latest
13-
env:
14-
DEPLOY_DIR_NAME: vue-cheatsheet
1513
steps:
1614
- name: ⚙️ Setup pnpm
1715
uses: pnpm/action-setup@v2
@@ -25,27 +23,16 @@ jobs:
2523
run: |
2624
pnpm i
2725
pnpm build
28-
mv content/.vitepress/dist content/.vitepress/${{ env.DEPLOY_DIR_NAME }}
29-
30-
- name: 🗄️ Cleanup & Backup
31-
uses: appleboy/ssh-action@v0.1.5
32-
with:
33-
host: ${{ secrets.HOST }}
34-
username: ${{ secrets.USERNAME }}
35-
port: ${{ secrets.PORT }}
36-
key: ${{ secrets.SSHKEY }}
37-
script: |
38-
mkdir -p ${{ secrets.PROD_DIR }}
39-
cd ${{ secrets.PROD_DIR }}
40-
rm -rf ${{ env.DEPLOY_DIR_NAME }}
26+
mv content/.vitepress/dist content/.vitepress/html
4127
42-
- name: 🚀 Upload documentation
28+
- name: 🚀 Upload
4329
uses: appleboy/scp-action@master
4430
with:
4531
HOST: ${{ secrets.HOST }}
4632
USERNAME: ${{ secrets.USERNAME }}
4733
PORT: ${{ secrets.PORT }}
4834
KEY: ${{ secrets.SSHKEY }}
49-
source: content/.vitepress/${{ env.DEPLOY_DIR_NAME }}
50-
target: ${{ secrets.PROD_DIR }}
51-
strip_components: 2
35+
source: content/.vitepress/html
36+
target: ${{ secrets.TARGET_DIR }}
37+
strip_components: 3
38+
rm: true

content/.vitepress/config.mts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,29 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1919

2020
// https://vitepress.dev/reference/site-config
2121
export default defineConfig({
22-
base: '/vue-cheatsheet/',
2322
lang: 'en-US',
2423
title: 'Vue Cheatsheet',
2524
description: "The one and only cheatsheet you need for Vue.js by ThemeSelection",
25+
head: [
26+
['link', { rel: 'icon', href: '/logos/favicon.ico' }],
27+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-57x57.png' }],
28+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-60x60.png' }],
29+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-72x72.png' }],
30+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-76x76.png' }],
31+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-114x114.png' }],
32+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-120x120.png' }],
33+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-144x144.png' }],
34+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-152x152.png' }],
35+
['link', { rel: 'apple-touch-icon', href: '/logos/apple-icon-180x180.png' }],
36+
['link', { rel: 'icon', href: '/logos/android-icon-192x192.png' }],
37+
['link', { rel: 'icon', href: '/logos/favicon-32x32.png' }],
38+
['link', { rel: 'icon', href: '/logos/favicon-96x96.png' }],
39+
['link', { rel: 'icon', href: '/logos/favicon-16x16.png' }],
40+
['link', { rel: 'manifest', href: '/logos/manifest.json' }],
41+
],
2642
themeConfig: {
2743
logo: '/vue-cheatsheet-logo.png',
44+
2845
siteTitle: false,
2946
search: {
3047
provider: 'local',

content/.vitepress/theme/components/Footer.vue

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SubscribeForm from './SubscribeForm.vue';
77
const { frontmatter } = useData()
88
const { hasSidebar } = useSidebar()
99
10+
1011
const firstColLinks = [
1112
{ title: 'Freebies', link: 'https://themeselection.com/item/category/download-free-admin-templates/' },
1213
{ title: 'UI Kits', link: 'https://themeselection.com/item/category/ui-kits/' },
@@ -21,9 +22,9 @@ const secondColLinks = [
2122
</script>
2223

2324
<template>
24-
<footer v-if="frontmatter.footer !== false" class="pt-12 px-6 bg-gray-100 dark:bg-zinc-800 sm:px-12 lg:px-16"
25+
<footer v-if="frontmatter.footer !== false" class="pt-12 bg-gray-100 dark:bg-zinc-800"
2526
:class="{ 'hidden': hasSidebar }">
26-
<div class="container mx-auto flex flex-wrap gap-y-14 gap-x-10 lg:justify-between gap-y-4 mb-10">
27+
<div class="container mx-auto flex flex-wrap gap-10 lg:justify-between mb-10 px-6 sm:px-12 lg:px-16">
2728
<div class="flex flex-col gap-4 items-start">
2829
<a v-for="(link, index) in firstColLinks" :key="index" target="_blank" rel="noreferrer" :href="link.link"
2930
class="text-gray-500 hover:text-[var(--vp-c-brand-1)] dark:text-gray-400 dark:hover:text-[var(--vp-c-brand-1)]">{{
@@ -41,12 +42,10 @@ const secondColLinks = [
4142
<SocialLinks class="mt-6"></SocialLinks>
4243
</div>
4344
</div>
44-
<hr>
45-
46-
<div class="container mx-auto flex items-center justify-between border-gray-300 dark:border-zinc-700 pt-8 pb-6 ">
47-
<a href="https://themeselection.com/" target="_blank">
48-
<img src="/brand-logo-small.png" alt="ThemeSelection" height="38" class="h-10" />
49-
</a>
45+
<hr class="divider">
46+
<div
47+
class="container mx-auto flex flex-wrap items-center justify-between border-gray-300 dark:border-zinc-700 pt-8 pb-6 gap-3 px-6 sm:px-12 lg:px-16">
48+
<a href="https://themeselection.com/" target="_blank" class="themeselection-logo"> </a>
5049
<div class="flex items-center gap-x-1">
5150
<span>© 2024-Present, Made with</span>
5251
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24">
@@ -60,3 +59,26 @@ const secondColLinks = [
6059
</div>
6160
</footer>
6261
</template>
62+
63+
<style scoped lang="scss">
64+
html {
65+
66+
.themeselection-logo {
67+
width: 192px;
68+
height: 40px;
69+
background-image: url('/brand-logo-small-light.png');
70+
background-repeat: no-repeat;
71+
background-size: contain;
72+
}
73+
74+
&.dark {
75+
.divider {
76+
border-color: var(--vp-c-gray-3);
77+
}
78+
79+
.themeselection-logo {
80+
background-image: url('/brand-logo-small-dark.png');
81+
}
82+
}
83+
}
84+
</style>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts" setup>
2+
import { useData } from 'vitepress';
3+
import { computed } from 'vue';
4+
5+
const { site, page } = useData()
6+
7+
const isHome = computed(() => page.value.frontmatter?.layout === 'home')
8+
</script>
9+
10+
<template>
11+
<span v-if="!isHome">{{ site.title }}</span>
12+
</template>

content/.vitepress/theme/components/SubscribeForm.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
</script>
33

44
<template>
5-
<p class="font-semibold leading-7 text-lg text-[var(--vp-c-brand-1)]">Stay connected with latest industry updates
5+
<p class="font-semibold leading-7 text-lg text-[var(--vp-c-brand-1)]">Subscribe to our newsletter
66
</p>
7-
<p class="my-4 mt-2 text-gray-500 dark:text-gray-400">Subscribe to get updated with our template updates,
8-
development-related resources, Freebies, and product offers.</p>
9-
<form class="flex items-center gap-4">
10-
<input type="email" required
7+
<p class="my-4 mt-2 text-gray-500 dark:text-gray-400">A weekly latest Articles, UI Kits, Free & Premium Resources.</p>
8+
<form action="https://themeselection.com/mailster/subscribe" method="post" class="flex items-center gap-4">
9+
10+
<input name="_action" type="hidden" value="subscribe">
11+
<input name="_timestamp" type="hidden" value="1706684888">
12+
<input name="_referer" type="hidden" value="extern">
13+
<input name="_nonce" type="hidden" value="342601d290">
14+
<input name="formid" type="hidden" value="1">
15+
<input type="email" required name="email"
1116
class="py-3 px-4 block w-full bg-white dark:bg-zinc-900 border-transparent rounded-lg text-sm focus:ring-2 focus:ring-emerald-500 dark:border-transparent dark:text-gray-400 dark:focus:ring-emerald-600"
1217
placeholder="john@mail.com" />
13-
<button
18+
<button type="submit"
1419
class="py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-[var(--vp-c-brand-1)] focus:ring-2 focus:outline-none focus:ring-emerald-500 text-white hover:bg-emerald-700 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-emerald-600">Subscribe</button>
1520
</form>
1621
</template>

content/.vitepress/theme/custom.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,9 @@
6464
button.DocSearch-Button {
6565
background-color: var(--vp-c-bg-alt);
6666
}
67-
}
67+
}
68+
69+
// Enable below after: https://github.com/vuejs/vitepress/pull/3522
70+
// .VPNav:has(~ .is-home) .title > span {
71+
// display: none;
72+
// }

content/.vitepress/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import DefaultTheme from 'vitepress/theme';
22
import { h } from 'vue';
33
import DocFooter from './components/DocFooter.vue';
4+
import SiteTitle from './components/SiteTitle.vue';
45
import HomeVueThemesCallOut from './components/VueThemesCallOut.vue';
56
import './custom.scss';
67
import './tailwind.css';
@@ -11,6 +12,7 @@ export default {
1112
return h(DefaultTheme.Layout, null, {
1213
'home-features-before': h(HomeVueThemesCallOut),
1314
'doc-after': h(DocFooter),
15+
'nav-bar-title-after': h(SiteTitle),
1416
})
1517
}
1618
}

content/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changelog
22

3-
## 2024-01-XX
3+
## 2024-01-31
44

55
- Initial Release

content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ features:
2020
- title: Vue
2121
icon:
2222
src: /vue-logo.png
23-
details: Accelerate your vue learning with our comprehensive cheatsheet
23+
details: Accelerate your vue learning & improve your skills with our comprehensive cheatsheet
2424
link: /vue/basic
2525
- title: Vue Router
2626
icon:
5.49 KB
Loading
6.64 KB
Loading
4.38 KB
Loading
4.61 KB
Loading
5.55 KB
Loading
5.93 KB
Loading
7.23 KB
Loading
2.35 KB
Loading
2.42 KB
Loading
2.81 KB
Loading
2.93 KB
Loading
1.12 KB
Loading
1.73 KB
Loading
3.6 KB
Loading

content/public/logos/favicon.ico

1.12 KB
Binary file not shown.

content/public/logos/manifest.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "App",
3+
"icons": [
4+
{
5+
"src": "\/android-icon-36x36.png",
6+
"sizes": "36x36",
7+
"type": "image\/png",
8+
"density": "0.75"
9+
},
10+
{
11+
"src": "\/android-icon-48x48.png",
12+
"sizes": "48x48",
13+
"type": "image\/png",
14+
"density": "1.0"
15+
},
16+
{
17+
"src": "\/android-icon-72x72.png",
18+
"sizes": "72x72",
19+
"type": "image\/png",
20+
"density": "1.5"
21+
},
22+
{
23+
"src": "\/android-icon-96x96.png",
24+
"sizes": "96x96",
25+
"type": "image\/png",
26+
"density": "2.0"
27+
},
28+
{
29+
"src": "\/android-icon-144x144.png",
30+
"sizes": "144x144",
31+
"type": "image\/png",
32+
"density": "3.0"
33+
},
34+
{
35+
"src": "\/android-icon-192x192.png",
36+
"sizes": "192x192",
37+
"type": "image\/png",
38+
"density": "4.0"
39+
}
40+
]
41+
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"name": "vue-cheatsheet",
3+
"version": "0.0.0",
24
"scripts": {
35
"dev": "vitepress dev content",
46
"build": "vitepress build content",

0 commit comments

Comments
 (0)