Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Chen li yin patch 1 #3

Open
wants to merge 4 commits into
base: LiYin-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md

This file was deleted.

29,096 changes: 29,096 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"autoprefixer": "^10.4.13",
"postcss": "^8.4.19",
"tailwindcss": "^3.2.4"
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added public/favicon.ico
Binary file not shown.
43 changes: 43 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
38 changes: 38 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
19 changes: 19 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import "./App.css";
import React from "react";
import Homepage from "./components/HomePage/HomePage";
import SearchResult from "./components/SearchResult/SearchResult";
import Challenge from "./components/Challenge/Challenge";
import EditProfile from "./components/EditProfile/EditProfile";

function App() {
return (
<div className="App">
{/* <Homepage /> */}
<SearchResult />
{/* <Challenge /> */}
{/* <EditProfile /> */}
</div>
);
}

export default App;
16 changes: 16 additions & 0 deletions src/components/Challenge/Category.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";

const Roll = (props) => {
return (
<div className="shadow-black">
<button
type="button"
class="shadow-lg shadow-gray text-white font-black bg-gradient-to-r from-purple-700 to-blue-800 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-purple-300 dark:focus:ring-purple-800 rounded-full text-4xl w-96 h-60 text-center mr-2 mb-2"
>
{props.buttonName}
</button>
</div>
);
};

export default Roll;
26 changes: 26 additions & 0 deletions src/components/Challenge/Challenge.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import Header from "../layout/Header";
import Title from "../layout/Title";
import Roll from "./Roll";
import Category from "./Category";
import Footer from "../layout/Footer";

const Challenge = () => {
return (
<div>
<Header />
<body>
<Title pageTitle="請選擇:" />
<div className="flex snap-x place-content-center gap-16">
<Roll buttonName="Let it Roll" />
<Category buttonName="Choose Category" />
</div>
</body>
<footer>
<Footer />
</footer>
</div>
);
};

export default Challenge;
16 changes: 16 additions & 0 deletions src/components/Challenge/Roll.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";

const Roll = (props) => {
return (
<div className="shadow-black">
<button
type="button"
class="shadow-lg shadow-gray text-white font-black bg-gradient-to-r from-orange-500 to-pink-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-orange-400 dark:focus:ring-pink-700 rounded-full text-4xl w-96 h-60 text-center mr-2 mb-2"
>
{props.buttonName}
</button>
</div>
);
};

export default Roll;
Empty file.
7 changes: 7 additions & 0 deletions src/components/EditProfile/EditProfile.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const EditProfile = () => {
return <div></div>;
};

export default EditProfile;
104 changes: 104 additions & 0 deletions src/components/HomePage/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import React from "react";
import Header from "../layout/Header";
import Card from "../layout/Card";
import Footer from "../layout/Footer";
import Title from "../layout/Title";
import Button from "../layout/Button";

const HomePage = () => {
return (
<div>
<Header />

<body>
<Title pageTitle="熱門排行|Popular Course" />
{/* card */}
<div className="flex snap-x scroll-pl-6">
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="250"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱2"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="450"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱3"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="250"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱4"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="350"
originalPrice="500"
/>
</div>

<Title pageTitle="推薦給你 | Recommended for you" />
{/* card */}
<div className="flex snap-x scroll-pl-6">
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱5"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="200"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱6"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="300"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱7"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="350"
originalPrice="500"
/>
<Card
badge1="html"
badge2="css"
badge3="react"
vedioName="影片名稱8"
vedioInfo="這是一段很長的影片資訊,會告訴你這堂課有關的詳細內容,可以不用太仔細看,謝謝。"
salePrice="250"
originalPrice="500"
/>
</div>
</body>

<footer>
<Footer />
</footer>
</div>
);
};

export default HomePage;
Loading