NavBar: extract Header into NavBar and Panorama components
This commit is contained in:
BIN
src/assets/pano.gif
Normal file
BIN
src/assets/pano.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 MiB |
@@ -1,8 +0,0 @@
|
|||||||
header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
header > * {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import "./Header.css";
|
|
||||||
|
|
||||||
type HeaderProps = {};
|
|
||||||
|
|
||||||
const Header: React.FC<HeaderProps> = () => {
|
|
||||||
return (
|
|
||||||
<header>
|
|
||||||
<div style={{ paddingLeft: 32 }}>
|
|
||||||
<h1>Phosphor Icons</h1>
|
|
||||||
</div>
|
|
||||||
<div style={{ paddingRight: 32, textAlign: "end" }}>
|
|
||||||
<button>Download all</button>
|
|
||||||
<button>Request</button>
|
|
||||||
<button>Donate</button>
|
|
||||||
<a href="https://github.com/rektdeckard/phosphor-react">
|
|
||||||
<button>Github</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Header;
|
|
||||||
54
src/components/NavBar/NavBar.css
Normal file
54
src/components/NavBar/NavBar.css
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 96px;
|
||||||
|
width: 83.33%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav > div {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 32px;
|
||||||
|
margin: 0px 16px 0px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title small {
|
||||||
|
margin-top: 4px;
|
||||||
|
color: #b2b2b2;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-right: 32;
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links a {
|
||||||
|
color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links a:hover {
|
||||||
|
/* border-bottom: 2px solid black; */
|
||||||
|
box-shadow: 0 2px 0px -1px black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links a:not(:first-child) {
|
||||||
|
margin-left: 48px;
|
||||||
|
}
|
||||||
35
src/components/NavBar/NavBar.tsx
Normal file
35
src/components/NavBar/NavBar.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import React from "react";
|
||||||
|
import "./NavBar.css";
|
||||||
|
|
||||||
|
type NavBarProps = {};
|
||||||
|
|
||||||
|
const NavBar: React.FC<NavBarProps> = () => {
|
||||||
|
return (
|
||||||
|
<nav>
|
||||||
|
<div className="title-container">
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
height: 32,
|
||||||
|
width: 32,
|
||||||
|
backgroundColor: "black",
|
||||||
|
borderRadius: "50%",
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
<div className="title">
|
||||||
|
<h1>Phosphor Icons</h1>
|
||||||
|
<small>v0.1.6</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="links">
|
||||||
|
<a href="#">Download</a>
|
||||||
|
<a href="#">Request</a>
|
||||||
|
<a href="#">Donate</a>
|
||||||
|
<a href="https://github.com/rektdeckard/phosphor-react">
|
||||||
|
<span>Github</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default NavBar;
|
||||||
5
src/components/Panorama/Panorama.css
Normal file
5
src/components/Panorama/Panorama.css
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
figure {
|
||||||
|
height: 400px;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #FFD171;
|
||||||
|
}
|
||||||
28
src/components/Panorama/Panorama.tsx
Normal file
28
src/components/Panorama/Panorama.tsx
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
import React from "react";
|
||||||
|
import "./Panorama.css";
|
||||||
|
|
||||||
|
type PanoramaProps = {};
|
||||||
|
|
||||||
|
const Panorama: React.FC<PanoramaProps> = () => {
|
||||||
|
return (
|
||||||
|
<section id="panorama">
|
||||||
|
{/* <figure></figure> */}
|
||||||
|
<img width="100%" src={require("../../assets/pano.gif")} alt="Loading" />
|
||||||
|
<div style={{ display: "flex", justifyContent: "center" }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
marginTop: 12,
|
||||||
|
border: "1px solid black",
|
||||||
|
borderRadius: 4,
|
||||||
|
width: 222,
|
||||||
|
height: 8,
|
||||||
|
backgroundColor: "gainsborough",
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Panorama;
|
||||||
Reference in New Issue
Block a user