Skip to content

Commit d9b45ec

Browse files
authored
Merge pull request #1 from CL-Jeremy/issue-4173-patch
With changes from @CL-Jeremy
2 parents 489eed6 + 47f323b commit d9b45ec

20 files changed

+80
-35
lines changed

public/css/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/less/_base.less

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,67 @@
1-
@default-fonts: "Segoe UI", "Microsoft YaHei", Arial, Helvetica, sans-serif;
1+
2+
@font-face {
3+
font-family: 'Lato';
4+
src: url('../vendor/assets/lato-fonts/lato-regular.eot');
5+
src: url('../vendor/assets/lato-fonts/lato-regular.eot?#iefix') format('embedded-opentype'), url('../vendor/assets/lato-fonts/lato-regular.woff2') format('woff2'), url('../vendor/assets/lato-fonts/lato-regular.woff') format('woff'), url('../vendor/assets/lato-fonts/lato-regular.ttf') format('truetype');
6+
font-weight: 400;
7+
font-style: normal;
8+
}
9+
10+
@font-face {
11+
font-family: 'Lato';
12+
src: url('../vendor/assets/lato-fonts/lato-italic.eot');
13+
src: url('../vendor/assets/lato-fonts/lato-italic.eot?#iefix') format('embedded-opentype'), url('../vendor/assets/lato-fonts/lato-italic.woff2') format('woff2'), url('../vendor/assets/lato-fonts/lato-italic.woff') format('woff'), url('../vendor/assets/lato-fonts/lato-italic.ttf') format('truetype');
14+
font-weight: 400;
15+
font-style: italic;
16+
}
17+
18+
@font-face {
19+
font-family: 'Lato';
20+
src: url('../vendor/assets/lato-fonts/lato-bold.eot');
21+
src: url('../vendor/assets/lato-fonts/lato-bold.eot?#iefix') format('embedded-opentype'), url('../vendor/assets/lato-fonts/lato-bold.woff2') format('woff2'), url('../vendor/assets/lato-fonts/lato-bold.woff') format('woff'), url('../vendor/assets/lato-fonts/lato-bold.ttf') format('truetype');
22+
font-weight: 700;
23+
font-style: normal;
24+
}
25+
26+
@font-face {
27+
font-family: 'Lato';
28+
src: url('../vendor/assets/lato-fonts/lato-bolditalic.eot');
29+
src: url('../vendor/assets/lato-fonts/lato-bolditalic.eot?#iefix') format('embedded-opentype'), url('../vendor/assets/lato-fonts/lato-bolditalic.woff2') format('woff2'), url('../vendor/assets/lato-fonts/lato-bolditalic.woff') format('woff'), url('../vendor/assets/lato-fonts/lato-bolditalic.ttf') format('truetype');
30+
font-weight: 700;
31+
font-style: italic;
32+
}
33+
34+
@font-face {
35+
font-family: 'Yu Gothic';
36+
src: local('Yu Gothic Medium');
37+
font-weight: 400;
38+
}
39+
40+
@font-face {
41+
font-family: 'Yu Gothic';
42+
src: local('Yu Gothic Bold');
43+
font-weight: 700;
44+
}
45+
46+
@default-fonts: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, Helvetica, Arial;
47+
@monospaced-fonts: 'SF Mono', Consolas, Menlo, 'Liberation Mono', Monaco, 'Lucida Console';
248

