Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit da25d1b

Browse files
committed
feat(style): use white theme color
1 parent 6e60549 commit da25d1b

15 files changed

+198
-236
lines changed

src/components/DocuteSelect.vue

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<template functional>
2+
<div class="DocuteSelect">
3+
<select class="select" v-on="listeners">
4+
<slot name="default"></slot>
5+
</select>
6+
<div class="arrow">
7+
<svg width="13" height="6" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#979797" fill-rule="evenodd" stroke-linecap="square"><path d="M1.367.375l5.185 5.303M11.685.375L6.5 5.678"></path></svg>
8+
</div>
9+
</div>
10+
</template>
11+
12+
<script>
13+
export default {
14+
name: 'DocuteSelect'
15+
}
16+
</script>
17+
18+
<style scoped>
19+
.DocuteSelect {
20+
appearance: none;
21+
color: #fff;
22+
background: white;
23+
display: inline-flex;
24+
height: 40px;
25+
outline: none;
26+
border: 1px solid #eaeaea;
27+
font-size: 12px;
28+
text-transform: uppercase;
29+
user-select: none;
30+
font-weight: 100;
31+
position: relative;
32+
overflow: hidden;
33+
transition: border 0.2s, background 0.2s, color 0.2s ease-out,
34+
box-shadow 0.2s ease;
35+
border-radius: 5px;
36+
white-space: nowrap;
37+
line-height: 0;
38+
width: 100%;
39+
40+
&:hover {
41+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
42+
border-color: #ddd;
43+
44+
& .arrow {
45+
border-color: #ddd;
46+
}
47+
}
48+
}
49+
50+
.select {
51+
appearance: none;
52+
height: 100%;
53+
border: none;
54+
box-shadow: none;
55+
background: transparent;
56+
background-image: none;
57+
line-height: 40px;
58+
font-size: 14px;
59+
margin-right: -20px;
60+
padding: 0 76px 0 16px;
61+
text-transform: none;
62+
width: 100%;
63+
outline: none;
64+
}
65+
66+
.arrow {
67+
border-left: 1px solid #eaeaea;
68+
background: white;
69+
width: 40px;
70+
height: 100%;
71+
position: absolute;
72+
right: 0;
73+
pointer-events: none;
74+
display: flex;
75+
align-items: center;
76+
justify-content: center;
77+
}
78+
</style>

