Skip to content

Commit

Permalink
Merge pull request #115 from IEEEUCSC/main
Browse files Browse the repository at this point in the history
Added timer and change Home page
  • Loading branch information
Udeesha-Prabhashana authored Feb 5, 2024
2 parents 1737493 + 64e6292 commit 2d928c4
Show file tree
Hide file tree
Showing 34 changed files with 431 additions and 228 deletions.
1 change: 1 addition & 0 deletions Frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react": "^18.2.0",
"react-bootstrap": "^2.10.0",
"react-dom": "^18.2.0",
"react-flip-move": "^3.0.5",
"react-hook-form": "^7.50.0",
"react-router-dom": "^6.21.3",
"react-router-hash-link": "^2.4.3",
Expand Down
13 changes: 13 additions & 0 deletions Frontend/pnpm-lock.yaml

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

Binary file modified Frontend/public/fav1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions Frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
rel="stylesheet"
/>
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@500&display=swap"
rel="stylesheet"
/>
<title>Hackaholics 6.0</title>
</head>
<body>
Expand Down
25 changes: 13 additions & 12 deletions Frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,26 @@ import "@fontsource/ibm-plex-mono"
import Narbar2 from './Components/NavBar/Navabr2'



function App() {
return (
<div className="content">
<Narbar2 />
<Particles />
<Narbar2 />
<Particles />
<Routes>
<Route path="/team" element={<Registration />} />
<Route path="/*" element={
<div>
<Home />
<Intro />
{/* <Sponsers /> */}
<Timeline/>
<FAQ />
<Prizes />
<Card />
<ContactUs />
<div>
<Home />
<Intro />
{/* <Sponsers /> */}
<Timeline />
<FAQ />
<Prizes />
<Card />
<ContactUs />
</div>
} />
} />
</Routes>


Expand Down
Binary file added Frontend/src/Assets/Contact Us/Buddhi.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 Frontend/src/Assets/Hack5/2.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 Frontend/src/Assets/Hack5/3.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 Frontend/src/Assets/Hack5/4.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 Frontend/src/Assets/Hack5/5.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 Frontend/src/Assets/Hack5/6.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 Frontend/src/Assets/Hack5/7.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 Frontend/src/Assets/Hack5/8.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 Frontend/src/Assets/Hack5/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 24 additions & 1 deletion Frontend/src/Components/Card/Card.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,27 @@ body {

* {
box-sizing: border-box;
}
}
.carouselDiv {
width: 100%;
}
#card {
width: 90%;
}
.carouselArea {
display: flex;
align-items: center;
justify-content: center;
}

.CarouselHead {
color: #000000;
text-align: left;
text-transform: capitalize;
font-family: Source Sans Pro;
display: flex;
align-items: center;
justify-content: left;
width: 80%;
margin-left: 50px;
}
166 changes: 84 additions & 82 deletions Frontend/src/Components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { useState, useRef, useEffect, ReactElement } from 'react';
import './Card.css'
import resources from './data';


// Data
import data from './data.json';

// import { WidthFull } from '@mui/icons-material';

const Carousel: React.FC = (): ReactElement => {
Expand All @@ -26,12 +27,12 @@ const Carousel: React.FC = (): ReactElement => {
}
};

