Skip to content

Commit a081b6a

Browse files
committed
feat: align website style with www.rust-lang.org/ for consistency
Signed-off-by: Rustin170506 <[email protected]>
1 parent c8eddcb commit a081b6a

File tree

4 files changed

+104
-44
lines changed

4 files changed

+104
-44
lines changed

www/fonts/AlfaSlabOne-Regular.woff

23 KB
Binary file not shown.

www/fonts/AlfaSlabOne-Regular.woff2

17 KB
Binary file not shown.

www/index.html

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@
1919
click or press "n" to cycle platforms
2020
</a>
2121

22-
<p id="pitch">
23-
<em>rustup</em> is an installer for<br/>
24-
the systems programming language
25-
<a href="https://www.rust-lang.org">Rust</a>
26-
</p>
27-
22+
<main>
23+
<header>
24+
<div>
25+
<h1>rustup</h1>
26+
<h2>An installer for the systems programming language <a href="https://www.rust-lang.org">Rust</a></h2>
27+
</div>
28+
</header>
29+
<div id="get-started">
30+
<div>
31+
<h2>Get Started</h2>
32+
<div class="highlight"></div>
33+
</div>
34+
</div>
2835
<div id="platform-instructions-unix" class="instructions display-none">
2936
<p>Run the following in your terminal, then follow the onscreen instructions.</p>
3037
<div class="copy-container">
@@ -223,8 +230,9 @@
223230
</div>
224231
</div>
225232

226-
<p>
227-
Need help?<br>Ask on <a href="https://discord.gg/rust-lang">#beginners in the Rust Discord</a><br>
233+
<p id="help">
234+
Need help?<br>
235+
Ask on <a href="https://discord.gg/rust-lang">#beginners in the Rust Discord</a><br>
228236
or in the <a href="https://users.rust-lang.org">Rust Users Forum</a>.
229237
</p>
230238

@@ -239,4 +247,6 @@
239247
<a href="https://rust-lang.github.io/rustup/">about rustup</a>
240248
</p>
241249

250+
</main>
251+
</body>
242252
<script src="rustup.js"></script>

www/rustup.css

Lines changed: 86 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
font-weight: 300;
55
src: local('Fira Sans Light'), url("fonts/FiraSans-Light.woff") format('woff');
66
}
7+
78
@font-face {
89
font-family: 'Fira Sans';
910
font-style: normal;
1011
font-weight: 400;
1112
src: local('Fira Sans'), url("fonts/FiraSans-Regular.woff") format('woff');
1213
}
14+
1315
@font-face {
1416
font-family: 'Fira Sans';
1517
font-style: normal;
@@ -31,49 +33,79 @@
3133
src: local('Work Sans Medium'), url("fonts/WorkSans-Medium.ttf") format('truetype');
3234
}
3335

36+
@font-face {
37+
font-family: 'Alfa Slab One';
38+
font-style: normal;
39+
font-weight: 400;
40+
src: local('Alfa Slab One'),
41+
url("fonts/AlfaSlabOne-Regular.woff2") format('woff2'),
42+
url("fonts/AlfaSlabOne-Regular.woff") format('woff');
43+
}
44+
3445
body {
35-
margin-top: 2em;
3646
background-color: white;
3747
color: #515151;
38-
font-family: "Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
48+
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3949
font-weight: 300;
4050
font-size: 25px;
51+
margin: 0;
4152
}
4253

4354
pre {
4455
font-family: "Fira Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
4556
font-weight: 400;
4657
}
4758

48-
body#idx #pitch > a {
49-
font-weight: 500;
50-
line-height: 2em;
59+
header>div {
60+
display: flex;
61+
flex-direction: column;
62+
align-items: flex-start;
63+
}
64+
65+
header>div>h1 {
66+
font-family: "Alfa Slab One", serif;
67+
color: #000;
68+
font-size: 4rem;
69+
margin-bottom: 0;
70+
margin-top: 1rem;
71+
line-height: 1;
72+
font-weight: 300;
73+
letter-spacing: 1px;
74+
}
75+
76+
header>div>h2 {
77+
color: #000;
78+
font-size: 2rem;
79+
font-weight: 300;
80+
}
81+
82+
.highlight {
83+
height: 12px;
84+
position: relative;
85+
top: 0;
86+
width: 100%;
87+
max-width: 90vw;
88+
line-height: 1.6;
89+
border-radius: 2px;
90+
background-color: #ffc832;
5191
}
5292

