-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.styl
367 lines (282 loc) · 13.3 KB
/
variables.styl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
//
// Variables
// ==================================================
// Colors
// colors for use across theme.
// --------------------------------------------------
$whitesmoke = #000000;
$gainsboro = #eee;
$gray-lighter = #000000; // 标题描述的颜色
$grey-light = #ccc;
$grey = #bbb;
$grey-dark = #0366d6; // 发表于的颜色
$grey-dim = #000000; // > 的颜色
$black-light = #000000; // 文章标题颜色
$black-dim = #333;
$black-deep = #FFFFFF; // header 背景颜色
$red = #ff2a2a;
$blue-bright = #fe9334;
$blue = #468f83;
$blue-deep = #262a30;
$orange = #000000;
// Scaffolding
// Settings for some of the most global styles.
// --------------------------------------------------
// Global text color on <body>
$text-color = #000000;
// Global link color.
$link-color = #0366d6;
$link-hover-color = #0350d6;
$link-decoration-color = #000000;
$link-decoration-hover-color = #ff0000;
// Global border color.
$border-color = $grey-light;
// Background color for <body>
$body-bg-color = #FFFFFF;
// Selection 选中后的背景
$selection-bg = #c5c5c5;
$selection-color = #f5f5f5;
// Typography
// Font, line-height, and elements colors.
// --------------------------------------------------
get_font_family(config) {
$custom-family = hexo-config('font.' + config + '.family');
return $custom-family is a 'string' ? $custom-family : null;
}
// Font families.
$font-family-chinese = 'Palatino Linotype', 'Book Antiqua', 'source-han-serif-sc', 'Source Han Serif TC', 'Source Han Serif TW', 'Source Han Serif', 'Songti SC', '仿宋', 'FangSong', 'NSimSun', 'Microsoft YaHei', serif;
$font-family-base = "Palatino Linotype", "Source Han Sans SC", "Noto Sans CJK SC", source-han-sans-cjk-sc, sans-serif;
$font-family-base = get_font_family('global'), $font-family-chinese, sans-serif if get_font_family('global');
$font-family-logo = $font-family-base;
$font-family-logo = get_font_family('title'), $font-family-base if get_font_family('title');
$font-family-headings = 'Palatino Linotype', 'Source Han Serif CN';
$font-family-headings = get_font_family('headings'), $font-family-base if get_font_family('headings');
$font-family-posts = $font-family-base;
$font-family-posts = get_font_family('posts'), $font-family-base if get_font_family('posts');
$font-family-monospace = monospace
$font-family-monospace = 'IBM Plex Mono', Monaco, Consolas, get_font_family('codes'), $font-family-chinese, monospace if get_font_family('codes')
$font-family-icons = 'FontAwesome';
// Font Weight
$font-weight-lighter = 600;
$font-weight-light = 600;
$font-weight-normal = 600;
$font-weight-bold = 600;
$font-weight-bolder = 700;
// Font size
$font-size-base = 17px;
$font-size-smallest = 0.9em; // 发表于的字体大小
$font-size-smaller = 0.95em; // 侧边栏的字体大小(目录 关于等)
$font-size-small = .875em;
$font-size-medium = 0.9em;
$font-size-large = 0.98em; // 发布文章标题的大小
$font-size-larger = 1.25em;
$font-size-largest = 1.3em;
// Headings font size
$font-size-headings-step = .05em;
$font-size-headings-base = (hexo-config('font.enable') and hexo-config('font.headings.size') is a 'unit') ? unit(hexo-config('font.headings.size'), em) : 1.625em;
// Global line height
$line-height-base = 1.65; // 修改文章的行间距[1, 2]这个区间内合适
$line-height-code-block = 1.3; // Can't be less than 1.3;
// Z-index master list
// --------------------------------------------------
$zindex-0 = 1000
$zindex-1 = 1100;
$zindex-2 = 1200;
$zindex-3 = 1300;
$zindex-4 = 1400;
$zindex-5 = 1500;
// Table
// --------------------------------------------------
$table-width = 100%;
$table-border-color = $gray-lighter;
$table-font-size = $font-size-small;
$table-content-alignment = left;
$table-content-vertical = middle;
$table-th-font-weight = 700;
$table-cell-padding = 8px;
$table-cell-border-right-color = $gainsboro;
$table-cell-border-bottom-color = $gray-lighter;
$table-row-odd-bg-color = #f9f9f9;
$table-row-hover-bg-color = #f9f9f9;
// Code & Code Blocks
// --------------------------------------------------
$code-font-family = $font-family-monospace;
$code-border-radius = 3px;
$code-foreground = #0366d6;
$code-background = #eaf5ff;
// Buttons
// --------------------------------------------------
$btn-font-weight = normal;
$btn-default-radius = 0;
$btn-default-bg = $black-deep;
$btn-default-color = white;
$btn-default-font-size = $font-size-small;
$btn-default-border-width = 2px;
$btn-default-border-color = $black-deep;
$btn-default-hover-bg = white;
$btn-default-hover-color = $black-deep;
$btn-default-hover-border-color = $black-deep;
// Pagination
// --------------------------------------------------
$pagination-border = $gainsboro;
$pagination-link-bg = transparent;
$pagination-link-color = $link-color;
$pagination-link-border = $gainsboro;
$pagination-link-hover-bg = transparent;
$pagination-link-hover-color = $link-color;
$pagination-link-hover-border = $black-deep;
$pagination-active-bg = $grey-light;
$pagination-active-color = white;
$pagination-active-border = $grey-light;
// Layout sizes
// --------------------------------------------------
$content-desktop = 700px;
$content-desktop-large = 1100px;
$content-desktop-largest = 900px;
$content-desktop-padding = 40px;
$content-tablet-padding = 10px;
$content-mobile-padding = 8px;
// Headband
// --------------------------------------------------
$headband-height = 1px;
$headband-bg = $black-deep;
// Section Header
// Variables for header section elements.
// --------------------------------------------------
$head-bg = transparent;
// Site Meta
$site-meta-text-align = center;
$brand-color = #0366d6;
$brand-hover-color = #0366d6;
$brand-bg = $black-deep;
$font-size-title = $font-size-largest;
$font-size-subtitle = $font-size-smaller;
$subtitle-color = #0366d6; // 明月更几时的颜色
$site-subtitle-color = #0366d6; //爱生活-------爱读书-------爱摄影 的颜色
// Posts Collpase
// --------------------------------------------------
$posts-collapse-margin = 55px;
$posts-collapse-margin-mobile = 20px;
// Sidebar
// Variables for sidebar section elements.
// --------------------------------------------------
$sidebar-offset = hexo-config('sidebar.offset') is a 'unit' ? unit(hexo-config('sidebar.offset'), px) : 12px;
$sidebar-nav-color = $black-light;
$sidebar-nav-hover-color = $whitesmoke;
$sidebar-highlight = $blue-bright;
$site-author-image-padding = 1px;
$site-author-image-width = 200px;
$site-author-image-height = auto;
$site-author-image-border-width = 0px;
$site-author-image-border-color = $black-dim;
$site-author-name-margin = 5px 0 0;
$site-author-name-color = $whitesmoke;
$site-author-name-align = center;
$site-author-name-weight = normal;
$site-description-font-size = $font-size-medium;
$site-description-color = #000000;
$site-description-margin-top = 5px;
$site-description-align = center;
$site-state-align = center;
$site-state-item-count-font-size = $font-size-larger;
$site-state-item-count-color = inherit;
$site-state-item-name-font-size = $font-size-small;
$site-state-item-name-color = inherit;
$site-state-item-border-color = $black-dim;
$toc-link-color = $grey-dark;
$toc-link-border-color = $black-light;
$toc-link-hover-color = $grey-light;
$toc-link-hover-border-color = $grey-light;
$toc-link-active-color = $sidebar-highlight;
$toc-link-active-border-color = $sidebar-highlight;
$toc-link-active-current-color = $sidebar-highlight;
$toc-link-active-current-border-color = $sidebar-highlight;
// Components
// --------------------------------------------------
// Back to top
$b2t-opacity = 2;
$b2t-opacity-hover = .8;
$b2t-position-bottom = -100px;
$b2t-position-bottom-on = 19px;
$b2t-position-right = 30px;
$b2t-position-right-mobile = 20px;
$b2t-font-size = 20px;
$b2t-color = #000000;
$b2t-bg-color = $black-deep;
$b2t-sidebar-bg-color = #000000;
// .post-expand .post-eof
// In Muse scheme, margin above and below the post separator
$post-eof-margin-top = 80px; // or 160px for more white space;
$post-eof-margin-bottom = 60px; // or 120px for less white space;
// Iconography
// Icons SVG Base64
// --------------------------------------------------
// blockquote-center icon
$center-quote-left = '../images/quote-l.svg';
$center-quote-right = '../images/quote-r.svg';
// Note colors
// --------------------------------------------------
// Read note light_bg_offset from NexT config and set in "$lbg%" to use it as string variable.
$lbg = hexo-config('note.light_bg_offset') is a 'unit' ? unit(hexo-config('note.light_bg_offset'), "%") : 0;
// Default
$note-default-border = #777;
$note-default-bg = lighten(spin($note-default-border, 0), 94% + $lbg);
$note-default-text = $note-default-border;
$note-default-icon = "\f0a9";
$note-modern-default-border = #e1e1e1;
$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + ($lbg * 4));
$note-modern-default-text = $grey-dim;
$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%);
// Primary
$note-primary-border = #6f42c1;
$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + $lbg);
$note-primary-text = $note-primary-border;
$note-primary-icon = "\f055";
$note-modern-primary-border = #e1c2ff;
$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + ($lbg * 4));
$note-modern-primary-text = #6f42c1;
$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%);
// Info
$note-info-border = #428bca;
$note-info-bg = lighten(spin($note-info-border, -10), 91% + $lbg);
$note-info-text = $note-info-border;
$note-info-icon = "\f05a";
$note-modern-info-border = #b3e5ef;
$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + ($lbg * 4));
$note-modern-info-text = #31708f;
$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%);
// Success
$note-success-border = #5cb85c;
$note-success-bg = lighten(spin($note-success-border, 10), 90% + $lbg);
$note-success-text = $note-success-border;
$note-success-icon = "\f058";
$note-modern-success-border = #d0e6be;
$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + ($lbg * 4));
$note-modern-success-text = #3c763d;
$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%);
// Warning
$note-warning-border = #f0ad4e;
$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + $lbg);
$note-warning-text = $note-warning-border;
$note-warning-icon = "\f06a";
$note-modern-warning-border = #fae4cd;
$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + ($lbg * 4));
$note-modern-warning-text = #8a6d3b;
$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%);
// Danger
$note-danger-border = #d9534f;
$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + $lbg);
$note-danger-text = $note-danger-border;
$note-danger-icon = "\f056";
$note-modern-danger-border = #ebcdd2;
$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + ($lbg * 4));
$note-modern-danger-text = #a94442;
$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%);
// Label colors
// --------------------------------------------------
$label-default = lighten(spin($note-default-border, 0), 89% + $lbg);
$label-primary = lighten(spin($note-primary-border, 10), 87% + $lbg);
$label-info = lighten(spin($note-info-border, -10), 86% + $lbg);
$label-success = lighten(spin($note-success-border, 10), 85% + $lbg);
$label-warning = lighten(spin($note-warning-border, 10), 83% + $lbg);
$label-danger = lighten(spin($note-danger-border, -10), 87% + $lbg);