Skip to content

Commit f05965c

Browse files
committed
feat(nav): organize header navigation into 3 groups
ヘッダーナビゲーションをUXベストプラクティスに基づいて整理: - 6つの並列リンクから3グループに削減 - DaisyUI v5のドロップダウンコンポーネントを使用 - About (About, Activities, Join) - Content (Articles, Projects) - Members (直接リンク) 変更: - src/routes/(site)/+layout.svelte: ドロップダウンメニューを実装 - docs/knowledges/ui-design.md: ナビゲーション構造を文書化
1 parent fee0a04 commit f05965c

File tree

2 files changed

+78
-15
lines changed

2 files changed

+78
-15
lines changed

docs/knowledges/ui-design.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
| Section labels | Monospace, uppercase, tracking-widest, text-[#00D372] |
4242
| Tech tags | Monospace, text-xs, bg-zinc-100/zinc-800, rounded-lg |
4343
| Page headers | border-b, bg-zinc-50/50, py-16 |
44+
| Dropdown menus | dropdown-hover, border border-zinc-200, bg-white, shadow, hover:bg-primary/5 |
4445

4546
## Interaction Patterns
4647

@@ -66,6 +67,15 @@ Applied to:
6667
- Card border radius: rounded-2xl
6768
- List pages: Header section + content section pattern
6869

70+
## Navigation Structure
71+
72+
**Header Navigation** (3 groups max for UX)
73+
- **About** dropdown: About, Activities, Join
74+
- **Content** dropdown: Articles, Projects
75+
- **Members**: Direct link
76+
77+
Mobile: All items in drawer menu
78+
6979
## Public Pages Structure
7080

7181
1. **Homepage**

src/routes/(site)/+layout.svelte

Lines changed: 68 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,77 @@
6262
>⌘K</kbd
6363
>
6464
</button>
65-
<a href="/about" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
66-
>About</a
67-
>
68-
<a href="/activities" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
69-
>Activities</a
70-
>
71-
<a href="/articles" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
72-
>Articles</a
73-
>
74-
<a href="/projects" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
75-
>Projects</a
76-
>
65+
66+
<div class="dropdown dropdown-hover">
67+
<div
68+
tabindex="0"
69+
role="button"
70+
class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
71+
>
72+
About
73+
</div>
74+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
75+
<ul
76+
tabindex="0"
77+
class="menu dropdown-content z-[1] mt-3 w-52 rounded-lg border border-zinc-200 bg-white p-2 shadow"
78+
>
79+
<li>
80+
<a
81+
href="/about"
82+
class="text-sm text-zinc-600 transition-colors hover:bg-primary/5 hover:text-primary"
83+
>About</a
84+
>
85+
</li>
86+
<li>
87+
<a
88+
href="/activities"
89+
class="text-sm text-zinc-600 transition-colors hover:bg-primary/5 hover:text-primary"
90+
>Activities</a
91+
>
92+
</li>
93+
<li>
94+
<a
95+
href="/join"
96+
class="text-sm text-zinc-600 transition-colors hover:bg-primary/5 hover:text-primary"
97+
>Join</a
98+
>
99+
</li>
100+
</ul>
101+
</div>
102+
103+
<div class="dropdown dropdown-hover">
104+
<div
105+
tabindex="0"
106+
role="button"
107+
class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
108+
>
109+
Content
110+
</div>
111+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
112+
<ul
113+
tabindex="0"
114+
class="menu dropdown-content z-[1] mt-3 w-52 rounded-lg border border-zinc-200 bg-white p-2 shadow"
115+
>
116+
<li>
117+
<a
118+
href="/articles"
119+
class="text-sm text-zinc-600 transition-colors hover:bg-primary/5 hover:text-primary"
120+
>Articles</a
121+
>
122+
</li>
123+
<li>
124+
<a
125+
href="/projects"
126+
class="text-sm text-zinc-600 transition-colors hover:bg-primary/5 hover:text-primary"
127+
>Projects</a
128+
>
129+
</li>
130+
</ul>
131+
</div>
132+
77133
<a href="/members" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
78134
>Members</a
79135
>
80-
<a href="/join" class="text-sm text-zinc-500 transition-colors hover:text-zinc-900"
81-
>Join</a
82-
>
83136
</div>
84137
</div>
85138
</nav>

0 commit comments

Comments
 (0)