-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from radix-vue/v1
V1
- Loading branch information
Showing
333 changed files
with
6,254 additions
and
9,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
const { frontmatter: fm } = useData() | ||
</script> | ||
|
||
<template> | ||
<a | ||
v-if="fm.hero.prelink" | ||
:href="fm.hero.prelink.link" | ||
:target="fm.hero.prelink.target" | ||
class="inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold mb-3" | ||
> | ||
{{ fm.hero.prelink.title }} | ||
</a> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup lang="ts"> | ||
import { AspectRatio } from 'radix-vue' | ||
defineProps<{ | ||
title: string | ||
description?: string | ||
url: string | ||
image?: string | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<a class="flex flex-col bg-[var(--vp-c-bg-soft)] hover:bg-[var(--vp-c-bg-alt)] transition duration-300 rounded-xl p-4" target="_blank" :href="url"> | ||
<h5 class="font-bold">{{ title }}</h5> | ||
<p class="my-1 text-sm text-[var(--vp-c-text-2)]">{{ description }}</p> | ||
|
||
<AspectRatio v-if="image" :ratio="16 / 9" class="rounded-md mt-2 overflow-hidden "> | ||
<img class="w-full h-full object-cover" :src="image" :alt="title"> | ||
</AspectRatio> | ||
|
||
</a> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { AspectRatio } from 'radix-vue' | ||
import { onMounted, ref } from 'vue' | ||
defineOptions({ | ||
inheritAttrs: false, | ||
}) | ||
defineProps<{ src: string }>() | ||
const isMounted = ref(false) | ||
onMounted(() => { | ||
isMounted.value = true | ||
}) | ||
</script> | ||
|
||
<template> | ||
<AspectRatio> | ||
<iframe :src="src" class="w-full h-full" v-bind="$attrs" /> | ||
</AspectRatio> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
"D-Lite", | ||
"DennisSmuda", | ||
"edtorba", | ||
"enkot", | ||
"glennlaysonjr", | ||
"lepture", | ||
"kn0wn", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import CardLink from '../components/CardLink.vue' | ||
import { VPButton } from 'vitepress/theme' | ||
const { frontmatter } = useData() | ||
</script> | ||
|
||
<template> | ||
<div class="content px-6 sm:px-[48px] lg:px-[64px] py-6 sm:py-12"> | ||
<div class="mx-auto w-full container max-w-[1152px]"> | ||
<div class=" my-16 md:my-26 flex flex-col items-center text-center"> | ||
<h1 class="text-5xl md:text-6xl lg:text-7xl font-bold animate-text bg-gradient-to-r from-green-200 via-green-300 to-blue-400 bg-clip-text text-transparent "> | ||
Showcase | ||
</h1> | ||
<h2 class="mt-2 md:mt-6 md:text-2xl font-medium text-[var(--vp-c-text-2)] max-w-[540px]"> | ||
{{ frontmatter.description }} | ||
</h2> | ||
|
||
<VPButton text="Add Showcase" class="mt-6" target="_blank" href="https://github.com/radix-vue/radix-vue/blob/main/docs/content/showcase.md" /> | ||
</div> | ||
|
||
<div class="flex flex-col gap-8 md:gap-12"> | ||
<div> | ||
<h3 class="md:text-lg font-semibold ml-2 inline-flex items-center group"> | ||
Packages | ||
</h3> | ||
<div class="mt-4 grid md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||
<CardLink v-for="item in frontmatter.packages" :key="item.title" v-bind="item" /> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<h3 class="md:text-lg font-semibold ml-2 inline-flex items-center group"> | ||
Projects | ||
</h3> | ||
<div class="mt-4 grid md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||
<CardLink v-for="item in frontmatter.projects" :key="item.title" v-bind="item" /> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<h3 class="md:text-lg font-semibold ml-2 inline-flex items-center group"> | ||
Starters | ||
</h3> | ||
<div class="mt-4 grid md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||
<CardLink v-for="item in frontmatter.starters" :key="item.title" v-bind="item" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,37 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import { h } from 'vue' | ||
import Theme from 'vitepress/theme' | ||
import DefaultTheme from 'vitepress/theme' | ||
import HomePage from '../components/HomePage.vue' | ||
import HomePageDemo from '../components/HomePageDemo.vue' | ||
import Badge from '../components/Badge.vue' | ||
import Annoucement from '../components/Annoucement.vue' | ||
import EmbedIframe from '../components/EmbedIframe.vue' | ||
import LayoutShowcase from '../layouts/showcase.vue' | ||
import 'vitepress/dist/client/theme-default/styles/components/vp-doc.css' | ||
import './style.css' | ||
import './tailwind.postcss' | ||
import { type Theme } from 'vitepress' | ||
|
||
const regex = /\/(\w+)\.vue/ | ||
// @ts-expect-error | ||
const baseModules = import.meta.glob('../../components/*.vue', { eager: true }) | ||
// @ts-expect-error | ||
const tableModules = import.meta.glob('../../components/tables/*.vue', { eager: true }) | ||
|
||
export default { | ||
extends: Theme, | ||
extends: DefaultTheme, | ||
Layout: () => { | ||
return h(Theme.Layout, null, { | ||
return h(DefaultTheme.Layout, null, { | ||
'home-hero-prelink': () => h(Annoucement), | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
'home-features-after': () => h('div', [h(HomePageDemo), h(HomePage)]), | ||
}) | ||
}, | ||
enhanceApp({ app, router, siteData }) { | ||
for (const path in baseModules) | ||
app.component(path.match(regex)?.[1], baseModules[path]?.default) | ||
app.component(path.match(regex)?.[1] ?? '', (baseModules[path] as any)?.default) | ||
|
||
for (const path in tableModules) | ||
app.component(path.match(regex)?.[1], tableModules[path]?.default) | ||
app.component(path.match(regex)?.[1] ?? '', (tableModules[path] as any)?.default) | ||
|
||
app.component('Badge', Badge) | ||
app.component('Showcase', LayoutShowcase) | ||
app.component('EmbedIframe', EmbedIframe) | ||
}, | ||
} | ||
} satisfies Theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.