Skip to content

Commit

Permalink
static webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
anku0512 committed Nov 2, 2023
1 parent 845cbdc commit de153eb
Show file tree
Hide file tree
Showing 19 changed files with 300 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/airbnb.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/body-image.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/cool.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/star.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/users/cycle.jpg
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/users/cycle2.jpg
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/users/image12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 59 additions & 5 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
}

.App-logo {
height: 40vmin;
height: 15vmin;
pointer-events: none;
padding-right: 20px;
padding-left: 10px;
}
.gray {
color: grey;
}
.bold {
font-weight: bold;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
Expand All @@ -15,19 +22,23 @@

.App-header {
background-color: #282c34;
min-height: 100vh;
min-height: 5vh;
display: flex;
flex-direction: column;
flex-direction: row;
align-items: center;
justify-content: center;
justify-content: flex-start;
font-size: calc(10px + 2vmin);
color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

section{
padding: 20px;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
Expand All @@ -36,3 +47,46 @@
transform: rotate(360deg);
}
}

.home-img {
padding-top: 20px;
width: 60%;
align-items: center;
filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}
.card {
/*padding-left: 30px;*/
width: 175px;
font-size: 12px;
flex: 0 0 auto;
display: flex;
flex-direction: column;
position: relative;
}
.card--image {
width: 100%;
border-radius: 9px;
}
.card-stats {
display: flex;
align-items: center;
}
.card--star {
height: 14px;
}

.slider {
display: flex;
gap: 20px;
flex-wrap: nowrap;
overflow-x: auto;
}
.card--badge{
position: absolute;
top: 6px;
left: 6px;
background-color: white;
padding: 5px 7px;
border-radius: 2px;
font-weight: bold;
}
24 changes: 8 additions & 16 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
import logo from './logo.svg';

import './App.css';
import Navbar from "./component/Navbar";
import Body from "./component/Body";
import Slider from "./component/Slider";

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<div>
<Navbar />
<Body />
<Slider />
</div>
);
}
Expand Down
14 changes: 14 additions & 0 deletions src/component/Body.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import '../App.css';

function Body() {
return (
<div className="App">
<img src="/body-image.png" alt="images" className="home-img"/>
<h1>Online Experience</h1>
<p>Join unique interactive activities led by one-of-a kind hosts-all without leaving home</p>
</div>
);
}

export default Body;
31 changes: 31 additions & 0 deletions src/component/Card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import '../App.css';




function Card(props) {
// const {coverImg, rating, reviewCount, price, title, openSpots, location} = props;
let badgeText
if (props.list.openSpots === 0) {
badgeText = "SOLD OUT"
} else if (props.list.location === "Online") {
badgeText = "ONLINE"
}
return (
<div className="card">
{badgeText && <div className="card--badge">{badgeText}</div>}
<img src={props.list.coverImg} alt="image" className="card--image"/>
<div className="card--stats">
<img src="/star.png" alt="star" className="card--star"/>
<span>{props.list.stats.rating}</span>
<span className="gray"> ({props.list.stats.reviewCount} .)</span>
<span className="gray"> {props.list.location}</span>
</div>
<p>{props.list.title}</p>
<p><span className="bold">From ${props.list.price}</span> / person</p>
</div>
);
}

export default Card;
13 changes: 13 additions & 0 deletions src/component/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import '../App.css';

function Navbar () {
return (
<div className="App-header">
<img src="/cool.png" alt="logo" className='App-logo'/>
<h1>Cool</h1>
</div>
);
}

export default Navbar;
24 changes: 24 additions & 0 deletions src/component/Slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import Card from "./Card";
import data from "../data"
function Slider() {
const dataCard = data.map(list => {
return (
<Card
key = {list.id}
list = {list}
/>
)
})

return (
<section>
<div className="slider">
{dataCard}
</div>
</section>
);
}


export default Slider;
119 changes: 119 additions & 0 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
export default [
{
id: 1,
title: "Life Lessons with Katie Zaferes",
description: "I will share with you what I call \"Positively Impactful Moments of Disappointment.\" Throughout my career, many of my highest moments only came after setbacks and losses. But learning from those difficult moments is what gave me the ability to rise above them and reach my goals.",
price: 136,
coverImg: "/users/image12.png",
stats: {
rating: 5.0,
reviewCount: 6
},
location: "Online",
openSpots: 0,
},
{
id: 2,
title: "Learn Wedding Photography",
description: "Interested in becoming a wedding photographer? For beginner and experienced photographers alike, join us in learning techniques required to leave the happy couple with memories that'll last a lifetime.",
price: 125,
coverImg: "/users/cycle.jpg",
stats: {
rating: 5.0,
reviewCount: 30
},
location: "Online",
openSpots: 27,
},
{
id: 3,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Online",
openSpots: 3,
},
{
id: 4,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "online",
openSpots: 3,
},
{
id: 5,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Norway",
openSpots: 3,
},
{
id: 6,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Norway",
openSpots: 3,
},
{
id: 7,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Norway",
openSpots: 3,
},
{
id: 8,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Norway",
openSpots: 3,
},
{
id: 9,
title: "Group Mountain Biking",
description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
price: 50,
coverImg: "/users/cycle2.jpg",
stats: {
rating: 4.8,
reviewCount: 2
},
location: "Norway",
openSpots: 0,
}
]
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.

0 comments on commit de153eb

Please sign in to comment.