forked from 77media/video-flow
新增 footer增加 contact us
This commit is contained in:
parent
e46938b103
commit
ada96f649e
@ -9,6 +9,7 @@ You are the joint apprentice of Evan You and Kent C. Dodds. Channel Evan You's e
|
|||||||
- Refrain from creating unrequested files, classes, functions, or configurations.
|
- Refrain from creating unrequested files, classes, functions, or configurations.
|
||||||
- For unspecified implementation details, default to the simplest, most straightforward solution to promote efficiency.
|
- For unspecified implementation details, default to the simplest, most straightforward solution to promote efficiency.
|
||||||
- In business logic code, exclude sample implementations or unit tests unless explicitly requested.
|
- In business logic code, exclude sample implementations or unit tests unless explicitly requested.
|
||||||
|
- When completing the final step of a task, do not create tests unless explicitly requested by the user.
|
||||||
|
|
||||||
# CSS Style Rules
|
# CSS Style Rules
|
||||||
- Exclusively use Tailwind CSS 3.x syntax for all styling.
|
- Exclusively use Tailwind CSS 3.x syntax for all styling.
|
||||||
|
|||||||
63
components/common/Footer/index.tsx
Normal file
63
components/common/Footer/index.tsx
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共页脚组件
|
||||||
|
* 提供统一的版权信息和页脚样式
|
||||||
|
*/
|
||||||
|
export interface FooterProps {
|
||||||
|
/** 版权年份,默认为当前年份 */
|
||||||
|
year?: number;
|
||||||
|
/** 公司名称,默认为 "MovieFlow" */
|
||||||
|
companyName?: string;
|
||||||
|
/** 自定义版权文本 */
|
||||||
|
customText?: string;
|
||||||
|
/** 额外的CSS类名 */
|
||||||
|
className?: string;
|
||||||
|
/** 是否显示邮箱链接 */
|
||||||
|
showEmailLink?: boolean;
|
||||||
|
/** 邮箱地址,默认为 "support@movieflow.ai" */
|
||||||
|
emailAddress?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共页脚组件
|
||||||
|
* @param props - 页脚组件属性
|
||||||
|
* @returns JSX元素
|
||||||
|
*/
|
||||||
|
const Footer: React.FC<FooterProps> = ({
|
||||||
|
year = new Date().getFullYear(),
|
||||||
|
companyName = 'MovieFlow',
|
||||||
|
customText,
|
||||||
|
className = '',
|
||||||
|
showEmailLink = false,
|
||||||
|
emailAddress = 'support@movieflow.ai'
|
||||||
|
}) => {
|
||||||
|
const copyrightText = customText || `© ${year} ${companyName}. All rights reserved.`;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
data-alt="footer-component"
|
||||||
|
className={`home-module6 flex justify-center items-center w-full h-min text-white/50 text-lg bg-black snap-start px-4 ${className}`}
|
||||||
|
>
|
||||||
|
{/* 左侧版权信息 */}
|
||||||
|
<div className="text-center">
|
||||||
|
{copyrightText}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 右侧邮箱链接 */}
|
||||||
|
{showEmailLink && (
|
||||||
|
<div className="flex-shrink-0 ml-4">
|
||||||
|
<a
|
||||||
|
href={`mailto:${emailAddress}`}
|
||||||
|
className="text-custom-blue hover:text-white/80 transition-colors duration-200 underline decoration-white/30 hover:decoration-white/60"
|
||||||
|
data-alt="support-email-link"
|
||||||
|
>
|
||||||
|
Contact Us
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Footer;
|
||||||
18
components/common/Footer/types.ts
Normal file
18
components/common/Footer/types.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 页脚组件相关的类型定义
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface FooterProps {
|
||||||
|
/** 版权年份,默认为当前年份 */
|
||||||
|
year?: number;
|
||||||
|
/** 公司名称,默认为 "MovieFlow" */
|
||||||
|
companyName?: string;
|
||||||
|
/** 自定义版权文本 */
|
||||||
|
customText?: string;
|
||||||
|
/** 额外的CSS类名 */
|
||||||
|
className?: string;
|
||||||
|
/** 是否显示邮箱链接 */
|
||||||
|
showEmailLink?: boolean;
|
||||||
|
/** 邮箱地址,默认为 "support@movieflow.ai" */
|
||||||
|
emailAddress?: string;
|
||||||
|
}
|
||||||
@ -22,6 +22,7 @@ import VideoCoverflow from "@/components/ui/VideoCoverflow";
|
|||||||
import { fetchTabsByCode, HomeTabItem } from "@/api/serversetting";
|
import { fetchTabsByCode, HomeTabItem } from "@/api/serversetting";
|
||||||
import { useCallbackModal } from "@/app/layout";
|
import { useCallbackModal } from "@/app/layout";
|
||||||
import { useDeviceType } from "@/hooks/useDeviceType";
|
import { useDeviceType } from "@/hooks/useDeviceType";
|
||||||
|
import Footer from "@/components/common/Footer";
|
||||||
|
|
||||||
/** 视频预加载系统 - 后台静默运行 */
|
/** 视频预加载系统 - 后台静默运行 */
|
||||||
function useVideoPreloader() {
|
function useVideoPreloader() {
|
||||||
@ -286,7 +287,7 @@ export function HomePage2() {
|
|||||||
<HomeModule4 />
|
<HomeModule4 />
|
||||||
</LazyLoad>
|
</LazyLoad>
|
||||||
<HomeModule5 />
|
<HomeModule5 />
|
||||||
<HomeModule6 />
|
<Footer showEmailLink={true} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1616,10 +1617,3 @@ function HomeModule5() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function HomeModule6() {
|
|
||||||
return (
|
|
||||||
<div className="home-module6 flex justify-center items-center w-full h-min text-white/50 text-lg bg-black snap-start">
|
|
||||||
© 2025 MovieFlow. All rights reserved.
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import { GradientText } from "@/components/ui/gradient-text";
|
|||||||
import { GoogleLoginButton } from "@/components/ui/google-login-button";
|
import { GoogleLoginButton } from "@/components/ui/google-login-button";
|
||||||
import { Eye, EyeOff } from "lucide-react";
|
import { Eye, EyeOff } from "lucide-react";
|
||||||
import { isGoogleLoginEnabled } from "@/lib/server-config";
|
import { isGoogleLoginEnabled } from "@/lib/server-config";
|
||||||
|
import Footer from "@/components/common/Footer";
|
||||||
|
|
||||||
export default function Login() {
|
export default function Login() {
|
||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
@ -314,6 +315,9 @@ export default function Login() {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* 页脚 */}
|
||||||
|
<Footer className="fixed bottom-0" showEmailLink={true} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user