Skip to content

Commit 116a1a2

Browse files
committed
Add: Add hardware introduce page
1 parent 62ee66a commit 116a1a2

5 files changed

Lines changed: 335 additions & 0 deletions

File tree

src/i18n/locales/en/translation.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,5 +238,53 @@
238238
"title": "Redstone Collection",
239239
"imageUrl": "redstoneCollection/p30.webp",
240240
"searchPlaceholder": "Search Tags or Name"
241+
},
242+
"hardware": {
243+
"title": "Server Hardware",
244+
"description": "State-of-the-art equipment powering our creative community",
245+
"imageUrl": "homePage/CTEC_Hardware.webp",
246+
"specsTitle": "Server Specifications",
247+
"featuresTitle": "Key Features",
248+
"specs": [
249+
{
250+
"icon": "processor",
251+
"name": "Processor",
252+
"value": "Intel Core i9-13900K\n24 Cores, 32 Threads\nUp to 5.8 GHz"
253+
},
254+
{
255+
"icon": "memory",
256+
"name": "Memory",
257+
"value": "128GB DDR5 RAM\nHigh-speed performance\nOptimized for multitasking"
258+
},
259+
{
260+
"icon": "storage",
261+
"name": "Storage",
262+
"value": "6TB NVMe Gen 4 SSD\nUltra-fast read/write speeds\nReliable data protection"
263+
},
264+
{
265+
"icon": "power",
266+
"name": "Power Supply",
267+
"value": "UPS Uninterruptible Power System\n24/7 uptime guarantee\nProtection against power outages"
268+
},
269+
{
270+
"icon": "network",
271+
"name": "Network",
272+
"value": "Global Proxy Servers\nLow-latency connections\nOptimized for international players"
273+
},
274+
{
275+
"icon": "maintenance",
276+
"name": "Maintenance",
277+
"value": "Dedicated Engineering Team\nProactive monitoring\nRegular updates and optimization"
278+
}
279+
],
280+
"features": [
281+
"Support for large numbers of simultaneous players without performance degradation",
282+
"Low-latency proxy servers distributed globally for optimal gaming experience",
283+
"Professional-grade UPS system ensuring 99.9% uptime",
284+
"Regular hardware maintenance and software updates by dedicated engineers",
285+
"Advanced cooling system for sustained high-performance operation",
286+
"Automated backup systems to protect player data and world progress",
287+
"Optimized for both creative building and intensive redstone contraptions"
288+
]
241289
}
242290
}

src/i18n/locales/zh_CN/translation.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,5 +234,53 @@
234234
"title": "紅石作品集",
235235
"imageUrl": "redstoneCollection/p30.webp",
236236
"searchPlaceholder": "搜索标签或名称"
237+
},
238+
"hardware": {
239+
"title": "服务器硬件",
240+
"description": "顶级设备驱动我们的创意社区",
241+
"imageUrl": "homePage/CTEC_Hardware.webp",
242+
"specsTitle": "服务器规格",
243+
"featuresTitle": "核心特色",
244+
"specs": [
245+
{
246+
"icon": "processor",
247+
"name": "处理器",
248+
"value": "Intel Core i9-13900K\n24核心,32线程\n最高 5.8 GHz"
249+
},
250+
{
251+
"icon": "memory",
252+
"name": "内存",
253+
"value": "128GB DDR5 RAM\n高速性能\n多任务优化"
254+
},
255+
{
256+
"icon": "storage",
257+
"name": "存储空间",
258+
"value": "6TB NVMe Gen 4 SSD\n超快读写速度\n可靠的数据保护"
259+
},
260+
{
261+
"icon": "power",
262+
"name": "电源供应",
263+
"value": "UPS 不断电系统\n24/7 运行保证\n防止电力中断"
264+
},
265+
{
266+
"icon": "network",
267+
"name": "网络",
268+
"value": "全球代理服务器\n低延迟连接\n国际玩家优化"
269+
},
270+
{
271+
"icon": "maintenance",
272+
"name": "维护",
273+
"value": "专业工程团队\n主动监控\n定期更新与优化"
274+
}
275+
],
276+
"features": [
277+
"支持大量玩家同时在线而不影响性能",
278+
"全球分布的低延迟代理服务器,提供最佳游戏体验",
279+
"专业级 UPS 系统确保 99.9% 正常运行时间",
280+
"专业工程师定期进行硬件维护和软件更新",
281+
"先进冷却系统确保持续高性能运作",
282+
"自动化备份系统保护玩家数据和世界进度",
283+
"针对创意建筑和高强度红石装置进行优化"
284+
]
237285
}
238286
}

