Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events Details Page #36

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"aos": "3.0.0-beta.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-icons": "^4.7.1",
"react-intersection-observer": "^9.4.3",
"react-router-dom": "^6.4.3",
Expand Down
29 changes: 26 additions & 3 deletions pnpm-lock.yaml

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

Binary file added public/images/EventHero1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Routes, Route } from "react-router-dom";

import { Home, Registration, Sponsors, Team } from "./Pages";
import { Home, Registration, Sponsors, Team, EventPage } from "./Pages";

import { Navbar, Footer } from "./Components";

Expand All @@ -13,6 +13,7 @@ const App = () => {
<Route path="/registration/:event" element={<Registration />} />
<Route path="/sponsors" element={<Sponsors />} />
<Route path="/team" element={<Team />} />
<Route path="/event/:id" element={<EventPage />} />
</Routes>

<Footer />
Expand Down
138 changes: 138 additions & 0 deletions src/Components/Event/Event.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
import styles from "./Event.module.scss";
import EventCard from "../EventCard/EventCard";

const Event = ({ data }) => {
return (
<section className={styles.event}>
<div className={styles.left} key={data.id}>
<div className={styles.img}>
<img src={data.img} alt="" />
</div>
<div className={styles.hero}>
<div className={styles.heroleft}>
<h2>{data["event-title"]}</h2>
<p>{data["head-content"]}</p>
</div>
<div className={styles.heroright}>
<div className={styles.button}>
<button className={styles.btn}>
<a href={data["reg-link"]} target="_blank">
Register
</a>
</button>
</div>
{data.stage_timeline.map((item) => {
return (
<div className={styles.stageTimeline} key={item.stage_id}>
<h3>DATE</h3>
<p>Stage 1 :{item.stage1_datetime}</p>
<p>{item.stage1_venue}</p>
<br />
<p>Stage 2 :{item.stage2_datetime}</p>
<p>{item.stage2_venue}</p>
</div>
);
})}
</div>
</div>
<div className={styles.content}>
<h1>Rules and Regulations</h1>
<div className={styles.overview}>
<h2 className={styles.head1}>OVERVIEW</h2>
<br />
<p>
{data.content.overview.map((val) => {
return (
<>
<p>{val}</p>
<br />
</>
JOSU9435 marked this conversation as resolved.
Show resolved Hide resolved
);
})}
</p>
<br />
<p>
{data.content.outcome.map((val) => {
return (
<>
<p>{val}</p>
<br />
</>
JOSU9435 marked this conversation as resolved.
Show resolved Hide resolved
);
})}
</p>
<br />
</div>
<div className={styles.stage1}>
{data.content.stage1.map((item) => {
return (
<div className={styles.overview} key={item.stage_id}>
<h2 className={styles.head1}>{item.stage_name}</h2>
<br />
<p>
{item.stage_rules.map((val) => {
return (
<>
<p>{val}</p>
<br />
</>
JOSU9435 marked this conversation as resolved.
Show resolved Hide resolved
);
})}
</p>
<br />
<a href={item.decklink} target="_blank">
Click here.
</a>
</div>
);
})}
</div>
<div className={styles.stage2}>
{data.content.stage2.map((item) => {
return (
<div className={styles.overview} key={item.stage_id}>
<h2 className={styles.head1}>{item.stage_name}</h2>
<br />
<p>
{item.stage_rules.map((val) => {
return (
<>
<p>{val}</p>
<br />
</>
JOSU9435 marked this conversation as resolved.
Show resolved Hide resolved
);
})}
</p>
</div>
);
})}
</div>
<div className={styles.overview}>
<h2 className={styles.head1}>GUIDELINES</h2>
<br />
<p>
{data.content.guidelines.map((val) => {
return (
<>
<p>{val}</p>
<br />
</>
JOSU9435 marked this conversation as resolved.
Show resolved Hide resolved
);
})}
</p>
<br />
<a href={data.content.sublink} target="_blank">
Click here.
</a>
</div>
</div>
</div>
<div className={styles.right}>
<h3>Other Events</h3>
<EventCard width="300px" />
</div>
</section>
);
};

export default Event;
147 changes: 147 additions & 0 deletions src/Components/Event/Event.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
.event {
display: flex;
justify-content: center;
background: var(--srijan4-gradient-4);
color: white;
margin-bottom: 1rem;
}
.left {
width: 70%;
margin: 1.5rem;
padding: 0.5rem;
display: flex;
align-items: center;
flex-direction: column;
}
.button {
display: flex;
justify-content: flex-end;
margin-bottom: 1rem;
}
.btn {
width: 7rem;
height: 2rem;
border-radius: 10rem;
background: var(--srijan4-gradient-10);
cursor: pointer;
a {
text-decoration: none;
color: white;
font-weight: 500;
}
border: none;
}
.right {
width: 30%;
display: flex;
align-items: center;
flex-direction: column;
margin: 1rem;
padding: 0.5rem;
}
.img img {
height: 30vw;
width: 50vw;
}
.hero {
display: flex;
}
.heroleft {
width: 60%;
padding: 1rem;
h2 {
font-size: 2rem;
}
p {
font-size: 0.9rem;
font-weight: 400;
}
}
.heroright {
width: 40%;
padding: 1rem;
}
.stageTimeline {
border-radius: 10px;
background: var(--srijan4-gradient-10);
padding: 0.5rem;
text-align: center;
font-weight: 600;
}
.content h1 {
background: var(--srijan4-gradient-10);
background-size: 100%;
-webkit-background-clip: text;
-moz-background-clip: text;
-webkit-text-fill-color: transparent;
-moz-text-fill-color: transparent;
font-weight: 700;
text-align: left !important;
}
.head1 {
color: var(--srijan4-dark-pink) !important;
}
.overview {
margin-bottom: 2rem;
p {
font-size: 0.9rem;
font-weight: 400;
}
a {
text-decoration: none;
color: white;
font-weight: 500;
font-size: 1.2rem;
}
}
@media only screen and (max-width: 1000px) {
.img img {
height: 30vw;
width: 50vw;
}
.stageTimeline {
p {
font-size: 0.75rem;
}
}
.content {
h1 {
font-size: 2rem;
}
}
}
@media only screen and (max-width: 805px) {
.heroleft {
h2 {
font-size: 1.5rem;
}
p {
font-size: 0.8rem;
}
}
.stageTimeline {
p {
font-size: 0.7rem;
}
}
.content {
h1 {
font-size: 2rem;
}
p {
font-size: 0.8rem;
}
}
}
@media only screen and (max-width: 750px) {
.right {
display: none;
}
.left {
width: 100%;
}
.img img {
width: 50vw;
height: 30vw;
}
}
Loading