Skip to content

Commit 37ede0b

Browse files
committed
StudioPage Title Description
1 parent 54f72c0 commit 37ede0b

10 files changed

Lines changed: 136 additions & 4 deletions

docusaurus.config.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {themes as prismThemes} from 'prism-react-renderer';
1010

1111
/** @type {import('@docusaurus/types').Config} */
1212
const config = {
13-
title: 'KSSJW\'s Site',
14-
tagline: 'Hello World!',
13+
title: 'WindySky Project',
14+
tagline: 'The project created by KSSJW',
1515
favicon: 'img/Profile.ico',
1616

1717
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
@@ -83,12 +83,13 @@ const config = {
8383
respectPrefersColorScheme: true,
8484
},
8585
navbar: {
86-
title: 'KSSJW\'s Site',
86+
title: 'WindySky Project',
8787
logo: {
8888
alt: 'My Site Logo',
8989
src: 'img/Profile.svg',
9090
},
9191
items: [
92+
{to: '/studio', label: 'Studio', position: 'left'},
9293
{
9394
type: 'docSidebar',
9495
sidebarId: 'tutorialSidebar',
@@ -114,6 +115,10 @@ const config = {
114115
label: 'Home',
115116
to: '/',
116117
},
118+
{
119+
label: 'Studio',
120+
to: '/studio',
121+
},
117122
{
118123
label: 'Docs',
119124
to: '/docs/intro',

src/pages/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ function HomepageHeader() {
1717
</Heading>
1818
<p className="hero__subtitle">{siteConfig.tagline}</p>
1919
<div className={styles.buttons}>
20+
<Link
21+
className="button button--secondary button--lg"
22+
to="/studio">
23+
Studio
24+
</Link>
25+
<p>&emsp;</p>
2026
<Link
2127
className="button button--secondary button--lg"
2228
to="/docs/intro">
@@ -45,7 +51,7 @@ export default function Home() {
4551
return (
4652
<Layout
4753
title={`Hello from ${siteConfig.title}`}
48-
description="Description will go into a meta tag in <head />">
54+
description="The project created by KSSJW.">
4955
<HomepageHeader />
5056
<main>
5157
<HomepageFeatures />

src/pages/studio/index.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import Layout from '@theme/Layout';
2+
import styles from './index.module.css';
3+
import Link from '@docusaurus/Link';
4+
5+
// 卡片数据
6+
const DataMinecraftJavaEdition = [
7+
{
8+
img: '/img/Studio/GlowingMinecart.png',
9+
name: 'Glowing Minecart',
10+
description: 'Minecart lighting based on the original Minecraft.',
11+
link: 'https://github.com/KSSJW/glowing-minecart'
12+
},
13+
{
14+
img: '/img/Studio/KineticMinecart.png',
15+
name: 'Kinetic Minecart',
16+
description: 'Impact damage from high-speed minecarts!',
17+
link: 'https://github.com/KSSJW/kinetic-minecart'
18+
},
19+
{
20+
img: '/img/Studio/LeavesNightlyCI.png',
21+
name: 'Leaves Nightly CI',
22+
description: 'An unofficial, radical build project that builds the latest changes from upstream.',
23+
link: 'https://github.com/KSSJW/Leaves-Nightly-CI'
24+
},
25+
{
26+
img: '/img/Studio/MinecartHUD.png',
27+
name: 'Minecart HUD',
28+
description: 'Add a head-up display to the minecart.',
29+
link: 'https://github.com/KSSJW/minecart-hud'
30+
},
31+
{
32+
img: '/img/Studio/MinecartTrainsFork.png',
33+
name: 'Minecart Trains Fork',
34+
description: 'Add connectivity features for the minecart based on the original content.',
35+
link: 'https://github.com/KSSJW/minecart-trains-fork'
36+
},
37+
{
38+
img: '/img/Studio/RailwaySwitchController.png',
39+
name: 'Railway Switch Controller',
40+
description: 'You can see and control the railway switches ahead!',
41+
link: 'https://github.com/KSSJW/railway-switch-controller'
42+
},
43+
];
44+
45+
// 卡片组件
46+
function Card({ img, name, description, link }) {
47+
return (
48+
<Link to={link} className={styles.card}>
49+
<img src={img} alt={name} className={styles.cardImage} />
50+
<h3 className={styles.cardTitle}>{name}</h3>
51+
<p className={styles.cardDesc}>{description}</p>
52+
</Link>
53+
);
54+
}
55+
56+
// 页面组件
57+
export default function CardsPage() {
58+
return (
59+
<Layout title="Studio" description="Studio Page">
60+
<main className={styles.container}>
61+
<h2>Minecraft Java Edition</h2>
62+
<div className={styles.cardGrid}>
63+
{DataMinecraftJavaEdition.map(
64+
(card, index) => (
65+
<Card key={index} {...card} />
66+
)
67+
)}
68+
</div>
69+
</main>
70+
</Layout>
71+
);
72+
}

src/pages/studio/index.module.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.container {
2+
padding: 2rem;
3+
}
4+
5+
.cardGrid {
6+
display: flex;
7+
gap: 1.5rem;
8+
flex-wrap: wrap;
9+
}
10+
11+
.card {
12+
border: 1px solid #ddd;
13+
border-radius: 16px;
14+
width: 250px;
15+
padding: 0.1rem;
16+
text-align: center;
17+
background-color: #fff;
18+
}
19+
20+
html[data-theme='dark'] .card {
21+
border: 1px solid #4a4d4f;
22+
border-radius: 16px;
23+
width: 250px;
24+
padding: 0.1rem;
25+
text-align: center;
26+
background-color: #242526;
27+
}
28+
29+
.cardImage {
30+
width: 100%;
31+
height: 175px;
32+
object-fit: cover;
33+
border-radius: 16px;
34+
}
35+
36+
.cardTitle {
37+
margin: 0.5rem 0;
38+
font-size: 1.2rem;
39+
}
40+
41+
.cardDesc {
42+
font-size: 0.9rem;
43+
color: #555;
44+
}
45+
46+
html[data-theme='dark'] .cardDesc {
47+
font-size: 0.9rem;
48+
color: #c9c9c9;
49+
}
450 KB
Loading
344 KB
Loading
17.5 KB
Loading

static/img/Studio/MinecartHUD.png

274 KB
Loading
1 MB
Loading
177 KB
Loading

0 commit comments

Comments
 (0)