From 1be4fea2f539c85eef4ae61e77f2dd25fd803c79 Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Sat, 26 Apr 2025 15:05:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tone-page-web/app/resource/page.tsx | 36 ++++++++++++++++++++- tone-page-web/components/ui/badge.tsx | 46 +++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 tone-page-web/components/ui/badge.tsx diff --git a/tone-page-web/app/resource/page.tsx b/tone-page-web/app/resource/page.tsx index d0d184e..bc8d783 100644 --- a/tone-page-web/app/resource/page.tsx +++ b/tone-page-web/app/resource/page.tsx @@ -1,5 +1,39 @@ +import { + Card, + CardContent, +} from "@/components/ui/card"; + + export default function Resources() { return ( -
+
+

精心挑选并收藏的资源

+

请在浏览此部分内容前阅读并同意 + 《使用条款和隐私政策》 + ,继续使用或浏览表示您接受协议条款。

+ +
+ { + [0, 1, 2, 3, 4, 5].map((item) => ( + + + +
+ +
+
Title 666 66 666 66
+
你好这是一段随机文本,你好这是一段随机文本,你好这是一段随机文本,
+
+
第三方来源
+
+
+
+
+
+
+ )) + } +
+
) } \ No newline at end of file diff --git a/tone-page-web/components/ui/badge.tsx b/tone-page-web/components/ui/badge.tsx new file mode 100644 index 0000000..0205413 --- /dev/null +++ b/tone-page-web/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" + + return ( + + ) +} + +export { Badge, badgeVariants }