104 lines
4.6 KiB
JavaScript
104 lines
4.6 KiB
JavaScript
"use client";
|
||
import { Inter } from "next/font/google";
|
||
import React, { useEffect } from "react";
|
||
import "./globals.css";
|
||
import BottomNav from "../components/BottomNav";
|
||
import { Provider } from "react-redux";
|
||
import store from "../store";
|
||
import withAuth from "@/components/WithAuth";
|
||
const inter = Inter({ subsets: ["latin"] });
|
||
|
||
const metadata = {
|
||
title: "铁粉空间",
|
||
description: "与Ta永不失联",
|
||
keywords: [
|
||
"铁粉空间",
|
||
"铁粉空间APP",
|
||
"社交",
|
||
"网红",
|
||
"粉丝",
|
||
"创作者",
|
||
"变现",
|
||
"平台",
|
||
"铁粉",
|
||
"空间",
|
||
],
|
||
};
|
||
export const viewport = {
|
||
width: "device-width",
|
||
initialScale: 1,
|
||
maximumScale: 1,
|
||
userScalable: 0,
|
||
};
|
||
export default function RootLayout({ children }) {
|
||
return (
|
||
<html
|
||
lang="zh-CN"
|
||
className="bg-deepBg h-full"
|
||
data-prefers-color-scheme="dark"
|
||
>
|
||
<head>
|
||
<title>{metadata.title}</title>
|
||
<link rel="icon" href="/favicon.ico" type="image/x-icon"></link>
|
||
<link
|
||
rel="shortcut icon"
|
||
href="/favicon.ico"
|
||
type="image/x-icon"
|
||
></link>
|
||
<link rel="icon" href="/favicon.png" type="image/png"></link>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
||
<meta
|
||
name="description"
|
||
content={metadata.description}
|
||
keywords={metadata.keywords}
|
||
/>
|
||
<meta charSet="UTF-8" />
|
||
{/* <!-- 自定义应用图标可用 --> */}
|
||
<link
|
||
rel="apple-touch-icon-precomposed"
|
||
sizes="120x120"
|
||
href="favicon.ico"
|
||
/>
|
||
{/* <!-- 全屏设置 --> */}
|
||
<meta
|
||
name="viewport"
|
||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"
|
||
/>
|
||
|
||
{/* <!-- 网站开启对 web app 程序的支持 具体表现为去除浏览器地址栏和底部导航栏 :先保存为桌面书签,然后通过书签打开即可生效--> */}
|
||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||
{/* <!-- 用来定义顶部状态栏的形式默认是default为白色 black为黑色 black-translucent为灰色半透明(会占据屏幕的约20px,不同的设备可能会有差异)--> */}
|
||
{/* <!-- 在定义了apple-mobile-web-app-capable的前提下,设置状态栏的属性值apple-mobile-web-app-status-bar-style才有效; --> */}
|
||
<meta
|
||
name="apple-mobile-web-app-status-bar-style"
|
||
content="black-translucent"
|
||
/>
|
||
{/* <!-- apple-touch-startup-image用来配置启动动画 --> */}
|
||
{/* <!-- 这里要注意,这里图片的尺寸要和设备的静态图片显示尺寸完全对应,差一个像素都会导致启动动画无法显示 --> */}
|
||
{/* <!-- 下面列举了iPhone的所有尺寸(ps:为了方便大家就全部贴出来了!!) --> */}
|
||
{/* <!-- iPhone 678 startup image @2x--> */}
|
||
<link href={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/splash.png"} media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"/>
|
||
{/* <!-- iPhone 678p startup image @3x--> */}
|
||
<link href={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/splash.png"} media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image"/>
|
||
{/* <!-- iPhone X Xs startup image @3x--> */}
|
||
<link href={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/splash.png"} media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image"/>
|
||
{/* <!-- iPhone XR startup image @2X --> */}
|
||
<link href={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/splash.png"} media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"/>
|
||
{/* <!-- iPhone XR Max startup image @3x--> */}
|
||
<link href={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/splash.png"} media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image"/>
|
||
</head>
|
||
<body className={`${inter.className} h-full`}>
|
||
<main className={`w-full bg-deepBg h-full`}>
|
||
{withAuth(<Provider store={store}>{children}</Provider>)}
|
||
{/* <Provider store={store}>{children}</Provider> */}
|
||
</main>
|
||
<footer className="fixed bottom-0 left-0 w-screen bg-black">
|
||
<div>
|
||
<BottomNav />
|
||
</div>
|
||
</footer>
|
||
</body>
|
||
</html>
|
||
);
|
||
}
|