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

feat: clusters carousel page #9

Merged
merged 5 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 31 additions & 0 deletions src/app/eventcluster/eventcluster.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.event {
background: url('../../assets/images/EventBG.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: #070b12;
}

.Back{
cursor: pointer;
transition: 0.2s;
}

.Back:active{
transform: scale(0.9);
}

.slide{
height: 60vh;
margin-top: -1%;
}

@media screen and (max-width : 1024px){
.eventClusterName{
margin-top: 2%;
}
.slide{
margin-top: -2%;
height: 75vh;
}
}
24 changes: 24 additions & 0 deletions src/app/eventcluster/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ClusterCarousel, NavBar } from '@/components';
import Back from '@/assets/images/Back.png';
import BackEnlarge from '@/assets/images/BackEnlarge.png';
import ImageChanger from '@/components/BackButton/back';
import styles from './eventcluster.module.css';

const events = () => {
return (
<div className={`min-h-screen w-full text-center lg:p-7 p-5 event + ${styles.event}`}>
<NavBar />
<ImageChanger defaultImage={Back} hoverImage={BackEnlarge} />
<p
className={`${styles.eventClusterName} font-ROG 2xl:text-6xl xl:text-5xl lg:text-4xl sm:text-3xl text-2xl mt-12 transition-all`}
>
CLUSTER NAME
</p>
<div className="flex w-full h-[60vh] justify-center items-center">
<ClusterCarousel />
</div>
</div>
);
};

export default events;
3 changes: 2 additions & 1 deletion src/app/gallery/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const History = () => {
styles.historyBG +
' ' +
'h-screen w-screen p-0 flex justify-center items-center overflow-y-hidden' +
(isScrolled ? 'scrolled' : '')
' ' +
(isScrolled ? ' scrolled' : ' transitioned')
}
onWheel={simulateScroll}
onTouchStart={handleTouchStart}
Expand Down
21 changes: 19 additions & 2 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ body {

.footer-bg {
border-radius: 10px;
background: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.45);
}

.home {
Expand All @@ -79,6 +79,11 @@ body {
background-position: center;
}

.AboutCardContent {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(20px);
}

.scrolled {
animation: fadeout 1.5s;
-moz-animation: fadeout 1.5s;
Expand All @@ -99,7 +104,7 @@ body {
background-color: initial;
}
to {
background-color: #7efbfe;
background-color: #000;
}
}

Expand Down Expand Up @@ -257,4 +262,16 @@ body {

.greenbutton{
filter: hue-rotate(137deg) drop-shadow(0 0 20px #23A347) brightness(120%);
}

@media screen and (min-width: 1240px) {
.about {
min-height: max(100vh, 742px);
}
}

@media screen and (min-width: 1540px) {
.about {
min-height: max(100vh, 860px);
}
}
2 changes: 1 addition & 1 deletion src/app/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function Home() {
}
></div>
<div
className={'h-screen w-full text-center lg:p-7 p-5 home'}
className={'h-screen w-full text-center lg:p-7 p-5 home transitioned'}
onWheel={simulateScroll}
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
Expand Down
73 changes: 25 additions & 48 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,7 @@ const generateRandomNumber = (length: number) => {
return result;
};

function useWindowSize() {
const [windowSize, setWindowSize] = useState<{
width: number | undefined;
height: number | undefined;
}>({
width: undefined,
height: undefined,
});

useEffect(() => {
function handleResize() {
setWindowSize({
width: window.innerWidth,
height: window.innerHeight,
});
}
window.addEventListener('resize', handleResize);
handleResize();
return () => window.removeEventListener('resize', handleResize);
}, []);
return windowSize;
}

export default function Loading() {
const size = useWindowSize();
const currDate = new Date();
const [animationStarted, setAnimationStarted] = useState<boolean>(false);
const [year, setYear] = useState(String(currDate.getFullYear()).padStart(4, '0'));
Expand Down Expand Up @@ -87,8 +63,8 @@ export default function Loading() {
clearInterval(lightTimer);
setTimeout(() => {
router.push('/home');
}, 1000);
}, 5000);
}, 500);
}, 2000);
const lightTimer = setInterval(() => {
setIsLeftLightOn(prev => !prev);
}, 100);
Expand All @@ -100,27 +76,28 @@ export default function Loading() {
}
}, [animationStarted, router]);

