Skip to content

Commit 654718e

Browse files
committed
调整GitHub图标和语言选择器水平对齐
1 parent aa3f935 commit 654718e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/GithubLink.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ const GithubLink: React.FC = () => {
77
return (
88
<div className="github-corner" style={{
99
position: 'absolute',
10-
top: '25px', // 增加顶部边距
10+
top: '25px',
1111
right: '20px',
12-
zIndex: 1000
12+
zIndex: 1000,
13+
display: 'flex',
14+
alignItems: 'center',
15+
height: '31px' // 与语言选择器高度对齐
1316
}}>
1417
<a
1518
href="https://github.com/fuck-algorithm/leetcode-283-move-zeroes"
@@ -27,7 +30,7 @@ const GithubLink: React.FC = () => {
2730
boxShadow: '0 2px 5px rgba(0,0,0,0.3)'
2831
}}
2932
>
30-
<svg height="28" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="28" data-view-component="true" style={{ fill: '#ffffff' }}>
33+
<svg height="20" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="20" data-view-component="true" style={{ fill: '#ffffff' }}>
3134
<path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
3235
</svg>
3336
</a>

src/components/LanguageSwitcher.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const LanguageSwitcher: React.FC = () => {
1818
right: '70px',
1919
display: 'flex',
2020
alignItems: 'center',
21+
height: '31px',
2122
zIndex: 1000
2223
}}>
2324
<select
@@ -29,7 +30,8 @@ const LanguageSwitcher: React.FC = () => {
2930
borderRadius: '4px',
3031
border: '1px solid #ccc',
3132
backgroundColor: '#2c3e50',
32-
color: '#fff'
33+
color: '#fff',
34+
height: '30px'
3335
}}
3436
>
3537
<option value="en">{t('language.en')}</option>

0 commit comments

Comments
 (0)