Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
98 changes: 49 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Footer() {
return (
<footer
id="global-footer"
className="flex justify-end items-center p-4 text-white fixed bottom-0 w-full bg-inverse-primary"
className="flex items-center justify-end p-4 text-white bg-inverse-primary sticky bottom-0 w-full"
>
<div className="flex flex-wrap justify-end space-x-4 bg-gray-800">
<Link
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Header() {
return (
<header
id="global-header"
className="flex items-center justify-between px-4 py-2 bg-white shadow-md fixed w-full z-10"
className="flex items-center justify-between px-4 py-2 bg-on-primary shadow-md sticky top-0 w-full z-10"
>
<div className="flex items-center space-x-2">
<a href="/" id="syllabus-link" className="text-lg">
Expand Down
8 changes: 7 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { useState } from "react";
import "./globals.css";
import { ThemeType, RegisterType } from "@/app/type";
import { ThemeContext } from "@/app/context";
import Header from "./components/Header";
import Footer from "./components/Footer";
import { UserContext, UserContextValue } from "@/app/UserContext";

import { User } from "@/app/utils/user";
Expand Down Expand Up @@ -53,7 +55,11 @@ export default function RootLayout({
lang="ja"
className={`bg-surface-container text-text-default ${theme}`}
>
<body className={inter.className}>{children}</body>
<body className={inter.className}>
<Header />
{children}
<Footer />
</body>
</html>
</UserContext.Provider>
</ThemeContext.Provider>
Expand Down
10 changes: 2 additions & 8 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Header from "@/app/components/Header";
import Footer from "@/app/components/Footer";
import Logo from "@/../../public/syllabus_icon.svg";
import Image from "next/image";

Expand All @@ -9,9 +7,7 @@ import Image from "next/image";
*/
export default function NotFound(): JSX.Element {
return (
<div>
<Header />

<>
{/* バックグラウンド画像 */}
<div className={`absolute right-0 bottom-0 w-[800px] h-full`}>
<Image
Expand Down Expand Up @@ -57,8 +53,6 @@ export default function NotFound(): JSX.Element {
</div>
</div>
</div>

<Footer />
</div>
</>
);
}
9 changes: 2 additions & 7 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use client";

import Header from "@/app/components/Header";
import Footer from "@/app/components/Footer";
import Logo from "@/../../public/syllabus_icon.svg";
import Image from "next/image";
import { useUser } from "@/app/UserContext";
Expand All @@ -16,8 +14,7 @@ import { useEffect } from "react";
export default function Home(): JSX.Element {
const { user, setUser } = useUser();
return (
<div>
<Header />
<>
{/* バックグラウンド画像 */}
<div className={`absolute right-0 bottom-0 w-[800px] h-full`}>
<Image
Expand Down Expand Up @@ -70,8 +67,6 @@ export default function Home(): JSX.Element {
</div>
</div>
</div>

<Footer />
</div>
</>
);
}