Skip to content

Commit

Permalink
Merge pull request #159 from Sparsh-V/master
Browse files Browse the repository at this point in the history
food page
  • Loading branch information
Aryamanz29 authored Nov 22, 2021
2 parents 30b0e5b + 43e8587 commit 67e1a28
Show file tree
Hide file tree
Showing 31 changed files with 1,206 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Card Flipper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Card Flipper

## to run

1) clone it to loacal
2) do npm i
3) run with npm start

## How it looks

![](https://github.com/Sparsh-V/Web-Ideas/blob/master/Card%20Flipper/Screenshot%20(5).png)
![](https://github.com/Sparsh-V/Web-Ideas/blob/master/Card%20Flipper/Screenshot%20(6).png)
Binary file added Card Flipper/Screenshot (5).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 Card Flipper/Screenshot (6).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 Card Flipper/public/favicon.ico
Binary file not shown.
43 changes: 43 additions & 0 deletions Card Flipper/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 Card Flipper/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 Card Flipper/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 Card Flipper/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 Card Flipper/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:
203 changes: 203 additions & 0 deletions Card Flipper/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
body::before{
content: " ";
position: absolute;
background:url(./assets/jason-leung-Xaanw0s0pMk-unsplash.jpg);
height: 100vh;
width: 100vw;
opacity: 0.4;
}
.main-container {
max-width: 1200px;
margin: auto;
}

.main-container > .cards {
padding: 20px;
display: flex;
flex: 1 1 0;
flex-wrap: wrap;
}

.card-container {
position: relative;
margin: 20px;
width: 340px;
min-height: 220px;
}

.text-container {
display: flex;
justify-content: center;
align-items: center;
padding: 40px;
height: 100%;
width: 100%;
box-sizing: border-box;
color: #646464;
font-size: 18px;
font-weight: 700;
}

.card {
border-radius: 8px;
position: absolute;
/* background: #fff; */
height: 100%;
width: 100%;
cursor: pointer;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
box-shadow: 0px 4px 8px rgba(191, 79, 79, 0.5);

}

.card-que {
border: 4px solid #db4437;
}

.card-ans {
border: 4px solid #0f9d58;
}


/* .card {
border-radius: 6px;
position: absolute;
height: 100%;
width: 100%;
cursor: pointer;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.card-ans {
border: 3px solid #0f9d58;
}
.card-que {
border: 3px solid #db4437;
} */

.flip {
transform: rotateY(180deg);
transform-style: preserve-3d;
transition: 4000ms;
}

.anti-flip {
transform: rotateY(0deg);
transform-style: preserve-3d;
transition: 4000ms;
}

.del-icon {
position: absolute;
bottom: 0;
right: 0;
padding: 8px;
cursor: pointer;
}

.add-button {
position: fixed;
width: 60px;
height: 60px;
background-color: #0f9d58;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
bottom: 0;
z-index: 999;
box-shadow: rgba(0, 0, 0, 0.5) 0px 4px 8px;
margin: 40px;
cursor: pointer;
}

.btn {
width: 100%;
padding: 8px;
font-size: 16px;
font-weight: 700;
border: none;
border-radius: 8px;

color: #ffffff;

transition: 300ms;
cursor: pointer;
}

.btn-container {
display: flex;
column-gap: 16px;
}

.btn-submit {
border: 2px solid #0f9d58;
background: #0f9d58;
}

.btn-submit:hover {
color: #0f9d58;
background: #ffffff;
border: 2px solid #0f9d58;
transition: 300ms;
}

.btn-cancel {
border: 2px solid #db4437;
background: #db4437;
}

.btn-cancel:hover {
color: #db4437;
background: #ffffff;
border: 2px solid #db4437;
transition: 300ms;
}

.modalContainer {
position: fixed;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.25);
z-index: 9999;
}

.modal {
width: 300px;
height: auto;
padding: 24px 32px;
border-radius: 6px;
background-color: #ffffff;
margin: 24px;
}

input {
padding: 8px;
border-radius: 4px;
min-width: "93%";
}

.form {
display: flex;
flex-direction: column;
}

.heading {
text-align: center;
margin-bottom: 12px;
font-size: large;
}

@media only screen and (max-width: 600px) {
.add-button {
right: 0;
}
}
56 changes: 56 additions & 0 deletions Card Flipper/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// import { useState } from "react";
import "./App.css";
//import AddButton from "./Components/AddButton";
// import AddModal from "./Components/AddModal";
// import Card from "./Components/Card";
import FlashCards from "./Components/Flashcard";
//import Counter from "./Components/Counter";

const App = () => {
// const color = "#0f9d58";
// const [hide, setHide] = useState(true);

// const toggleHide = () => {
// setHide(!hide);
// };

// let promiseWala = () => {
// return new Promise((resolve, reject) => {
// if (false) {
// setTimeout(() => {
// resolve("vada poora");
// }, 5000);
// } else {
// setTimeout(() => {
// resolve("vada tut gya");
// }, 5000);
// }
// });
// };

// console.log(promiseWala());
// promiseWala()
// .then((text) => console.log(text))
// .catch((text) => console.log(text));

// let asyncFunction = async () => {
// try {
// let promiseResponse = await promiseWala();
// console.log(promiseResponse);
// } catch (error) {
// console.log(error);
// }
// };

// try{
// a=76;
// }catch(error){

// }

//asyncFunction();

return <FlashCards />;
};

export default App;
8 changes: 8 additions & 0 deletions Card Flipper/src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
15 changes: 15 additions & 0 deletions Card Flipper/src/Components/AddButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import plus from "../assets/plus.svg";

const AddButton = ({ color, toggleHide }) => {
return (
<div
className="add-button"
style={{ backgroundColor: color }}
onClick={toggleHide}
>
<img src={plus} alt="plus" width="30px" height="30px" />
</div>
);
};

export default AddButton;
Loading

0 comments on commit 67e1a28

Please sign in to comment.