feat: 优化服务器卡片组件并添加新功能

- 更新服务器卡片样式,增加更多图标和链接类型
- 添加 Font Awesome 图标库支持
- 更新搜索栏 placeholder 文本
- 修改页面 metadata 信息
- 更新服务器列表数据,移除 jenkins 链接
This commit is contained in:
mei 2025-02-03 22:14:50 +08:00
parent ef3ab20f46
commit 36e4ee302b
7 changed files with 162 additions and 30 deletions

View File

@ -14,8 +14,17 @@ const geistMono = localFont({
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Minecraft Severs List",
description: "Minecraft Severs List",
keywords: ['一键开服脚本,Minecraft一键开服脚本,一键开服,Minecraft 服务端列表,Minecraft 服务端,Minecraft,Minecraft Severs List,Minecraft Severs,Linuxcat,linuxcat,linux'],
authors: [{ name: 'mei' }],
creator: 'mei',
publisher: 'mei',
formatDetection: {
email: false,
address: false,
telephone: false,
},
};
export default function RootLayout({

View File

@ -10,7 +10,7 @@ export default function SearchBar({ searchTerm, setSearchTerm }: SearchBarProps)
<div className="relative w-full max-w-md mx-auto mb-6">
<input
type="text"
placeholder="搜索服务..."
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"

View File

@ -1,5 +1,8 @@
import Image from "next/image";
import { Github, Server } from "lucide-react";
import { Github, PanelsTopLeft, Podcast, Server } from "lucide-react";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faBlog, faBook } from '@fortawesome/free-solid-svg-icons';
import { faDiscord, faQq, faTelegram } from '@fortawesome/free-brands-svg-icons';
interface Server {
name: string;
@ -10,7 +13,13 @@ interface Server {
links?: {
downloads?: string[];
"icon-GitHub"?: string;
"icon-jenkins"?: string;
"icon-website"?: string;
"icon-blog"?: string;
"icon-wiki"?: string;
"icon-discord"?: string;
"icon-QQ"?: string;
"icon-telegram"?: string;
"icon-shequ"?: string;
};
}
@ -22,8 +31,7 @@ interface ServerProps {
export default function ServerCard({ server, theme }: ServerProps) {
return (
<div
className={`rounded-lg shadow-lg overflow-hidden ${
theme === "dark" ? "bg-gray-800" : "bg-white"
className={`rounded-lg shadow-lg overflow-hidden ${theme === "dark" ? "bg-gray-800" : "bg-white"
}`}
>
<div className="p-4">
@ -51,8 +59,7 @@ export default function ServerCard({ server, theme }: ServerProps) {
href={link}
target="_blank"
rel="noopener noreferrer"
className={`text-sm px-2 py-1 rounded ${
theme === "dark"
className={`text-sm px-2 py-1 rounded ${theme === "dark"
? "bg-blue-600 hover:bg-blue-700"
: "bg-blue-100 hover:bg-blue-200"
}`}
@ -75,14 +82,74 @@ export default function ServerCard({ server, theme }: ServerProps) {
<Github className="w-6 h-6" />
</a>
)}
{server.links?.["icon-jenkins"] && (
{server.links?.["icon-website"] && (
<a
href={server.links["icon-jenkins"]}
href={server.links["icon-website"]}
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" />
<FontAwesomeIcon icon={faBlog} className="w-6 h-6" />
</a>
)}
{server.links?.["icon-blog"] && (
<a
href={server.links["icon-blog"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<PanelsTopLeft className="w-6 h-6" />
</a>
)}
{server.links?.["icon-discord"] && (
<a
href={server.links["icon-discord"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<FontAwesomeIcon icon={faDiscord} className="w-6 h-6" />
</a>
)}
{server.links?.["icon-wiki"] && (
<a
href={server.links["icon-wiki"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<FontAwesomeIcon icon={faBook} className="w-6 h-6" />
</a>
)}
{server.links?.["icon-QQ"] && (
<a
href={server.links["icon-QQ"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<FontAwesomeIcon icon={faQq} className="w-6 h-6" />
</a>
)}
{server.links?.["icon-telegram"] && (
<a
href={server.links["icon-telegram"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<FontAwesomeIcon icon={faTelegram} className="w-6 h-6" />
</a>
)}
{server.links?.["icon-shequ"] && (
<a
href={server.links["icon-shequ"]}
target="_blank"
rel="noopener noreferrer"
className="text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
>
<Podcast className="w-6 h-6" />
</a>
)}
</div>

View File

@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
output: 'export'
};
export default nextConfig;

64
package-lock.json generated
View File

@ -8,6 +8,10 @@
"name": "mslist",
"version": "0.1.0",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fs": "^0.0.1-security",
@ -107,6 +111,64 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@fortawesome/fontawesome-common-types": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz",
"integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/fontawesome-svg-core": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz",
"integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==",
"license": "MIT",
"dependencies": {
"@fortawesome/fontawesome-common-types": "6.7.2"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/free-brands-svg-icons": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.7.2.tgz",
"integrity": "sha512-zu0evbcRTgjKfrr77/2XX+bU+kuGfjm0LbajJHVIgBWNIDzrhpRxiCPNT8DW5AdmSsq7Mcf9D1bH0aSeSUSM+Q==",
"license": "(CC-BY-4.0 AND MIT)",
"dependencies": {
"@fortawesome/fontawesome-common-types": "6.7.2"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/free-solid-svg-icons": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz",
"integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==",
"license": "(CC-BY-4.0 AND MIT)",
"dependencies": {
"@fortawesome/fontawesome-common-types": "6.7.2"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/react-fontawesome": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.2.tgz",
"integrity": "sha512-EnkrprPNqI6SXJl//m29hpaNzOp1bruISWaOiRtkMi/xSvHJlzc2j2JAYS7egxt/EbjSNV/k6Xy0AQI6vB2+1g==",
"license": "MIT",
"dependencies": {
"prop-types": "^15.8.1"
},
"peerDependencies": {
"@fortawesome/fontawesome-svg-core": "~1 || ~6",
"react": ">=16.3"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
@ -4145,7 +4207,6 @@
"version": "15.8.1",
"resolved": "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
"dev": true,
"license": "MIT",
"dependencies": {
"loose-envify": "^1.4.0",
@ -4212,7 +4273,6 @@
"version": "16.13.1",
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true,
"license": "MIT"
},
"node_modules/read-cache": {

View File

@ -9,6 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fs": "^0.0.1-security",

View File

@ -9,7 +9,6 @@ servers:
- http://ci.josephworks.net/job/Akarin/job/ver%252F1.12.2/
- https://mirror.polars.cc/#/minecraft/core
icon-GitHub: https://github.com/Akarin-project/Akarin
icon-jenkins: http://ci.josephworks.net/job/Akarin/job/ver%252F1.12.2/
name: Akarin
version_range: 1.12.2 - 1.15.2
version_type: 插件端
@ -22,7 +21,7 @@ servers:
- https://www.fastmirror.net/#/download/Arclight
- https://sync.mcsl.com.cn/core/Arclight
- https://mirror.polars.cc/#/minecraft/core
icon-GitHub: https://github.com/softpak/HOSE
icon-GitHub: https://github.com/IzzelAliz/Arclight
name: Arclight
version_range: 1.14.2 - 1.20.4
version_type: 混合端
@ -65,7 +64,6 @@ servers:
- https://www.fastmirror.net/#/download/BungeeCord
icon-GitHub: https://github.com/SpigotMC/BungeeCord
icon-website: https://www.spigotmc.org/go/bungeecord
icon-jenkins: https://ci.md-5.net/job/BungeeCord/""
icon-wiki: https://www.spigotmc.org/wiki/bungeecord/
name: BungeeCord
version_range: '1.7'
@ -93,7 +91,6 @@ servers:
- https://github.com/Luohuayu/CatServer/releases
icon-GitHub: https://github.com/Luohuayu/CatServer
icon-website: https://catmc.org/
icon-jenkins: https://jenkins.rbqcloud.cn:30011/job/CatServer-1.16.5/lastSuccessfulBuild/
icon-telegram: https://t.me/CatServer
name: Catserver/LoliServer
version_range: 1.18.2
@ -210,7 +207,6 @@ servers:
- https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/
icon-GitHub: https://github.com/GeyserMC/Floodgate
icon-website: https://geysermc.org/
icon-jenkins: https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/
icon-wiki: https://geysermc.org/wiki/floodgate/S
name: Floodgate
version_range: 1.20.80 - 1.21.3
@ -237,7 +233,6 @@ servers:
icon-website: https://geysermc.org/
icon-blog: https://geysermc.org/blog
icon-discord: https://discord.gg/geysermc
icon-jenkins: ''
icon-wiki: https://geysermc.org/wiki/geyser/
name: Geyser
version_range: 1.20.80 - 1.21.3
@ -258,7 +253,6 @@ servers:
- https://github.com/SimplyRin/HexaCord/releases
icon-GitHub: https://github.com/SimplyRin/HexaCord/
icon-website: https://hexagonmc.eu/
icon-jenkins: https://ci.simplyrin.net/job/HexaCord/
icon-shequ: https://hexagonmc.eu/
name: HexaCord
version_range: 1.8 - 1.20
@ -375,7 +369,6 @@ servers:
icon-GitHub: https://github.com/CloudburstMC/Nukkit
icon-website: https://cloudburstmc.org/
icon-discord: https://discord.gg/5PzMkyK
icon-jenkins: https://ci.nukkitx.com/job/NukkitX/job/Nukkit/job/master
icon-shequ: https://nukkitx.com/forums
icon-wiki: https://nukkitx.com/wiki/nukkit
name: NukkitX
@ -388,7 +381,6 @@ servers:
downloads:
- https://ci.opencollab.dev//job/NukkitX/job/Nemisys/
icon-GitHub: https://github.com/iTXTech/Nemisys
icon-jenkins: https://ci.opencollab.dev//job/NukkitX/job/Nemisys/
name: Nemisys
version_range: ''
version_type: 群组端
@ -543,7 +535,6 @@ servers:
- https://hub.spigotmc.org/jenkins/job/BuildTools/
icon-GitHub: https://github.com/orgs/SpigotMC/
icon-website: https://www.spigotmc.org/
icon-jenkins: https://hub.spigotmc.org/jenkins/job/BuildTools/
icon-wiki: https://www.spigotmc.org/wiki/index/
name: Spigot
version_range: ''
@ -586,7 +577,6 @@ servers:
- https://ci.sugarcanemc.org/job/Sugarcane
icon-GitHub: https://github.com/SugarcaneMC/Sugarcane
icon-website: https://sugarcanemc.org/
icon-jenkins: https://ci.sugarcanemc.org/job/Sugarcane
name: Sugarcane
version_range: 1.17.1 - 1.19
version_type: 插件端