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

Added schedule backgroud #210

Merged
merged 2 commits into from
Nov 2, 2024
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
4 changes: 2 additions & 2 deletions apps/site/src/app/schedule/Header/Header.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.header {
margin-top: 200px;
height: auto;
display: flex;
flex-direction: column;
gap: 50px;
align-items: center;

gap: 50px;
}
6 changes: 3 additions & 3 deletions apps/site/src/app/schedule/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";
import Image from "next/image";

import Countdown from "../Countdown/Countdown";

import Image from "next/image";
import Chest from "@/assets/images/schedule-chest.png";
import Chest from "@/assets/images/schedule-chest.svg";
import OpenChest from "@/assets/images/schedule-chest-open.svg";
import Title from "@/assets/images/schedule-title.png";
import Title from "@/assets/images/schedule-title.svg";
import styles from "./Header.module.scss";

interface HeaderProps {
Expand Down
27 changes: 16 additions & 11 deletions apps/site/src/app/schedule/Schedule.module.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
@use "bootstrap-utils" as bootstrap;

$container-padding: 8rem;
$sm-width: 170vw;
$md-width: 140vw;
$width: 100vw;

.schedule {
h1 {
text-align: center;
.background {
position: absolute;
width: $sm-width;
left: calc((100% - $sm-width) / 2);
padding-top: 0;

@include bootstrap.rfs(8rem, margin-bottom);
}

margin: 10rem 1rem;
z-index: -1;

@include bootstrap.media-breakpoint-up(md) {
margin: 10rem 7rem;
padding-top: 50px;
width: $md-width;
left: calc((100% - $md-width) / 2);
}

h2 {
text-align: center;
@include bootstrap.media-breakpoint-up(xxl) {
height: auto;
width: $width;
left: calc((100% - $width) / 2);
}
}
17 changes: 15 additions & 2 deletions apps/site/src/app/schedule/Schedule.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import Image from "next/image";

import { getSchedule } from "./getSchedule";
import ScheduleTimer from "./ScheduleTimer/ScheduleTimer";

import background from "@/assets/images/schedule-background.svg";

import styles from "./Schedule.module.scss";
import ScheduleTimer from "./ScheduleTimer";

export default async function Schedule() {
const schedule = await getSchedule();
return <ScheduleTimer schedule={schedule}></ScheduleTimer>;
return (
<>
<Image
src={background}
alt="cloud background"
className={styles.background}
/>
<ScheduleTimer schedule={schedule} />
</>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.timer {
padding-top: 200px;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"use client";

import Header from "./Header/Header";
import DayOne from "./DayOne/DayOne";
import DayTwo from "./DayTwo/DayTwo";
import DayThree from "./DayThree/DayThree";
import { useEffect, useState } from "react";

import Header from "../Header/Header";
import DayOne from "../DayOne/DayOne";
import DayTwo from "../DayTwo/DayTwo";
import DayThree from "../DayThree/DayThree";

import styles from "./ScheduleTimer.module.scss";

interface ScheduleProps {
schedule: Array<any>;
}
Expand Down Expand Up @@ -38,12 +40,12 @@ const ScheduleTimer: React.FC<ScheduleProps> = ({ schedule }) => {
);

return (
<>
<div className={styles.timer}>
<Header time={time} />
<DayOne schedule={dayOne} time={time} />
<DayTwo schedule={dayTwo} time={time} />
<DayThree schedule={dayThree} time={time} />
</>
</div>
);
};

Expand Down
35 changes: 35 additions & 0 deletions apps/site/src/assets/images/schedule-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/site/src/assets/images/schedule-chest.png
Binary file not shown.
170 changes: 170 additions & 0 deletions apps/site/src/assets/images/schedule-chest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/site/src/assets/images/schedule-title.png
Binary file not shown.
25 changes: 25 additions & 0 deletions apps/site/src/assets/images/schedule-title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading