feat(blogs): 新增多语言博客内容及图片资源

添加英文、日文和中文博客文章,包括1.mdx、2.mdx和3.mdx文件
新增博客相关图片资源到public/images目录
This commit is contained in:
砂糖
2025-12-09 17:34:49 +08:00
parent de67af263e
commit 1d23c01990
21 changed files with 348 additions and 184 deletions

View File

@@ -1,5 +1,4 @@
import MDXComponents from "@/components/mdx/MDXComponents";
import TableOfContents from "@/components/mdx/TableOfContents.client";
import { Locale, LOCALES } from "@/i18n/routing";
import { constructMetadata } from "@/lib/metadata";
import fs from "fs/promises";
@@ -17,52 +16,7 @@ const options = {
},
};
interface TableOfContentsItem {
id: string;
text: string;
level: number;
}
// 解析MDX内容并提取标题
async function parseMDXContent(content: string): Promise<TableOfContentsItem[]> {
if (!content) {
return [];
}
try {
const headingRegex = /^#{2,4}\s+(.+)$/gm;
const headings: TableOfContentsItem[] = [];
let match;
while ((match = headingRegex.exec(content)) !== null) {
const fullMatch = match[0];
const text = match[1]?.trim();
if (!text) continue;
// 确定标题级别
let level = 2;
if (fullMatch.startsWith("###")) {
level = fullMatch.startsWith("####") ? 4 : 3;
}
// 生成ID将文本转换为URL友好的格式
const id = text
.toLowerCase()
.replace(/[^a-z0-9\u4e00-\u9fa5\s-]/g, "")
.replace(/\s+/g, "-");
headings.push({ id, text, level });
}
return headings;
} catch (error) {
console.error("Error parsing MDX content for TOC:", error);
return [];
}
}
async function getMDXContent(locale: string, section: string): Promise<string> {
async function getMDXContent(locale: string, section: string) {
const filePath = path.join(
process.cwd(),
"content",
@@ -115,37 +69,15 @@ export default async function AboutPage({
const section = (resolvedSearchParams.section as string) || "company";
const content = await getMDXContent(locale, section);
const tocItems = await parseMDXContent(content);
// 获取多语言目录标题
const t = await getTranslations({ locale, namespace: "Common" });
const tocTitle = t("tableOfContents") || "目录";
return (
<div className="flex flex-col md:flex-row w-full gap-8">
{/* 侧边目录 - 在移动端显示在内容上方 */}
<div className="w-full md:w-1/4 lg:w-1/5 order-2 md:order-1">
<TableOfContents
items={tocItems || []}
title={tocTitle}
/>
</div>
{/* 主要内容 */}
<article className="w-full md:w-3/4 lg:w-4/5 px-2 md:px-8 ml-0 md:ml-64 order-1 md:order-2">
{content ? (
<MDXRemote
source={content}
components={MDXComponents}
options={options}
/>
) : (
<div className="text-center py-8 text-gray-500">
<p>...</p>
</div>
)}
</article>
</div>
<article className="w-full md:w-3/5 px-2 md:px-12">
<MDXRemote
source={content}
components={MDXComponents}
options={options}
/>
</article>
);
}

View File

@@ -4,9 +4,11 @@ import { Locale, LOCALES } from "@/i18n/routing";
import { getPosts } from "@/lib/getBlogs";
import { constructMetadata } from "@/lib/metadata";
import { BlogPost } from "@/types/blog";
import fs from "fs/promises";
import { Metadata } from "next";
import { MDXRemote } from "next-mdx-remote-client/rsc";
import { notFound } from "next/navigation";
import path from "path";
type Params = Promise<{
locale: string;
@@ -17,14 +19,112 @@ type MetadataProps = {
params: Params;
};
async function getMDXContent(locale: string, section: string): Promise<BlogPost> {
const filePath = path.join(
process.cwd(),
"blogs",
locale,
`${section}.mdx`
);
try {
const content = await fs.readFile(filePath, "utf-8");
// 解析MDX文件的frontmatter和内容
const { frontmatter, content: postContent } = parseMDXContent(content);
// 构建BlogPost对象
const blogPost: BlogPost = {
locale,
title: frontmatter.title || '',
description: frontmatter.description,
image: frontmatter.image,
slug: frontmatter.slug || '',
tags: frontmatter.tags,
// 解析日期
date: frontmatter.date ? new Date(frontmatter.date) : new Date(),
// 设置visible默认值为published
visible: frontmatter.visible || 'published',
// 处理pin字段 - 如果有pin标记则为true否则为false
pin: frontmatter.pin === 'pin',
// 去除frontmatter后的内容
content: postContent.trim(),
// 所有frontmatter作为metadata
metadata: { ...frontmatter }
};
return blogPost;
} catch (error) {
console.error(`Error reading MDX file: ${error}`);
// 返回默认的BlogPost对象符合类型要求
return {
title: '',
slug: '',
date: new Date(),
content: '',
visible: 'published',
pin: false,
metadata: {},
locale
};
}
}
/**
* 解析MDX内容提取frontmatter和正文
*/
function parseMDXContent(content: string): {
frontmatter: Record<string, any>
content: string
} {
// 匹配frontmatter的正则表达式---开头和结尾)
const frontmatterRegex = /^---\s*[\r\n]([\s\S]*?)[\r\n]---\s*[\r\n]/;
const match = frontmatterRegex.exec(content);
let frontmatter: Record<string, any> = {};
let postContent = content;
if (match && match[1]) {
// 提取frontmatter部分并解析
const frontmatterStr = match[1];
postContent = content.slice(match[0].length);
// 解析frontmatter的每一行
const lines = frontmatterStr.split(/[\r\n]+/);
lines.forEach(line => {
// 跳过空行和注释
if (!line.trim() || line.trim().startsWith('#')) return;
// 分割键值对(支持值中有冒号的情况)
const colonIndex = line.indexOf(':');
if (colonIndex === -1) return;
const key = line.substring(0, colonIndex).trim();
let value = line.substring(colonIndex + 1).trim();
// 移除值的引号(如果有)
if ((value.startsWith('"') && value.endsWith('"')) ||
(value.startsWith("'") && value.endsWith("'"))) {
value = value.substring(1, value.length - 1);
}
frontmatter[key] = value;
});
}
return { frontmatter, content: postContent };
}
export async function generateMetadata({
params,
}: MetadataProps): Promise<Metadata> {
const { locale, slug } = await params;
let { posts }: { posts: BlogPost[] } = await getPosts(locale);
const post = posts.find((post) => post.slug === slug);
let post = await getMDXContent(locale, slug);
console.log(post, 'post');
console.log(post, posts);
if (!post) {
return constructMetadata({
title: "404",
@@ -38,9 +138,9 @@ export async function generateMetadata({
return constructMetadata({
page: "blog",
title: post.title,
description: post.description,
images: post.image ? [post.image] : [],
title: post.title || '',
description: post.description || '',
images: [],
locale: locale as Locale,
path: `/blog/${slug}`,
canonicalUrl: `/blog/${slug}`,
@@ -49,10 +149,9 @@ export async function generateMetadata({
export default async function BlogPage({ params }: { params: Params }) {
const { locale, slug } = await params;
let { posts }: { posts: BlogPost[] } = await getPosts(locale);
const post = posts.find((item) => item.slug === slug);
let post = await getMDXContent(locale, slug);
console.log(post);
if (!post) {
return notFound();
}

0
blogs/en/2.mdx Normal file
View File

0
blogs/en/3.mdx Normal file
View File

0
blogs/ja/2.mdx Normal file
View File

0
blogs/ja/3.mdx Normal file
View File

View File

@@ -1,18 +0,0 @@
---
title: 示例
description: 这是一个描述
slug: /demo
tags: nextjs,i18n,mdx,starter,robots,sitemap
date: 2025-02-16
visible: published
# visible: draft/invisible/published默认为published
pin: true
---
## 简介
示例
## 如何使用
示例

40
blogs/zh/1.mdx Normal file
View File

@@ -0,0 +1,40 @@
---
title: 钢铁行业发展新趋势
visible: published
# visible: draft/invisible/published (published is default)
pin: pin
---
近年来,伴随我国城镇化进程进入中后期,建筑钢材需求正经历由“总量扩张”向“结构优化”的深刻转变。这一变化不仅重塑了钢材消费格局,也正在加速推动钢铁行业整体转型升级。
一、建筑用钢:总量见顶,结构分化
过去二十多年我国城镇化率从1996年的30%快速提升至2024年的67%年均增速在1996—2017年间高达1.42%。在此期间城市大规模扩张带动建筑钢材需求爆发式增长。然而自2018年起城镇化年均增速已放缓至0.97%并预计在突破70%后进一步趋缓——参照美、日、韩等发达国家经验,这意味着以新建为主的建筑用钢需求高峰已然过去。
数据显示自2021年房地产周期见顶以来螺纹钢表观消费量同步回落2021—2024年年均降幅达5.88%,且短期内难现逆转。传统住宅和商业地产对钢材的拉动作用持续减弱。
但结构性机会正在显现。中央城市工作会议明确提出未来将稳步推进城中村和危旧房改造加快城市基础设施“生命线”安全工程建设重点推进燃气、供排水、供热等老旧管网更新。据国家发展改革委测算未来五年全国需改造各类市政管网约60万千米总投资约4万亿元。这一轮“城市更新”将带动螺纹钢、中厚板及焊接钢管的阶段性需求尽管其单位投资用钢强度显著低于新建项目。
与此同时绿色低碳转型为建筑用钢开辟新赛道。住建部要求到2025年城镇新建建筑全面执行绿色建筑标准超低能耗建筑推广提速。钢结构因其施工快、抗震强、可循环、碳排放低等优势正成为绿色建造的重要载体。2020—2024年我国钢结构加工量从8900万吨增至1.09亿吨年均增长4.5%中国钢结构协会预计2025年将达1.4亿吨2035年有望突破2亿吨。
二、需求重心转移:从全域扩张到城市群聚焦
在总量下行背景下,建筑钢材需求的区域分布也发生显著变化。过去“遍地开花”的建设模式正在被“重点集聚”所取代。会议强调,要发展组团式、网络化的现代化城市群和都市圈,这意味着未来基建投资将高度集中于京津冀、长三角、粤港澳大湾区等核心区域。
城际铁路、综合交通枢纽、跨江跨海桥梁、长大隧道等重大工程将成为用钢主力场景。而人口持续流出的三四线城市及县域地区,建筑钢材需求增长空间有限,甚至面临长期萎缩。
更深远的变化在于制造业正取代建筑业成为钢材消费的第一大领域。据估算建筑用钢占钢材总消费的比重已从2020年的63.74%降至2024年的56.99%其中房地产用钢占比更是从39.79%大幅下滑至23.67%同期制造业用钢占比则从36.26%上升至43.01%。
这一结构性转变已在钢厂生产端得到印证2024年重点钢铁企业螺纹钢和线材产量同比分别下降13.84%和1.73%而热轧薄宽钢带、冷轧薄宽钢带产量分别增长3.14%和1.95%电工钢板及其冷轧品种增幅更高达7.75%和5.41%。产品结构正加速向高附加值板材倾斜。
三、产业升级:技术、绿色与产能优化协同推进
需求侧的深刻变革,正倒逼钢铁行业在多个维度加速升级。
一是产品高端化。面向制造业转型升级,钢厂正加大高强钢、硅钢、镀锌板等新能源汽车用材的供给;针对风电、光伏等可再生能源装机激增,中厚板、压力容器钢、耐蚀合金钢等专用品种产能持续扩张;同时,顺应轻量化、智能化趋势,开发高精度船板、家电用不锈钢等功能性产品。在建筑领域,高强度抗震钢筋、耐腐蚀结构钢等绿色建材也成为研发重点。
二是绿色低碳转型提速。截至2025年7月底全国已有147家钢铁企业、约6亿吨粗钢产能完成全流程超低排放改造占总产能比重持续提升。行业目标是在2025年底前实现80%以上产能达标,环保成本内化已成为企业竞争力的重要组成部分。
三是落后产能有序退出。面对房地产投资仍处两位数负增长的现实政策层面持续强化“反内卷”导向。中央财经委员会7月初再次强调推动低效产能退出未来或将通过联合重组替代传统的产能指标交易严禁产能买卖从根本上改善行业供需关系提升资源配置效率。
结语
中央城市工作会议释放的信号清晰表明:中国钢铁行业已正式迈入“存量优化、提质升级”的新发展阶段。建筑钢材需求总量下行不可逆,但城市更新、绿色建筑、城市群基建等结构性机会依然可观;而制造业用钢的崛起,则为行业提供了更可持续的增长引擎。
在此背景下,唯有主动调整产品结构、加快绿色智能转型、坚决淘汰落后产能的企业,才能在新一轮洗牌中赢得先机。钢铁行业的未来,不再取决于“产多少”,而在于“产什么”和“如何产”。这场由需求变革驱动的产业升级,正在书写中国钢铁高质量发展的新篇章。

View File

@@ -1,18 +0,0 @@
---
title: 示例2
description: 这是一个描述2
slug: /demo2
tags: nextjs,i18n,mdx,starter,robots,sitemap
date: 2025-02-17
visible: published
# visible: draft/invisible/published默认为published
# pin: true
---
## 简介
示例2
## 如何使用
示例2

70
blogs/zh/2.mdx Normal file
View File

@@ -0,0 +1,70 @@
---
title: 雅江工程对钢铁行业的重大意义
visible: published
# visible: draft/invisible/published (published is default)
pin: pin
---
在青藏高原腹地、雅鲁藏布江大拐弯处一项被称作“世纪工程”的超级水电项目正拉开建设帷幕——这就是总投资达1.2万亿元、总装机容量5500万至6000万千瓦的雅鲁藏布江下游水电工程简称“雅江工程”或“雅下工程”。作为人类历史上规模最大的水电基建项目其年均发电量预计达2000亿至3000亿千瓦时约为三峡工程的3倍。这一工程不仅将重塑国家能源格局、支撑“双碳”战略更将深刻影响中国钢铁工业的发展轨迹。
2025年8月27日在第七届中国高速钢应用技术论坛上中国特钢企业协会副秘书长赵发忠以《雅江工程与钢铁工业发展新机遇——钢铁及特钢需求分析》为题发表报告系统阐释了该工程对钢铁行业带来的历史性机遇与结构性挑战。
一、规模空前:钢材需求体量创历史之最
据测算雅江工程主体建设用钢量预计达400万至600万吨若计入配套输变电、交通、移民安置等项目总用钢量或将突破800万吨——是三峡工程59万吨的10至13倍。更为关键的是这一需求并非短期集中释放而是贯穿约15年的建设周期年均稳定在50万至80万吨为钢铁行业提供长期、可预期的市场支撑。
从品类结构看,钢材需求呈现“常规为主、特钢为要”的双轮驱动格局:
核心工程用常规建材280万330万吨包括螺纹钢、H型钢、工字钢、中厚板等用于大坝骨架、引水隧洞、施工道路等基础设施
输电设施用特殊钢28.1万吨):如耐候角钢、镀锌钢板,用于特高压塔架及变电站钢结构;
水电机组用特种钢27万吨涵盖06Cr13Ni4Mo等耐蚀不锈钢、高磁感取向硅钢片、高强度结构钢用于水轮机转轮、发电机定转子等核心部件。
值得注意的是西部钢铁企业凭借区位优势有望成为常规钢材供应主力。例如宝武集团八钢公司在西藏重点工程型钢市场占有率高达85%依托兰新、青藏铁路其运输成本较东部企业低30%以上,“就地供应”优势显著。
二、分阶段释放:需求节奏要求柔性响应
赵发忠指出,雅江工程的钢材需求具有鲜明的阶段性特征,对钢铁企业的生产组织与供应链协同提出“柔性化”新要求:
前期20252027年以土建施工为主螺纹钢、工字钢等常规建材占比超60%同时带动工程机械用钢需求增长12%,高原隧道掘进设备订单激增。
中期20282030年进入大坝浇筑与机组制造高峰期中厚板年需求或破500万吨硅钢片年增15万吨Q500E等高强桥梁钢溢价空间扩大——此为特钢企业的“黄金窗口期”。
后期2031年起聚焦特高压输电线路建设耐候角钢、镀锌钢材及取向硅钢片年新增8万吨成为主力强调“精准对接”与“即时响应”。
这种“前重后精、由普入特”的需求曲线,倒逼钢铁企业从“批量生产”转向“按需定制”,从“产品交付”升级为“解决方案提供”。
三、极限环境:倒逼材料性能全面跃升
雅江工程地处海拔4000米以上的青藏高原面临极端低温、强紫外线、高腐蚀水质、地震活跃带、运输受限等多重挑战对钢材性能提出近乎苛刻的要求
低温韧性:需满足-40℃冲击功≥27J推动Ni-Cr-Mo-V微合金化技术应用
抗紫外线老化镀锌层厚度≥85μm配套新型耐UV涂层体系
耐腐蚀性:面对高氯离子、高溶解氧水体,含氮双相不锈钢成关键材料;
抗震抗撕裂地质断裂带区域需Z向钢采用在线淬火+回火工艺提升层状撕裂抗力;
轻量化与可焊性受限于高原运力日均仅500吨要求钢材强度更高、重量更轻减重30%且焊接裂纹敏感性指数Pcm≤0.30。
在此背景下特种钢占比高达40%,远超常规大型工程。这不仅是对材料的考验,更是对中国钢铁工业技术能力的一次“压力测试”。
四、技术领跑:从“跟跑”到“并跑”甚至“领跑”
雅江工程正成为国产高端钢材的“试金石”与“加速器”。一批标志性成果已崭露头角:
湖南钢铁集团研发的HY950CF水电钢屈服强度≥960MPa、-40℃冲击功50J成功拿下压力钢管70%份额约15万吨实现减重30%
太钢攻克高海拔焊接熔敷率难题独家供应全部93台水轮机转轮用钢3.7万吨);
宝钢将供应14万吨高性能硅钢支撑23.3万吨的发电机组磁芯需求。
这些突破标志着我国特钢技术已跻身国际先进水平,并具备自主保障国家重大工程的能力。
五、产业协同:推动全链条绿色智能升级
赵发忠强调,雅江工程不应仅被视为“钢材采购项目”,而应作为推动钢铁行业高质量发展的战略支点。他建议:
西部钢企可依托区位优势,扩建高原适配钢种产能,布局电炉短流程项目;
东部企业可通过合资建厂方式参与西部供应链;
建立“雅江工程专用废钢”回收体系,结合工程绿电资源,打造低碳循环示范;
行业协会牵头整合研发、生产、检测、物流等全链条资源,提供精准化服务。
中国特钢企业协会已将雅江工程列为重中之重,由协会领导亲自部署,旨在凝聚行业合力,以特钢力量护航国家战略落地。
六、行动倡议:钢铁企业须主动出击
面对这一千载难逢的机遇,赵发忠向全行业发出呼吁:
成立专项工作组:设立“雅江工程用钢领导小组”,系统谋划技术、产能、市场策略;
深度对接业主与承包商:主动联系中国雅江集团、中国电建、东方电气、大唐集团、西藏天路等关键单位;
强化技术研发:针对高原、高寒、高腐蚀等特殊工况,加快高强度、耐蚀、轻量化钢材开发;
构建专属供应链:实现从铁矿石到成品钢的全流程质量追溯与保障;
打造品牌高地:将雅江工程作为展示技术实力、培养高端人才、树立行业标杆的核心平台。
结语:铸就“钢铁脊梁”,书写硬核答卷
“雅江工程的钢铁骨架,正等待我们以更精尖的技术去完善、用更严谨的态度去守护。”赵发忠在报告结尾深情寄语。
对钢铁行业而言,雅江工程不仅是一张庞大的订单清单,更是一场关乎转型升级、技术跃迁与全球竞争力重塑的历史性战役。每一次对用钢标准的精进,都是为世纪工程筑牢安全底线;每一次对技术瓶颈的突破,都是为中国制造注入新的动能。
在这片世界屋脊之上,中国钢铁人将以实打实的产品、硬碰硬的技术、稳扎稳打的行动,共同铸就这座“超级工程”的钢铁脊梁,也书写属于新时代中国工业的硬核答卷。

47
blogs/zh/3.mdx Normal file
View File

@@ -0,0 +1,47 @@
---
title: 中国钢铁行业发展亟需高端化
visible: published
# visible: draft/invisible/published (published is default)
pin: pin
---
随着年末临近,钢铁行业正经历一场结构性调整与转型的关键阶段。尽管整体产量保持相对稳定,但需求端持续承压,库存水平明显攀升,行业盈利基础仍显脆弱。然而,在挑战之中,部分企业通过聚焦高端产品、优化结构、降本增效等举措,实现了业绩的逆势增长,为行业高质量发展提供了新路径。
(一)需求下行,库存压力显现
根据中国钢铁工业协会中钢协最新数据2025年前三季度国内钢铁表观消费量为6.49亿吨同比下降5.7%。这一趋势并非短期波动而是“十四五”以来的延续性变化——自2020年10.4亿吨的消费峰值起国内钢铁表观消费量已连续五年下滑至2024年降至8.9亿吨累计减少1.5亿吨年均降幅达3.8%。
与此同时库存压力逐步累积。信达证券研报指出截至2025年11月28日五大钢材品种的社会库存达到1007.3万吨同比大幅增长27.82%厂内库存为393.5万吨同比增长2.11%。中钢协数据显示11月中旬重点统计钢铁企业钢材库存量为1561万吨较年初增加324万吨增幅达26.3%,反映出终端需求疲软与生产节奏之间的阶段性错配。
(二)产量稳中有调,结构性分化加剧
从生产端看钢铁行业整体运行平稳。2025年11月中旬重点统计钢铁企业粗钢日均产量为194.3万吨环比微增0.9%钢材日均产量192.4万吨环比增长2.1%。但回溯至10月全国粗钢产量为7200万吨同比下降12.1%1—10月累计产量8.18亿吨同比下降3.9%。这表明在政策引导和市场调节下,行业主动压减产量的趋势仍在延续。
值得注意的是尽管总产量有所回落但高端钢材产品的产销比例正在提升。多家上市公司在公告中披露通过提高特种钢、高附加值产品的比重有效对冲了普通钢材价格下行带来的冲击部分企业甚至实现扭亏为盈。三季报数据显示在已披露业绩的46家钢铁上市公司中31家净利润同比增长占比达67.39%。
(三)盈利改善但基础不牢,行业仍处转型阵痛期
中钢协副会长夏农在第21届中国钢铁产业链峰会上指出2025年以来行业总体运行良好效益较去年同期显著改善9月实现由亏转盈。但环比来看9月盈利水平较8月出现较大幅度回落说明当前盈利基础尚不稳固行业仍处于“弱复苏、强分化”的阶段。
这一判断与当前供需格局高度吻合:一方面,传统建筑、房地产等用钢领域持续萎缩;另一方面,新能源、高端制造、钢结构建筑等新兴应用场景尚未形成足够规模的增量支撑。
(四)转型升级成破局关键,绿色智能引领未来
面对“存量优化、提质升级”的新发展阶段,中钢协强调,钢铁企业必须坚决贯彻“三定三不要”经营原则(即以销定产、以效定产、以现定产,不要盲目扩产、不要恶性竞争、不要牺牲长远利益),强化行业自律,遏制“内卷式”竞争。
夏农提出五项高质量发展建议:
一是深化供给侧结构性改革,管住增量、优化存量,推动兼并重组;
二是推进高端化、智能化、绿色化、融合化发展,提升全产业链竞争力;
三是加强铁矿资源开发与废钢利用,保障产业链安全;
四是拓展钢结构建筑等新应用场景,激活潜在需求;
五是提升国际化水平,融入全球产业链。
在绿色转型方面行业已迈出坚实步伐。截至2025年10月底全国已有219家钢铁企业完成或部分完成超低排放改造其中165家实现全工序改造覆盖粗钢产能约6.63亿吨累计投入超3100亿元。吨钢平均环保运行成本达212.44元,绿色已成为行业发展的硬约束与新优势。
此外极致能效建设也在加速推进。截至11月中旬21家企业完成极致能效验收10家被认定为“双碳最佳实践能效标杆示范企业”另有11家在关键工序或设备上树立能效标杆。
(五)展望:创新驱动,拓展边界
清华大学中国经济思想与实践研究院院长李稻葵建议,钢铁企业应加快技术创新步伐,积极布局新能源相关材料领域,并大力推广钢结构建筑应用。他同时呼吁加强政企协同,以更稳健的节奏推进国际化,通过高水平开放倒逼内部改革与能力提升。
可以预见,在“双碳”目标与高质量发展双重驱动下,钢铁行业正从规模扩张转向价值创造。那些率先完成产品升级、绿色转型与市场拓展的企业,将在新一轮洗牌中赢得先机。而整个行业,也将在阵痛中重塑竞争力,迈向更加可持续的未来。

View File

@@ -1,4 +1,5 @@
'use client'
import { Link as I18nLink } from "@/i18n/routing";
import { useTranslations } from "next-intl";
export default function HomeComponent() {
@@ -11,13 +12,13 @@ export default function HomeComponent() {
<>
<section className="mx-auto text-center">
{/* 轮播图区域, 先用一张图片占位, 宽度100% 盖度100vh */}
<img src="/placeholder.svg" alt={t("carousel")} className="w-screen h-[80vh] object-cover rounded-lg" />
<img src="/images/home.png" alt={t("carousel")} className="w-screen h-[80vh] object-cover rounded-lg" />
{/* 公司介绍 - 左右布局 */}
<div className="flex flex-col lg:flex-row w-full my-16 px-8">
{/* 左边视频(图片占位) */}
<div className="w-full lg:w-1/2 h-[50vh] lg:h-[60vh] relative overflow-hidden">
<img
src="/placeholder.svg"
src="http://kelunpuzhonggong.com/upload/img/20210508103620.jpg"
alt={t("company_video")}
className="w-full h-full object-cover"
/>
@@ -32,7 +33,8 @@ export default function HomeComponent() {
{/* 第二部分:介绍 */}
<div className="mb-8">
<p className="text-lg text-gray-700 leading-relaxed">
{/* 左对齐首行缩进2字符 */}
<p className="text-left text-lg text-gray-700 leading-relaxed indent-8">
{t("company.description")}
</p>
</div>
@@ -119,37 +121,44 @@ export default function HomeComponent() {
{/* 资讯卡片列表 */}
<div className="flex flex-wrap justify-center gap-6 max-w-7xl mx-auto">
{/* 第一张卡片 */}
<div className="w-full md:w-[28vw] lg:w-[28vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news1.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news1.title")}</div>
<I18nLink href={t("news.items.news1.link")}>
<div className="w-full md:w-[28vw] lg:w-[28vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news1.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news1.title")}</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/images/blogs/1.jpg" alt={t("news.items.news1.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/placeholder.svg" alt={t("news.items.news1.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
</I18nLink>
{/* 第二张卡片 - 中间突出显示 */}
<div className="w-full md:w-[28vw] lg:w-[28vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg relative -mt-2 z-10">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news2.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news2.title")}</div>
{/* 第二张卡片 */}
<I18nLink href={t("news.items.news2.link")}>
<div className="w-full md:w-[28vw] lg:w-[28vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg relative -mt-2 z-10">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news2.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news2.title")}</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/images/blogs/2.png" alt={t("news.items.news2.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/placeholder.svg" alt={t("news.items.news2.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
</I18nLink>
{/* 第三张卡片 */}
<div className="w-full md:w-[26vw] lg:w-[26vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news3.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news3.title")}</div>
<I18nLink href={t("news.items.news3.link")}>
<div className="w-full md:w-[26vw] lg:w-[26vw] bg-white rounded-lg overflow-hidden transition-all duration-300 hover:shadow-lg">
<div className="p-4">
<div className="text-red-600 mb-2 font-medium text-left">{t("news.items.news3.date")}</div>
<div className="text-gray-800 mb-3 line-clamp-1 text-base whitespace-nowrap overflow-hidden text-ellipsis">{t("news.items.news3.title")}</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/images/blogs/3.jpg" alt={t("news.items.news3.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
<div className="p-4 h-48 overflow-hidden">
<img src="/placeholder.svg" alt={t("news.items.news3.title")} className="w-full h-full object-cover rounded" />
</div>
</div>
</I18nLink>
</div>
{/* 了解更多按钮 */}
@@ -175,7 +184,7 @@ export default function HomeComponent() {
{/* 默认显示第一张产品图 */}
<img
id="productImage"
src="/placeholder.svg"
src={t("products.list.product1.image")}
alt={t("products.list.product1.alt")}
className="w-full h-full object-contain p-8 transition-opacity duration-300"
/>
@@ -192,7 +201,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product1.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product1.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product1.name");
}}
@@ -204,7 +213,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product2.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product2.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product2.name");
}}
@@ -216,7 +225,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product3.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product3.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product3.name");
}}
@@ -228,7 +237,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product4.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product4.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product4.name");
}}
@@ -240,7 +249,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product5.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product5.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product5.name");
}}
@@ -252,7 +261,7 @@ export default function HomeComponent() {
<div
className="product-item p-6 flex items-center justify-center text-center bg-gray-200 cursor-pointer transition-colors duration-300 hover:bg-red-600 hover:text-white"
onMouseEnter={() => {
document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg');
document.getElementById('productImage')?.setAttribute('src', t("products.list.product6.image"));
document.getElementById('productImage')?.setAttribute('alt', t("products.list.product6.alt"));
document.getElementById('productTitle')!.textContent = t("products.list.product6.name");
}}

View File

@@ -164,14 +164,14 @@
}
},
"Home": {
"title": "福安德外贸",
"tagLine": "Next.js 多语言启动模板",
"description": "内置多语言支持的 Next.js 16 启动模板助您快速构建面向全球的出海网站。简洁高效开箱即用完全优化的SEO基础架构。",
"title": "巨丰钢铁",
"tagLine": "巨丰钢铁官网",
"description": "巨丰钢铁官网",
"carousel": "轮播图",
"company_video": "企业视频",
"company": {
"title": "天津友发钢管集团股份有限公司",
"description": "友发集团是集直缝焊接圆管(含热浸镀锌)、直缝焊接方矩管(含热浸镀锌)、钢塑复合管、不锈钢管及管件、螺旋焊管(含承插及防腐加工)、热镀锌无缝管、石油管道、管件、保温管道、塑料管及管件、盘扣脚手架、光伏支架及地桩等多种产品生产销售于一体的大型企业集团,拥有'友发'和'正金'两个品牌。已经形成天津、河北唐山、河北邯郸、河北沧州、陕西韩城、江苏溧阳、辽宁葫芦岛、云南玉溪、安徽临泉、吉林磐石10个生产基地同时正在建设四川成都基地。",
"title": "巨丰钢铁股份有限公司",
"description": "巨丰钢铁股份有限公司是山东省重点工程项目,是济宁市工程之一,也是科伦普产品结构调整重要的工程项目。工程采用了外方技术总负责、关键设备整体引进、点菜集成、国内技术总成、自主创新、单体设备引进等多种建设方 案保证了技术先进和人才的培养确保工程投产后达产达效。科伦普冷轧重工有限公司是设计年产量150万 吨,能向广大用户提供热轧酸洗、热轧镀锌、冷硬、罩式退火、冷轧镀锌、铝锌合金、锌铝合金、锌铝镁、镀铬等各大类产品。产品覆盖东北、华北、华东、华南等地区。 ",
"button": "了解更多"
},
"stats": {
@@ -198,15 +198,18 @@
"items": {
"news1": {
"date": "2025/11/17",
"title": "核聚变区智创未来友发集团亮相202..."
"title": "钢铁行业发展新趋势",
"link": "/blog/1"
},
"news2": {
"date": "2025/11/17",
"title": "携手再攀产业新高峰,友发集团应邀出席..."
"title": "雅江工程就钢铁行业的重大意义",
"link": "/blog/2"
},
"news3": {
"date": "2025/09/20",
"title": "友发集团与中诚投建工集团签订战略合作..."
"title": "中国钢铁行业发展亟需高端化",
"link": "/blog/3"
}
}
},
@@ -214,34 +217,34 @@
"title": "产品中心",
"list": {
"product1": {
"name": "直缝高频焊接圆管(含热浸镀锌)",
"image": "/placeholder.svg",
"alt": "直缝高频焊接圆管"
"name": "冷轧卷",
"image": "http://kelunpuzhonggong.com/upload/20251021161717.jpg",
"alt": "冷轧卷"
},
"product2": {
"name": "方形焊接钢管(含热浸镀锌)",
"image": "/placeholder.svg",
"alt": "方形焊接钢管"
"name": "冷硬卷",
"image": "http://kelunpuzhonggong.com/upload/20251023102339.jpg",
"alt": "冷硬卷"
},
"product3": {
"name": "钢塑复合管",
"image": "/placeholder.svg",
"alt": "钢塑复合管"
"name": "无花镀锌卷",
"image": "http://kelunpuzhonggong.com/upload/20251102082125.jpg",
"alt": "无花镀锌卷"
},
"product4": {
"name": "管路连接件",
"image": "/placeholder.svg",
"alt": "管路连接件"
"name": "冷轧热镀锌(锌铝镁)钢带",
"image": "http://kelunpuzhonggong.com/upload/20250318141215854.jpg",
"alt": "冷轧热镀锌(锌铝镁)钢带"
},
"product5": {
"name": "盘扣脚手架",
"image": "/placeholder.svg",
"alt": "盘扣脚手架"
"name": "连续镀铝锌带钢",
"image": "http://kelunpuzhonggong.com/upload/20250318141215385.jpg",
"alt": "连续镀铝锌带钢"
},
"product6": {
"name": "不锈钢管及管件",
"image": "/placeholder.svg",
"alt": "不锈钢管及管件"
"name": "锌铝镁高铁声噪板",
"image": "http://kelunpuzhonggong.com/upload/20250318141214984.jpg",
"alt": "锌铝镁高铁声噪板"
}
}
},

2
next-env.d.ts vendored
View File

@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -4,7 +4,7 @@ const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: "standalone",
output: "standalone",
images: {
remotePatterns: [
...(process.env.R2_PUBLIC_URL

BIN
public/images/blogs/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 MiB

BIN
public/images/blogs/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 KiB

BIN
public/images/blogs/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB

BIN
public/images/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 KiB