const isDisabled = (direction: 'prev' | 'next'): boolean => {
if (direction === 'prev') {
const isDisabled = (direction: "prev" | "next"): boolean => {
if (direction === "prev") {
return currentIndex <= 0;
}

if (direction === 'next' && carousel.current !== null) {
if (direction === "next" && carousel.current !== null) {
return (
carousel.current.offsetWidth * currentIndex >= maxScrollWidth.current
);
Expand All @@ -53,95 +54,96 @@ const Carousel: React.FC = (): ReactElement => {
}, []);

return (


<div className="carousel bg-secondary pt-10 pb-24 p-2" id={"card"}>
<div className="prizeHead">
<div
className="shape "
>
<div className="carouselDiv">
<div className="CarouselHead" data-aos="fade-right" data-aos-duration="1000">
<div className="shape">
<h1 className="font-sfont font-semibold tracking-wider">
<span>Hackaholics 5.0</span>
</h1>
</div>
</div>
<div className="relative overflow-hidden">
<div className="flex justify-between absolute top left w-full h-full">
<button
onClick={movePrev}
className="hover:bg-tertiary text-white w-auto h-auto text-center opacity-75 hover:opacity-30 disabled:opacity-25 disabled:cursor-not-allowed z-10 p-0 m-0 transition-all ease-in-out duration-200"
disabled={isDisabled('prev')}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-12 w-20 -ml-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M15 19l-7-7 7-7"
/>
</svg>
<span className="sr-only">Prev</span>
</button>
<button
onClick={moveNext}
className="hover:bg-tertiary text-white w-10 h-full text-center opacity-75 hover:opacity-30 disabled:opacity-25 disabled:cursor-not-allowed z-10 p-0 m-0 transition-all ease-in-out duration-200"
disabled={isDisabled('next')}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-12 w-20 -ml-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M9 5l7 7-7 7"
/>
</svg>
<span className="sr-only">Next</span>
</button>
</div>

{/* carousel bar */}
<div
ref={carousel}
className="carousel-container relative h-96 ml-1 flex gap-2 rounded overflow-hidden scroll-smooth snap-x snap-mandatory touch-pan-x z-0"
>
{data.resources.map((resource, index) => {
return (
<div
key={index}
className="carousel-item text-center relative w-auto h-auto snap-start z-10"
<div className="carouselArea">
<div className="carousel bg-secondary pt-10 pb-24 p-2" id={"card"}>
<div className="relative overflow-hidden">
<div className="flex justify-between absolute top left w-full h-full">
<button
onClick={movePrev}
className="hover:bg-tertiary text-white w-auto h-auto text-center opacity-75 hover:opacity-30 disabled:opacity-25 disabled:cursor-not-allowed z-10 p-0 m-0 transition-all ease-in-out duration-200"
disabled={isDisabled("prev")}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-12 w-20 -ml-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M15 19l-7-7 7-7"
/>
</svg>
<span className="sr-only">Prev</span>
</button>
<button
onClick={moveNext}
className="hover:bg-tertiary text-white w-10 h-full text-center opacity-75 hover:opacity-30 disabled:opacity-25 disabled:cursor-not-allowed z-10 p-0 m-0 transition-all ease-in-out duration-200"
disabled={isDisabled("next")}
>
<a
href={resource.title}
className="h-full w-full items-center aspect-video block bg-origin-padding bg-left-top rounded bg-cover bg-no-repeat z-1"
style={{ backgroundImage: `url(${resource.imageUrl || ''})` }}
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-12 w-20 -ml-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<img
src={resource.imageUrl || ''}
alt={resource.title}
className="w-full aspect-square hidden"
style={{ width: '100%', height: '100%' }}
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M9 5l7 7-7 7"
/>
</a>
</div>
);
})}
</svg>
<span className="sr-only">Next</span>
</button>
</div>

{/* carousel bar */}
<div
ref={carousel}
className="carousel-container relative h-96 ml-1 flex gap-2 rounded overflow-hidden scroll-smooth snap-x snap-mandatory touch-pan-x z-0"
>
{resources.map((resource: any, index: number) => {
return (
<div
key={index}
className="carousel-item text-center relative w-auto h-auto snap-start z-10"
>
<a
href={resource.title}
className="h-full w-full items-center aspect-video block bg-origin-padding bg-left-top rounded bg-cover bg-no-repeat z-1"
style={{
backgroundImage: `url(${resource.imageUrl || ""})`,
}}
>
<img
src={resource.imageUrl || ""}
alt={resource.title}
className="w-full aspect-square hidden"
style={{ width: "100%", height: "100%" }}
/>
</a>
</div>
);
})}
</div>
</div>
</div>
</div>
</div>
);
};


export default Carousel;
export default Carousel;
41 changes: 41 additions & 0 deletions Frontend/src/Components/Card/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export const resources = [
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Introduction/OC.JPG")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/2.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/3.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/4.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/5.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/6.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/7.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/8.jpg")
},
{
"title": "Hackaholics 5.0",
"imageUrl":require("../../Assets/Hack5/9.jpg")
}
];


export default resources;
Loading

0 comments on commit 2d928c4

Please sign in to comment.