Skip to content

Commit 8a09ff6

Browse files
authored
Merge pull request #539 from nullptr-z/dev
fix: 明暗主题展示不明显问题
2 parents 92809e3 + 834e7f3 commit 8a09ff6

File tree

8 files changed

+56
-9
lines changed

8 files changed

+56
-9
lines changed

website/src/assets/github.svg

Lines changed: 2 additions & 2 deletions
Loading

website/src/component/Footer/index.module.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.warpper {
22
background: white;
33
border-top: 1px solid #e1e4e8;
4+
width: 100%;
45
}
56

67
.inner {
@@ -79,3 +80,8 @@
7980
margin: 0 5px;
8081
}
8182
}
83+
84+
html[data-color-mode*='dark'] .warpper {
85+
border-top: 1px solid #032438;
86+
background: var(--color-theme-bg);
87+
}

website/src/component/Header/index.module.less

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
html[data-color-mode*='dark'] .warpper {
13-
background-color: #0d1117;
13+
background-color: var(--color-theme-bg);
1414
border-bottom: 1px solid #032438;
1515
}
1616

@@ -25,9 +25,10 @@ html[data-color-mode*='dark'] .warpper {
2525
.menus {
2626
display: flex;
2727

28+
span,
2829
a {
2930
transition: all 0.3s;
30-
color: #333;
31+
color: var(--color-fg-default);
3132
border-radius: 3px;
3233
padding: 2px 8px 2px 8px;
3334
display: flex;
@@ -39,12 +40,12 @@ html[data-color-mode*='dark'] .warpper {
3940
}
4041

4142
:global(.active),
43+
span:hover,
4244
a:hover {
4345
background: #00000017;
4446
color: #0366d6;
4547
}
4648
}
47-
4849
.logo {
4950
display: flex;
5051
align-items: center;
@@ -74,3 +75,9 @@ html[data-color-mode*='dark'] .warpper {
7475
font-weight: 300;
7576
}
7677
}
78+
79+
html[data-color-mode*='dark'] {
80+
:global(.github) {
81+
fill: white;
82+
}
83+
}

website/src/component/Header/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default function Header(props: HeaderProps) {
2222
if (enableStyle) {
2323
style.background = '#f7f7f7';
2424
}
25+
2526
return (
2627
<header className={styles.warpper} style={style}>
2728
<div className={styles.inner}>
@@ -43,7 +44,9 @@ export default function Header(props: HeaderProps) {
4344
Web 组件
4445
</a>
4546
<NavLink to="/team">团队</NavLink>
46-
<dark-mode permanent style={{ display: 'flex', alignItems: 'center' }} />
47+
<span>
48+
<dark-mode permanent />
49+
</span>
4750
<a target="__blank" href="https://github.com/uiwjs/react-native-uiw">
4851
<Github />
4952
</a>

website/src/component/Preview/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BackTop, Circle, Icon } from 'uiw';
44
import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';
55
import CodeLayout from 'react-code-preview-layout';
66
import { useRef } from 'react';
7-
import Footer from './Footer';
7+
import Footer from '../Footer';
88

99
const Wrapper = styled.div`
1010
width: 100%;

website/src/component/SubMenus/index.module.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
position: relative;
44

55
a {
6-
color: #5a5a5a;
6+
color: var(--color-fg-default);
77
transition: all 0.3s;
88
margin-left: 10px;
99
display: flex;
@@ -39,7 +39,7 @@
3939
padding: 5px 0;
4040
margin-left: 10px;
4141
margin-bottom: 10px;
42-
color: #bdbdbd;
42+
color: #8a8686;
4343
border-bottom: 1px solid #eaeaea;
4444
}
4545

website/src/pages/home/index.module.less

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
background: linear-gradient(60deg, #393e48c4 0%, #dfe2e5 100%);
55
color: white;
66
}
7+
html[data-color-mode*='dark'] .header {
8+
background: linear-gradient(10deg, #393e48c4 0%, var(--color-theme-bg) 80%);
9+
color: rgb(255, 255, 255);
10+
h2,
11+
p,
12+
a:hover {
13+
text-shadow: 1px 3px 5px cornflowerblue;
14+
}
15+
}
716

817
.headerContent {
918
padding-top: 140px;
@@ -25,6 +34,7 @@
2534
}
2635
p {
2736
padding-top: 52px;
37+
font-size: 25px;
2838
}
2939
}
3040
.innerHeader {
@@ -64,6 +74,23 @@
6474
}
6575
}
6676

77+
html[data-color-mode*='dark'] .waves {
78+
:global(.parallax) {
79+
& > use:nth-child(1) {
80+
fill: #0d1117b5;
81+
}
82+
& > use:nth-child(2) {
83+
fill: #0d111783;
84+
}
85+
& > use:nth-child(3) {
86+
fill: #0d11173c;
87+
}
88+
& > use:nth-child(4) {
89+
fill: var(--color-theme-bg);
90+
}
91+
}
92+
}
93+
6794
@keyframes move-forever {
6895
0% {
6996
transform: translate3d(-90px, 0, 0);

website/src/pages/team/index.module.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
background: #f7f7f7;
66
}
77

8+
html[data-color-mode*='dark'] .warpper {
9+
background: var(--color-theme-bg);
10+
}
11+
812
.article {
913
min-height: 60vh;
1014
padding-top: 26px;

0 commit comments

Comments
 (0)