Skip to content

Commit

Permalink
games
Browse files Browse the repository at this point in the history
  • Loading branch information
virajchandra51 committed Nov 5, 2023
1 parent cbac059 commit b4e522a
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Events from "./pages/events/Events"
import Speakers from "./pages/speakers/Speakers"
import Merchandise from "./pages/merchandise/Merchandise";
import CountDown from "./pages/countDown/CountDown";
import Games from "./pages/games/Games";

export default class App extends Component {
render() {
Expand All @@ -28,6 +29,7 @@ export default class App extends Component {
<Route path="/events" element={<Events />} />
<Route path="/speakers" element={<Speakers />} />
<Route path="/merchandise" element={<Merchandise />} />
<Route path="/games" element={<Games />} />
<Route path="/countdown" element={<CountDown />} />
</Routes>
</BrowserRouter>
Expand Down
Binary file added src/assets/images/games/game1.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 src/assets/images/games/game2.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 src/assets/images/games/game3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions src/components/gameCard/GameCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.codeutsava__game-container {
display: flex;
gap: 4rem;
font-family: var(--font-family3);
color: white;
background-color: #b079c11d;
backdrop-filter: blur(10px);
border-radius: 4px;
width: 100%;
padding: 4rem;
}

.codeutsava__game-left {
flex: 1;
display: flex;
gap: 20px;
}

.codeutsava__game-right {
flex: 1;
gap: 4px;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.codeutsava__game-right-content {
display: flex;
flex-direction: column;
gap: 1rem;
}

.codeutsava__game-img-container {
flex: 1;
}

.codeutsava__game-link {
background-color: var(--secondary-c);
border: 1px solid var(--secondary-c);
border-radius: 4px;
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px 0;
box-sizing: border-box;
color: #fff;
cursor: pointer;
font-family: inherit;
font-size: 16px;
font-weight: 400;
padding: 10px 25px;
text-align: center;
transform: translateY(0);
transition: transform 150ms, box-shadow 150ms;
}

.codeutsava__game-link:hover {
box-shadow: rgba(0, 0, 0, 0.15) 0 3px 9px 0;
transform: translateY(-2px);
}

.codeutsava__game-img-container img {
width: 100%;
height: 100px;
object-fit: cover;
cursor: pointer;
margin-bottom: 10px;
}

.codeutsava__game-main-img-container {
flex: 5;
}

.codeutsava__game-main-img-container img {
width: 100%;
min-height: 200px;
object-fit: cover;
}

@media screen and (max-width: 768px) {
.codeutsava__game-left {
flex-direction: column-reverse;
}
.codeutsava__game-container {
flex-direction: column;
padding: 3rem 1.5rem;
gap: 1rem;
}
.codeutsava__game-img-container {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 12px;
}
.codeutsava__game-img-container img {
width: auto;
height: 100px;
}
.codeutsava__game-right-heading {
font-size: 10px;
display: flex;
flex-direction: column;
}
.codeutsava__game-right-special-prices h2 {
margin-bottom: 10px;
}
.codeutsava__game-right-content {
margin: 1rem 0;
}
}
49 changes: 49 additions & 0 deletions src/components/gameCard/GameCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React, { useState } from "react";
import "./GameCard.css";
import game1 from "../../assets/images/games/game1.png";
import game2 from "../../assets/images/games/game2.png";
import game3 from "../../assets/images/games/game3.png";

const GameCard = () => {
const [selectedImg, setSelectedImg] = useState(0);
const images = [game1, game2, game3];
return (
<div className="codeutsava__game-container">
<div className="codeutsava__game-left">
<div className="codeutsava__game-img-container">
<img src={images[0]} onClick={(e) => setSelectedImg(0)} />
<img src={images[1]} onClick={(e) => setSelectedImg(1)} />
<img src={images[2]} onClick={(e) => setSelectedImg(2)} />
</div>
<div className="codeutsava__game-main-img-container">
<img src={images[selectedImg]} />
</div>
</div>
<div className="codeutsava__game-right">
<div className="codeutsava__game-right-heading">
<h1>Virtual Escape Room - The Cursed Mansion</h1>
</div>
<div className="codeutsava__game-right-content">
<div className="codeutsava__game-right-special-prices">
<h3>
Our self designed <b>virtual escape room,</b> where participants
must solve different puzzles in each level to escape and win.
</h3>
</div>
<p>
<b>Disclaimer:</b> Not for the <b>Weak.</b>
</p>
</div>
<a
className="codeutsava__game-link"
href="https://docs.google.com/forms/d/e/1FAIpQLSdnFe_Zm97Of15Hs2UH9V-mIoiQz8rSggj48y41ekjKkcSj7g/viewform"
target="__blank"
>
Click at your own Risk!
</a>
</div>
</div>
);
};

export default GameCard;
26 changes: 19 additions & 7 deletions src/components/navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Navbar = () => {
</a>
</Link>
</li>
<li className="codeutsava__navbar-navitem">
<li className="codeutsava__navbar-navitem">
<Link to="/merchandise">
<a href="#merchandise">
<h3 className="codeutsava__navbar-menu-heading">
Expand All @@ -63,18 +63,21 @@ const Navbar = () => {
</a>
</Link>
</li>
<li className="codeutsava__navbar-navitem">
<Link to="/games">
<a href="#games">
<h3 className="codeutsava__navbar-menu-heading">Games</h3>
</a>
</Link>
</li>
<li className="codeutsava__navbar-navitem">
<a href="#prizes">
<h3 className="codeutsava__navbar-menu-heading">
Prizes
</h3>
<h3 className="codeutsava__navbar-menu-heading">Prizes</h3>
</a>
</li>
<li className="codeutsava__navbar-navitem">
<a href="#format">
<h3 className="codeutsava__navbar-menu-heading">
Timeline
</h3>
<h3 className="codeutsava__navbar-menu-heading">Timeline</h3>
</a>
</li>
<li className="codeutsava__navbar-navitem">
Expand Down Expand Up @@ -190,6 +193,15 @@ const Navbar = () => {
</a>
</Link>
</li>
<li className="codeutsava__navbar-hamburger-navitem">
<Link to="/games">
<a href="#games" onClick={toggleMenu}>
<h3 className="codeutsava__navbar-hamburger-menu-heading">
Games
</h3>
</a>
</Link>
</li>
<li className="codeutsava__navbar-hamburger-navitem">
<a href="#prizes" onClick={toggleMenu}>
<h3 className="codeutsava__navbar-hamburger-menu-heading">
Expand Down
Empty file added src/pages/games/Games.css
Empty file.
37 changes: 37 additions & 0 deletions src/pages/games/Games.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react'
import './Games.css'
import GameCard from '../../components/gameCard/GameCard'
import { useState, useEffect, useRef } from "react";
import frank from "../../assets/images/frakenstein.png";
import Footer from "../../components/footer/Footer";
import NavbarTeam from "../../components/navbarTeam/NavbarTeam";
import IntroAudio from "../../components/introAudio/IntroAudio";

const Merchandise = () => {
return (
<div className="bg-image" id="home">
<div className="codeutsava__navbar-container">
<NavbarTeam />
</div>
<div className="container mx-auto main-container">
<div className="codeutsava__section3" id="events">
<div className="codeutsava__section3-title">
<img src={frank}></img>
Games
</div>
<div className="codeutsava__section3-events-container">
<GameCard />
</div>
</div>
</div>
<div className="intro_audio_new_design">
<IntroAudio />
</div>
<div className="codeutsava__footer-container">
<Footer />
</div>
</div>
)
}

export default Merchandise

0 comments on commit b4e522a

Please sign in to comment.