Skip to content

Commit aa8c929

Browse files
committed
修改 header,增加 github 地址
1 parent c3df72d commit aa8c929

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

components/layout/Header.tsx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React, { memo, useCallback } from 'react';
44
import { useRouter } from 'next/navigation';
55
import { Button, Tooltip } from 'antd';
6-
import { EditOutlined, MenuOutlined } from '@ant-design/icons';
6+
import { EditOutlined, MenuOutlined, GithubOutlined } from '@ant-design/icons';
77
import SearchBar from './SearchBar';
88
import ThemeToggle from './ThemeToggle';
99

@@ -75,6 +75,21 @@ const Header = memo(function Header({ onMenuClick }: HeaderProps) {
7575
}}
7676
/>
7777
</Tooltip>
78+
<Tooltip title="GitHub 项目地址" placement="bottom">
79+
<Button
80+
type="text"
81+
icon={<GithubOutlined aria-hidden="true" />}
82+
onClick={() => window.open('https://github.com/weizwz/weiz-nav', '_blank', 'noopener,noreferrer')}
83+
aria-label="访问 GitHub 项目地址"
84+
title="GitHub"
85+
className="flex items-center justify-center"
86+
style={{
87+
fontSize: '18px',
88+
width: '40px',
89+
height: '40px',
90+
}}
91+
/>
92+
</Tooltip>
7893
</div>
7994
</div>
8095

@@ -126,6 +141,21 @@ const Header = memo(function Header({ onMenuClick }: HeaderProps) {
126141
}}
127142
/>
128143
</Tooltip>
144+
<Tooltip title="GitHub 项目地址" placement="bottom">
145+
<Button
146+
type="text"
147+
icon={<GithubOutlined aria-hidden="true" />}
148+
onClick={() => window.open('https://github.com/weizwz/weiz-nav', '_blank', 'noopener,noreferrer')}
149+
aria-label="访问 GitHub 项目地址"
150+
title="GitHub"
151+
className="flex items-center justify-center"
152+
style={{
153+
fontSize: '18px',
154+
width: '40px',
155+
height: '40px',
156+
}}
157+
/>
158+
</Tooltip>
129159
</div>
130160
</div>
131161

0 commit comments

Comments
 (0)