From 0e5faadfb7241c0a8a971183f4d730b86e8e1cfd Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Fri, 15 Sep 2023 14:08:01 +0900 Subject: [PATCH] refactor: extract Header component --- apps/portfolio/src/components/Header.astro | 74 +++++++++++++++++++++ apps/portfolio/src/layouts/BaseLayout.astro | 73 +------------------- 2 files changed, 76 insertions(+), 71 deletions(-) create mode 100644 apps/portfolio/src/components/Header.astro diff --git a/apps/portfolio/src/components/Header.astro b/apps/portfolio/src/components/Header.astro new file mode 100644 index 0000000..24b3875 --- /dev/null +++ b/apps/portfolio/src/components/Header.astro @@ -0,0 +1,74 @@ +--- +import { listIconPath } from '../icon-path.js'; +import Button from './Button.astro'; +import InternalLink from './InternalLink.astro'; + +const openNavButtonId = 'open-nav-button'; +const navId = 'nav-menu'; +--- + +
+
+ + +
+ + +
+ + diff --git a/apps/portfolio/src/layouts/BaseLayout.astro b/apps/portfolio/src/layouts/BaseLayout.astro index 48a995f..b37f523 100644 --- a/apps/portfolio/src/layouts/BaseLayout.astro +++ b/apps/portfolio/src/layouts/BaseLayout.astro @@ -1,18 +1,13 @@ --- import '../styles/index.css'; -import Button from '../components/Button.astro'; -import InternalLink from '../components/InternalLink.astro'; -import { listIconPath } from '../icon-path.js'; +import Header from '../components/Header.astro'; interface Props { title: string; } const { title } = Astro.props; - -const openNavButtonId = 'open-nav-button'; -const navId = 'nav-menu'; --- @@ -24,71 +19,7 @@ const navId = 'nav-menu'; {title} -
-
- - -
- - -
+
- -