src/components/EditLink.vue

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default {
3232
margin-top: 50px;
3333
3434
& a {
35-
color: var(--accent-color);
3635
text-decoration: none;
3736
display: flex;
3837
align-items: center;

src/components/MobileHeader.vue

+6-10
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ export default {
2525
padding: 0 20px;
2626
height: var(--mobile-header-height);
2727
line-height: var(--mobile-header-height);
28-
background: var(--accent-color);
29-
color: white;
3028
position: fixed;
3129
top: 0;
3230
left: 0;
3331
right: 0;
3432
z-index: 3;
33+
border-bottom: 1px solid var(--border-color);
34+
background: var(--sidebar-bg);
35+
36+
@media (max-width: 768px) {
37+
display: flex;
38+
}
3539
}
3640
3741
.SiteTitle {
@@ -51,11 +55,3 @@ export default {
5155
margin-right: 10px;
5256
}
5357
</style>
54-
55-
<style scoped>
56-
@media screen and (max-width: 768px) {
57-
.MobileHeader {
58-
display: flex;
59-
}
60-
}
61-
</style>

src/components/PrevNextLinks.vue

-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ export default {
6060
margin-top: 40px;
6161
padding-top: 30px;
6262
border-top: 1px solid var(--border-color);
63-
color: var(--accent-color);
6463
6564
& a {
66-
color: var(--accent-color);
6765
text-decoration: none;
6866
6967
&:hover {

src/components/Rightbar.vue

-24
This file was deleted.

src/components/Sidebar.vue

+33-51
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,27 @@ export default {
7878
position: fixed;
7979
top: 0;
8080
bottom: 0;
81-
left: 0;
8281
z-index: 9;
83-
color: white;
8482
overflow-y: auto;
8583
padding: 20px 0;
8684
word-break: break-word;
85+
border-right: 1px solid var(--border-color);
8786
8887
& a {
89-
color: white;
9088
text-decoration: none;
89+
color: #000;
90+
}
91+
92+
@media (max-width: 768px) {
93+
left: 0;
94+
transform: translateX(-100%);
95+
width: 80%;
96+
top: var(--mobile-header-height);
97+
transition: transform 0.5s cubic-bezier(0.5, 0.32, 0.01, 1);
98+
99+
&.isShown {
100+
transform: translateX(0);
101+
}
91102
}
92103
}
93104
@@ -97,13 +108,16 @@ export default {
97108
padding: 20px;
98109
padding-top: 0;
99110
line-height: 1.2;
111+
112+
@media (max-width: 768px) {
113+
display: none;
114+
}
100115
}
101116
102117
.SidebarItem {
103118
&:not(:last-child) {
104-
border-bottom: 1px solid var(--sidebar-border-color);
105-
padding-bottom: 2rem;
106-
margin-bottom: 2rem;
119+
padding-bottom: 1.2rem;
120+
margin-bottom: 1.2rem;
107121
}
108122
109123
&.hasTitle {
@@ -118,12 +132,12 @@ export default {
118132
}
119133
120134
.ItemTitle {
121-
font-size: 1.2rem;
122-
font-style: italic;
135+
font-size: 1rem;
123136
padding: 0 20px;
124137
margin-bottom: 10px;
125-
font-weight: 500;
126138
position: relative;
139+
color: var(--sidebar-section-title-color);
140+
text-transform: uppercase;
127141
}
128142
129143
.ItemLink {
@@ -134,7 +148,7 @@ export default {
134148
135149
&.active,
136150
&:hover {
137-
background: var(--sidebar-border-color);
151+
font-weight: bold;
138152
}
139153
}
140154
@@ -160,50 +174,18 @@ export default {
160174
margin-left: 50px;
161175
}
162176
163-
&:before {
164-
position: absolute;
165-
content: '';
166-
height: 4px;
167-
width: 4px;
168-
background: transparent;
169-
display: block;
170-
top: 50%;
171-
margin-top: -2px;
172-
left: -10px;
173-
border-radius: 50%;
174-
}
175-
176-
&:hover {
177-
&:before {
178-
background: rgba(228, 228, 228, 0.28);
179-
}
180-
}
181-
182177
&.router-link-exact-active {
183-
&:before {
184-
background: white;
185-
}
186-
}
187-
}
188-
</style>
178+
font-weight: bold;
189179
190-
<style scoped>
191-
@import 'vars.css';
192-
193-
@media screen and (max-width: 768px) {
194-
.Sidebar {
195-
transform: translateX(-100%);
196-
width: 80%;
197-
top: var(--mobile-header-height);
198-
transition: transform 0.5s cubic-bezier(0.5, 0.32, 0.01, 1);
199-
200-
&.isShown {
201-
transform: translateX(0);
180+
&:before {
181+
content: '';
182+
position: absolute;
183+
top: 0;
184+
bottom: 0;
185+
width: 3px;
186+
right: 0;
187+
background: #333;
202188
}
203189
}
204-
205-
.SiteTitle {
206-
display: none;
207-
}
208190
}
209191
</style>

src/css/main.css

+11-42
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
body {
44
margin: 0;
5-
background: #fafafa;
65
font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
76
}
87

98
* {
109
box-sizing: border-box;
1110
}
1211

12+
a {
13+
color: var(--link-color);
14+
}
15+
1316
.external-link-icon {
1417
color: #aaa;
1518
display: inline-block;
@@ -19,6 +22,13 @@ body {
1922
z-index: 99;
2023
}
2124

25+
.Wrap {
26+
&.is-center {
27+
max-width: 1020px;
28+
margin: 0 auto;
29+
}
30+
}
31+
2232
/** Badge */
2333
.badge {
2434
display: inline-block;
@@ -43,44 +53,3 @@ body {
4353
background: #d82f2f;
4454
}
4555
}
46-
47-
.docute-select {
48-
position: relative;
49-
display: inline-block;
50-
51-
&:after {
52-
position: absolute;
53-
top: 50%;
54-
right: 0.95rem;
55-
display: inline-block;
56-
content: "";
57-
width: 0;
58-
height: 0;
59-
margin-top: -.15rem;
60-
pointer-events: none;
61-
border-top: .35rem solid var(--sidebar-border-color);
62-
border-right: .35rem solid transparent;
63-
border-bottom: .35rem solid transparent;
64-
border-left: .35rem solid transparent;
65-
}
66-
67-
& select {
68-
display: inline-block;
69-
margin: 0;
70-
padding: .3rem 1.95rem .3rem .7rem;
71-
line-height: 1.5;
72-
color: inherit;
73-
background-color: transparent;
74-
border: 1px solid var(--sidebar-border-color);
75-
border-radius: .25rem;
76-
outline: 0;
77-
appearance: none;
78-
}
79-
80-
&.is-block {
81-
width: 100%;
82-
& select {
83-
width: 100%;
84-
}
85-
}
86-
}

src/css/markdown.css

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
}
77

88
& a {
9-
color: var(--accent-color);
109
text-decoration: none;
1110

1211
&:hover {
@@ -25,15 +24,13 @@
2524
}
2625

2726
& h1 {
28-
color: var(--accent-color);
2927
font-size: 3rem;
3028
margin-bottom: 1.4rem;
3129
}
3230

3331
& h2 {
34-
color: var(--accent-color);
3532
font-size: 2rem;
36-
border-bottom: 1px solid #ccc;
33+
border-bottom: 1px solid var(--border-color);
3734
margin-top: 7rem;
3835
padding-bottom: 5px;
3936
}

0 commit comments

Comments
 (0)