Skip to content

Commit

Permalink
Deploying to gh-pages from @ 8730300 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal committed Feb 6, 2024
1 parent 19faa38 commit f93036d
Show file tree
Hide file tree
Showing 36 changed files with 128 additions and 38 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _licenses.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/just-the-docs-dark.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/just-the-docs-default.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/just-the-docs-light.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/search-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
},"24": {
"doc": "Installation",
"title": "Installation",
"content": "# Installation ## Current release packages (2.3.0) | Platform | Files | -------- | ----- | Windows Installer | [F3D-2.3.0-Windows.exe](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Windows-x86_64-raytracing.exe) | Windows (Portable) | [F3D-2.3.0-Windows.zip](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Windows-x86_64-raytracing.zip) | MacOS (Intel) | [F3D-2.3.0-macOS-x86_64.dmg](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-macOS-x86_64-raytracing.dmg) | MacOS (Silicon) | [F3D-2.3.0-macOS-arm64.dmg](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-macOS-arm64.dmg) | Debian-based Package | [F3D-2.3.0-Linux.deb](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Linux-x86_64-raytracing.deb) | Linux (Portable) | [F3D-2.3.0-Linux.tar.xz](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Linux-x86_64-raytracing.tar.xz) | Note: MacOS package is not signed, see the [troubleshooting](/doc/user/LIMITATIONS_AND_TROUBLESHOOTING.html) section for a workaround if needed. ## Alternatives You can find other (headless, older, smaller, checksum, RCs) release related packages and files on the [releases page](https://github.com/f3d-app/f3d/releases). You can also find there the [nightly release](https://github.com/f3d-app/f3d/releases/tag/nightly) to test the development version of F3D. See the [desktop integration](/doc/user/DESKTOP_INTEGRATION.html) section in order actually integrate the binary release in your desktop. Alternatively, you can build F3D yourself by following the [build](/doc/dev/BUILD.html) guide. You can also find packages for the following repositories: ### Windows - [Scoop](https://scoop.sh/#/apps?q=f3d&s=0&d=1&o=true) ### MacOS - [Homebrew](https://formulae.brew.sh/formula/f3d) ### Linux - [Ubuntu](https://packages.ubuntu.com/search?keywords=f3d&searchon=names&exact=1&suite=all&section=all) - [Debian](https://packages.debian.org/search?keywords=f3d&searchon=names&exact=1&suite=all&section=all) - [Arch](https://archlinux.org/packages/extra/x86_64/f3d/) - [NixOS](https://search.nixos.org/packages?query=f3d) - [openSUSE](https://software.opensuse.org/package/f3d) - [OpenMandriva](https://github.com/OpenMandrivaAssociation/f3d) - [Mageia](https://madb.mageia.org/package/show/source/1/application/0/release/cauldron/name/f3d) - Fedora and others through [openSUSE OBS](https://build.opensuse.org/package/show/home:AndnoVember:F3D/f3d) - [Guix](https://packages.guix.gnu.org/packages/f3d/) - [Flathub](https://flathub.org/apps/details/io.github.f3d_app.f3d) ### Other - [FreeBSD](https://cgit.freebsd.org/ports/tree/graphics/f3d) - [Spack](https://packages.spack.io/package.html?name=f3d) - [pypi](https://pypi.org/project/f3d/) (library only) ",
"content": "# Installation ## Current release packages (2.3.0) | Platform | Files | -------- | ----- | Windows (installer) | [F3D-2.3.0-Windows.exe](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Windows-x86_64-raytracing.exe) | Windows (portable) | [F3D-2.3.0-Windows.zip](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Windows-x86_64-raytracing.zip) | MacOS (Intel) | [F3D-2.3.0-macOS-x86_64.dmg](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-macOS-x86_64-raytracing.dmg) | MacOS (Silicon) | [F3D-2.3.0-macOS-arm64.dmg](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-macOS-arm64.dmg) | Linux (Debian package) | [F3D-2.3.0-Linux.deb](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Linux-x86_64-raytracing.deb) | Linux (portable) | [F3D-2.3.0-Linux.tar.xz](https://github.com/f3d-app/f3d/releases/download/v2.3.0/F3D-2.3.0-Linux-x86_64-raytracing.tar.xz) | Note: MacOS package is not signed, see the [troubleshooting](/doc/user/LIMITATIONS_AND_TROUBLESHOOTING.html) section for a workaround if needed. ## Alternatives You can find other (headless, older, smaller, checksum, RCs) release related packages and files on the [releases page](https://github.com/f3d-app/f3d/releases). You can also find there the [nightly release](https://github.com/f3d-app/f3d/releases/tag/nightly) to test the development version of F3D. See the [desktop integration](/doc/user/DESKTOP_INTEGRATION.html) section in order actually integrate the binary release in your desktop. Alternatively, you can build F3D yourself by following the [build](/doc/dev/BUILD.html) guide. You can also find packages for the following repositories: ### Windows - [Scoop](https://scoop.sh/#/apps?q=f3d&s=0&d=1&o=true) ### MacOS - [Homebrew](https://formulae.brew.sh/formula/f3d) ### Linux - [Ubuntu](https://packages.ubuntu.com/search?keywords=f3d&searchon=names&exact=1&suite=all&section=all) - [Debian](https://packages.debian.org/search?keywords=f3d&searchon=names&exact=1&suite=all&section=all) - [Arch](https://archlinux.org/packages/extra/x86_64/f3d/) - [NixOS](https://search.nixos.org/packages?query=f3d) - [openSUSE](https://software.opensuse.org/package/f3d) - [OpenMandriva](https://github.com/OpenMandrivaAssociation/f3d) - [Mageia](https://madb.mageia.org/package/show/source/1/application/0/release/cauldron/name/f3d) - Fedora and others through [openSUSE OBS](https://build.opensuse.org/package/show/home:AndnoVember:F3D/f3d) - [Guix](https://packages.guix.gnu.org/packages/f3d/) - [Flathub](https://flathub.org/apps/details/io.github.f3d_app.f3d) ### Other - [FreeBSD](https://cgit.freebsd.org/ports/tree/graphics/f3d) - [Spack](https://packages.spack.io/package.html?name=f3d) - [pypi](https://pypi.org/project/f3d/) (library only) ",
"url": "/doc/user/INSTALLATION.html",

"relUrl": "/doc/user/INSTALLATION.html"
Expand Down
90 changes: 90 additions & 0 deletions assets/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
function onload(event) {
if (window.location.pathname.endsWith("/INSTALLATION.html")) {
enhance_install_page();
}
}

function enhance_install_page() {
function retrieve_downloads(target_platform_re) {
var downloads = [];
for (const table of document.querySelectorAll("table")) {
const th = document.querySelector("th");
if (th) {
if (/Platform/i.test(th.innerText)) {
for (const table_row of table.querySelectorAll("tr")) {
const table_cols = table_row.querySelectorAll("td");
if (table_cols.length > 1) {
const link = table_cols[1].querySelector("a");
if (link) {
const platform = table_cols[0].innerText;
if (target_platform_re.test(platform))
downloads.push([platform, link.innerText, link.href]);
}
}
}
break; // stop after first relevant table
}
}
}
return downloads;
}

/* check OS: first check for `?os=foo` in the URL, otherwise guess form user agent */
const params = new URLSearchParams(window.location.search);
const current_os = params.get("os") || guess_client_OS();

if (current_os == null) return;

/* find download links matching the OS */
const target_platform_re = RegExp(`(${current_os})`, "i");
const downloads = retrieve_downloads(target_platform_re);

if (downloads.length < 1) return;

/* create a box below the first header to insert buttons */
const header = document.querySelector("h1");
if (header == null) return;
const div = document.createElement("div");
div.setAttribute("class", "install-buttons");
header.parentNode.insertBefore(div, header.nextSibling);

/* create download button for each matching link */
var i = 0;
for ([platform, filename, url] of downloads) {
const bolded_platform = platform.replace(target_platform_re, "<b>$1</b>");
const link = document.createElement("a");
link.setAttribute("href", url);
link.setAttribute("class", i++ ? "btn" : "btn btn-primary");
link.innerHTML = `<div>Get <b>F3D</b> for ${bolded_platform}</div><small>${filename}</small>`;
div.append(link);
}
const note = document.createElement("div");
note.innerHTML = "<small>or see other available versions below</small>";
div.append(note);
}

function guess_client_OS() {
/* https://stackoverflow.com/a/38241481 */
const userAgent = window.navigator.userAgent;
const platform =
window.navigator?.userAgentData?.platform || window.navigator.platform;
const macosPlatforms = ["macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K"];
const windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"];
const iosPlatforms = ["iPhone", "iPad", "iPod"];

if (macosPlatforms.indexOf(platform) !== -1) {
return "MacOS";
} else if (iosPlatforms.indexOf(platform) !== -1) {
return "iOS";
} else if (windowsPlatforms.indexOf(platform) !== -1) {
return "Windows";
} else if (/Android/.test(userAgent)) {
return "Android";
} else if (/Linux/.test(platform)) {
return "Linux";
} else {
return null;
}
}

window.addEventListener("load", onload);
2 changes: 1 addition & 1 deletion doc/CHANGELOG.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/GALLERY.html

Large diffs are not rendered by default.

Loading

0 comments on commit f93036d

Please sign in to comment.