Skip to content

Commit 167e75a

Browse files
author
reco_luan
committed
feat: add dark mode(part.2)
1 parent a0bab57 commit 167e75a

File tree

3 files changed

+7
-29
lines changed

3 files changed

+7
-29
lines changed

components/Mode/index.vue

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,10 @@ export default {
6262
left: 50%;
6363
transform: translateX(-50%);
6464
z-index: 150;
65-
&::before {
66-
content: '';
67-
position: absolute;
68-
top: -7px;
69-
left: 50%;
70-
border-style: solid;
71-
border-color: transparent transparent $borderColor;
72-
border-width: 0 7px 7px;
73-
transform: translateX(-50%);
74-
}
75-
7665
&.menu-transition-enter-active,
7766
&.menu-transition-leave-active {
7867
transition: all 0.25s ease-in-out;
7968
}
80-
8169
&.menu-transition-enter,
8270
&.menu-transition-leave-to {
8371
top: 50px;
@@ -92,17 +80,6 @@ export default {
9280
}
9381
}
9482
95-
.reco-mode-dark {
96-
.color-picker-menu {
97-
background-color: $darkPrimaryBg;
98-
border-color: $darkBorderColor;
99-
100-
&::before {
101-
border-bottom-color: $darkBorderColor;
102-
}
103-
}
104-
}
105-
10683
@media (max-width: $MQMobile) {
10784
.color-picker {
10885
margin-right: 1rem;

layouts/TimeLines.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default {
119119
margin-left: -2px;
120120
width: 4px;
121121
height: 100%;
122-
background: #f5f5f5;
122+
background: var(--border-color);
123123
}
124124
.desc, .year {
125125
position: relative;
@@ -135,7 +135,8 @@ export default {
135135
margin-top: -4px;
136136
width: 8px;
137137
height: 8px;
138-
background: #ddd;
138+
background: var(--background-color);
139+
border: 1px solid var(--border-color);
139140
border-radius: 50%;
140141
}
141142
}
@@ -151,7 +152,7 @@ export default {
151152
display flex
152153
padding 30px 0 10px
153154
list-style none
154-
border-bottom: 1px dashed #ccc;
155+
border-bottom: 1px dashed var(--border-color);
155156
position relative
156157
&:hover {
157158
.date {
@@ -177,9 +178,9 @@ export default {
177178
width: 6px;
178179
height: 6px;
179180
margin-left: -4px;
180-
background: #ddd;
181+
background: var(--background-color);
181182
border-radius: 50%;
182-
border: 1px solid #fff;
183+
border: 1px solid var(--border-color);
183184
z-index 2
184185
}
185186
}

styles/theme.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ body
4343

4444
.sidebar
4545
font-size 16px
46-
background-color #fff
46+
background-color var(--background-color)
4747
width $sidebarWidth
4848
position fixed
4949
z-index 10

0 commit comments

Comments
 (0)