5393
a {
54-
color: #428bca;
55-
text-decoration: none;
94+
color: #0b7261;
95+
text-decoration: underline;
5696
}
5797

5898
a:hover {
59-
color: rgb(42, 100, 150);
99+
color: #0d8b75;
100+
text-decoration: underline;
60101
}
61102

62-
body#idx > * {
103+
main {
63104
margin-left: auto;
64105
margin-right: auto;
65-
text-align: center;
66-
width: 35em;
106+
width: 45em;
67107
}
68108

69-
body#idx > #pitch {
70-
width: 35rem;
71-
}
72-
73-
#pitch em {
74-
font-style: normal;
75-
font-weight: 400;
76-
}
77109

78110
body#idx p {
79111
margin-top: 2em;
@@ -84,8 +116,20 @@ body#idx p.other-platforms-help {
84116
font-size: 0.6em;
85117
}
86118

119+
#get-started {
120+
display: flex;
121+
flex-direction: column;
122+
align-items: start;
123+
margin-bottom: 1rem;
124+
}
125+
126+
#get-started>div>h2 {
127+
margin: 0;
128+
font-size: 1.5rem;
129+
}
130+
87131
.instructions {
88-
background-color: rgb(250, 250, 250);
132+
color: black;
89133
margin-left: auto;
90134
margin-right: auto;
91135
text-align: center;
@@ -94,41 +138,41 @@ body#idx p.other-platforms-help {
94138
box-shadow: 0px 1px 4px 0px rgb(204, 204, 204);
95139
}
96140

97-
.instructions > * {
141+
.instructions>* {
98142
width: 45rem;
99143
margin-left: auto;
100144
margin-right: auto;
101145
}
102146

103147
hr {
148+
border-color: #0b7261;
104149
margin-top: 2em;
105150
margin-bottom: 2em;
106151
}
107152

108-
#platform-instructions-unix > p,
109-
#platform-instructions-win32 > p,
110-
#platform-instructions-win64 > p,
111-
#platform-instructions-win-arm64 > p,
112-
#platform-instructions-default > p,
113-
#platform-instructions-unknown > p {
153+
#platform-instructions-unix>p,
154+
#platform-instructions-win32>p,
155+
#platform-instructions-win64>p,
156+
#platform-instructions-win-arm64>p,
157+
#platform-instructions-default>p,
158+
#platform-instructions-unknown>p {
114159
width: 40rem;
115160
}
116161

117162
.rustup-command::before {
118-
color: #999;
163+
color: black;
119164
content: " $ ";
120-
margin-left: 15px;
165+
margin-left: 15px;
121166
}
122167

123168
.rustup-command {
124-
background-color: #515151;
125-
color: white;
169+
color: black;
126170
padding: 1rem 1rem 1rem 0;
127171
width: 45rem;
128172
height: auto;
129173
text-align: center;
130174
border-radius: 3px 0 0 3px;
131-
box-shadow: inset 0px 0px 20px 0px #333333;
175+
box-shadow: inset 0px 0px 20px 0px #f1eeee;
132176
overflow: hidden;
133177
font-size: 0.6em;
134178
white-space: nowrap;
@@ -183,7 +227,7 @@ hr {
183227
transition: opacity 0.2s ease-in-out;
184228
opacity: 0;
185229
font-size: 10px;
186-
color: green;
230+
color: #0b7261;
187231
width: 41px;
188232
height: 15px;
189233
position: relative;
@@ -198,23 +242,29 @@ hr {
198242
display: block;
199243
padding-top: 0.4rem;
200244
padding-bottom: 0.6rem;
201-
font-family: "Work Sans", "Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
245+
font-family: "Work Sans", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
202246
font-weight: 500;
203247
letter-spacing: 0.1rem;
204248
}
205249

206250
/* This is the box that prints navigator.platform, navigator.appVersion values */
207-
#platform-instructions-unknown > div:first-of-type {
251+
#platform-instructions-unknown>div:first-of-type {
208252
font-size: 16px;
209253
line-height: 2rem;
210254
}
211255

256+
#help {
257+
text-align: center;
258+
font-size: 20px;
259+
}
260+
212261
#about {
213262
font-size: 16px;
214263
line-height: 2em;
264+
text-align: center;
215265
}
216266

217-
#about > img {
267+
#about>img {
218268
width: 30px;
219269
height: 30px;
220270
transform: translateY(11px);

0 commit comments

Comments
 (0)