practice_code/web/czr/app/routes/solutions.tsx

105 lines
4.7 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { MetaFunction } from "@remix-run/node";
import { ImageLoader } from "hooks/ParticleImage";
import { useLoaderData } from "@remix-run/react";
export const meta: MetaFunction = () => {
return [
{ title: "解决方案 - 新纪元科技" },
{ name: "description", content: "新纪元科技提供的环保科技解决方案" },
];
};
export const loader = () => {
return { isClient: true };
};
export default function Solutions() {
const { isClient } = useLoaderData<typeof loader>();
return (
<div className="min-h-screen bg-gradient-to-br from-slate-50 to-white text-gray-800">
{/* 页面标题和轮播图 */}
<div className="bg-gradient-to-r from-green-50 to-blue-50 py-20">
<div className="max-w-7xl mx-auto px-4">
<div className="flex flex-col items-center">
{isClient ? (
<div className="w-[60px] md:w-[70px] h-[60px] md:h-[70px]">
{/* 轮播图代码从这里开始 */}
</div>
) : (
<div className="w-[60px] md:w-[70px] h-[60px] md:h-[70px] bg-gray-100 rounded-lg" />
)}
<h1 className="text-4xl font-bold text-center mt-8 bg-gradient-to-r from-green-600 to-blue-600 bg-clip-text text-transparent">
</h1>
<p className="text-center text-gray-600 mt-4 max-w-2xl mx-auto">
</p>
</div>
</div>
</div>
{/* 解决方案详情 */}
<div className="py-20">
<div className="max-w-7xl mx-auto px-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-12">
<div className="bg-white rounded-lg p-8 shadow-lg transform transition-all duration-300
hover:-translate-y-2 hover:shadow-xl border border-transparent hover:border-green-100">
<h2 className="text-2xl font-bold mb-6 relative inline-block">
<span className="relative z-10"></span>
<span className="absolute bottom-0 left-0 w-full h-2 bg-green-100 transform -skew-x-12"></span>
</h2>
<div className="space-y-4">
<p className="text-gray-600"></p>
<ul className="space-y-2 text-gray-600">
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
</ul>
</div>
</div>
<div className="bg-white rounded-lg p-8 shadow-lg transform transition-all duration-300
hover:-translate-y-2 hover:shadow-xl border border-transparent hover:border-green-100">
<h2 className="text-2xl font-bold mb-6 relative inline-block">
<span className="relative z-10"></span>
<span className="absolute bottom-0 left-0 w-full h-2 bg-green-100 transform -skew-x-12"></span>
</h2>
<div className="space-y-4">
<p className="text-gray-600"></p>
<ul className="space-y-2 text-gray-600">
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
<li className="transition-all duration-200 hover:text-green-600 hover:translate-x-2">
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
{/* 页脚 - 可以提取为共享组件 */}
<footer className="bg-gray-900 text-white py-12">
{/* 同首页页脚内容 */}
</footer>
</div>
);
}