return size.width !== undefined && size.width < 700 ? (
<LoadingMobileView
month={month}
year={year}
date={date}
hours={hours}
minutes={minutes}
isButtonClicked={animationStarted}
setClicked={setAnimationStarted}
isLeftLightOn={isLeftLightOn}
/>
) : (
<LoadingWebView
month={month}
year={year}
date={date}
hours={hours}
minutes={minutes}
isButtonClicked={animationStarted}
setClicked={setAnimationStarted}
isLeftLightOn={isLeftLightOn}
/>
return (
<>
<LoadingMobileView
month={month}
year={year}
date={date}
hours={hours}
minutes={minutes}
isButtonClicked={animationStarted}
setClicked={setAnimationStarted}
isLeftLightOn={isLeftLightOn}
/>
<LoadingWebView
month={month}
year={year}
date={date}
hours={hours}
minutes={minutes}
isButtonClicked={animationStarted}
setClicked={setAnimationStarted}
isLeftLightOn={isLeftLightOn}
/>
</>
);
}
Binary file added src/assets/images/aboutWedge.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/leftPortal.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/rightPortal.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/temp.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: 24 additions & 1 deletion src/components/AboutCard/AboutCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
box-sizing: border-box;
}

.parent div {
.edge {
position: absolute;
width: 55px;
height: 55px;
Expand Down Expand Up @@ -46,3 +46,26 @@
border: 1px solid #ddd;
border-radius: 2px;
}

/* .topWedge {
width: 70px;
height: 6.9px;
left: 50%;
transform: translate(-40%,-10%);
background: url('../../assets/images/aboutWedge.png');
background-size: contain;
background-repeat: no-repeat;
transform: scale(1.2);
}

.bottomWedge {
width: 70px;
height: 8px;
left: 50%;
transform: translate(-40%,-50%);
transform: rotate(90deg);
background: url('../../assets/images/aboutWedge.png');
background-size: contain;
background-repeat: no-repeat;
transform: scale(1.2);
} */
2 changes: 1 addition & 1 deletion src/components/AboutCard/AboutCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const AboutCard = () => {
const content = AboutContent.content;
return (
<div className="AboutCard max-md:hidden h-fit sm:w-[85%] sm:h-[70%] md:w-[70%] md:h-[60%] lg:w-[60%] lg:h-[70%] xl:w-[45%] xl:h-[55%] flex justify-center items-center p-10 ">
<p className="pt-3 max-lg:text-base">{content}</p>
<p className="pt-3 max-lg:text-base text-lg font-Nunito">{content}</p>
</div>
);
};
Expand Down
14 changes: 7 additions & 7 deletions src/components/AboutCard/AboutCardMob.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ const AboutCardMob = () => {
className={
styles.parent +
' ' +
'md:hidden flex justify-center items-center p-4 py-10 text-center'
'md:hidden flex justify-center items-center p-4 py-10 text-center AboutCardContent z-0'
}
>
<div className={styles.topLeft}></div>
<div className={styles.topRight}></div>
<div className={styles.bottomLeft}></div>
<div className={styles.bottomRight}></div>
<p className={styles.content + ' ' + 'w-full h-full p-3 overflow-y-scroll'}>
<div className={styles.topLeft + ' ' + styles.edge}></div>
<div className={styles.topRight + ' ' + styles.edge}></div>
<div className={styles.bottomLeft + ' ' + styles.edge}></div>
<div className={styles.bottomRight + ' ' + styles.edge}></div>
<div className={styles.content + ' ' + 'w-full h-full p-3 overflow-y-scroll relative'}>
{content} + {content2}
</p>
</div>
</div>
);
};
Expand Down
Loading
Loading