349
.override-fonts(@fonts) {
4-
body {
5-
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, @fonts;
50+
textarea {
51+
font-family: @fonts, sans-serif;
652
}
753

854
.markdown:not(code) {
9-
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, @fonts;
55+
font-family: @fonts, sans-serif;
1056
}
1157

1258
/* We're going to just override the semantic fonts here */
1359
h1, h2, h3, h4, h5 {
14-
font-family: "Lato", @fonts;
60+
font-family: Lato, @fonts, sans-serif;
1561
}
1662

1763
.home .hero h1, .home .hero h2 {
18-
font-family: 'PT Sans Narrow', "Lato", @fonts;
64+
font-family: 'PT Sans Narrow', Lato, @fonts, sans-serif;
1965
}
2066

2167
.ui.accordion .title:not(.ui),
@@ -40,44 +86,46 @@
4086
.ui.statistics .statistic > .label,
4187
.ui.statistic > .label,
4288
.ui.steps .step .title,
43-
.ui.text.container
89+
.ui.text.container,
90+
.ui.language > .menu > .item&
4491
{
45-
font-family: "Lato", @fonts;
92+
font-family: Lato, @fonts, sans-serif;
4693
}
4794
}
4895

96+
.override-fonts(@default-fonts);
97+
4998
body {
50-
.override-fonts(@default-fonts);
5199
background-color: #fff;
52100
overflow-y: auto;
53101
-webkit-font-smoothing: antialiased;
54102
display: flex;
55103
flex-direction: column;
56104
}
57105

58-
@ja-fonts: "Segoe UI", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", Roboto, Noto, "Noto Sans CJK JP", Arial, Helvetica, sans-serif;
106+
@ja-fonts: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Source Han Sans JP', 'Noto Sans CJK JP', 'Droid Sans Japanese', 'Meiryo', 'MS PGothic';
59107
:lang(ja) {
60-
.override-fonts(@ja-fonts);
108+
.override-fonts(@default-fonts, @ja-fonts;);
61109
}
62110

63-
@zh-CN-fonts: "Segoe UI", "Microsoft YaHei New", "Microsoft Yahei", "微软雅黑", "方体", "PingFang SC", "黑体", "Heiti SC", STXihei, "华文细黑", Roboto, Noto, "Noto Sans CJK SC", Arial, Helvetica, sans-serif;
111+
@zh-CN-fonts: 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans CN', 'Source Han Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Heiti SC', SimHei;
64112
:lang(zh-CN) {
65-
.override-fonts(@zh-CN-fonts);
113+
.override-fonts(@default-fonts, @zh-CN-fonts;);
66114
}
67115

68-
@zh-TW-fonts: "Segoe UI", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei New", "Microsoft JhengHei", "微軟正黑體", "宋体", MingLiu, Roboto, Noto, "Noto Sans CJK TC", Arial, Helvetica, sans-serif;
116+
@zh-TW-fonts: 'PingFang TC', 'Hiragino Sans TC', 'Source Han Sans TW', 'Source Han Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', 'Heiti TC', PMingLiU;
69117
:lang(zh-TW) {
70-
.override-fonts(@zh-TW-fonts);
118+
.override-fonts(@default-fonts, @zh-TW-fonts;);
71119
}
72120

73-
@zh-HK-fonts: "Segoe UI", "方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei New", "Microsoft JhengHei", "微軟正黑體", "宋体", MingLiu, Roboto, Noto, "Noto Sans CJK TC", Arial, Helvetica, sans-serif;
121+
@zh-HK-fonts: 'PingFang HK', 'Hiragino Sans TC', 'Source Han Sans HK', 'Source Han Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', 'Heiti TC', PMingLiU_HKSCS, PMingLiU;
74122
:lang(zh-HK) {
75-
.override-fonts(@zh-HK-fonts);
123+
.override-fonts(@default-fonts, @zh-HK-fonts;);
76124
}
77125

78-
@ko-fonts: "Segoe UI", 'Apple SD Gothic Neo', 'NanumBarunGothic', '맑은 고딕', 'Malgun Gothic', '굴림', 'Gulim', '돋움', 'Dotum', "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Roboto, Noto, "Noto Sans CJK KR", 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
126+
@ko-fonts: 'Apple SD Gothic Neo', 'NanumBarunGothic', 'Malgun Gothic', 'Gulim', 'Dotum', 'Nanum Gothic', 'Source Han Sans KR', 'Noto Sans CJK KR';
79127
:lang(ko) {
80-
.override-fonts(@ko-fonts);
128+
.override-fonts(@default-fonts, @ko-fonts;);
81129
}
82130

83131
img {
@@ -93,7 +141,7 @@ a {
93141
border-radius: .28571429rem !important;
94142
}
95143
pre, code {
96-
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
144+
font: 12px @monospaced-fonts, monospace;
97145
&.raw {
98146
padding: 7px 12px;
99147
margin: 10px 0;
@@ -411,7 +459,7 @@ pre, code {
411459
}
412460

413461
.sha.label {
414-
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace, inherit;
462+
font-family: @monospaced-fonts, monospace;
415463
font-size: 13px;
416464
padding: 6px 10px 4px 10px;
417465
font-weight: normal;
@@ -465,7 +513,7 @@ pre, code {
465513
}
466514

467515
.file-comment {
468-
font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace;
516+
font: 12px @monospaced-fonts, monospace;
469517
color: rgba(0,0,0,.87);
470518

471519
}

public/less/_dashboard.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
}
100100
}
101101
.commit-id {
102-
font-family: Consolas, monospace, inherit;
102+
font-family: @monospaced-fonts, monospace;
103103
}
104104
code {
105105
padding: 1px;

public/less/_editor.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.CodeMirror {
2-
font: 14px Consolas, "Liberation Mono", Menlo, Courier, monospace;
2+
font: 14px @monospaced-fonts, monospace;
33
&.cm-s-default {
44
border-radius: 3px;
55
padding: 0 !important;

public/less/_form.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192

193193
.githook {
194194
textarea {
195-
font-family: monospace, inherit;
195+
font-family: @monospaced-fonts, monospace;
196196
}
197197
}
198198

public/less/_home.less

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
max-width: 220px;
44
}
55
.hero {
6-
h1, h2 {
7-
font-family: 'PT Sans Narrow', sans-serif, 'Microsoft YaHei';
8-
}
96
@media only screen and (max-width: 767px) {
107
h1 {
118
font-size: 3.5em;

public/less/_repository.less

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
.code-view {
331331
* {
332332
font-size: 12px;
333-
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace, inherit;
333+
font-family: @monospaced-fonts, monospace;
334334
line-height: 20px;
335335
}
336336

@@ -430,7 +430,7 @@
430430
.branch-name {
431431
display: inline-block;
432432
padding: 3px 6px;
433-
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
433+
font: 12px @monospaced-fonts, monospace;
434434
color: rgba(0,0,0,0.65);
435435
background-color: rgba(209,227,237,0.45);
436436
border-radius: 3px;
@@ -699,7 +699,7 @@
699699
}
700700
textarea {
701701
height: 200px;
702-
font-family: "Consolas", monospace, inherit;
702+
font-family: @monospaced-fonts, monospace;
703703
}
704704
}
705705

@@ -802,7 +802,7 @@
802802
}
803803
textarea {
804804
height: 200px;
805-
font-family: "Consolas", monospace, inherit;
805+
font-family: @monospaced-fonts, monospace;
806806
}
807807
}
808808
}
@@ -1346,7 +1346,7 @@
13461346
&.new {
13471347
.CodeMirror {
13481348
.CodeMirror-code {
1349-
font-family: "Consolas", monospace, inherit;
1349+
font-family: @monospaced-fonts, monospace;
13501350
.cm-comment {
13511351
background: inherit;
13521352
}

public/less/_review.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@
109109
}
110110

111111
.file-comment {
112-
font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace;
112+
font: 12px @monospaced-fonts, monospace;
113113
color: rgba(0,0,0,.87);
114114
}
250 KB
Binary file not shown.
302 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)