mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
deploy: 6d342eaf30
This commit is contained in:
parent
36a329fcca
commit
c44201f558
@ -1,2 +1,2 @@
|
||||
cp -r /nix/store/77hisn5864q8k61mdf48306ir1kr3m9j-source/* .
|
||||
/nix/store/yraybmrngngjgs1ly1hh37g24h83wybl-mdbook-0.4.30/bin/mdbook build --dest-dir "$out"
|
||||
/nix/store/3azx36x41zxajkvx6ld7q8p0ix99ic89-mdbook-0.4.34/bin/mdbook build --dest-dir "$out"
|
||||
|
24
404.html
24
404.html
@ -89,11 +89,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
16
book.js
16
book.js
@ -346,7 +346,7 @@ function playground_text(playground, hidden = true) {
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
themeColorMetaTag.content = getComputedStyle(document.body).backgroundColor;
|
||||
themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor;
|
||||
}, 1);
|
||||
|
||||
if (window.ace && window.editors) {
|
||||
@ -551,13 +551,6 @@ function playground_text(playground, hidden = true) {
|
||||
firstContact = null;
|
||||
}
|
||||
}, { passive: true });
|
||||
|
||||
// Scroll sidebar to current active section
|
||||
var activeSection = document.getElementById("sidebar").querySelector(".active");
|
||||
if (activeSection) {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
})();
|
||||
|
||||
(function chapterNavigation() {
|
||||
@ -676,13 +669,14 @@ function playground_text(playground, hidden = true) {
|
||||
}, { passive: true });
|
||||
})();
|
||||
(function controllBorder() {
|
||||
menu.classList.remove('bordered');
|
||||
document.addEventListener('scroll', function () {
|
||||
function updateBorder() {
|
||||
if (menu.offsetTop === 0) {
|
||||
menu.classList.remove('bordered');
|
||||
} else {
|
||||
menu.classList.add('bordered');
|
||||
}
|
||||
}, { passive: true });
|
||||
}
|
||||
updateBorder();
|
||||
document.addEventListener('scroll', updateBorder, { passive: true });
|
||||
})();
|
||||
})();
|
||||
|
@ -5,6 +5,7 @@
|
||||
:root {
|
||||
/* Browser default font-size is 16px, this way 1 rem = 10px */
|
||||
font-size: 62.5%;
|
||||
color-scheme: var(--color-scheme);
|
||||
}
|
||||
|
||||
html {
|
||||
|
@ -22,14 +22,6 @@
|
||||
overflow-y: initial;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #666666;
|
||||
border-radius: 5px;
|
||||
|
||||
/* Force background to be printed in Chrome */
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
pre > .buttons {
|
||||
z-index: 2;
|
||||
}
|
||||
|
@ -50,6 +50,8 @@
|
||||
--searchresults-border-color: #888;
|
||||
--searchresults-li-bg: #252932;
|
||||
--search-mark-bg: #e3b171;
|
||||
|
||||
--color-scheme: dark;
|
||||
}
|
||||
|
||||
.coal {
|
||||
@ -90,6 +92,8 @@
|
||||
--searchresults-border-color: #98a3ad;
|
||||
--searchresults-li-bg: #2b2b2f;
|
||||
--search-mark-bg: #355c7d;
|
||||
|
||||
--color-scheme: dark;
|
||||
}
|
||||
|
||||
.light {
|
||||
@ -130,6 +134,8 @@
|
||||
--searchresults-border-color: #888;
|
||||
--searchresults-li-bg: #e4f2fe;
|
||||
--search-mark-bg: #a2cff5;
|
||||
|
||||
--color-scheme: light;
|
||||
}
|
||||
|
||||
.navy {
|
||||
@ -170,6 +176,8 @@
|
||||
--searchresults-border-color: #5c5c68;
|
||||
--searchresults-li-bg: #242430;
|
||||
--search-mark-bg: #a2cff5;
|
||||
|
||||
--color-scheme: dark;
|
||||
}
|
||||
|
||||
.rust {
|
||||
@ -210,6 +218,8 @@
|
||||
--searchresults-border-color: #888;
|
||||
--searchresults-li-bg: #dec2a2;
|
||||
--search-mark-bg: #e69f67;
|
||||
|
||||
--color-scheme: light;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
22
env-vars
22
env-vars
@ -1,19 +1,19 @@
|
||||
declare -x CONFIG_SHELL="/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash"
|
||||
declare -x CONFIG_SHELL="/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin/bash"
|
||||
declare -x HOME="/homeless-shelter"
|
||||
declare -x HOST_PATH="/nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin:/nix/store/dq11g3lzkl5bxrjy9y6x1pjxkxx6z91f-findutils-4.9.0/bin:/nix/store/xwchhp6yh1s1m1zkkzfqc8dwfprlz6mi-diffutils-3.10/bin:/nix/store/n31qkcw7f4jkkl0crczd6hiyy8sdjaz5-gnused-4.9/bin:/nix/store/yw3g789y5fpmxbzgkhs4nv7xdnyklsjd-gnugrep-3.11/bin:/nix/store/l69xigsqwjhlfl45h59ih69r1ni44xli-gawk-5.2.2/bin:/nix/store/61fb45v0p9rgpg8k4bmkd7wz187454f9-gnutar-1.34/bin:/nix/store/zh1g9lzd8wpgcjxcvm3y4a6dwjy50dym-gzip-1.12/bin:/nix/store/118gd5v4dr5zsmqkd4bigp3j5vhmdmn5-bzip2-1.0.8-bin/bin:/nix/store/xqgd14chbnrqyi0080kkyzsxwsi3hvld-gnumake-4.4.1/bin:/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin:/nix/store/sf1434s0vamnwa1ms1az7nn6z5qg5kqc-patch-2.7.6/bin:/nix/store/j9mafmdr7vmbvwznmd8axg7vgqn93m11-xz-5.4.3-bin/bin:/nix/store/fqi9n7p5rrzqansqb64zf92c2g0hk0hk-file-5.44/bin"
|
||||
declare -x HOST_PATH="/nix/store/5wspmqhgsfs7dza9gcyrj5yxbyd00q7y-coreutils-9.3/bin:/nix/store/039nii0j16pkzabxi9nm5dkh0z8awaww-findutils-4.9.0/bin:/nix/store/pmkqwxzi27lzdzkh2zpqajks9b3521jz-diffutils-3.10/bin:/nix/store/5ccllrgswk61a44yl7jcxs20jql1y32b-gnused-4.9/bin:/nix/store/m88w8in2zf5dwijxypyba02f0ff260rm-gnugrep-3.11/bin:/nix/store/scv8hzzf0vpxaqj96qjhzdcf04aygga1-gawk-5.2.2/bin:/nix/store/ygjmhqdm8labz14xxscz003srl1p2c94-gnutar-1.35/bin:/nix/store/pm6pfypn61d9n9gy19i01ak8hwc6g688-gzip-1.12/bin:/nix/store/ir3achw4jh3qyyac0vkj8jb46l06psqh-bzip2-1.0.8-bin/bin:/nix/store/k51cq3ap20c69wffjsl8qjs21wy5wlrq-gnumake-4.4.1/bin:/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin:/nix/store/l6wb1grmnawfvy6xqp5x29jsq9p5dym8-patch-2.7.6/bin:/nix/store/ikzmh72n5f785gkfm02kzg4cl8d7hzmg-xz-5.4.4-bin/bin:/nix/store/yyrljddc4wqraxs72d8kzcf3filcncky-file-5.45/bin"
|
||||
declare -x NIX_BUILD_CORES="2"
|
||||
declare -x NIX_BUILD_TOP="/build"
|
||||
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=xpbxjpmlxj"
|
||||
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=imn8jc84x0"
|
||||
declare -x NIX_ENFORCE_NO_NATIVE="1"
|
||||
declare -x NIX_ENFORCE_PURITY="1"
|
||||
declare -x NIX_LDFLAGS="-rpath /nix/store/xpbxjpmlxj8g0p12v3dpzflj088ndzh0-nixos-anywhere-docs/lib "
|
||||
declare -x NIX_LDFLAGS="-rpath /nix/store/imn8jc84x0847ab02wjhp05n2191h8ha-nixos-anywhere-docs/lib "
|
||||
declare -x NIX_LOG_FD="2"
|
||||
declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
|
||||
declare -x NIX_STORE="/nix/store"
|
||||
declare -x OLDPWD
|
||||
declare -x PATH="/nix/store/sprx92b3v49if4m7wi7iahclfsi4nwvn-patchelf-0.15.0/bin:/nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin:/nix/store/dq11g3lzkl5bxrjy9y6x1pjxkxx6z91f-findutils-4.9.0/bin:/nix/store/xwchhp6yh1s1m1zkkzfqc8dwfprlz6mi-diffutils-3.10/bin:/nix/store/n31qkcw7f4jkkl0crczd6hiyy8sdjaz5-gnused-4.9/bin:/nix/store/yw3g789y5fpmxbzgkhs4nv7xdnyklsjd-gnugrep-3.11/bin:/nix/store/l69xigsqwjhlfl45h59ih69r1ni44xli-gawk-5.2.2/bin:/nix/store/61fb45v0p9rgpg8k4bmkd7wz187454f9-gnutar-1.34/bin:/nix/store/zh1g9lzd8wpgcjxcvm3y4a6dwjy50dym-gzip-1.12/bin:/nix/store/118gd5v4dr5zsmqkd4bigp3j5vhmdmn5-bzip2-1.0.8-bin/bin:/nix/store/xqgd14chbnrqyi0080kkyzsxwsi3hvld-gnumake-4.4.1/bin:/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin:/nix/store/sf1434s0vamnwa1ms1az7nn6z5qg5kqc-patch-2.7.6/bin:/nix/store/j9mafmdr7vmbvwznmd8axg7vgqn93m11-xz-5.4.3-bin/bin:/nix/store/fqi9n7p5rrzqansqb64zf92c2g0hk0hk-file-5.44/bin"
|
||||
declare -x PATH="/nix/store/dhg99sq2invv3scrlv6abxsb5pcz8ip6-patchelf-0.15.0/bin:/nix/store/5wspmqhgsfs7dza9gcyrj5yxbyd00q7y-coreutils-9.3/bin:/nix/store/039nii0j16pkzabxi9nm5dkh0z8awaww-findutils-4.9.0/bin:/nix/store/pmkqwxzi27lzdzkh2zpqajks9b3521jz-diffutils-3.10/bin:/nix/store/5ccllrgswk61a44yl7jcxs20jql1y32b-gnused-4.9/bin:/nix/store/m88w8in2zf5dwijxypyba02f0ff260rm-gnugrep-3.11/bin:/nix/store/scv8hzzf0vpxaqj96qjhzdcf04aygga1-gawk-5.2.2/bin:/nix/store/ygjmhqdm8labz14xxscz003srl1p2c94-gnutar-1.35/bin:/nix/store/pm6pfypn61d9n9gy19i01ak8hwc6g688-gzip-1.12/bin:/nix/store/ir3achw4jh3qyyac0vkj8jb46l06psqh-bzip2-1.0.8-bin/bin:/nix/store/k51cq3ap20c69wffjsl8qjs21wy5wlrq-gnumake-4.4.1/bin:/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin:/nix/store/l6wb1grmnawfvy6xqp5x29jsq9p5dym8-patch-2.7.6/bin:/nix/store/ikzmh72n5f785gkfm02kzg4cl8d7hzmg-xz-5.4.4-bin/bin:/nix/store/yyrljddc4wqraxs72d8kzcf3filcncky-file-5.45/bin"
|
||||
declare -x PWD="/build"
|
||||
declare -x SHELL="/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash"
|
||||
declare -x SHELL="/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin/bash"
|
||||
declare -x SHLVL="1"
|
||||
declare -x SOURCE_DATE_EPOCH="315532800"
|
||||
declare -x SSL_CERT_FILE="/no-cert-file.crt"
|
||||
@ -23,11 +23,11 @@ declare -x TERM="xterm-256color"
|
||||
declare -x TMP="/build"
|
||||
declare -x TMPDIR="/build"
|
||||
declare -x TZ="UTC"
|
||||
declare -x XDG_DATA_DIRS="/nix/store/sprx92b3v49if4m7wi7iahclfsi4nwvn-patchelf-0.15.0/share"
|
||||
declare -x XDG_DATA_DIRS="/nix/store/dhg99sq2invv3scrlv6abxsb5pcz8ip6-patchelf-0.15.0/share"
|
||||
declare -x __structuredAttrs=""
|
||||
declare -x buildCommandPath="/build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90"
|
||||
declare -x buildInputs=""
|
||||
declare -x builder="/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash"
|
||||
declare -x builder="/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin/bash"
|
||||
declare -x cmakeFlags=""
|
||||
declare -x configureFlags=""
|
||||
declare -x depsBuildBuild=""
|
||||
@ -46,13 +46,13 @@ declare -x enableParallelInstalling="1"
|
||||
declare -x mesonFlags=""
|
||||
declare -x name="nixos-anywhere-docs"
|
||||
declare -x nativeBuildInputs=""
|
||||
declare -x out="/nix/store/xpbxjpmlxj8g0p12v3dpzflj088ndzh0-nixos-anywhere-docs"
|
||||
declare -x out="/nix/store/imn8jc84x0847ab02wjhp05n2191h8ha-nixos-anywhere-docs"
|
||||
declare -x outputs="out"
|
||||
declare -x passAsFile="buildCommand"
|
||||
declare -x patches=""
|
||||
declare -x propagatedBuildInputs=""
|
||||
declare -x propagatedNativeBuildInputs=""
|
||||
declare -x shell="/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash"
|
||||
declare -x stdenv="/nix/store/32ihbg0l1v9v4bs9x0shmp4kdjsym3qq-stdenv-linux"
|
||||
declare -x shell="/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin/bash"
|
||||
declare -x stdenv="/nix/store/80fgzsxy3x8gyv9kmjdhmis26grm2adi-stdenv-linux"
|
||||
declare -x strictDeps=""
|
||||
declare -x system="x86_64-linux"
|
||||
|
24
howtos.html
24
howtos.html
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
24
index.html
24
index.html
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
24
print.html
24
print.html
@ -89,11 +89,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
@ -88,11 +88,33 @@
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
||||
<!-- Track and set sidebar scroll position -->
|
||||
<script>
|
||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||
sidebarScrollbox.addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||
}
|
||||
}, { passive: true });
|
||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||
sessionStorage.removeItem('sidebar-scroll');
|
||||
if (sidebarScrollTop) {
|
||||
// preserve sidebar scroll position when navigating via links within sidebar
|
||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||
} else {
|
||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||
var activeSection = document.querySelector('#sidebar .active');
|
||||
if (activeSection) {
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="page-wrapper" class="page-wrapper">
|
||||
|
||||
<div class="page">
|
||||
<div id="menu-bar-hover-placeholder"></div>
|
||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||
<div id="menu-bar" class="menu-bar sticky">
|
||||
<div class="left-buttons">
|
||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
Loading…
Reference in New Issue
Block a user