-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1441842
Showing
5 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.root { | ||
height: 100%; | ||
font-family: sans-serif; | ||
background-color: __backgroundColor__; | ||
flex-basis: 100%; | ||
overflow-y: auto; | ||
/* __center__ */ | ||
} | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
:root { | ||
--foreground-rgb: 0, 0, 0; | ||
--background-start-rgb: 214, 219, 220; | ||
--background-end-rgb: 255, 255, 255; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
:root { | ||
--foreground-rgb: 255, 255, 255; | ||
--background-start-rgb: 0, 0, 0; | ||
--background-end-rgb: 0, 0, 0; | ||
} | ||
} | ||
|
||
body { | ||
color: rgb(var(--foreground-rgb)); | ||
background: linear-gradient( | ||
to bottom, | ||
transparent, | ||
rgb(var(--background-end-rgb)) | ||
) | ||
rgb(var(--background-start-rgb)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import './globals.css' | ||
import { Inter } from 'next/font/google' | ||
|
||
const inter = Inter({ subsets: ['latin'] }) | ||
|
||
export const metadata = { | ||
title: 'Create Next App', | ||
description: 'Generated by create next app', | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}>{children}</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use client' | ||
import Image from 'next/image' | ||
import { MacBookAir1 } from '../components/MacBookAir1/MacBookAir1'; | ||
import { IPhone141 } from '../components/iPhone141/iPhone141' | ||
import classes from './App.module.css'; | ||
import resets from '../components/_resets.module.css'; | ||
import {useEffect,useState} from 'react'; | ||
|
||
|
||
export default function Home() { | ||
const [mobile,SetMobile]=useState(0); | ||
|
||
|
||
|
||
useEffect(() => { | ||
if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) | ||
//当用户用手机端打开时,控制打开移动端网站 | ||
SetMobile(1); | ||
}, []); | ||
|
||
|
||
if (mobile) | ||
return( | ||
<div className={`${resets.storybrainResets} ${classes.root}`}> | ||
<IPhone141/> | ||
</div> | ||
); | ||
else | ||
return ( | ||
<div className={`${resets.storybrainResets} ${classes.root}`}> | ||
<MacBookAir1 /> | ||
</div> | ||
) | ||
|
||
} |