src/i18n/locales/zh_TW/translation.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,5 +234,53 @@
234234
"title": "紅石作品集",
235235
"imageUrl": "redstoneCollection/p30.webp",
236236
"searchPlaceholder": "搜尋標籤或名稱"
237+
},
238+
"hardware": {
239+
"title": "伺服器硬體",
240+
"description": "頂級設備驅動我們的創意社群",
241+
"imageUrl": "homePage/CTEC_Hardware.webp",
242+
"specsTitle": "伺服器規格",
243+
"featuresTitle": "核心特色",
244+
"specs": [
245+
{
246+
"icon": "processor",
247+
"name": "處理器",
248+
"value": "Intel Core i9-13900K\n24核心,32執行緒\n最高 5.8 GHz"
249+
},
250+
{
251+
"icon": "memory",
252+
"name": "記憶體",
253+
"value": "128GB DDR5 RAM\n高速效能\n多工處理優化"
254+
},
255+
{
256+
"icon": "storage",
257+
"name": "儲存空間",
258+
"value": "6TB NVMe Gen 4 SSD\n超快讀寫速度\n可靠的資料保護"
259+
},
260+
{
261+
"icon": "power",
262+
"name": "電源供應",
263+
"value": "UPS 不斷電系統\n24/7 運行保證\n防止電力中斷"
264+
},
265+
{
266+
"icon": "network",
267+
"name": "網路",
268+
"value": "全球代理伺服器\n低延遲連線\n國際玩家優化"
269+
},
270+
{
271+
"icon": "maintenance",
272+
"name": "維護",
273+
"value": "專業工程團隊\n主動監控\n定期更新與優化"
274+
}
275+
],
276+
"features": [
277+
"支援大量玩家同時在線而不影響效能",
278+
"全球分布的低延遲代理伺服器,提供最佳遊戲體驗",
279+
"專業級 UPS 系統確保 99.9% 正常運行時間",
280+
"專業工程師定期進行硬體維護和軟體更新",
281+
"先進冷卻系統確保持續高效能運作",
282+
"自動化備份系統保護玩家資料和世界進度",
283+
"針對創意建築和高強度紅石裝置進行優化"
284+
]
237285
}
238286
}

src/main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import OpenSourcePage from './pages/OpenSource.tsx';
1212
import Partner from './pages/Partner.tsx';
1313
import ArchitectureCollection from './pages/ArchitectureCollection.tsx';
1414
import RedstoneCollection from './pages/RedstoneCollection.tsx';
15+
import Hardware from './pages/Hardware.tsx';
1516
import NotFoundPage from './pages/NotFoundPage.tsx';
1617

1718
import initI18n from './i18n/i18nConfig';
@@ -41,6 +42,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
4142
path='architectureCollection'
4243
element={<ArchitectureCollection />}
4344
/>
45+
<Route path='hardware' element={<Hardware />} />
4446
<Route path='*' element={<NotFoundPage />} />
4547
</Route>
4648
</Routes>

