Skip to content

Commit

Permalink
docs: add kit store
Browse files Browse the repository at this point in the history
  • Loading branch information
recoluan committed Jun 13, 2024
1 parent 67b0a80 commit 0f0904b
Show file tree
Hide file tree
Showing 16 changed files with 325 additions and 214 deletions.
55 changes: 55 additions & 0 deletions docs/.vuepress/components/KitStore.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<template>
<div class="works__container">
<MagicCard
class="works__item"
v-for="(item, index) in data"
:key="index"
@click="() => jumpLink(item.link)"
>
<h4>{{ item.title }}</h4>
<p>{{ item.desc }}</p>
</MagicCard>
</div>
</template>

<script setup lang="ts">
import { kitStore as zhKitStore } from '../config/zh'
import { kitStore as enKitStore } from '../config/en'
import { computed, toRefs } from 'vue';
const props = defineProps({
lang: {
type: String,
default: 'zh'
}
})
const { lang } = toRefs(props)
const data = computed(() => {
return lang.value === 'zh' ? zhKitStore : enKitStore
})
const jumpLink = (link?: string) => {
if (link) {
window.open(link, '_blank')
}
}
</script>

<style scoped>
@import '@vuepress-reco/tailwindcss-config/lib/client/styles/tailwindcss-base.css';
.works__container {
@apply grid grid-cols-1 gap-4 max-w-screen-lg mx-auto py-16 px-6;
@apply md:grid-cols-3;
.works__item {
@apply py-4 px-6 cursor-pointer;
h4 {
@apply mt-0 mb-0 pt-0;
}
p {
@apply my-4 text-lighter;
}
}
}
</style>
3 changes: 2 additions & 1 deletion docs/.vuepress/config/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './bulletin'
export * from './navbar'
export * from './series'
export * from './bulletin'
export * from './kitStore'
12 changes: 12 additions & 0 deletions docs/.vuepress/config/en/kitStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const kitStore = [
{
title: '📖 @revili/revili-kit-demo',
desc: "Official example kit of revili",
link: 'https://github.com/revilijs/revili/tree/main/packages/%40revili/kit-demo'
},
{
title: '🎨 revili-kit-vuepress-reco',
desc: "Visual scaffolding of vuepress-theme-reco 2.x",
link: 'https://github.com/vuepress-reco/revili-kit-vuepress-reco'
},
]
2 changes: 1 addition & 1 deletion docs/.vuepress/config/en/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const navbar = [
}
]
},
{ text: 'Kit Store', link: '/docs/kit-store/@revili/revili-kit-default' },
{ text: 'Kit Store', link: '/docs/others/kit-store' },
]
7 changes: 4 additions & 3 deletions docs/.vuepress/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import * as enConfig from './en'
export const themeConfig = {
locales: {
'/': {
selectLanguageText: '选择语言',
selectLanguageText: 'Languages',
selectLanguageName: 'English',
navbar: enConfig.navbar,
series: enConfig.series,
bulletin: enConfig.bulletin,
},
'/zh/': {
selectLanguageText: 'Languages',
selectLanguageText: '选择语言',
selectLanguageName: '简体中文',
lastUpdatedText: '最后更新时间',
navbar: zhConfig.navbar,
Expand All @@ -23,5 +23,6 @@ export const themeConfig = {
author: 'reco_luan',
docsRepo: 'https://github.com/revilijs/revili',
docsBranch: 'main',
docsDir: '/docs',
docsDir: '/',
componentsDir: './.vuepress/components',
}
3 changes: 2 additions & 1 deletion docs/.vuepress/config/zh/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './bulletin'
export * from './navbar'
export * from './series'
export * from './bulletin'
export * from './kitStore'
12 changes: 12 additions & 0 deletions docs/.vuepress/config/zh/kitStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const kitStore = [
{
title: '📖 @revili/revili-kit-demo',
desc: "revili 的官方套件案例",
link: 'https://github.com/revilijs/revili/tree/main/packages/%40revili/kit-demo'
},
{
title: '🎨 revili-kit-vuepress-reco',
desc: "vuepress-theme-reco 2.x 的可视化搭建平台",
link: 'https://github.com/vuepress-reco/revili-kit-vuepress-reco'
},
]
2 changes: 1 addition & 1 deletion docs/.vuepress/config/zh/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const navbar = [
}
]
},
{ text: '套件市场', link: '/zh/docs/kit-store/@revili/revili-kit-default' },
{ text: '套件市场', link: '/zh/docs/others/kit-store' },
]
8 changes: 7 additions & 1 deletion docs/.vuepress/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.banner-brand-wrapper .hero-content img {
@apply md:w-80 w-64;
}
}

body {
.works__container {
background-image: radial-gradient(rgba(93, 103, 232, 0.2) 10%, rgba(255, 255, 255, 0) 60%);
}
}
3 changes: 0 additions & 3 deletions docs/docs/kit-store/@revili/revili-kit-default.md

This file was deleted.

5 changes: 5 additions & 0 deletions docs/docs/others/kit-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Kit Store
---

<kit-store lang="en" />
7 changes: 4 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"build": "vuepress build ."
},
"devDependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.12",
"@vuepress/bundler-vite": "2.0.0-rc.13",
"@vuepress-reco/tailwindcss-config": "2.0.0-rc.81",
"vue": "^3.4.27",
"vuepress": "2.0.0-rc.12",
"vuepress-theme-reco": "2.0.0-rc.14"
"vuepress": "2.0.0-rc.13",
"vuepress-theme-reco": "2.0.0-rc.15"
},
"author": "reco_luan",
"license": "MIT"
Expand Down
Loading

0 comments on commit 0f0904b

Please sign in to comment.