You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
deploy: 64ff55be0e
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,245 +0,0 @@
|
||||
/* Code modified from the blender website
|
||||
* https://www.blender.org/wp-content/themes/bthree/assets/js/get_os.js?x82196
|
||||
*/
|
||||
|
||||
let options = {
|
||||
windows64: "x86_64-pc-windows",
|
||||
windows32: "i686-pc-windows",
|
||||
windowsArm: "aarch64-pc-windows",
|
||||
|
||||
mac64: "x86_64-apple",
|
||||
mac32: "i686-apple",
|
||||
macSilicon: "aarch64-apple",
|
||||
|
||||
linux64: "x86_64-unknown-linux",
|
||||
linux32: "i686-unknown-linux",
|
||||
linuxArm: "aarch64-unknown-linux",
|
||||
|
||||
// ios: "ios",
|
||||
// android: "linux-android",
|
||||
// freebsd: "freebsd",
|
||||
};
|
||||
|
||||
function isAppleSilicon() {
|
||||
try {
|
||||
var glcontext = document.createElement("canvas").getContext("webgl");
|
||||
var debugrenderer = glcontext
|
||||
? glcontext.getExtension("WEBGL_debug_renderer_info")
|
||||
: null;
|
||||
var renderername =
|
||||
(debugrenderer &&
|
||||
glcontext.getParameter(debugrenderer.UNMASKED_RENDERER_WEBGL)) ||
|
||||
"";
|
||||
if (renderername.match(/Apple M/) || renderername.match(/Apple GPU/)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function getOS() {
|
||||
var OS = options.windows64.default;
|
||||
var userAgent = navigator.userAgent;
|
||||
var platform = navigator.platform;
|
||||
|
||||
if (navigator.appVersion.includes("Win")) {
|
||||
if (
|
||||
!userAgent.includes("Windows NT 5.0") &&
|
||||
!userAgent.includes("Windows NT 5.1") &&
|
||||
(userAgent.indexOf("Win64") > -1 ||
|
||||
platform == "Win64" ||
|
||||
userAgent.indexOf("x86_64") > -1 ||
|
||||
userAgent.indexOf("x86_64") > -1 ||
|
||||
userAgent.indexOf("amd64") > -1 ||
|
||||
userAgent.indexOf("AMD64") > -1 ||
|
||||
userAgent.indexOf("WOW64") > -1)
|
||||
) {
|
||||
OS = options.windows64;
|
||||
} else {
|
||||
if (
|
||||
window.external &&
|
||||
window.external.getHostEnvironmentValue &&
|
||||
window.external
|
||||
.getHostEnvironmentValue("os-architecture")
|
||||
.includes("ARM64")
|
||||
) {
|
||||
OS = options.windowsArm;
|
||||
} else {
|
||||
try {
|
||||
var canvas = document.createElement("canvas");
|
||||
var gl = canvas.getContext("webgl");
|
||||
|
||||
var debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
||||
var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
|
||||
if (renderer.includes("Qualcomm")) OS = options.windowsArm;
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//MacOS, MacOS X, macOS
|
||||
if (navigator.appVersion.includes("Mac")) {
|
||||
if (
|
||||
navigator.userAgent.includes("OS X 10.5") ||
|
||||
navigator.userAgent.includes("OS X 10.6")
|
||||
) {
|
||||
OS = options.mac32;
|
||||
} else {
|
||||
OS = options.mac64;
|
||||
|
||||
const isSilicon = isAppleSilicon();
|
||||
if (isSilicon) {
|
||||
OS = options.macSilicon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// linux
|
||||
if (platform.includes("Linux")) {
|
||||
OS = options.linux64;
|
||||
// FIXME: Can we find out whether linux 32-bit or ARM are used?
|
||||
}
|
||||
|
||||
// if (
|
||||
// userAgent.includes("iPad") ||
|
||||
// userAgent.includes("iPhone") ||
|
||||
// userAgent.includes("iPod")
|
||||
// ) {
|
||||
// OS = options.ios;
|
||||
// }
|
||||
// if (platform.toLocaleLowerCase().includes("freebsd")) {
|
||||
// OS = options.freebsd;
|
||||
// }
|
||||
|
||||
return OS;
|
||||
}
|
||||
|
||||
let os = getOS();
|
||||
window.os = os;
|
||||
|
||||
// Unhide and hydrate selector with events
|
||||
const archSelect = document.querySelector(".arch-select");
|
||||
if (archSelect) {
|
||||
archSelect.classList.remove("hidden");
|
||||
const selector = document.querySelector("#install-arch-select");
|
||||
if (selector) {
|
||||
selector.addEventListener("change", onArchChange);
|
||||
}
|
||||
}
|
||||
|
||||
// Hydrate tab buttons with events
|
||||
Array.from(document.querySelectorAll(".install-tab[data-id]")).forEach((tab) => {
|
||||
tab.addEventListener("click", onTabClick);
|
||||
});
|
||||
|
||||
function onArchChange(evt) {
|
||||
// Get target
|
||||
const target = evt.currentTarget.value;
|
||||
// Find corresponding installer lists
|
||||
const newContentEl = document.querySelector(`.arch[data-arch=${target}]`);
|
||||
const oldContentEl = document.querySelector(`.arch[data-arch]:not(.hidden)`);
|
||||
// Hide old content element (if applicable)
|
||||
if (oldContentEl) {
|
||||
oldContentEl.classList.add("hidden");
|
||||
}
|
||||
// Show new content element
|
||||
newContentEl.classList.remove("hidden");
|
||||
// Show the first tab's content if nothing was selected before
|
||||
if (newContentEl.querySelectorAll(".install-tab.selected").length === 0) {
|
||||
const firstContentChild = newContentEl.querySelector(".install-content:first-of-type");
|
||||
const firstTabChild = newContentEl.querySelector(".install-tab:first-of-type");
|
||||
firstContentChild.classList.remove("hidden");
|
||||
if (firstTabChild) {
|
||||
firstTabChild.classList.add("selected");
|
||||
}
|
||||
}
|
||||
// Hide "no OS detected" message
|
||||
const noDetectEl = document.querySelector(".no-autodetect");
|
||||
noDetectEl.classList.add("hidden");
|
||||
// Hide Mac hint
|
||||
document.querySelector(".mac-switch").classList.add("hidden");
|
||||
}
|
||||
|
||||
function onTabClick(evt) {
|
||||
// Get target and ID
|
||||
const {triple, id} = evt.currentTarget.dataset;
|
||||
if (triple) {
|
||||
// Find corresponding content elements
|
||||
const newContentEl = document.querySelector(`.install-content[data-id="${String(id)}"][data-triple=${triple}]`);
|
||||
const oldContentEl = document.querySelector(`.install-content[data-triple=${triple}][data-id]:not(.hidden)`);
|
||||
// Find old tab to unselect
|
||||
const oldTabEl = document.querySelector(`.install-tab[data-triple=${triple}].selected`);
|
||||
// Hide old content element
|
||||
if (oldContentEl && oldTabEl) {
|
||||
oldContentEl.classList.add("hidden");
|
||||
oldTabEl.classList.remove("selected");
|
||||
}
|
||||
|
||||
// Unhide new content element
|
||||
newContentEl.classList.remove("hidden");
|
||||
// Select new tab element
|
||||
evt.currentTarget.classList.add("selected");
|
||||
}
|
||||
}
|
||||
|
||||
const allPlatforms = Array.from(document.querySelectorAll(`.arch[data-arch]`));
|
||||
let hit = allPlatforms.find(
|
||||
(a) => {
|
||||
// Show Intel Mac downloads if no M1 Mac downloads are available
|
||||
if (
|
||||
a.attributes["data-arch"].value.includes(options.mac64) &&
|
||||
os.includes(options.macSilicon) &&
|
||||
!allPlatforms.find(p => p.attributes["data-arch"].value.includes(options.macSilicon))) {
|
||||
// Unhide hint
|
||||
document.querySelector(".mac-switch").classList.remove("hidden");
|
||||
return true;
|
||||
}
|
||||
return a.attributes["data-arch"].value.includes(os);
|
||||
}
|
||||
);
|
||||
|
||||
if (hit) {
|
||||
hit.classList.remove("hidden");
|
||||
const selectEl = document.querySelector("#install-arch-select");
|
||||
selectEl.value = hit.dataset.arch;
|
||||
const firstContentChild = hit.querySelector(".install-content:first-of-type");
|
||||
const firstTabChild = hit.querySelector(".install-tab:first-of-type");
|
||||
firstContentChild.classList.remove("hidden");
|
||||
if (firstTabChild) {
|
||||
firstTabChild.classList.add("selected");
|
||||
}
|
||||
} else {
|
||||
const noDetectEl = document.querySelector(".no-autodetect");
|
||||
if (noDetectEl) {
|
||||
const noDetectElDetails = document.querySelector(".no-autodetect-details");
|
||||
if (noDetectElDetails) {
|
||||
noDetectElDetails.innerHTML = `We detected you're on ${os} but there don't seem to be installers for that. `
|
||||
}
|
||||
noDetectEl.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
let copyButtons = Array.from(document.querySelectorAll("[data-copy]"));
|
||||
if (copyButtons.length) {
|
||||
copyButtons.forEach(function (element) {
|
||||
element.addEventListener("click", () => {
|
||||
navigator.clipboard.writeText(element.attributes["data-copy"].value);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Toggle for pre releases
|
||||
const checkbox = document.getElementById("show-prereleases");
|
||||
|
||||
if (checkbox) {
|
||||
checkbox.addEventListener("click", () => {
|
||||
const all = document.getElementsByClassName("pre-release");
|
||||
|
||||
if (all) {
|
||||
for (var item of all) {
|
||||
item.classList.toggle("hidden");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
This file makes sure that Github Pages doesn't process mdBook's output.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
Based off of the Ayu theme
|
||||
Original by Dempfi (https://github.com/dempfi/ayu)
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #191f26;
|
||||
color: #e6e1cf;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #5c6773;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-attr,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ff7733;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #ffee99;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet {
|
||||
color: #b8cc52;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-built_in,
|
||||
.hljs-section {
|
||||
color: #ffb454;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-symbol {
|
||||
color: #ff7733;
|
||||
}
|
||||
|
||||
.hljs-name {
|
||||
color: #36a3d9;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #00568d;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #91b362;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #d96c75;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Vendored
-7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,251 +0,0 @@
|
||||
/* Base styles and content styles */
|
||||
|
||||
@import "variables.css";
|
||||
|
||||
:root {
|
||||
/* Browser default font-size is 16px, this way 1 rem = 10px */
|
||||
font-size: 62.5%;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: var(--main-font);
|
||||
color: var(--fg);
|
||||
background-color: var(--bg);
|
||||
text-size-adjust: none;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-size: 1.6rem;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: var(--mono-font) !important;
|
||||
font-size: var(--code-font-size);
|
||||
}
|
||||
|
||||
/* make long words/inline code not x overflow */
|
||||
main {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* make wide tables scroll if they overflow */
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Don't change font size in headers. */
|
||||
h1 code,
|
||||
h2 code,
|
||||
h3 code,
|
||||
h4 code,
|
||||
h5 code,
|
||||
h6 code {
|
||||
font-size: unset;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
.boring {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.hide-boring .boring {
|
||||
display: none;
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
margin-top: 2.5em;
|
||||
}
|
||||
h4,
|
||||
h5 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.header + .header h3,
|
||||
.header + .header h4,
|
||||
.header + .header h5 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
h1:target::before,
|
||||
h2:target::before,
|
||||
h3:target::before,
|
||||
h4:target::before,
|
||||
h5:target::before,
|
||||
h6:target::before {
|
||||
display: inline-block;
|
||||
content: "»";
|
||||
margin-left: -30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
/* This is broken on Safari as of version 14, but is fixed
|
||||
in Safari Technology Preview 117 which I think will be Safari 14.2.
|
||||
https://bugs.webkit.org/show_bug.cgi?id=218076
|
||||
*/
|
||||
:target {
|
||||
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
|
||||
}
|
||||
|
||||
.page {
|
||||
outline: 0;
|
||||
padding: 0 var(--page-padding);
|
||||
margin-top: calc(
|
||||
0px - var(--menu-bar-height)
|
||||
); /* Compensate for the #menu-bar-hover-placeholder */
|
||||
}
|
||||
.page-wrapper {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.js:not(.sidebar-resizing) .page-wrapper {
|
||||
transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
|
||||
}
|
||||
|
||||
.content {
|
||||
overflow-y: auto;
|
||||
min-height: 70vh;
|
||||
padding: 0 5px 50px 5px;
|
||||
}
|
||||
.content main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: var(--content-max-width);
|
||||
}
|
||||
.content p {
|
||||
line-height: 1.45em;
|
||||
}
|
||||
.content ol {
|
||||
line-height: 1.45em;
|
||||
}
|
||||
.content ul {
|
||||
line-height: 1.45em;
|
||||
}
|
||||
.content a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.content img,
|
||||
.content video {
|
||||
max-width: 100%;
|
||||
}
|
||||
.content h1 .header:link,
|
||||
.content h1 .header:visited {
|
||||
color: var(--title-fg);
|
||||
}
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.content .header:link,
|
||||
.content .header:visited {
|
||||
color: var(--subtitle-fg);
|
||||
}
|
||||
|
||||
.content .header:link,
|
||||
.content .header:visited:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
table {
|
||||
margin: 0 auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table td {
|
||||
padding: 3px 20px;
|
||||
border: 1px var(--table-border-color) solid;
|
||||
}
|
||||
table thead {
|
||||
background: var(--table-header-bg);
|
||||
}
|
||||
table thead td {
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
}
|
||||
table thead th {
|
||||
padding: 3px 20px;
|
||||
}
|
||||
table thead tr {
|
||||
border: 1px var(--table-header-bg) solid;
|
||||
}
|
||||
/* Alternate background colors for rows */
|
||||
table tbody tr:nth-child(2n) {
|
||||
background: var(--table-alternate-bg);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 20px 0;
|
||||
padding: 0 20px;
|
||||
color: var(--fg);
|
||||
background-color: var(--quote-bg);
|
||||
border-top: 0.1em solid var(--quote-border);
|
||||
border-bottom: 0.1em solid var(--quote-border);
|
||||
}
|
||||
|
||||
kbd {
|
||||
background-color: var(--table-border-color);
|
||||
border-radius: 4px;
|
||||
border: solid 1px var(--theme-popup-border);
|
||||
box-shadow: inset 0 -1px 0 var(--theme-hover);
|
||||
display: inline-block;
|
||||
font-size: var(--code-font-size);
|
||||
font-family: var(--mono-font);
|
||||
line-height: 10px;
|
||||
padding: 4px 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
:not(.footnote-definition) + .footnote-definition,
|
||||
.footnote-definition + :not(.footnote-definition) {
|
||||
margin-top: 2em;
|
||||
}
|
||||
.footnote-definition {
|
||||
font-size: 0.9em;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.footnote-definition p {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.tooltiptext {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
color: #fff;
|
||||
background-color: #333;
|
||||
transform: translateX(
|
||||
-50%
|
||||
); /* Center by moving tooltip 50% of its width left */
|
||||
left: -8px; /* Half of the width of the icon */
|
||||
top: -35px;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 8px;
|
||||
margin: 5px;
|
||||
z-index: 1000;
|
||||
}
|
||||
.tooltipped .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.chapter li.part-title {
|
||||
color: var(--sidebar-fg);
|
||||
margin: 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.result-no-output {
|
||||
font-style: italic;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user