diff --git a/www/ghcup.css b/www/ghcup.css index f501769..e8e8d27 100644 --- a/www/ghcup.css +++ b/www/ghcup.css @@ -63,7 +63,7 @@ body#idx > * { margin-left: auto; margin-right: auto; text-align: center; - width: 30em; + width: 31em; } body#idx > #pitch { @@ -88,7 +88,7 @@ body#idx p.other-platforms-help { background-color: rgb(250, 250, 250); margin-left: auto; margin-right: auto; - width: 46rem; + width: 45rem; text-align: center; border-radius: 3px; border: 1px solid rgb(204, 204, 204); @@ -96,7 +96,7 @@ body#idx p.other-platforms-help { } .instructions > * { - width: 43rem; + width: 45rem; margin-left: auto; margin-right: auto; } @@ -106,7 +106,9 @@ hr { margin-bottom: 2em; } -#platform-instructions-unix > pre, +#platform-instructions-linux > pre, +#platform-instructions-mac > pre, +#platform-instructions-freebsd > pre, #platform-instructions-win32 > pre, #platform-instructions-win64 > pre, #platform-instructions-default > div > pre, diff --git a/www/ghcup.js b/www/ghcup.js index 1027742..6085e54 100644 --- a/www/ghcup.js +++ b/www/ghcup.js @@ -1,4 +1,4 @@ -var platforms = ["default", "unknown", "win32", "win64", "unix"]; +var platforms = ["default", "unknown", "win32", "win64", "linux", "freebsd", "mac"]; var platform_override = null; function detect_platform() { @@ -10,41 +10,41 @@ function detect_platform() { var os = "unknown"; - if (navigator.platform == "Linux x86_64") {os = "unix";} - if (navigator.platform == "Linux i686") {os = "unix";} - if (navigator.platform == "Linux i686 on x86_64") {os = "unix";} - if (navigator.platform == "Linux aarch64") {os = "unix";} - if (navigator.platform == "Linux armv6l") {os = "unix";} - if (navigator.platform == "Linux armv7l") {os = "unix";} - if (navigator.platform == "Linux armv8l") {os = "unix";} - if (navigator.platform == "Linux ppc64") {os = "unix";} - if (navigator.platform == "Linux mips") {os = "unix";} - if (navigator.platform == "Linux mips64") {os = "unix";} - if (navigator.platform == "Mac") {os = "unix";} + if (navigator.platform == "Linux x86_64") {os = "linux";} + if (navigator.platform == "Linux i686") {os = "linux";} + if (navigator.platform == "Linux i686 on x86_64") {os = "linux";} + if (navigator.platform == "Linux aarch64") {os = "linux";} + if (navigator.platform == "Linux armv6l") {os = "linux";} + if (navigator.platform == "Linux armv7l") {os = "linux";} + if (navigator.platform == "Linux armv8l") {os = "linux";} + if (navigator.platform == "Linux ppc64") {os = "linux";} + if (navigator.platform == "Linux mips") {os = "linux";} + if (navigator.platform == "Linux mips64") {os = "linux";} + if (navigator.platform == "Mac") {os = "mac";} if (navigator.platform == "Win32") {os = "win32";} if (navigator.platform == "Win64" || navigator.userAgent.indexOf("WOW64") != -1 || navigator.userAgent.indexOf("Win64") != -1) { os = "win64"; } - if (navigator.platform == "FreeBSD x86_64") {os = "unix";} - if (navigator.platform == "FreeBSD amd64") {os = "unix";} - if (navigator.platform == "NetBSD x86_64") {os = "unix";} - if (navigator.platform == "NetBSD amd64") {os = "unix";} + if (navigator.platform == "FreeBSD x86_64") {os = "freebsd";} + if (navigator.platform == "FreeBSD amd64") {os = "freebsd";} + // if (navigator.platform == "NetBSD x86_64") {os = "unix";} + // if (navigator.platform == "NetBSD amd64") {os = "unix";} // I wish I knew by now, but I don't. Try harder. if (os == "unknown") { if (navigator.appVersion.indexOf("Win")!=-1) {os = "win32";} - if (navigator.appVersion.indexOf("Mac")!=-1) {os = "unix";} - if (navigator.appVersion.indexOf("FreeBSD")!=-1) {os = "unix";} + if (navigator.appVersion.indexOf("Mac")!=-1) {os = "mac";} + if (navigator.appVersion.indexOf("FreeBSD")!=-1) {os = "freebsd";} } // Firefox Quantum likes to hide platform and appVersion but oscpu works if (navigator.oscpu) { if (navigator.oscpu.indexOf("Win32")!=-1) {os = "win32";} if (navigator.oscpu.indexOf("Win64")!=-1) {os = "win64";} - if (navigator.oscpu.indexOf("Mac")!=-1) {os = "unix";} - if (navigator.oscpu.indexOf("Linux")!=-1) {os = "unix";} - if (navigator.oscpu.indexOf("FreeBSD")!=-1) {os = "unix";} - if (navigator.oscpu.indexOf("NetBSD")!=-1) {os = "unix";} + if (navigator.oscpu.indexOf("Mac")!=-1) {os = "mac";} + if (navigator.oscpu.indexOf("Linux")!=-1) {os = "linux";} + if (navigator.oscpu.indexOf("FreeBSD")!=-1) {os = "freebsd";} + // if (navigator.oscpu.indexOf("NetBSD")!=-1) {os = "unix";} } return os; diff --git a/www/index.html b/www/index.html index b99b83b..b6439a0 100644 --- a/www/index.html +++ b/www/index.html @@ -24,10 +24,22 @@ the general purpose language Haskell

-