-
Notifications
You must be signed in to change notification settings - Fork 0
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
10 changed files
with
177 additions
and
3 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
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,16 @@ | ||
import { Lobster } from "next/font/google"; | ||
import styles from "./style.module.css"; | ||
|
||
const lobster = Lobster({ | ||
display: "swap", | ||
subsets: ["latin"], | ||
weight: "400", | ||
}); | ||
|
||
export default function Header(): JSX.Element { | ||
return ( | ||
<header className={styles.header}> | ||
<div className={`${styles.title} ${lobster.className}`}>Vmate</div> | ||
</header> | ||
); | ||
} |
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,12 @@ | ||
.header { | ||
align-items: center; | ||
background: #fff; | ||
border-bottom: 1px solid #e8eaee; | ||
display: flex; | ||
height: 48px; | ||
justify-content: center; | ||
} | ||
|
||
.title { | ||
font-size: 3rem; | ||
} |
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,28 @@ | ||
"use client"; | ||
import { ReactNode } from "react"; | ||
import useShowWindowSize from "use-show-window-size"; | ||
import Header from "../Header"; | ||
import MobileNavigation from "../MobileNavigation"; | ||
import styles from "./style.module.css"; | ||
|
||
export type LayoutProps = { | ||
children: ReactNode; | ||
}; | ||
|
||
export default function Layout({ children }: LayoutProps): JSX.Element { | ||
useShowWindowSize({ | ||
disable: process.env.NODE_ENV === "production", | ||
}); | ||
|
||
return ( | ||
<div> | ||
<div className={styles.header}> | ||
<Header /> | ||
</div> | ||
<main className={styles.main}>{children}</main> | ||
<aside className={styles.mobileNavigation}> | ||
<MobileNavigation /> | ||
</aside> | ||
</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,13 @@ | ||
.header { | ||
inset: 0 0 auto; | ||
position: fixed; | ||
} | ||
|
||
.main { | ||
margin: 48px 0 0; | ||
} | ||
|
||
.mobileNavigation { | ||
inset: auto 0 0; | ||
position: fixed; | ||
} |
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,40 @@ | ||
import Link from "next/link"; | ||
import { useMemo } from "react"; | ||
import styles from "./style.module.css"; | ||
|
||
export default function MobileNavigation(): JSX.Element { | ||
const items = useMemo( | ||
() => | ||
[ | ||
{ | ||
path: "/", | ||
text: "ホーム", | ||
}, | ||
{ | ||
path: "community/", | ||
text: "コミュニティ", | ||
}, | ||
{ | ||
path: "/schedule", | ||
text: "スケジュール", | ||
}, | ||
{ | ||
path: "/pypage", | ||
text: "マイページ", | ||
}, | ||
].map(({ path, text }) => ( | ||
<li key={path}> | ||
<Link className={styles.link} href="/"> | ||
{text} | ||
</Link> | ||
</li> | ||
)), | ||
[], | ||
); | ||
|
||
return ( | ||
<nav className={styles.nav}> | ||
<ul className={styles.list}>{items}</ul> | ||
</nav> | ||
); | ||
} |
15 changes: 15 additions & 0 deletions
15
apps/user/src/app/_components/MobileNavigation/style.module.css
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,15 @@ | ||
.nav { | ||
background: #fff; | ||
border-top: 1px solid #e8eaee; | ||
height: 48px; | ||
} | ||
|
||
.list { | ||
display: grid; | ||
grid-template: auto / repeat(4, 1fr); | ||
height: 100%; | ||
} | ||
|
||
.link { | ||
display: block; | ||
} |
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 |
---|---|---|
|
@@ -12,6 +12,10 @@ html { | |
} | ||
} | ||
|
||
body { | ||
background: #f4f7fa; | ||
} | ||
|
||
* { | ||
outline: none; | ||
} | ||
|
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.