|
1 | 1 | --- |
2 | | -import { SITE_TITLE } from '../consts'; |
| 2 | +// src/components/Header.astro |
3 | 3 | import HeaderLink from './HeaderLink.astro'; |
| 4 | +import { SITE_TITLE } from '../consts'; |
4 | 5 | --- |
5 | 6 |
|
6 | | -<header class="bg-white dark:bg-gray-900 shadow-sm border-b border-gray-200 dark:border-gray-700"> |
7 | | - <nav class="max-w-6xl mx-auto px-4 flex items-center justify-between h-16"> |
8 | | - <!-- 로고/타이틀 --> |
9 | | - <div class="flex items-center space-x-4"> |
10 | | - <h1 class="text-xl font-bold text-gray-900 dark:text-white"> |
11 | | - <a href="/github.io/">{SITE_TITLE}</a> |
12 | | - </h1> |
13 | | - </div> |
14 | | - |
15 | | - <!-- 네비게이션 --> |
16 | | - <div class="flex items-center space-x-6"> |
17 | | - <div class="hidden md:flex space-x-4"> |
18 | | - <HeaderLink href="/github.io/">Home</HeaderLink> |
19 | | - <HeaderLink href="/github.io/blog">Blog</HeaderLink> |
20 | | - <HeaderLink href="/github.io/about">About</HeaderLink> |
| 7 | +<header class="sticky top-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-md border-b border-gray-200/50 dark:border-gray-700/50"> |
| 8 | + <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8"> |
| 9 | + <div class="flex items-center justify-between h-16"> |
| 10 | + <!-- 로고/사이트 제목 --> |
| 11 | + <div class="flex items-center"> |
| 12 | + <a href="/" class="text-xl font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors"> |
| 13 | + {SITE_TITLE} |
| 14 | + </a> |
21 | 15 | </div> |
22 | 16 |
|
23 | | - <!-- 테마 토글 + 소셜 링크 --> |
24 | | - <div class="flex items-center space-x-3"> |
25 | | - <!-- ThemeToggle 컴포넌트 위치 --> |
26 | | - <a href="https://github.com/chr-kim" target="_blank" |
27 | | - class="text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"> |
28 | | - <span class="sr-only">GitHub</span> |
29 | | - <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
30 | | - <!-- GitHub 아이콘 --> |
31 | | - </svg> |
32 | | - </a> |
33 | | - <a href="https://linkedin.com/in/your-profile" target="_blank" |
34 | | - class="text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"> |
35 | | - <span class="sr-only">LinkedIn</span> |
36 | | - <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
37 | | - <!-- LinkedIn 아이콘 --> |
| 17 | + <!-- 내비게이션 메뉴 --> |
| 18 | + <nav class="hidden md:flex space-x-8"> |
| 19 | + <HeaderLink href="/">홈</HeaderLink> |
| 20 | + <HeaderLink href="/blog">블로그</HeaderLink> |
| 21 | + <HeaderLink href="/about">소개</HeaderLink> |
| 22 | + </nav> |
| 23 | + |
| 24 | + <!-- 모바일 메뉴 버튼 --> |
| 25 | + <div class="md:hidden"> |
| 26 | + <button |
| 27 | + type="button" |
| 28 | + class="text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300" |
| 29 | + aria-label="메뉴" |
| 30 | + > |
| 31 | + <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 32 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /> |
38 | 33 | </svg> |
39 | | - </a> |
| 34 | + </button> |
40 | 35 | </div> |
41 | 36 | </div> |
42 | | - </nav> |
| 37 | + </div> |
43 | 38 | </header> |
0 commit comments