docs: add shacdn to website

This commit is contained in:
moonrailgun 2024-10-12 20:07:11 +08:00
parent c0e2ef0fe8
commit 763810e8b7
6 changed files with 171 additions and 2 deletions

View File

@ -704,9 +704,15 @@ importers:
'@mdx-js/react': '@mdx-js/react':
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.1(@types/react@18.2.78)(react@18.3.1) version: 3.0.1(@types/react@18.2.78)(react@18.3.1)
'@radix-ui/react-icons':
specifier: ^1.3.0
version: 1.3.0(react@18.3.1)
antd: antd:
specifier: ^5.12.5 specifier: ^5.12.5
version: 5.13.1(date-fns@3.6.0)(moment@2.30.1)(react-dom@18.2.0(react@18.3.1))(react@18.3.1) version: 5.13.1(date-fns@3.6.0)(moment@2.30.1)(react-dom@18.2.0(react@18.3.1))(react@18.3.1)
class-variance-authority:
specifier: ^0.7.0
version: 0.7.0
clsx: clsx:
specifier: ^1.2.1 specifier: ^1.2.1
version: 1.2.1 version: 1.2.1
@ -734,6 +740,12 @@ importers:
react-vertical-timeline-component: react-vertical-timeline-component:
specifier: ^3.6.0 specifier: ^3.6.0
version: 3.6.0(react@18.3.1) version: 3.6.0(react@18.3.1)
tailwind-merge:
specifier: ^2.2.1
version: 2.2.1
tailwindcss-animate:
specifier: ^1.0.7
version: 1.0.7(tailwindcss@3.4.1(ts-node@10.9.1(@types/node@20.12.7)(typescript@5.5.4)))
tianji-client-sdk: tianji-client-sdk:
specifier: workspace:^ specifier: workspace:^
version: link:../packages/client-sdk version: link:../packages/client-sdk
@ -15897,6 +15909,10 @@ snapshots:
dependencies: dependencies:
react: 18.2.0 react: 18.2.0
'@radix-ui/react-icons@1.3.0(react@18.3.1)':
dependencies:
react: 18.3.1
'@radix-ui/react-id@1.0.1(@types/react@18.2.78)(react@18.2.0)': '@radix-ui/react-id@1.0.1(@types/react@18.2.78)(react@18.2.0)':
dependencies: dependencies:
'@babel/runtime': 7.24.0 '@babel/runtime': 7.24.0

View File

@ -19,7 +19,9 @@
"@docusaurus/plugin-sitemap": "3.5.2", "@docusaurus/plugin-sitemap": "3.5.2",
"@docusaurus/preset-classic": "3.5.2", "@docusaurus/preset-classic": "3.5.2",
"@mdx-js/react": "^3.0.0", "@mdx-js/react": "^3.0.0",
"@radix-ui/react-icons": "^1.3.0",
"antd": "^5.12.5", "antd": "^5.12.5",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"docusaurus-preset-openapi": "^0.7.5", "docusaurus-preset-openapi": "^0.7.5",
"prism-react-renderer": "^2.1.0", "prism-react-renderer": "^2.1.0",
@ -29,6 +31,8 @@
"react-responsive-carousel": "^3.2.23", "react-responsive-carousel": "^3.2.23",
"react-slick": "^0.29.0", "react-slick": "^0.29.0",
"react-vertical-timeline-component": "^3.6.0", "react-vertical-timeline-component": "^3.6.0",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"tianji-client-sdk": "workspace:^" "tianji-client-sdk": "workspace:^"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,82 @@
@tailwind base; @tailwind base;
@layer base { @layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--ring: 215 20.2% 65.1%;
--radius: 0.5rem;
}
.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--border: 216 34% 17%;
--input: 216 34% 17%;
--card: 224 71% 4%;
--card-foreground: 213 31% 91%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--ring: 216 34% 17%;
--radius: 0.5rem;
}
}
@layer base {
* {
@apply border-border;
}
body {
/* @apply bg-background text-foreground; */
font-feature-settings: "rlig" 1, "calt" 1;
}
/* Scrollbar */ /* Scrollbar */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;

6
website/src/lib/utils.ts Normal file
View File

@ -0,0 +1,6 @@
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

View File

@ -1,5 +1,6 @@
import type { Config } from 'tailwindcss'; import type { Config } from 'tailwindcss';
import { PluginCreator } from 'tailwindcss/types/config'; import { PluginCreator } from 'tailwindcss/types/config';
import { fontFamily } from 'tailwindcss/defaultTheme';
const plugin: PluginCreator = (api) => { const plugin: PluginCreator = (api) => {
api.addUtilities({ api.addUtilities({
@ -19,7 +20,72 @@ export default {
}, },
content: ['./src/**/*.{html,tsx}'], content: ['./src/**/*.{html,tsx}'],
theme: { theme: {
extend: {}, container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
},
borderRadius: {
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: 'calc(var(--radius) - 4px)',
},
fontFamily: {
sans: ['var(--font-sans)', ...fontFamily.sans],
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
}, },
plugins: [plugin], plugins: [plugin, require('tailwindcss-animate')],
} satisfies Config; } satisfies Config;

View File

@ -5,6 +5,7 @@
"baseUrl": ".", "baseUrl": ".",
"strict": false, "strict": false,
"paths": { "paths": {
"@/*": ["./*"],
"@/utils/style": ["../src/client/utils/style"] "@/utils/style": ["../src/client/utils/style"]
} }
} }