mirror of
https://github.com/lingke-net/koring-space.git
synced 2026-09-12 05:45:17 +08:00
基础
This commit is contained in:
+148
@@ -0,0 +1,148 @@
|
||||
@import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
@import "shadcn/tailwind.css";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
@theme {
|
||||
--animate-warning-scroll: warning-scroll 1.5s linear infinite;
|
||||
@keyframes warning-scroll {
|
||||
from { background-position: 0 0; }
|
||||
to { background-position: 56.56px 0; }
|
||||
}
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: var(--font-sans);
|
||||
--font-heading: var(--font-sans);
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-ring: var(--ring);
|
||||
--color-input: var(--input);
|
||||
--color-border: var(--border);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-card: var(--card);
|
||||
--radius-sm: calc(var(--radius) * 0.6);
|
||||
--radius-md: calc(var(--radius) * 0.8);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) * 1.4);
|
||||
--radius-2xl: calc(var(--radius) * 1.8);
|
||||
--radius-3xl: calc(var(--radius) * 2.2);
|
||||
--radius-4xl: calc(var(--radius) * 2.6);
|
||||
--animate-meteor: meteor 5s linear infinite;
|
||||
@keyframes meteor {
|
||||
0% {
|
||||
transform: rotate(var(--angle)) translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
70% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(var(--angle)) translateX(-500px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.145 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.145 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.205 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
--muted: oklch(0.97 0 0);
|
||||
--muted-foreground: oklch(0.556 0 0);
|
||||
--accent: oklch(0.97 0 0);
|
||||
--accent-foreground: oklch(0.205 0 0);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.922 0 0);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--chart-1: oklch(0.87 0 0);
|
||||
--chart-2: oklch(0.556 0 0);
|
||||
--chart-3: oklch(0.439 0 0);
|
||||
--chart-4: oklch(0.371 0 0);
|
||||
--chart-5: oklch(0.269 0 0);
|
||||
--radius: 0.625rem;
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.205 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.97 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||
--sidebar-border: oklch(0.922 0 0);
|
||||
--sidebar-ring: oklch(0.708 0 0);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.145 0 0);
|
||||
--foreground: oklch(0.985 0 0);
|
||||
--card: oklch(0.205 0 0);
|
||||
--card-foreground: oklch(0.985 0 0);
|
||||
--popover: oklch(0.205 0 0);
|
||||
--popover-foreground: oklch(0.985 0 0);
|
||||
--primary: oklch(0.922 0 0);
|
||||
--primary-foreground: oklch(0.205 0 0);
|
||||
--secondary: oklch(0.269 0 0);
|
||||
--secondary-foreground: oklch(0.985 0 0);
|
||||
--muted: oklch(0.269 0 0);
|
||||
--muted-foreground: oklch(0.708 0 0);
|
||||
--accent: oklch(0.269 0 0);
|
||||
--accent-foreground: oklch(0.985 0 0);
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.556 0 0);
|
||||
--chart-1: oklch(0.87 0 0);
|
||||
--chart-2: oklch(0.556 0 0);
|
||||
--chart-3: oklch(0.439 0 0);
|
||||
--chart-4: oklch(0.371 0 0);
|
||||
--chart-5: oklch(0.269 0 0);
|
||||
--sidebar: oklch(0.205 0 0);
|
||||
--sidebar-foreground: oklch(0.985 0 0);
|
||||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.269 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.556 0 0);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { Header } from "@/layout/header";
|
||||
import { Footer } from "@/layout/footer";
|
||||
import Script from "next/script";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const alimamaFangYuan = localFont({
|
||||
src: "../public/font/Alimama.ttf",
|
||||
variable: "--font-sans",
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "RivFox",
|
||||
description: "Generated by create next app",
|
||||
icons: {
|
||||
icon: "/favicon.svg",
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={cn("h-full", "antialiased", alimamaFangYuan.variable, geistMono.variable, "font-sans")}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">
|
||||
<Header />
|
||||
<main className="flex-1 pt-14 px-4 sm:px-10 lg:px-48">
|
||||
{children}
|
||||
<Script
|
||||
src="https://analysis.rivfox.com/api/script.js"
|
||||
data-site-id="aaedd41de497"
|
||||
strategy="afterInteractive"
|
||||
/>
|
||||
</main>
|
||||
<Footer/>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { useNewsStore } from "@/lib/database";
|
||||
|
||||
export default async function NewsPage() {
|
||||
const newsList = await useNewsStore.findAsync({});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-8">
|
||||
<h1 className="text-2xl font-bold">新闻动态</h1>
|
||||
|
||||
<div className="grid gap-4">
|
||||
{newsList.length > 0 ? (
|
||||
newsList.map((item: any) => (
|
||||
<div
|
||||
key={item._id}
|
||||
className="p-4 border rounded-lg shadow-sm hover:shadow-md transition-shadow"
|
||||
>
|
||||
<h2 className="text-lg font-semibold">{item.title || "无标题"}</h2>
|
||||
<p className="text-gray-500 text-sm mt-2">{item.content || "暂无内容..."}</p>
|
||||
<div className="text-xs text-gray-400 mt-4">
|
||||
发布于: {item.createdAt ? new Date(item.createdAt).toLocaleDateString() : "未知"}
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<p className="text-muted-foreground">目前还没有新闻内容。</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
import { FlickeringGrid } from "@/components/ui/flickering-grid";
|
||||
import { ArrowUpRight, HammerIcon } from "lucide-react";
|
||||
import { Marquee, MarqueeContent, MarqueeFade, MarqueeItem } from "@/components/kibo-ui/marquee";
|
||||
import { Status, StatusIndicator } from "@/components/kibo-ui/status";
|
||||
import { Meteors } from "@/components/ui/meteors";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col w-full h-full gap-4 md:gap-8">
|
||||
<div className="relative overflow-hidden rounded-xl border border-amber-500/50 group">
|
||||
{/* 滚动条纹层 */}
|
||||
<div
|
||||
className="absolute inset-0 z-0 animate-warning-scroll opacity-100"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"repeating-linear-gradient(-45deg, #f59e0b, #f59e0b 20px, #000 20px, #000 40px)",
|
||||
backgroundSize: "56.56px 56.56px"
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* 内容层 */}
|
||||
<div className="relative z-10 flex items-center justify-center gap-4 p-3 bg-amber-500/80">
|
||||
<div className="flex items-center gap-2 px-3 py-1 bg-black rounded-full text-amber-500">
|
||||
<HammerIcon className="size-4" />
|
||||
<span className="text-[10px] font-black tracking-widest">正在接受测试</span>
|
||||
</div>
|
||||
<p className="text-black font-bold text-sm tracking-tight">Koring Launcher UI 预览版本已发布</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="relative w-full h-120 overflow-hidden">
|
||||
<div className="relative rounded-xl border w-full h-full">
|
||||
<div className="absolute left-12 top-12 flex flex-col gap-2">
|
||||
<span className="font-bold text-5xl">Koring Team</span>
|
||||
<span className="text-xl">创意无限</span>
|
||||
</div>
|
||||
|
||||
<span className="absolute right-12 bottom-12 text-xl text-muted-foreground">
|
||||
与光年相遇,见宇宙未开源的无限
|
||||
<span className="text-sm">
|
||||
<br /> 以星辰为数据,用仰望作读取
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<FlickeringGrid
|
||||
className="relative inset-0 z-0 mask-[radial-gradient(700px_circle_at_center,white,transparent)]"
|
||||
squareSize={6}
|
||||
gridGap={14}
|
||||
color="#6b9eb6"
|
||||
maxOpacity={0.7}
|
||||
flickerChance={0.1}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href="/launcher"
|
||||
className="relative flex w-full flex-col overflow-hidden rounded-md border p-6 group dark text-white bg-[#0A0A0AFF]"
|
||||
>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
要不来尝尝鲜?试试这个...
|
||||
<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">Koring Launcher</h3>
|
||||
<p className="text-sm text-muted-foreground">基于 electron 的 Minecraft 启动器</p>
|
||||
</div>
|
||||
|
||||
<Meteors number={28} />
|
||||
</Link>
|
||||
|
||||
<div className="py-8 font-bold text-xl">
|
||||
<Marquee>
|
||||
<MarqueeFade side="left" />
|
||||
<MarqueeFade side="right" />
|
||||
<MarqueeContent>
|
||||
<MarqueeItem className="w-32">Launcher</MarqueeItem>
|
||||
<MarqueeItem className="w-32">Account</MarqueeItem>
|
||||
<MarqueeItem className="w-32">Play服务</MarqueeItem>
|
||||
<MarqueeItem className="w-32">木柴.空间</MarqueeItem>
|
||||
<MarqueeItem className="w-32">SkinEditer</MarqueeItem>
|
||||
<MarqueeItem className="w-32">创绘基金</MarqueeItem>
|
||||
</MarqueeContent>
|
||||
</Marquee>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3">
|
||||
<a
|
||||
href="https://docs.play.lenjing.work"
|
||||
target="_blank"
|
||||
className="group rounded-md border border-border p-6"
|
||||
>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>散射系列</b>
|
||||
<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">Sanshe Play</h3>
|
||||
<p className="text-sm text-muted-foreground">Minecraft 综合性一体化设施平台</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/launcher"
|
||||
className="group rounded-md border border-border p-6"
|
||||
>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>科灵启动器</b>
|
||||
<Status status="maintenance">
|
||||
<StatusIndicator />
|
||||
UI 预览版
|
||||
</Status>
|
||||
{/*<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />*/}
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">Koring Launcher</h3>
|
||||
<p className="text-sm text-muted-foreground">基于 electron 的 Minecraft 启动器</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a className="group rounded-md border border-border p-6">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>绘皮编辑器</b>
|
||||
<Status status="degraded">
|
||||
<StatusIndicator />
|
||||
待开发
|
||||
</Status>
|
||||
{/*<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />*/}
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">SkinEditer</h3>
|
||||
<p className="text-sm text-muted-foreground">基于 Tauri 的 Minecraft 皮肤编辑器</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a className="group rounded-md border border-border p-6">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>绘皮编辑器</b>
|
||||
<Status status="degraded">
|
||||
<StatusIndicator />
|
||||
封测中
|
||||
</Status>
|
||||
{/*<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />*/}
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">SkinEditer</h3>
|
||||
<p className="text-sm text-muted-foreground">基于 Tauri 的 Minecraft 皮肤编辑器</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a className="group rounded-md border border-border p-6">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>创汇基金</b>
|
||||
<Status status="degraded">
|
||||
<StatusIndicator />
|
||||
邀请制
|
||||
</Status>
|
||||
{/*<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />*/}
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">Koring Foreign Exchange Fund</h3>
|
||||
<p className="text-sm text-muted-foreground">100万 RMB 的创造力奖励基金</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://mchine.space"
|
||||
target="_blank"
|
||||
className="group rounded-md border border-border p-6"
|
||||
>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<b>木柴.空间</b>
|
||||
<ArrowUpRight className="size-4 -translate-x-2 translate-y-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100" />
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-1 font-semibold">MChine Space</h3>
|
||||
<p className="text-sm text-muted-foreground">Minecraft 创作者赞助平台</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { useNewsStore } from "@/lib/database";
|
||||
import NewsEditor from "@/components/news-editor";
|
||||
|
||||
export default async function NewsPage() {
|
||||
const newsList = await useNewsStore.findAsync({});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-[calc(100vh-25vh)]">
|
||||
<div className="flex-1">213</div>
|
||||
|
||||
<NewsEditor className="max-h-52" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user