Skip to content

Commit

Permalink
Merge pull request #5 from jphacks/feat/2-Header
Browse files Browse the repository at this point in the history
Header: 概形作成
  • Loading branch information
ViniciusBrJp authored Oct 26, 2024
2 parents ed392d3 + 1b36797 commit 0a34f34
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import "@/styles/style.scss";
import React from "react";
import Header from "@/components/Header/Header";

export const metadata: Metadata = {
title: "websocket sample",
Expand All @@ -15,7 +16,7 @@ export default function RootLayout({
return (
<html lang="ja">
<body>
<header>header</header>
<Header />
<main>{children}</main>
<footer>footer</footer>
</body>
Expand Down
36 changes: 36 additions & 0 deletions frontend/src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.header {
z-index: 1000;
transition: all 0.3s ease-out;
}

.headerMain {
display: flex;
justify-content: space-evenly;
}

.navigationContainer {
padding: 8px 0 6px 0;
background-color: #f8f8f8;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.15);
opacity: 1;
transition: all 0.3s ease-out;
transform: translateY(0);
}

.navigation {
display: flex;
width: 100%;
padding: 0 !important;
}

.logo {
padding: 8px 100px 6px 100px;
}

.userNumber {
padding: 8px 100px 6px 100px;
}

.logoutButton {
padding: 8px 0 6px 0;
}
15 changes: 15 additions & 0 deletions frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import styles from "./Header.module.scss";
export default function Header() {
return (
<header className={styles.header}>
<div className={styles.navigationContainer}>
<nav className={styles.navigation}>
<div className={styles.logo}>ls-chat</div>
<div className={styles.userNumber}>users</div>
<button className={styles.logoutButton}>logout</button>
</nav>
</div>
</header>
);
}
6 changes: 3 additions & 3 deletions frontend/src/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ html {
}

body {
margin: 0;
background: white;
max-width: 700px;
margin: 0 auto;
height: 100vh;
margin: 0;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
background: white;
}

0 comments on commit 0a34f34

Please sign in to comment.