Skip to content

Commit

Permalink
feat: Headerを作成
Browse files Browse the repository at this point in the history
  • Loading branch information
crab85193 committed Dec 15, 2024
1 parent 46c8c73 commit da16f07
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 60 deletions.
21 changes: 4 additions & 17 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
import React from "react";
import logo from "./assets/images/logo.svg";
import "./assets/styles/App.css";
import Header from "./components/Header";
import "./assets/styles/reset.css";

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<div className="layout">
<Header />
</div>
);
}
Expand Down
38 changes: 0 additions & 38 deletions src/assets/styles/App.css

This file was deleted.

34 changes: 34 additions & 0 deletions src/assets/styles/Header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.wrapper {
max-width: 1140px;
padding-left: 1rem;
padding-right: 1rem;
margin-left: auto;
margin-right: auto;
}

.brand {
font-weight: bold;
font-size: 20px;
text-decoration: none;
color: #222;
padding: 1.5rem 1rem;
}

.site-header {
position: relative;
background-color: #def7ff;
}

.site-header__wrapper {
padding-top: 1rem;
padding-bottom: 1rem;
}
@media (min-width: 600px) {
.site-header__wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 0;
padding-bottom: 0;
}
}
5 changes: 0 additions & 5 deletions src/assets/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
129 changes: 129 additions & 0 deletions src/assets/styles/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: "";
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
16 changes: 16 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import "./../assets/styles/Header.css";

function Header() {
return (
<header className="site-header">
<div className="wrapper site-header__wrapper">
<a href="" className="brand">
都道府県別の総人口推移グラフ
</a>
</div>
</header>
);
}

export default Header;

0 comments on commit da16f07

Please sign in to comment.