update
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
|
||||||
}
|
|
36
.gitignore
vendored
@ -1,36 +0,0 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
.yarn/install-state.gz
|
|
||||||
|
|
||||||
# testing
|
|
||||||
/coverage
|
|
||||||
|
|
||||||
# next.js
|
|
||||||
/.next/
|
|
||||||
/out/
|
|
||||||
|
|
||||||
# production
|
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
*.pem
|
|
||||||
|
|
||||||
# debug
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env*.local
|
|
||||||
|
|
||||||
# vercel
|
|
||||||
.vercel
|
|
||||||
|
|
||||||
# typescript
|
|
||||||
*.tsbuildinfo
|
|
||||||
next-env.d.ts
|
|
23
404.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5.0">
|
||||||
|
<title>404 页面被吃了喵~</title>
|
||||||
|
<link rel="shortcut icon" href="/assets/img/404.png">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<br/><br/>
|
||||||
|
<br/><br/>
|
||||||
|
<br/><br/>
|
||||||
|
<br/><br/>
|
||||||
|
<br/><br/>
|
||||||
|
<center>
|
||||||
|
<div style="max-width: 400px;">
|
||||||
|
<img style="padding-bottom: 50px;" src="/assets/img/404.jpeg" width="100%"/>
|
||||||
|
<h2 style="font-weight: 300;">Not Found</h2>
|
||||||
|
<h6 style="font-weight: 300;">页面被吃了喵~</h6>
|
||||||
|
</div>
|
||||||
|
</center>
|
||||||
|
</body>
|
9
LICENSE
@ -1,9 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2025 mei
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,11 +0,0 @@
|
|||||||
import { NextResponse } from "next/server"
|
|
||||||
import fs from "fs"
|
|
||||||
import path from "path"
|
|
||||||
|
|
||||||
export async function GET() {
|
|
||||||
const filePath = path.join(process.cwd(), "public", "servers.yaml")
|
|
||||||
const yamlContent = fs.readFileSync(filePath, "utf8")
|
|
||||||
|
|
||||||
return NextResponse.json({ yaml: yamlContent })
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
|||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
@layer utilities {
|
|
||||||
.text-balance {
|
|
||||||
text-wrap: balance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@layer base {
|
|
||||||
:root {
|
|
||||||
--background: 0 0% 100%;
|
|
||||||
--foreground: 0 0% 3.9%;
|
|
||||||
--card: 0 0% 100%;
|
|
||||||
--card-foreground: 0 0% 3.9%;
|
|
||||||
--popover: 0 0% 100%;
|
|
||||||
--popover-foreground: 0 0% 3.9%;
|
|
||||||
--primary: 0 0% 9%;
|
|
||||||
--primary-foreground: 0 0% 98%;
|
|
||||||
--secondary: 0 0% 96.1%;
|
|
||||||
--secondary-foreground: 0 0% 9%;
|
|
||||||
--muted: 0 0% 96.1%;
|
|
||||||
--muted-foreground: 0 0% 45.1%;
|
|
||||||
--accent: 0 0% 96.1%;
|
|
||||||
--accent-foreground: 0 0% 9%;
|
|
||||||
--destructive: 0 84.2% 60.2%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
--border: 0 0% 89.8%;
|
|
||||||
--input: 0 0% 89.8%;
|
|
||||||
--ring: 0 0% 3.9%;
|
|
||||||
--chart-1: 12 76% 61%;
|
|
||||||
--chart-2: 173 58% 39%;
|
|
||||||
--chart-3: 197 37% 24%;
|
|
||||||
--chart-4: 43 74% 66%;
|
|
||||||
--chart-5: 27 87% 67%;
|
|
||||||
--radius: 0.5rem;
|
|
||||||
}
|
|
||||||
.dark {
|
|
||||||
--background: 0 0% 3.9%;
|
|
||||||
--foreground: 0 0% 98%;
|
|
||||||
--card: 0 0% 3.9%;
|
|
||||||
--card-foreground: 0 0% 98%;
|
|
||||||
--popover: 0 0% 3.9%;
|
|
||||||
--popover-foreground: 0 0% 98%;
|
|
||||||
--primary: 0 0% 98%;
|
|
||||||
--primary-foreground: 0 0% 9%;
|
|
||||||
--secondary: 0 0% 14.9%;
|
|
||||||
--secondary-foreground: 0 0% 98%;
|
|
||||||
--muted: 0 0% 14.9%;
|
|
||||||
--muted-foreground: 0 0% 63.9%;
|
|
||||||
--accent: 0 0% 14.9%;
|
|
||||||
--accent-foreground: 0 0% 98%;
|
|
||||||
--destructive: 0 62.8% 30.6%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
--border: 0 0% 14.9%;
|
|
||||||
--input: 0 0% 14.9%;
|
|
||||||
--ring: 0 0% 83.1%;
|
|
||||||
--chart-1: 220 70% 50%;
|
|
||||||
--chart-2: 160 60% 45%;
|
|
||||||
--chart-3: 30 80% 55%;
|
|
||||||
--chart-4: 280 65% 60%;
|
|
||||||
--chart-5: 340 75% 55%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@layer base {
|
|
||||||
* {
|
|
||||||
@apply border-border;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
@apply bg-background text-foreground;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
import type { Metadata } from "next";
|
|
||||||
import localFont from "next/font/local";
|
|
||||||
import "./globals.css";
|
|
||||||
|
|
||||||
const geistSans = localFont({
|
|
||||||
src: "./fonts/GeistVF.woff",
|
|
||||||
variable: "--font-geist-sans",
|
|
||||||
weight: "100 900",
|
|
||||||
});
|
|
||||||
const geistMono = localFont({
|
|
||||||
src: "./fonts/GeistMonoVF.woff",
|
|
||||||
variable: "--font-geist-mono",
|
|
||||||
weight: "100 900",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: "Create Next App",
|
|
||||||
description: "Generated by create next app",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function RootLayout({
|
|
||||||
children,
|
|
||||||
}: Readonly<{
|
|
||||||
children: React.ReactNode;
|
|
||||||
}>) {
|
|
||||||
return (
|
|
||||||
<html lang="en">
|
|
||||||
<body
|
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
);
|
|
||||||
}
|
|
78
app/page.tsx
@ -1,78 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
import ServerCard from "../components/ServerCard";
|
|
||||||
import ThemeToggle from "../components/ThemeToggle";
|
|
||||||
import SearchBar from "../components/SearchBar";
|
|
||||||
|
|
||||||
interface Server {
|
|
||||||
name: string;
|
|
||||||
description: string;
|
|
||||||
version_type: string;
|
|
||||||
version_range?: string; // 可选属性
|
|
||||||
links?: {
|
|
||||||
downloads?: string[];
|
|
||||||
"icon-GitHub"?: string;
|
|
||||||
"icon-jenkins"?: string;
|
|
||||||
}; // 修改后的可选属性
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Home() {
|
|
||||||
const [servers, setServers] = useState<Server[]>([]);
|
|
||||||
const [filteredServers, setFilteredServers] = useState<Server[]>([]);
|
|
||||||
const [theme, setTheme] = useState("light");
|
|
||||||
const [searchTerm, setSearchTerm] = useState("");
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
fetch("/api/servers")
|
|
||||||
.then((res) => res.json())
|
|
||||||
.then((data) => {
|
|
||||||
const parsedData = yaml.load(data.yaml) as { servers: Server[] };
|
|
||||||
setServers(parsedData.servers);
|
|
||||||
setFilteredServers(parsedData.servers);
|
|
||||||
});
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const filtered = servers.filter(
|
|
||||||
(server) =>
|
|
||||||
server.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
|
||||||
server.description.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
|
||||||
server.version_type.toLowerCase().includes(searchTerm.toLowerCase())
|
|
||||||
);
|
|
||||||
setFilteredServers(filtered);
|
|
||||||
}, [searchTerm, servers]);
|
|
||||||
|
|
||||||
const toggleTheme = () => {
|
|
||||||
setTheme(theme === "light" ? "dark" : "light");
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={`min-h-screen ${
|
|
||||||
theme === "dark"
|
|
||||||
? "bg-gray-900 text-white"
|
|
||||||
: "bg-gray-100 text-gray-900"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<div className="container mx-auto px-4 py-8">
|
|
||||||
<header className="flex flex-col md:flex-row justify-between items-center mb-8">
|
|
||||||
<h1 className="text-4xl font-bold mb-4 md:mb-0">MSList</h1>
|
|
||||||
<div className="flex items-center space-x-4">
|
|
||||||
<SearchBar searchTerm={searchTerm} setSearchTerm={setSearchTerm} />
|
|
||||||
<ThemeToggle theme={theme} toggleTheme={toggleTheme} />
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
||||||
{filteredServers.map((server, index) => (
|
|
||||||
<ServerCard key={index} server={server} theme={theme} />
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
{filteredServers.length === 0 && (
|
|
||||||
<p className="text-center mt-8 text-lg">没有找到匹配的服务器。</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
4
assets/css/font-awesome.min.css
vendored
Normal file
2661
assets/css/home.main.css
Normal file
BIN
assets/css/images/bg01.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
110
assets/css/mc.css
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
.container {
|
||||||
|
width: 90%;
|
||||||
|
margin: auto auto 10%;
|
||||||
|
background-color: rgba(255, 255, 255, 0.6);
|
||||||
|
color: rgba(0, 0, 0, 1);
|
||||||
|
padding: 2% 3.5%;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
background-image: url('/resource/img/mc-background.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-size: cover;
|
||||||
|
font-family:"Bitstream Vera Sans","Lucida Grande", Verdana, Lucida, sans-serif;
|
||||||
|
font-size: .9em;
|
||||||
|
margin: 0px 20px;
|
||||||
|
}
|
||||||
|
tr.even {
|
||||||
|
background:#EEE;
|
||||||
|
}
|
||||||
|
table th,td {
|
||||||
|
padding: 0em 0.6em;
|
||||||
|
height: 1.8em;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
text-align:left;
|
||||||
|
font-weight:bold;
|
||||||
|
background:#EEE;
|
||||||
|
border-bottom:1px solid #aaa;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: rgb(0, 0, 205);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border:1px solid #aaa;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
float: left;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 90%;
|
||||||
|
color: #c7254e;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: #f9f2f4;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#mirror-data, #mirror-usage, #mirror-links, #mirror-misc {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
h1, h3 {
|
||||||
|
color: rgb(0, 0, 205);
|
||||||
|
}
|
||||||
|
.hr {
|
||||||
|
border-bottom: dashed #777 1px;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
.hr hr {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
#footer a {
|
||||||
|
color: #555;
|
||||||
|
margin: 0px 10px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 110%;
|
||||||
|
color: dimgrey;
|
||||||
|
border:1px dashed black;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 8px;
|
||||||
|
width: 800px;
|
||||||
|
line-height: 150%;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
p.answer {
|
||||||
|
text-indent: 20px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
#distro-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#copyright {
|
||||||
|
color: #555;
|
||||||
|
margin: 0px 10px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
102
assets/css/mirror.css
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/* CSS file for 163 mirror site. http://mirrors.163.com/
|
||||||
|
* * Copyright (c) 2009, Netease corp.
|
||||||
|
* * This work is under Creative Common Attribution 2.5 China Mainland License.
|
||||||
|
* */
|
||||||
|
body{
|
||||||
|
font-family:"Bitstream Vera Sans","Lucida Grande", Verdana, Lucida, sans-serif;
|
||||||
|
font-size: .9em;
|
||||||
|
margin: 0px 20px;
|
||||||
|
}
|
||||||
|
tr.even {
|
||||||
|
background:#EEE;
|
||||||
|
}
|
||||||
|
table th,td {
|
||||||
|
padding: 0em 0.6em;
|
||||||
|
height: 1.8em;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
text-align:left;
|
||||||
|
font-weight:bold;
|
||||||
|
background:#EEE;
|
||||||
|
border-bottom:1px solid #aaa;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: rgb(0, 0, 205);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border:1px solid #aaa;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
float: left;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 90%;
|
||||||
|
color: #c7254e;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: #f9f2f4;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#mirror-data, #mirror-usage, #mirror-links, #mirror-misc {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
h1, h3 {
|
||||||
|
color: rgb(0, 0, 205);
|
||||||
|
}
|
||||||
|
.hr {
|
||||||
|
border-bottom: dashed #777 1px;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
.hr hr {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
#footer a {
|
||||||
|
color: #555;
|
||||||
|
margin: 0px 10px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 110%;
|
||||||
|
color: dimgrey;
|
||||||
|
border:1px dashed black;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 8px;
|
||||||
|
width: 800px;
|
||||||
|
line-height: 150%;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
p.answer {
|
||||||
|
text-indent: 20px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
#distro-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#copyright {
|
||||||
|
color: #555;
|
||||||
|
margin: 0px 10px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
BIN
assets/fonts/FontAwesome.otf
Normal file
BIN
assets/fonts/fontawesome-webfont.eot
Normal file
2671
assets/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
assets/fonts/fontawesome-webfont.ttf
Normal file
BIN
assets/fonts/fontawesome-webfont.woff
Normal file
BIN
assets/fonts/fontawesome-webfont.woff2
Normal file
BIN
assets/img/404.jpeg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/img/404.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/img/cats/cat1.jpg
Normal file
After Width: | Height: | Size: 205 KiB |
BIN
assets/img/cats/cat10.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
assets/img/cats/cat11.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
assets/img/cats/cat12.jpg
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
assets/img/cats/cat13.jpg
Normal file
After Width: | Height: | Size: 514 KiB |
BIN
assets/img/cats/cat14.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
assets/img/cats/cat15.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
assets/img/cats/cat16.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
assets/img/cats/cat17.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
assets/img/cats/cat2.gif
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/img/cats/cat3.gif
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/img/cats/cat4.jpg
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
assets/img/cats/cat5.gif
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
assets/img/cats/cat6.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
assets/img/cats/cat7.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
assets/img/cats/cat8.jpg
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
assets/img/cats/cat9.gif
Normal file
After Width: | Height: | Size: 328 KiB |
BIN
assets/img/mc-background.png
Normal file
After Width: | Height: | Size: 494 KiB |
BIN
assets/img/polars-ico.jpg
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
5
assets/js/jquery-1.11.3.min.js
vendored
Normal file
0
assets/js/jquery-3.3.1.min.js
vendored
Normal file
121
assets/js/select.js
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
const versionAvailability = {
|
||||||
|
"paper": [
|
||||||
|
{ label: "1.8.8", value: "1.88" },
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.14.2", value: "11.42" },
|
||||||
|
{ label: "1.14.4", value: "11.44" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" },
|
||||||
|
{ label: "1.19.2", value: "11.92" },
|
||||||
|
{ label: "1.19.4", value: "11.94" },
|
||||||
|
{ label: "1.20", value: "12" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" },
|
||||||
|
],
|
||||||
|
"forge": [
|
||||||
|
{ label: "1.8.8", value: "1.88" },
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.14.2", value: "11.42" },
|
||||||
|
{ label: "1.14.4", value: "11.44" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" },
|
||||||
|
{ label: "1.19.2", value: "11.92" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
],
|
||||||
|
"arclight": [
|
||||||
|
{ label: "1.16.1", value: "11.61" },
|
||||||
|
{ label: "1.18.1", value: "11.81" },
|
||||||
|
{ label: "1.19.2", value: "11.92" }
|
||||||
|
],
|
||||||
|
"catserver": [
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" }
|
||||||
|
],
|
||||||
|
"mohist": [
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" },
|
||||||
|
{ label: "1.19.2", value: "11.92" },
|
||||||
|
{ label: "1.19.4", value: "11.94" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
],
|
||||||
|
"folia": [
|
||||||
|
{ label: "1.19.4", value: "11.94" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
],
|
||||||
|
"purpur": [
|
||||||
|
{ label: "1.14.2", value: "11.42" },
|
||||||
|
{ label: "1.14.4", value: "11.44" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" },
|
||||||
|
{ label: "1.19.2", value: "11.92" },
|
||||||
|
{ label: "1.19.4", value: "11.94" },
|
||||||
|
{ label: "1.20", value: "12" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
],
|
||||||
|
"spigot": [
|
||||||
|
{ label: "1.8", value: "1.8" },
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.13.2", value: "11.32" },
|
||||||
|
{ label: "1.14.2", value: "11.42" },
|
||||||
|
{ label: "1.14.4", value: "11.44" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.18.2", value: "11.82" },
|
||||||
|
{ label: "1.19.2", value: "11.92" },
|
||||||
|
{ label: "1.19.4", value: "11.94" },
|
||||||
|
{ label: "1.20", value: "12" },
|
||||||
|
{ label: "1.20.1", value: "12.01" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
],
|
||||||
|
"airplane": [
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.17.1", value: "11.71" }
|
||||||
|
],
|
||||||
|
"akarin": [
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.13.2", value: "11.32" },
|
||||||
|
{ label: "1.14.4", value: "11.44" }
|
||||||
|
],
|
||||||
|
"spongeforge": [
|
||||||
|
{ label: "1.8.9", value: "1.89" },
|
||||||
|
{ label: "1.12.2", value: "11.22" },
|
||||||
|
{ label: "1.16.5", value: "11.65" },
|
||||||
|
{ label: "1.20.2", value: "12.02" }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
const distributionSelect = document.getElementById("distributionSelect");
|
||||||
|
const versionSelect = document.getElementById("versionSelect");
|
||||||
|
|
||||||
|
// 当发行版选择发生变化时,更新版本选择区
|
||||||
|
distributionSelect.addEventListener("change", () => {
|
||||||
|
const selectedDistribution = distributionSelect.value;
|
||||||
|
const availableVersions = versionAvailability[selectedDistribution];
|
||||||
|
|
||||||
|
// 清空版本选择区
|
||||||
|
versionSelect.innerHTML = "";
|
||||||
|
|
||||||
|
// 添加新版本选项
|
||||||
|
availableVersions.forEach(version => {
|
||||||
|
const option = document.createElement("option");
|
||||||
|
option.value = version.value; // 使用自定义的value属性
|
||||||
|
option.textContent = version.label; // 显示给用户的版本名称或标签
|
||||||
|
versionSelect.appendChild(option);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始加载时,预填充版本选择区(如果有默认选择的话)
|
||||||
|
distributionSelect.dispatchEvent(new Event("change"));
|
||||||
|
|
||||||
|
function updateContent(className, newValue) {
|
||||||
|
const elements = document.getElementsByClassName(className);
|
||||||
|
for (let i = 0; i < elements.length; i++) {
|
||||||
|
elements[i].textContent = newValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://ui.shadcn.com/schema.json",
|
|
||||||
"style": "new-york",
|
|
||||||
"rsc": true,
|
|
||||||
"tsx": true,
|
|
||||||
"tailwind": {
|
|
||||||
"config": "tailwind.config.ts",
|
|
||||||
"css": "app/globals.css",
|
|
||||||
"baseColor": "neutral",
|
|
||||||
"cssVariables": true,
|
|
||||||
"prefix": ""
|
|
||||||
},
|
|
||||||
"aliases": {
|
|
||||||
"components": "@/components",
|
|
||||||
"utils": "@/lib/utils",
|
|
||||||
"ui": "@/components/ui",
|
|
||||||
"lib": "@/lib",
|
|
||||||
"hooks": "@/hooks"
|
|
||||||
},
|
|
||||||
"iconLibrary": "lucide"
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
import { Search } from "lucide-react"
|
|
||||||
|
|
||||||
interface SearchBarProps {
|
|
||||||
searchTerm: string
|
|
||||||
setSearchTerm: (term: string) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function SearchBar({ searchTerm, setSearchTerm }: SearchBarProps) {
|
|
||||||
return (
|
|
||||||
<div className="relative w-full max-w-md mx-auto mb-6">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="搜索服务器..."
|
|
||||||
value={searchTerm}
|
|
||||||
onChange={(e) => setSearchTerm(e.target.value)}
|
|
||||||
className="w-full px-4 py-2 pl-10 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
|
|
||||||
/>
|
|
||||||
<Search className="absolute left-3 top-2.5 h-5 w-5 text-gray-400" />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
|||||||
import Image from "next/image";
|
|
||||||
import { Github, Server } from "lucide-react";
|
|
||||||
|
|
||||||
interface Server {
|
|
||||||
name: string;
|
|
||||||
description: string;
|
|
||||||
version_type: string;
|
|
||||||
version_range?: string;
|
|
||||||
image?: string;
|
|
||||||
links?: {
|
|
||||||
downloads?: string[];
|
|
||||||
"icon-GitHub"?: string;
|
|
||||||
"icon-jenkins"?: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ServerProps {
|
|
||||||
server: Server;
|
|
||||||
theme: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ServerCard({ server, theme }: ServerProps) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={`rounded-lg shadow-lg overflow-hidden ${
|
|
||||||
theme === "dark" ? "bg-gray-800" : "bg-white"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<div className="p-4">
|
|
||||||
<div className="flex items-center mb-4">
|
|
||||||
<Image
|
|
||||||
src={server.image || "/placeholder.svg"}
|
|
||||||
alt={server.name}
|
|
||||||
width={64}
|
|
||||||
height={64}
|
|
||||||
className="rounded-full"
|
|
||||||
/>
|
|
||||||
<div className="ml-4">
|
|
||||||
<h2 className="text-xl font-semibold">{server.name}</h2>
|
|
||||||
<p className="text-sm text-gray-500">{server.version_type}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p className="text-sm mb-4">{server.description}</p>
|
|
||||||
<p className="text-sm mb-2">版本范围: {server.version_range || "无"}</p>
|
|
||||||
<div className="flex flex-wrap gap-2 mb-4">
|
|
||||||
{Array.isArray(server.links?.downloads) &&
|
|
||||||
server.links.downloads.length > 0 ? (
|
|
||||||
server.links.downloads.map((link, index) => (
|
|
||||||
<a
|
|
||||||
key={index}
|
|
||||||
href={link}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className={`text-sm px-2 py-1 rounded ${
|
|
||||||
theme === "dark"
|
|
||||||
? "bg-blue-600 hover:bg-blue-700"
|
|
||||||
: "bg-blue-100 hover:bg-blue-200"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
下载 {index + 1}
|
|
||||||
</a>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<p className="text-sm text-gray-500">暂无下载链接</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="flex gap-4">
|
|
||||||
{server.links?.["icon-GitHub"] && (
|
|
||||||
<a
|
|
||||||
href={server.links["icon-GitHub"]}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
|
|
||||||
>
|
|
||||||
<Github className="w-6 h-6" />
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
{server.links?.["icon-jenkins"] && (
|
|
||||||
<a
|
|
||||||
href={server.links["icon-jenkins"]}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
|
|
||||||
>
|
|
||||||
<Server className="w-6 h-6" />
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { Moon, Sun } from "lucide-react"
|
|
||||||
|
|
||||||
interface ThemeToggleProps {
|
|
||||||
theme: string
|
|
||||||
toggleTheme: () => void
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ThemeToggle({ theme, toggleTheme }: ThemeToggleProps) {
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
onClick={toggleTheme}
|
|
||||||
className={`p-2 rounded-full ${theme === "dark" ? "bg-gray-800 text-yellow-300" : "bg-gray-200 text-gray-800"}`}
|
|
||||||
>
|
|
||||||
{theme === "dark" ? <Sun className="w-5 h-5" /> : <Moon className="w-5 h-5" />}
|
|
||||||
</button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
21
config.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// 下载文件存储目录(如果下载模式为1时建议修改
|
||||||
|
$path = './file';
|
||||||
|
|
||||||
|
// 网址设定,为空为自动获取
|
||||||
|
$siteURL = '/';
|
||||||
|
|
||||||
|
// 下载模式
|
||||||
|
// 此值为2时:直接返回文件在本站的路径
|
||||||
|
// 此值为3时:将文件的路径拼接到$downloadURL中($downloadURL变量生效
|
||||||
|
$downloadMode = 3;
|
||||||
|
|
||||||
|
// 单个文件下载限速,单位:KB/S(下载模式为1时生效
|
||||||
|
$maxSpeed = 10000;
|
||||||
|
|
||||||
|
// 文件服务器链接(下载模式为3时生效
|
||||||
|
$downloadURL = "/file";
|
||||||
|
|
||||||
|
// umami
|
||||||
|
$umami = '<script defer src="https://umami.mmeiblog.cn/script.js" data-website-id="5b3cf059-b49b-444c-ab25-aa69e26a4c10"></script>';
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
BIN
favicon.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
14
index.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
$f = isset($_GET['f']) ? str_replace("//", "/", $_GET['f']) : '';
|
||||||
|
|
||||||
|
if (empty($f)) {
|
||||||
|
include('config.php');
|
||||||
|
include('pages/home.php');
|
||||||
|
} else {
|
||||||
|
include('config.php');
|
||||||
|
include('pages/function.php');
|
||||||
|
include('pages/site_name.php');
|
||||||
|
include('pages/header.php');
|
||||||
|
include('pages/file.php');
|
||||||
|
}
|
||||||
|
?>
|
2
js-yaml.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
// js-yaml.d.ts
|
|
||||||
declare module 'js-yaml';
|
|