Skip to content

Commit

Permalink
Merge pull request #28 from ItsukiKigoshi/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ItsukiKigoshi authored Jan 22, 2024
2 parents 19b2ce6 + 910974b commit 80db7f0
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 260 deletions.
229 changes: 0 additions & 229 deletions src/app/page.module.css

This file was deleted.

7 changes: 4 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";
import { AppShell, Flex, Text } from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { Header } from "../components/Header/Header";
import { Navbar } from "../components/Navbar/Navbar";
import { Timetable } from "../components/Timetable/Timetable";
import { Header } from "../components/Header";
import { Navbar } from "../components/Navbar";
import { Timetable } from "../components/Timetable";
import { useLocalStorage } from "../hooks/useLocalStorage";
import { Course } from "../type/Types";

Expand All @@ -25,6 +25,7 @@ export default function Page() {
modified: new Date(2022, 5 - 1, 5, 6, 35, 20, 333),
unit: 3,
isEnrolled: true,
color: "#ff0000",
},
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default function AddCourse(props: {
unit: unit,
modified: new Date(),
isEnrolled: true, // Default value, update as needed
color: "#000000", // Default value, update as needed
};

return course;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ModalConfirm from "@/src/components/ModalConfirm/ModalConfirm";
import ModalConfirm from "@/src/components/ModalConfirm";
import { Course } from "@/src/type/Types";
import {
ActionIcon,
Expand Down
6 changes: 0 additions & 6 deletions src/components/Header/Header.module.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { IconBrandGithub, IconSettings } from "@tabler/icons-react";

import React from "react";

import ModalSetting from "../ModalSetting/ModalSetting";
import classes from "./Header.module.css";
import ModalSetting from "../ModalSetting";

export function Header(props: {
opened: boolean;
Expand All @@ -14,7 +13,15 @@ export function Header(props: {
const [modalOpened, { open, close }] = useDisclosure(false);
return (
<header>
<Container size="max" className={classes.inner}>
<Container
size="max"
style={{
height: "56px",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<Group gap={5}>
<Burger
opened={props.opened}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import {
Button,
Group,
Input,
Modal,
NativeSelect,
Text,
useComputedColorScheme,
useMantineColorScheme,
Button,
Group,
Input,
Modal,
NativeSelect,
Text,
useComputedColorScheme,
useMantineColorScheme,
} from "@mantine/core";
import { useColorScheme } from "@mantine/hooks";
import { IconMoon, IconSun } from "@tabler/icons-react";
import cx from "clsx";
import classes from "./ModalSetting.module.css";

export default function ModalSetting(props: {
modalOpened: boolean;
close: () => void;
modalOpened: boolean;
close: () => void;
}) {
const { setColorScheme } = useMantineColorScheme();

Expand Down Expand Up @@ -74,8 +73,11 @@ export default function ModalSetting(props: {
size="sm"
aria-label="Toggle color scheme"
>
<IconSun className={cx(classes.icon, classes.light)} stroke={1.5} />
<IconMoon className={cx(classes.icon, classes.dark)} stroke={1.5} />
{computedColorScheme === "dark" ? (
<IconSun stroke={1.5} />
) : (
<IconMoon stroke={1.5} />
)}
</Button>
<Button
onClick={() => setColorScheme("auto")}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Flex, ScrollArea, Text } from "@mantine/core";

import AddCourse from "@/src/components/AddCourse";
import CourseCard from "@/src/components/CourseCard";
import { Course } from "@/src/type/Types";
import AddCourse from "../AddCourse/AddCourse";
import CourseCard from "../CourseCard/CourseCard";
import classes from "./Navbar.module.css";

export function Navbar(props: {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"use client";
import { Course } from "@/src/type/Types";
import { Card, SimpleGrid, Stack, Text, useMantineTheme } from "@mantine/core";
import { Card, SimpleGrid, Stack, Text } from "@mantine/core";
import classes from "./Timetable.module.css";

export function Timetable(props: { courses: Course[] }) {
const theme = useMantineTheme();

const weekDays: string[] = ["M", "TU", "W", "TH", "F", "SA"];
const weekDayItems = weekDays.map((day) => (
<Card key={day} className={classes.item} style={{ height: "30px" }}>
Expand Down
1 change: 1 addition & 0 deletions src/type/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export interface Course {
unit: number;
modified: Date;
isEnrolled: boolean;
color: string;
}

0 comments on commit 80db7f0

Please sign in to comment.