-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added synopsis and characters to the Home Page * Added timer to Home Page * Added dummy logo and some css to Home Page * Temporarily disable modal overlay (#21) * Remove modal overlay * Remove unused import * Create initial About Us History Page (#16) * Create initial About Us History Page * Modify About Us History Page to make background persisten regarding of zoom --------- Co-authored-by: izruff <[email protected]> * Replace apostrophe * Refactor Timer and fix warning * Update countdown date --------- Co-authored-by: Rafael Kristoforus Yanto <[email protected]> Co-authored-by: FerdiHS <[email protected]> Co-authored-by: izruff <[email protected]>
- Loading branch information
1 parent
b1e704d
commit 86be27f
Showing
9 changed files
with
211 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import HistorySummary from '@/app/components/about-us/history/summary'; | ||
import Timeline from '@/app/components/about-us/history/timeline'; | ||
import VideoFrame from '@/app/components/about-us/history/video-frame'; | ||
|
||
export default function AboutUsHistorypage() { | ||
return ( | ||
<div className="flex flex-col md:flex-row space-y-8 md:space-y-0 md:space-x-8 p-4 md:p-8 items-start bg-black w-full min-h-screen"> | ||
<div className="w-full md:w-1/4 md:h-full sticky top-8"> | ||
<Timeline years={[2025, 2024, 2023, 2022, 2021, 2020]} /> | ||
</div> | ||
|
||
<div className="w-full md:w-2/4 space-y-4"> | ||
<VideoFrame | ||
videoTitle="RickRoll" | ||
videoSrc="https://www.youtube.com/embed/dQw4w9WgXcQ?si=tSGI-Y2bIM5CKrxI" | ||
/> | ||
<HistorySummary | ||
title="[Nuansa 2024] Keong Mas: Daha to Surabaya" | ||
description='"Keongmas," which translates to "Golden Snail" in Indonesian, could indicate a theme or symbol central to the event. It might involve elements related to the cultural significance or artistic interpretation.' | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
interface HistorySummaryProps { | ||
title: string; | ||
description: string; | ||
} | ||
|
||
export default function HistorySummary({ title, description }: HistorySummaryProps) { | ||
return ( | ||
<div className="text-left space-y-2 p-4 bg-transparent shadow-md rounded-lg"> | ||
<h2 className="text-3xl font-bold text-[#ECBF7F] font-poppins text-justify"> | ||
{title} | ||
</h2> | ||
<p className="text-white font-poppins text-2xl text-justify"> | ||
{description} | ||
</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
interface TimelineProps { | ||
years: number[]; | ||
} | ||
|
||
export default function Timeline({ years }: TimelineProps) { | ||
return ( | ||
<div className="flex flex-col items-center space-y-8 justify-start h-full"> | ||
{years.map((year, index) => ( | ||
<div key={index} className="flex items-center"> | ||
<div className="flex flex-col items-center mx-2 relative"> | ||
<div className="w-2 h-2 bg-[#ECBF7F] rounded-full z-10"/> | ||
{index < years.length - 1? <div className="w-0.5 h-14 bg-[#ECBF7F] absolute"/> : null} | ||
</div> | ||
<span className="text-sm font-bold text-white text-justify ml-2 w-16 text-center">{year}</span> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
|
||
interface VideoFrameProps { | ||
videoTitle: string; | ||
videoSrc: string; | ||
} | ||
|
||
export default function VideoFrame({ videoTitle, videoSrc }: VideoFrameProps) { | ||
return ( | ||
<div className="relative h-0 rounded-lg overflow-hidden shadow-md" style={{ paddingBottom: '56.25%' }}> | ||
<iframe | ||
width="560" | ||
height="315" | ||
src={videoSrc} | ||
title={videoTitle} | ||
frameBorder="0" | ||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" | ||
referrerPolicy="strict-origin-when-cross-origin" | ||
allowFullScreen | ||
className="absolute top-0 left-0 w-full h-full" | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
"use client"; | ||
|
||
import { useEffect, useState } from "react"; | ||
|
||
interface TimeCount { | ||
days: string; | ||
hours: string; | ||
minutes: string; | ||
seconds: string; | ||
} | ||
|
||
const getTimeLeft = (expiry: string): TimeCount => { | ||
let days = "0"; | ||
let hours = "0"; | ||
let minutes = "0"; | ||
let seconds = "0"; | ||
|
||
const difference = new Date(expiry).getTime() - new Date().getTime(); | ||
|
||
if (difference <= 0) { | ||
return { | ||
days, | ||
hours, | ||
minutes, | ||
seconds, | ||
}; | ||
} | ||
|
||
const dys = Math.floor(difference / (1000 * 60 * 60 * 24)); | ||
const hrs = Math.floor((difference / (1000 * 60 * 60)) % 24); | ||
const mnt = Math.floor((difference / (1000 * 60)) % 60); | ||
const snd = Math.floor((difference / 1000) % 60); | ||
|
||
days = dys < 10 ? `0${dys}` : dys.toString(); | ||
hours = hrs < 10 ? `0${hrs}` : hrs.toString(); | ||
minutes = mnt < 10 ? `0${mnt}` : mnt.toString(); | ||
seconds = snd < 10 ? `0${snd}` : snd.toString(); | ||
|
||
return { | ||
days, | ||
hours, | ||
minutes, | ||
seconds, | ||
}; | ||
}; | ||
|
||
const NumberDisplay = ({ value, label }: { value: string; label: string }) => { | ||
return ( | ||
<> | ||
<span | ||
className="flex flex-col justify-center items-center text-orange-200 text-2xl lg:text-4xl w-16 sm:w-24 lg:w-32" | ||
suppressHydrationWarning | ||
> | ||
{value} | ||
<small className="text-xs lg:text-sm uppercase font-semibold text-white pt-1"> | ||
{label} | ||
</small> | ||
</span> | ||
</> | ||
); | ||
} | ||
|
||
const Timer = ({ launchDate }: { launchDate: string }) => { | ||
const [timeLeft, setTimeLeft] = useState<TimeCount>(getTimeLeft(launchDate)); | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setTimeLeft(getTimeLeft(launchDate)); | ||
}, 1000); | ||
}, [launchDate]); | ||
|
||
return ( | ||
<div className="flex justify-center lg:justify-start mt-10 gap-1"> | ||
<NumberDisplay value={timeLeft.days} label="Days" /> | ||
<NumberDisplay value={timeLeft.hours} label="Hours" /> | ||
<NumberDisplay value={timeLeft.minutes} label="Minutes" /> | ||
<NumberDisplay value={timeLeft.seconds} label="Seconds" /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Timer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.