mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-16 23:55:32 -04:00
next-mdx-remote v4 (#737)
This commit is contained in:
52
components/Header/Header.module.css
Normal file
52
components/Header/Header.module.css
Normal file
@@ -0,0 +1,52 @@
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 4.5em;
|
||||
padding: 0.7em 1.5em;
|
||||
border-bottom: 1px solid var(--kinda-light);
|
||||
background-color: var(--background-header);
|
||||
backdrop-filter: saturate(180%) blur(5px);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
max-width: 865px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.nav > div {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.header {
|
||||
padding: 0.75em 1.25em;
|
||||
height: 5.9em;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 0;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
max-width: 325px;
|
||||
margin-left: 2.5em;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 380px) {
|
||||
.right {
|
||||
max-width: 225px;
|
||||
margin-left: 1.6em;
|
||||
}
|
||||
}
|
21
components/Header/Header.tsx
Normal file
21
components/Header/Header.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { memo } from "react";
|
||||
import Name from "../Name/Name";
|
||||
import Menu from "../Menu/Menu";
|
||||
|
||||
import styles from "./Header.module.css";
|
||||
|
||||
const Header = () => (
|
||||
<header className={styles.header}>
|
||||
<nav className={styles.nav}>
|
||||
<div className={styles.left}>
|
||||
<Name />
|
||||
</div>
|
||||
|
||||
<div className={styles.right}>
|
||||
<Menu />
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
);
|
||||
|
||||
export default memo(Header);
|
Reference in New Issue
Block a user