init finish
This commit is contained in:
33
components/Header.js
Normal file
33
components/Header.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import styles from "../styles/Header.module.css";
|
||||
import Link from "next/link";
|
||||
|
||||
// images
|
||||
import headerBackground from "../public/typhoon.png";
|
||||
|
||||
export default function Header({ titleText }) {
|
||||
return (
|
||||
<>
|
||||
<nav className={styles.toolbar}>
|
||||
<strong>
|
||||
<Link href="/">Social OJO</Link>
|
||||
</strong>
|
||||
<div className={styles.nav}>
|
||||
<span>
|
||||
<Link href="/">主页</Link>
|
||||
</span>
|
||||
<span>
|
||||
<Link href="/posts/init">关于</Link>
|
||||
</span>
|
||||
</div>
|
||||
</nav>
|
||||
<h1 className={styles.title}>{titleText || "Social OJO"}</h1>
|
||||
<header
|
||||
className={styles.header}
|
||||
style={{
|
||||
backgroundImage: `url('${headerBackground.src}')`,
|
||||
}}
|
||||
>
|
||||
</header>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user