-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
377 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
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,74 @@ | ||
.container { | ||
@apply | ||
flex | ||
flex-row | ||
max-w-full | ||
h-[30vh] | ||
lg:h-[30vh] | ||
items-center | ||
justify-center | ||
md:justify-around | ||
px-2 | ||
md:gap-2 | ||
|
||
; | ||
} | ||
|
||
.container>img { | ||
@apply | ||
object-cover | ||
p-4 | ||
w-32 | ||
md:w-48 | ||
max-h-[30vh] | ||
rounded-3xl | ||
; | ||
} | ||
|
||
.text-container { | ||
@apply | ||
flex | ||
flex-col | ||
lg:p-4 | ||
max-h-full | ||
; | ||
} | ||
|
||
.text-container>h2 { | ||
@apply | ||
font-bold | ||
text-sm | ||
md:text-xl | ||
; | ||
} | ||
|
||
.text-container>h3 { | ||
@apply | ||
font-subheading | ||
text-xs | ||
md:text-sm | ||
pb-4 | ||
; | ||
} | ||
|
||
.text-container>p { | ||
@apply | ||
line-clamp-2 | ||
font-body | ||
text-xs | ||
md:text-sm | ||
; | ||
} | ||
|
||
.text-container>h4 { | ||
@apply | ||
text-right | ||
text-primary | ||
font-subheading | ||
p-2 | ||
text-xs | ||
md:text-base | ||
; | ||
} | ||
|
||
|
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,32 @@ | ||
import React from 'react'; | ||
import WindowCard from '../../layout/WindowCard'; | ||
import './AnnouncementsCard.css'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
interface AnnouncementsCardProps { | ||
title: string; | ||
desc: string; | ||
date: string; | ||
imgSrc: string; | ||
link: string; | ||
} | ||
|
||
export default function AnnouncementsCard(props: AnnouncementsCardProps) { | ||
const content = ( | ||
<div className='container'> | ||
<img src={props.imgSrc}></img> | ||
<div className='text-container'> | ||
<h2>{props.title}</h2> | ||
<h3>{props.date}</h3> | ||
<p>{props.desc}</p> | ||
<h4> | ||
<Link to={props.link}>Read More</Link> | ||
</h4> | ||
</div> | ||
</div> | ||
); | ||
|
||
return ( | ||
<WindowCard content={content}></WindowCard> | ||
); | ||
} |
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,39 @@ | ||
.item { | ||
@apply | ||
p-8 | ||
md:p-14 | ||
; | ||
} | ||
|
||
.slick-arrow.slick-next, | ||
.slick-arrow.slick-prev{ | ||
@apply | ||
flex | ||
justify-center | ||
items-center | ||
h-24 | ||
w-24 | ||
z-10 | ||
max-w-full | ||
; | ||
} | ||
|
||
.slick-prev::before,.slick-next::before{ | ||
display:none; | ||
} | ||
|
||
.arrows { | ||
@apply | ||
h-80 | ||
w-80 | ||
text-primary | ||
opacity-60 | ||
z-10 | ||
; | ||
} | ||
|
||
.arrows:hover { | ||
@apply | ||
opacity-100 | ||
; | ||
} |
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,80 @@ | ||
import React from "react"; | ||
import Slider from "react-slick"; | ||
import AnnouncementsCard from './AnnouncementsCard'; | ||
import './Carousel.css'; | ||
import { GoChevronLeft, GoChevronRight } from "react-icons/go"; | ||
import announcements from './announcements.json' with {type: 'json'}; | ||
|
||
|
||
function NextArrow(props) { | ||
const { className, style, onClick } = props; | ||
return ( | ||
<div | ||
className={className} | ||
onClick={onClick}> | ||
<GoChevronRight className="arrows" /> | ||
</div> | ||
); | ||
} | ||
|
||
function PrevArrow(props) { | ||
const { className, style, onClick } = props; | ||
return ( | ||
<div | ||
className={className} | ||
onClick={onClick}> | ||
<GoChevronLeft className="arrows"/></div> | ||
); | ||
} | ||
|
||
|
||
export default function Carousel() { | ||
var settings = { | ||
dots: true, | ||
infinite: true, | ||
speed: 500, | ||
slidesToShow: 2, | ||
slidesToScroll: 1, | ||
nextArrow: <NextArrow />, | ||
prevArrow: <PrevArrow />, | ||
responsive: [ | ||
{ | ||
breakpoint: 1200, | ||
settings: { | ||
slidesToShow: 1, | ||
slidesToScroll: 1, | ||
initialSlide: 1 | ||
} | ||
}, | ||
{ | ||
breakpoint: 800, | ||
settings: { | ||
slidesToShow: 1, | ||
slidesToScroll: 1, | ||
initialSlide: 1, | ||
nextArrow: false, | ||
prevArrow: false | ||
} | ||
} | ||
] | ||
}; | ||
|
||
|
||
return ( | ||
<div className="slider-container"> | ||
<Slider {...settings}> | ||
{announcements.map((announcement, index) => ( | ||
<div className='item' key={index}> | ||
<AnnouncementsCard | ||
title={announcement.title} | ||
desc={announcement.desc} | ||
date={announcement.date} | ||
imgSrc={announcement.imgSrc} | ||
link='./' | ||
/> | ||
</div> | ||
))} | ||
</Slider> | ||
</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,26 @@ | ||
[ | ||
{ | ||
"title": "Freshman Social Camp (FSC)", | ||
"desc": "FSC is crafted to kickstart your university journey with enduring friendships and unforgettable experiences. Engage in a variety of physical and intellectual games, participate in team bonding exercises, and compete for exciting team and individual prizes. You will also have the opportunity to attend the beach finale event Bash together with your new friends, solidifying your friendships.", | ||
"date": "19th June - 22nd June 2024", | ||
"imgSrc": "announcements/fsc.jpg" | ||
}, | ||
{ | ||
"title": "Freshman Orientation Week (FOW)", | ||
"desc": "FOW is a 4-day physical orientation camp where seniors help freshmen adapt to different aspects of university life through preparatory talks and team-building activities. Forge lasting friendships as you navigate campus resources and academic challenges together. Look forward to strategic team games that develop you both intellectually and physically.", | ||
"date": "24th July - 22nd July 2024", | ||
"imgSrc": "announcements/fow.jpg" | ||
}, | ||
{ | ||
"title": "Freshman Finale Camp (FFC)", | ||
"desc": "FFC is a 3-day physical summer camp, perfectly tailored for international students gearing up for matriculation closer to August. The camp offers an array of theme-based activities such as flag-building and exhilarating house face-offs. Engage in friendly competition alongside your housemates, strategizing to earn glory for your elemental faction in a series of thrilling challenges. End the camp on a high note with its campfire and barbecue finale under the stars.", | ||
"date": "5th August - 7th August 2024", | ||
"imgSrc": "announcements/ffc.jpg" | ||
}, | ||
{ | ||
"title": "Computing Bash", | ||
"desc": "FFC is a 3-day physical summer camp, perfectly tailored for international students gearing up for matriculation closer to August. The camp offers an array of theme-based activities such as flag-building and exhilarating house face-offs. Engage in friendly competition alongside your housemates, strategizing to earn glory for your elemental faction in a series of thrilling challenges. End the camp on a high note with its campfire and barbecue finale under the stars.", | ||
"date": "16th August 2024", | ||
"imgSrc": "announcements/bash.jpg" | ||
} | ||
] |
Oops, something went wrong.