Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a link to all installers to the homepage #1270

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@
<div id="platform-instructions-unix" class="instructions" style="display: none;">
<p>Run the following in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
<p class="other-platforms-help">You appear to be running Unix. Click <a class="default-platform-button" href="#">here</a> to see the installer for all supported platforms.</p>
</div>

<div id="platform-instructions-win" class="instructions" style="display: none;">
<p>
Download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
<a class="windows-download" href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
<p class="other-platforms-help">You appear to be running Windows. Click <a class="default-platform-button" href="#">here</a> to see the installer for all supported platforms.</p>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
Expand Down Expand Up @@ -64,7 +66,7 @@
<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
<a class="windows-download" href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>
Expand All @@ -82,7 +84,7 @@
<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
<a class="windows-download" href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>
Expand Down
12 changes: 9 additions & 3 deletions www/rustup.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ body#idx p {
margin-bottom: 2em;
}

body#idx p.other-platforms-help {
font-size: 16px;
}

.instructions {
background-color: rgb(250, 250, 250);
margin-left: auto;
Expand All @@ -103,7 +107,8 @@ hr {
}

#platform-instructions-unix > pre,
#platform-instructions-default > div > pre {
#platform-instructions-default > div > pre,
#platform-instructions-unknown > div > pre {
background-color: #515151;
color: white;
margin-left: auto;
Expand All @@ -115,8 +120,9 @@ hr {
box-shadow: inset 0px 0px 20px 0px #333333;
}

#platform-instructions-win a,
#platform-instructions-default a {
#platform-instructions-win a.windows-download,
#platform-instructions-default a.windows-download,
#platform-instructions-unknown a.windows-download {
display: block;
padding-top: 0.4rem;
padding-bottom: 0.6rem;
Expand Down
13 changes: 13 additions & 0 deletions www/rustup.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ function set_up_cycle_button() {
};
}

function go_to_default_platform() {
platform_override = "default";
adjust_for_platform();
}

function set_up_default_platform_buttons() {
var defaults_buttons = document.getElementsByClassName('default-platform-button');
for (var i = 0; i < defaults_buttons.length; i++) {
defaults_buttons[i].onclick = go_to_default_platform;
}
}

function fill_in_bug_report_values() {
var nav_plat = document.getElementById("nav-plat");
var nav_app = document.getElementById("nav-app");
Expand All @@ -116,5 +128,6 @@ function fill_in_bug_report_values() {
(function () {
adjust_for_platform();
set_up_cycle_button();
set_up_default_platform_buttons();
fill_in_bug_report_values();
}());