src/pages/Hardware.tsx

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
import { useTranslation } from 'react-i18next';
2+
import styled from 'styled-components';
3+
import {
4+
DesktopOutlined,
5+
DatabaseOutlined,
6+
HddOutlined,
7+
ThunderboltOutlined,
8+
GlobalOutlined,
9+
ToolOutlined,
10+
} from '@ant-design/icons';
11+
12+
import PageHeader from '#/common/PageHeader.tsx';
13+
import HeaderImage from '#/common/HeaderImage.tsx';
14+
15+
import getImageUrl from '@/utils/getImageUrl.ts';
16+
17+
const SpecsContainer = styled.div`
18+
background: var(--bg-secondary);
19+
padding: 80px 30px;
20+
min-height: 400px;
21+
22+
@media (max-width: 768px) {
23+
padding: 60px 20px;
24+
}
25+
`;
26+
27+
const SpecsContent = styled.div`
28+
max-width: 1200px;
29+
margin: 0 auto;
30+
`;
31+
32+
const SectionTitle = styled.h2`
33+
text-align: center;
34+
color: var(--text-primary);
35+
margin-bottom: 60px;
36+
font-weight: 700;
37+
font-size: clamp(1.8rem, 4vw, 2.5rem);
38+
`;
39+
40+
const SpecsGrid = styled.div`
41+
display: grid;
42+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
43+
gap: 30px;
44+
margin-bottom: 60px;
45+
46+
@media (max-width: 768px) {
47+
grid-template-columns: 1fr;
48+
gap: 20px;
49+
}
50+
`;
51+
52+
const SpecCard = styled.div`
53+
background: var(--bg-primary);
54+
border-radius: var(--radius-lg);
55+
padding: 30px;
56+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
57+
transition:
58+
transform 0.3s ease,
59+
box-shadow 0.3s ease;
60+
61+
&:hover {
62+
transform: translateY(-5px);
63+
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
64+
}
65+
`;
66+
67+
const SpecIcon = styled.div`
68+
font-size: 3rem;
69+
margin-bottom: 15px;
70+
text-align: center;
71+
color: var(--color-primary);
72+
73+
.anticon {
74+
font-size: 3rem;
75+
}
76+
`;
77+
78+
const SpecName = styled.h3`
79+
color: var(--text-primary);
80+
font-size: 1.3rem;
81+
font-weight: 600;
82+
margin-bottom: 10px;
83+
text-align: center;
84+
`;
85+
86+
const SpecValue = styled.p`
87+
color: var(--text-secondary);
88+
font-size: 1rem;
89+
line-height: 1.6;
90+
text-align: center;
91+
`;
92+
93+
const FeaturesContainer = styled.div`
94+
background: var(--color-primary-light);
95+
border-radius: var(--radius-lg);
96+
padding: 40px;
97+
margin-top: 40px;
98+
99+
@media (max-width: 768px) {
100+
padding: 30px 20px;
101+
}
102+
`;
103+
104+
const FeaturesList = styled.ul`
105+
list-style: none;
106+
padding: 0;
107+
margin: 0;
108+
`;
109+
110+
const FeatureItem = styled.li`
111+
color: var(--text-primary);
112+
font-size: 1.1rem;
113+
line-height: 1.8;
114+
margin-bottom: 15px;
115+
padding-left: 30px;
116+
position: relative;
117+
118+
&:before {
119+
content: '✓';
120+
position: absolute;
121+
left: 0;
122+
color: var(--color-primary);
123+
font-weight: bold;
124+
font-size: 1.3rem;
125+
}
126+
127+
&:last-child {
128+
margin-bottom: 0;
129+
}
130+
`;
131+
132+
const iconMap: Record<string, React.ReactNode> = {
133+
processor: <DesktopOutlined />,
134+
memory: <DatabaseOutlined />,
135+
storage: <HddOutlined />,
136+
power: <ThunderboltOutlined />,
137+
network: <GlobalOutlined />,
138+
maintenance: <ToolOutlined />,
139+
};
140+
141+
const Hardware = () => {
142+
const { t } = useTranslation();
143+
144+
const specs = t('hardware.specs', { returnObjects: true }) as Array<{
145+
icon: string;
146+
name: string;
147+
value: string;
148+
}>;
149+
150+
const features = t('hardware.features', { returnObjects: true }) as string[];
151+
152+
return (
153+
<>
154+
<PageHeader
155+
backgroundComponent={
156+
<HeaderImage imageUrl={getImageUrl(t('hardware.imageUrl'))} />
157+
}
158+
headerTextArray={[t('hardware.title')]}
159+
subHeaderContentArray={[t('hardware.description')]}
160+
/>
161+
<SpecsContainer>
162+
<SpecsContent>
163+
<SectionTitle>{t('hardware.specsTitle')}</SectionTitle>
164+
<SpecsGrid>
165+
{Array.isArray(specs) &&
166+
specs.map((spec, index) => (
167+
<SpecCard key={index}>
168+
<SpecIcon>{iconMap[spec.icon]}</SpecIcon>
169+
<SpecName>{spec.name}</SpecName>
170+
<SpecValue>{spec.value}</SpecValue>
171+
</SpecCard>
172+
))}
173+
</SpecsGrid>
174+
<FeaturesContainer>
175+
<SectionTitle>{t('hardware.featuresTitle')}</SectionTitle>
176+
<FeaturesList>
177+
{Array.isArray(features) &&
178+
features.map((feature, index) => (
179+
<FeatureItem key={index}>{feature}</FeatureItem>
180+
))}
181+
</FeaturesList>
182+
</FeaturesContainer>
183+
</SpecsContent>
184+
</SpecsContainer>
185+
</>
186+
);
187+
};
188+
189+
export default Hardware;

0 commit comments

Comments
 (0)