-
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.
* feat: Schedule Page component structure feat: component organiztion on schedule page * feature: create clipboard schedule * feat: draft clipboard * fix: build error * fix: heading sizes and h1 title * fix: Bootstrap vars, set up Accordion item map * fix: remove unused files * fix: responsive margins, accessibility * fix: simplify accordion header layout --------- Co-authored-by: Tyler Yu <tyleryy@uci.edu> Co-authored-by: Albert Wang <alberw5@uci.edu>
- Loading branch information
1 parent
90aafbb
commit 2df99f9
Showing
11 changed files
with
200 additions
and
9 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ $light-blue: #81deeb; | |
$blue: #3902fd; | ||
$purple: #6600b6; | ||
$navbar-red: #ff0000; | ||
$brown: #aa703c; |
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 |
---|---|---|
@@ -1,4 +1,23 @@ | ||
@use "bootstrap-utils" as bootstrap; | ||
|
||
$container-padding: 8rem; | ||
|
||
.background { | ||
background-image: url("~@/assets/background/anteater-head-tiling.gif"); | ||
background-size: 464px; // half size for 2x scaling | ||
} | ||
|
||
.accordion { | ||
--bs-accordion-active-color: theme.$black; | ||
--bs-accordion-bg: transparent; | ||
--bs-accordion-active-bg: transparent; | ||
--bs-accordion-border-color: transparent; | ||
--bs-accordion-border-radius: 0; | ||
--bs-accordion-btn-icon-width: 14px; | ||
} | ||
|
||
section.container { | ||
// responsive padding | ||
@include bootstrap.padding-top($container-padding); | ||
@include bootstrap.padding-bottom($container-padding); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@use "bootstrap-utils" as bootstrap; | ||
|
||
$container-padding: 8rem; | ||
|
||
.schedule { | ||
h1 { | ||
text-align: center; | ||
|
||
@include bootstrap.rfs(8rem, margin-bottom); | ||
} | ||
|
||
margin: 10rem 1rem; | ||
|
||
@include bootstrap.media-breakpoint-up(md) { | ||
margin: 10rem 7rem; | ||
} | ||
|
||
h2 { | ||
text-align: center; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,22 @@ | ||
import "./Schedule.module.scss"; | ||
import ClipboardSchedule from "./sections/ClipboardSchedule/ClipboardSchedule"; | ||
import styles from "./Schedule.module.scss"; | ||
|
||
export default function Schedule() { | ||
return <h1>Schedule</h1>; | ||
return ( | ||
<div className={styles.schedule}> | ||
<h1>Schedule</h1> | ||
<ClipboardSchedule | ||
schedule={[ | ||
{ | ||
_key: "test", | ||
title: "test", | ||
description: "test", | ||
location: "test", | ||
startDate: new Date(), | ||
endDate: new Date(), | ||
}, | ||
]} | ||
/> | ||
</div> | ||
); | ||
} |
36 changes: 36 additions & 0 deletions
36
apps/site/src/views/Schedule/sections/ClipboardSchedule/ClipboardSchedule.module.scss
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,36 @@ | ||
@use "bootstrap-utils" as bootstrap; | ||
@use "zothacks-theme" as theme; | ||
|
||
.accordion { | ||
--bs-accordion-btn-icon: url("~@/assets/icons/accordion-btn.svg"); | ||
--bs-accordion-btn-active-icon: url("~@/assets/icons/accordion-btn.svg"); | ||
--bs-accordion-btn-icon-width: 25px; | ||
|
||
button::after { | ||
margin-left: 1rem; | ||
} | ||
} | ||
|
||
.clip { | ||
position: absolute; | ||
width: 75%; | ||
top: 0; | ||
left: 50%; | ||
transform: translate(-50%, -55%); | ||
|
||
@include bootstrap.media-breakpoint-up(lg) { | ||
width: 60%; | ||
} | ||
} | ||
|
||
.clipboard { | ||
@include bootstrap.rfs(7.5rem, border-radius); | ||
|
||
background-color: white; | ||
border: 1.25rem solid theme.$brown; | ||
} | ||
|
||
.accordionItem { | ||
border-top: 2px solid theme.$light-blue; | ||
border-bottom: 2px solid theme.$light-blue; | ||
} |
61 changes: 61 additions & 0 deletions
61
apps/site/src/views/Schedule/sections/ClipboardSchedule/ClipboardSchedule.tsx
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,61 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
|
||
import Accordion from "react-bootstrap/Accordion"; | ||
import Container from "react-bootstrap/Container"; | ||
import Col from "react-bootstrap/Col"; | ||
import Row from "react-bootstrap/Row"; | ||
|
||
import clip from "@/assets/images/clip.svg"; | ||
|
||
import styles from "./ClipboardSchedule.module.scss"; | ||
|
||
interface ClipboardScheduleProps { | ||
schedule: { | ||
_key: string; | ||
title: string; | ||
description: string; | ||
location: string; | ||
startDate: Date; | ||
endDate: Date; | ||
}[]; | ||
} | ||
|
||
function ClipboardSchedule({ schedule }: ClipboardScheduleProps) { | ||
return ( | ||
<Container | ||
as="section" | ||
className={styles.clipboard + " px-0 position-relative"} | ||
> | ||
<div className={styles.clip}> | ||
<Image src={clip} alt="Clipboard clip" className={styles.clip} /> | ||
</div> | ||
<h2 className="mb-5">Countdown Timer</h2> | ||
<Accordion defaultActiveKey="0" className={styles.accordion}> | ||
{schedule.map( | ||
( | ||
{ _key, title, description, location, startDate, endDate }, | ||
index, | ||
) => ( | ||
<Accordion.Item | ||
key={_key} | ||
eventKey={`${index}`} | ||
className={styles.accordionItem} | ||
> | ||
<Accordion.Header className={styles.accordionHeader}> | ||
<h3>{title}</h3> | ||
<span className="text-end ms-auto"> | ||
{location}, {startDate.toString()} - {endDate.toString()} | ||
</span> | ||
</Accordion.Header> | ||
<Accordion.Body>{description}</Accordion.Body> | ||
</Accordion.Item> | ||
), | ||
)} | ||
</Accordion> | ||
</Container> | ||
); | ||
} | ||
|
||
export default ClipboardSchedule; |