Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JimHacker1980 authored May 17, 2023
0 parents commit 1441842
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/App.module.css
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 added app/favicon.ico
Binary file not shown.
27 changes: 27 additions & 0 deletions app/globals.css
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));
}
21 changes: 21 additions & 0 deletions app/layout.tsx
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>
)
}
35 changes: 35 additions & 0 deletions app/page.tsx
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>
)

}

0 comments on commit 1441842

Please sign in to comment.