Skip to content

Commit e6d3015

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

File tree

4 files changed

+69
-39
lines changed

4 files changed

+69
-39
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: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
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>
2829
<div id="platform-instructions-unix" class="instructions display-none">
2930
<p>Run the following in your terminal, then follow the onscreen instructions.</p>
3031
<div class="copy-container">
@@ -223,8 +224,9 @@
223224
</div>
224225
</div>
225226

226-
<p>
227-
Need help?<br>Ask on <a href="https://discord.gg/rust-lang">#beginners in the Rust Discord</a><br>
227+
<p id="help">
228+
Need help?<br>
229+
Ask on <a href="https://discord.gg/rust-lang">#beginners in the Rust Discord</a><br>
228230
or in the <a href="https://users.rust-lang.org">Rust Users Forum</a>.
229231
</p>
230232

@@ -239,4 +241,5 @@
239241
<a href="https://rust-lang.github.io/rustup/">about rustup</a>
240242
</p>
241243

244+
</main>
242245
<script src="rustup.js"></script>

www/rustup.css

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,49 +31,69 @@
3131
src: local('Work Sans Medium'), url("fonts/WorkSans-Medium.ttf") format('truetype');
3232
}
3333

34+
@font-face {
35+
font-family: 'Alfa Slab One';
36+
font-style: normal;
37+
font-weight: 400;
38+
src: local('Alfa Slab One'),
39+
url("fonts/AlfaSlabOne-Regular.woff2") format('woff2'),
40+
url("fonts/AlfaSlabOne-Regular.woff") format('woff');
41+
}
42+
3443
body {
35-
margin-top: 2em;
3644
background-color: white;
37-
color: #515151;
38-
font-family: "Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
45+
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3946
font-weight: 300;
4047
font-size: 25px;
48+
margin: 0;
4149
}
4250

4351
pre {
4452
font-family: "Fira Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
4553
font-weight: 400;
4654
}
4755

48-
body#idx #pitch > a {
49-
font-weight: 500;
50-
line-height: 2em;
56+
header > div {
57+
display: flex;
58+
flex-direction: column;
59+
align-items: flex-start;
60+
}
61+
62+
header > div > h1 {
63+
font-family: "Alfa Slab One", serif;
64+
color: black;
65+
font-size: 4rem;
66+
margin-bottom: 0;
67+
margin-top: 1rem;
68+
line-height: 1;
69+
font-weight: 300;
70+
letter-spacing: 1px;
71+
}
72+
73+
header > div > h2 {
74+
color: black;
75+
font-size: 2rem;
76+
font-weight: 300;
5177
}
5278

5379
a {
54-
color: #428bca;
55-
text-decoration: none;
80+
color: #0b7261;
81+
text-decoration: underline;
5682
}
5783

5884
a:hover {
59-
color: rgb(42, 100, 150);
85+
color: #0d8b75;
86+
text-decoration: underline;
6087
}
6188

62-
body#idx > * {
89+
main {
6390
margin-left: auto;
6491
margin-right: auto;
65-
text-align: center;
66-
width: 35em;
92+
width: 80%;
93+
max-width: 1200px;
94+
padding: 0 20px;
6795
}
6896

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

7898
body#idx p {
7999
margin-top: 2em;
@@ -85,7 +105,7 @@ body#idx p.other-platforms-help {
85105
}
86106

87107
.instructions {
88-
background-color: rgb(250, 250, 250);
108+
color: black;
89109
margin-left: auto;
90110
margin-right: auto;
91111
text-align: center;
@@ -95,12 +115,12 @@ body#idx p.other-platforms-help {
95115
}
96116

97117
.instructions > * {
98-
width: 45rem;
99118
margin-left: auto;
100119
margin-right: auto;
101120
}
102121

103122
hr {
123+
border-color: #0b7261;
104124
margin-top: 2em;
105125
margin-bottom: 2em;
106126
}
@@ -111,29 +131,28 @@ hr {
111131
#platform-instructions-win-arm64 > p,
112132
#platform-instructions-default > p,
113133
#platform-instructions-unknown > p {
114-
width: 40rem;
134+
width: 80%;
115135
}
116136

117137
.rustup-command::before {
118-
color: #999;
138+
color: black;
119139
content: " $ ";
120-
margin-left: 15px;
140+
margin-left: 15px;
121141
}
122142

123143
.rustup-command {
124-
background-color: #515151;
125-
color: white;
144+
color: black;
126145
padding: 1rem 1rem 1rem 0;
127-
width: 45rem;
128146
height: auto;
129147
text-align: center;
130148
border-radius: 3px 0 0 3px;
131-
box-shadow: inset 0px 0px 20px 0px #333333;
149+
box-shadow: inset 0px 0px 20px 0px #f1eeee;
132150
overflow: hidden;
133151
font-size: 0.6em;
134152
white-space: nowrap;
135153
height: 26px;
136154
line-height: 26px;
155+
overflow-x: auto;
137156
}
138157

139158
#platform-instructions-unix div.copy-container,
@@ -144,6 +163,8 @@ hr {
144163
#platform-instructions-unknown div.copy-container {
145164
display: flex;
146165
align-items: center;
166+
width: 90%;
167+
justify-content: center;
147168
}
148169

149170
#platform-instructions-unix button.copy-button,
@@ -183,7 +204,7 @@ hr {
183204
transition: opacity 0.2s ease-in-out;
184205
opacity: 0;
185206
font-size: 10px;
186-
color: green;
207+
color: #0b7261;
187208
width: 41px;
188209
height: 15px;
189210
position: relative;
@@ -198,7 +219,7 @@ hr {
198219
display: block;
199220
padding-top: 0.4rem;
200221
padding-bottom: 0.6rem;
201-
font-family: "Work Sans", "Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
222+
font-family: "Work Sans", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
202223
font-weight: 500;
203224
letter-spacing: 0.1rem;
204225
}
@@ -209,9 +230,15 @@ hr {
209230
line-height: 2rem;
210231
}
211232

233+
#help {
234+
text-align: center;
235+
font-size: 20px;
236+
}
237+
212238
#about {
213239
font-size: 16px;
214240
line-height: 2em;
241+
text-align: center;
215242
}
216243

217244
#about > img {

0 commit comments

Comments
 (0)