Reworks download page.

This commit is contained in:
Marie Kiryanova 2023-01-31 17:07:30 -05:00
parent 4e8c2c1860
commit cb8e343f1a
3 changed files with 98 additions and 80 deletions

View file

@ -135,12 +135,35 @@ pre > code {
box-shadow: 0 1px 1px rgba(0,0,0,0.125); box-shadow: 0 1px 1px rgba(0,0,0,0.125);
} }
// Workaround for browsers without JavaScript for the downloads page #download-header {
#install-view, #manual-package-view { display: flex;
flex-direction: column;
text-align: center;
}
#download-buttons > a {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
@media screen and (min-width: 768px) {
#download-header {
flex-direction: row;
text-align: left;
}
#download-buttons > a {
margin-top: 0;
margin-bottom: 0;
}
}
#unsupported-platform-view {
display: none; display: none;
} }
.dl-button, #platform-unsupported { // Workaround for browsers without JavaScript for the downloads page
#install-view, #manual-package-view {
display: none; display: none;
} }

View file

@ -4,9 +4,9 @@ layout: "downloads"
FullWidth: true FullWidth: true
--- ---
<div class="columns is-desktop">
<div class="column">
## Windows <h2>Windows</h2>
<article class="message has-text-weight-semibold"> <article class="message has-text-weight-semibold">
<div class="message-body"> <div class="message-body">
@ -16,17 +16,20 @@ FullWidth: true
</div> </div>
</article> </article>
#### Windows Installer <h4>Windows Installer</h4>
The installer will allow you to download your preferred release channel. The installer will allow you to download your preferred release channel.
If you are a Patreon subscriber, the "Early Access" channel will be available to you, and will provide early access to exciting experimental changes on top of what is available in the main channel. Please follow our [Early Access guide](https://yuzu-emu.org/help/early-access/) for assistance linking your Patreon account. If you are a Patreon subscriber, the "Early Access" channel will be available to you, and will provide early access to exciting experimental changes on top of what is available in the main channel. Please follow our [Early Access guide](https://yuzu-emu.org/help/early-access/) for assistance linking your Patreon account.
Intel and AMD users are strongly recommended to switch to Vulkan by going to `Emulation > Configure > Graphics > API`. Latest GPU drivers are recommended. Intel and AMD users are strongly recommended to switch to Vulkan by going to `Emulation > Configure > Graphics > API`. Latest GPU drivers are recommended.
</div>
## Linux
<link href="//cdn.jsdelivr.net/npm/font-logos@0.18/assets/font-logos.css" rel="stylesheet">
<div class="column">
<h2>Linux</h2>
<article class="message has-text-weight-semibold"> <article class="message has-text-weight-semibold">
<div class="message-body"> <div class="message-body">
<p style="color:cyan;margin-bottom: 0px;">We have yuzu as an AppImage and Flatpak now! This relaxes dependency requirements for yuzu, as well as enabling it to run on a lot of older distributions.</p> <p style="color:cyan;margin-bottom: 0px;">We have yuzu as an AppImage and Flatpak now! This relaxes dependency requirements for yuzu, as well as enabling it to run on a lot of older distributions.</p>
@ -42,3 +45,5 @@ chmod a+x yuzu-*.AppImage
``` ```
Or with the GUI, right click the AppImage, click Properties, then Permissions, then click "Allow this file to run as a program". After that, double-click the AppImage to run it. Or with the GUI, right click the AppImage, click Properties, then Permissions, then click "Allow this file to run as a program". After that, double-click the AppImage to run it.
</div>
</div>

View file

@ -1,54 +1,60 @@
{{ define "header" }} {{ define "header" }}
<link href="//cdn.jsdelivr.net/npm/font-logos@0.18/assets/font-logos.css" rel="stylesheet">
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<div class="mb-6" id="download-header">
<div class="is-flex-grow-1">
<h1 class="title">{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
</div>
<div id="download-buttons">
<a href="https://github.com/yuzu-emu/liftinstall/releases/download/1.9/yuzu_install.exe" class="button dl-button is-medium is-success" id="dl-button-windows">
<span class="icon mr-1"><i class="fab fa-windows"></i></span> Download for Windows x64
</a>
<a href="https://github.com/yuzu-emu/liftinstall/releases/download/1.9/liftinstall-31b3e7e.tar.xz" class="button dl-button is-medium is-success" id="dl-button-linux">
<span class="icon mr-1"><i class="fab fa-linux"></i></span> Download for Linux x64
</a>
</div>
</div>
<div class="content"> <div class="content">
{{ .Content }} {{ .Content }}
</div> </div>
</div>
</section> </section>
<section class="section"> <section class="section pt-0">
<div class="container"> <div class="container">
<div id="no-js-view"> <div id="no-js-view">
Hi! We see that you have JavaScript disabled. We can't show you an <article class="message is-warn">
updated listing of the available packages for yuzu, nor alternative <div class="message-body has-text-white mb-6">
installation methods, but here are a few links to get you started: <br /> Hi! We see that you have JavaScript disabled. You can still use the
<a href="https://github.com/yuzu-emu/liftinstall/releases/download/1.9/yuzu_install.exe">Windows x64 Installer</a><br /> above download links but we can't show you an updated listing of the available
packages for yuzu, nor alternative installation methods, but we recommend
viewing the
<a href="https://github.com/yuzu-emu/yuzu-mainline/releases">Mainline releases on GitHub</a> <a href="https://github.com/yuzu-emu/yuzu-mainline/releases">Mainline releases on GitHub</a>
</div> </div>
<div id="install-view"> </article>
</div>
<div id="unsupported-platform-view">
<article class="message is-danger" id="platform-unsupported"> <article class="message is-danger" id="platform-unsupported">
<div class="message-body has-text-white"> <div class="message-body has-text-white mb-6">
yuzu doesn't support your platform. If you are running Windows x64 or Linux x64 however, Yuzu doesn't support your platform. If you are running Windows x64 or Linux x64 however,
choose one of the options below. choose one of the options below.
</div> </div>
</article> </article>
<div class="buttons is-centered">
<a href="https://github.com/yuzu-emu/liftinstall/releases/download/1.9/yuzu_install.exe" class="button dl-button is-medium is-success" id="dl-button-windows">Download for Windows x64</a>
<a href="https://github.com/yuzu-emu/liftinstall/releases/download/1.9/liftinstall-31b3e7e.tar.xz" class="button dl-button is-medium is-success" id="dl-button-linux">Download for Linux x64</a>
</div> </div>
<div class="buttons is-centered">
<!-- Show this when Flatpak/other primary installation methods are provided for Linux/Mac.
<a class="button">
Other platforms
</a>
-->
<a class="button" id="view-package-listing-button">
Manual Download
</a>
</div>
</div>
<div class="columns" id="manual-package-view"> <div class="columns" id="manual-package-view">
<!-- Mainline --> <!-- Mainline -->
<div class="column"> <div class="column content">
<h3>Builds <h2>Builds
<span style='font-size: smaller; margin-left: 6px;'> <span class="tag is-info">
Last release was Last release was &nbsp;
<span id='last-updated-mainline'></span> <span id='last-updated-mainline'></span>
</span> </span>
</h3> </h2>
<div id="downloads-mainline"> <div id="downloads-mainline">
</div> </div>
@ -76,6 +82,10 @@
{{ define "scripts" }} {{ define "scripts" }}
<script type="text/javascript"> <script type="text/javascript">
// Show JS relevant elements
document.getElementById("no-js-view").style.display = "none";
document.getElementById("manual-package-view").style.display = "block";
function fetchReleases() { function fetchReleases() {
getRelease('mainline'); getRelease('mainline');
} }
@ -84,10 +94,9 @@
// Attempt autodetection of their operating system // Attempt autodetection of their operating system
var userAgent = navigator.userAgent.toLowerCase(); var userAgent = navigator.userAgent.toLowerCase();
var allPlatforms = ["windows", "mac", "linux"];
var os = "Other"; var os = "Other";
const unsupportedPlatforms = ["Other", "Mac"]
if (userAgent.indexOf("windows") !== -1) { if (userAgent.indexOf("windows") !== -1) {
os = "Windows"; os = "Windows";
} else if (userAgent.indexOf("mac") !== -1 && userAgent.indexOf("mobile") === -1 && userAgent.indexOf("phone") === -1) { } else if (userAgent.indexOf("mac") !== -1 && userAgent.indexOf("mobile") === -1 && userAgent.indexOf("phone") === -1) {
@ -96,36 +105,17 @@
os = "Linux"; os = "Linux";
} }
// Configure the views for this platform switch (os) {
document.getElementById("no-js-view").style.display = "none"; case "Windows":
var platformButton = document.getElementById("dl-button-" + os.toLowerCase());
if (platformButton !== null) {
platformButton.style.display = "block";
} else {
document.getElementById("platform-unsupported").style.display = "block";
}
// Installer is not available on all platforms
if (os === "Mac") {
document.getElementById("install-view").style.display = "none";
document.getElementById("manual-package-view").style.display = "flex";
} else {
document.getElementById("install-view").style.display = "block";
document.getElementById("manual-package-view").style.display = "none";
}
if (os === "Linux") {
document.getElementById("dl-button-linux").style.display = "block";
document.getElementById("dl-button-windows").style.display = "none";
} else if (os === "Windows") {
document.getElementById("dl-button-windows").style.display = "block";
document.getElementById("dl-button-linux").style.display = "none"; document.getElementById("dl-button-linux").style.display = "none";
break;
case "Linux":
document.getElementById("dl-button-windows").style.display = "none";
break;
default:
document.getElementById("unsupported-platform-view").style.display = "block";
break
} }
document.getElementById("view-package-listing-button").addEventListener("click", function() {
this.style.display = "none";
document.getElementById("manual-package-view").style.display = "flex";
});
</script> </script>
{{ end }} {{ end }}