Skip to content

Commit 7542bf8

Browse files
feat: add UI changes to the site (#380)
* feat: add new ui changes to all pages in docs.jenkins.io site * more changes * fixing dark mode * fix * fix2 * Update ui/src/partials/head-styles.hbs Co-authored-by: Kris Stern <[email protected]> --------- Co-authored-by: Kris Stern <[email protected]>
1 parent 34f0062 commit 7542bf8

File tree

7 files changed

+593
-73
lines changed

7 files changed

+593
-73
lines changed

playbook/package-lock.json

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

ui/src/css/base.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ html {
2020
body {
2121
background: var(--body-background);
2222
color: var(--body-font-color);
23-
font-family: var(--body-font-family), serif;
23+
font-family: var(--body-font-family);
2424
line-height: var(--body-line-height);
2525
margin: 0;
2626
tab-size: 4;
27-
word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
27+
word-wrap: anywhere;
2828
}
2929

3030
a {
31-
text-decoration: none;
31+
text-decoration: underline;
32+
text-decoration-thickness: 1px;
33+
text-underline-offset: 2px;
34+
color: var(--link-font-color);
3235
}
3336

3437
a:hover {
35-
text-decoration: underline;
38+
text-decoration-thickness: 2px;
39+
color: var(--link_hover-font-color);
3640
}
3741

3842
a:active {
@@ -42,7 +46,7 @@ a:active {
4246
code,
4347
kbd,
4448
pre {
45-
font-family: var(--monospace-font-family), serif;
49+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
4650
}
4751

4852
b,
@@ -99,7 +103,7 @@ summary {
99103

100104
table {
101105
border-collapse: collapse;
102-
word-wrap: normal; /* table widths aren't computed as expected when word-wrap is enabled */
106+
word-wrap: normal;
103107
}
104108

105109
object[type="image/svg+xml"]:not([width]) {

ui/src/css/doc.css

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
margin: var(--doc-margin);
77
max-width: var(--doc-max-width);
88
padding: 1rem;
9+
font-family: var(--body-font-family);
910
}
1011

1112
@media screen and (min-width: 1024px) {
@@ -29,11 +30,14 @@
2930
hyphens: none;
3031
line-height: 1.3;
3132
margin: 1rem 0 0;
33+
font-family: var(--body-font-family);
3234
}
3335

3436
.doc > h1.page:first-child {
35-
font-size: calc(36 / var(--rem-base) * 1rem);
36-
margin: 1.5rem 0;
37+
font-family: var(--body-font-family);
38+
font-weight: 800;
39+
font-size: 2rem;
40+
margin: 1.5rem 0 0.5rem;
3741
}
3842

3943
@media screen and (min-width: 769px) {
@@ -63,15 +67,36 @@
6367
}
6468

6569
.doc h2:not(.discrete) {
70+
font-family: var(--body-font-family);
71+
font-weight: 800;
72+
font-size: 1.75rem;
6673
border-bottom: 1px solid var(--section-divider-color);
67-
margin-left: -1rem;
68-
margin-right: -1rem;
74+
margin: 1.5rem -1rem 0.5rem;
6975
padding: 0.4rem 1rem 0.1rem;
7076
}
7177

72-
.doc h3:not(.discrete),
78+
.doc h3:not(.discrete) {
79+
font-size: 1.5rem;
80+
font-weight: 800;
81+
margin: 1.25rem 0 0.5rem;
82+
}
83+
7384
.doc h4:not(.discrete) {
74-
font-weight: var(--alt-heading-font-weight);
85+
font-size: 1.25rem;
86+
font-weight: 800;
87+
margin: 1rem 0 0.5rem;
88+
}
89+
90+
.doc h5:not(.discrete) {
91+
font-size: 1.1rem;
92+
font-weight: 800;
93+
margin: 0.75rem 0 0.5rem;
94+
}
95+
96+
.doc h6:not(.discrete) {
97+
font-size: 1rem;
98+
font-weight: 800;
99+
margin: 0.75rem 0 0.5rem;
75100
}
76101

77102
.doc h1 .anchor,
@@ -108,17 +133,27 @@
108133
visibility: visible;
109134
}
110135

111-
.doc p,
136+
.doc p {
137+
font-size: 1rem;
138+
line-height: 1.65;
139+
margin: 0 0 1.5rem 0;
140+
font-weight: 500;
141+
}
142+
112143
.doc dl {
113144
margin: 0;
114145
}
115146

116147
.doc a {
117148
color: var(--link-font-color);
149+
text-decoration: underline;
150+
text-decoration-thickness: 1px;
151+
text-underline-offset: 2px;
118152
}
119153

120154
.doc a:hover {
121155
color: var(--link_hover-font-color);
156+
text-decoration-thickness: 2px;
122157
}
123158

124159
.doc a.bare {
@@ -137,11 +172,13 @@
137172
.doc p code,
138173
.doc thead code,
139174
.doc .colist > table code {
140-
color: var(--code-font-color);
141-
background: var(--code-background);
175+
color: var(--jenkins-error-red);
176+
background: transparent;
142177
border-radius: 0.25em;
143178
font-size: 0.95em;
144179
padding: 0.125em 0.25em;
180+
font-weight: 600;
181+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
145182
}
146183

147184
.doc code,
@@ -281,7 +318,6 @@
281318
border-top-width: 0;
282319
}
283320

284-
/* NOTE let the grid win in case of frame-none */
285321
.doc table.frame-sides > :last-child > :last-child > * {
286322
border-bottom-width: 0;
287323
}
@@ -332,18 +368,7 @@
332368
}
333369

334370
.doc .admonitionblock {
335-
font-family:
336-
system-ui,
337-
-apple-system,
338-
BlinkMacSystemFont,
339-
"Segoe UI",
340-
Roboto,
341-
Oxygen,
342-
Ubuntu,
343-
Cantarell,
344-
"Open Sans",
345-
"Helvetica Neue",
346-
sans-serif;
371+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
347372
margin: 1.4rem 0 0;
348373
}
349374

@@ -894,7 +919,6 @@
894919
margin-top: 0;
895920
}
896921

897-
/* NEEDS REVIEW prevent pre in table from causing article to exceed bounds */
898922
.doc .tableblock pre,
899923
.doc .listingblock.wrap pre {
900924
white-space: pre-wrap;
@@ -908,9 +932,7 @@
908932
overflow-x: auto;
909933
padding: 0.875em;
910934
background-color: #e7f3ff;
911-
font-family:
912-
Source Code Pro,
913-
monospace;
935+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
914936
box-shadow:
915937
rgba(255, 255, 255, 0.02) 0 1px 3px 0,
916938
rgba(27, 31, 35, 0.15) 0 0 0 1px;
@@ -1095,7 +1117,6 @@
10951117

10961118
.doc b.button {
10971119
white-space: nowrap;
1098-
/* effectively ignores hyphens setting */
10991120
}
11001121

11011122
.doc b.button::before {
@@ -1120,7 +1141,6 @@
11201141
padding: 0.25em 0.5em;
11211142
vertical-align: text-bottom;
11221143
white-space: nowrap;
1123-
/* effectively ignores hyphens setting */
11241144
}
11251145

11261146
.doc kbd,

0 commit comments

Comments
 (0)