pressbooks aldine theme the theme used for the front page or default book
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
126 KiB

/*! For license information please see aldine.js.LICENSE.txt */
!function(){var t,e={612:function(t,e,n){"use strict";var i=n(755),r=n(391),o=n(831),s={init:function(){var t;t=document.querySelectorAll("fieldset h2"),Array.prototype.forEach.call(t,(function(t){t.innerHTML='\n\t\t\t\t<button type="button" aria-expanded="false">\n\t\t\t\t\t'.concat(t.textContent,'\n\t\t\t\t\t<svg aria-hidden="true" focusable="false" class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="currentColor" fill-rule="evenodd"></path></svg>\n\t\t\t\t</button>\n\t\t\t ');var e=function(t){for(var e=[];t.nextElementSibling&&"H2"!==t.nextElementSibling.tagName;)e.push(t.nextElementSibling),t=t.nextElementSibling;return e.forEach((function(t){t.parentNode.removeChild(t)})),e}(t),n=document.createElement("div");n.hidden=!0,e.forEach((function(t){n.appendChild(t)})),t.parentNode.insertBefore(n,t.nextElementSibling);var i=t.querySelector("button");i.onclick=function(){var t="true"===i.getAttribute("aria-expanded")||!1;i.setAttribute("aria-expanded",!t),n.hidden=t}})),function(){var t=document.querySelectorAll("fieldset h3");Array.prototype.forEach.call(t,(function(t){t.innerHTML='\n\t\t\t\t<button type="button" aria-expanded="false">\n\t\t\t\t\t'.concat(t.innerHTML,'\n\t\t\t\t\t<svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="currentColor" fill-rule="evenodd"></path></svg>\n\t\t\t\t</button>\n\t\t\t ');var e=function(t){for(var e=[];t.nextElementSibling&&"H3"!==t.nextElementSibling.tagName;)e.push(t.nextElementSibling),t=t.nextElementSibling;return e.forEach((function(t){t.parentNode.removeChild(t)})),e}(t),n=document.createElement("div");n.hidden=!0,e.forEach((function(t){n.appendChild(t)})),t.parentNode.insertBefore(n,t.nextElementSibling);var i=t.querySelector("button");i.onclick=function(){var t="true"===i.getAttribute("aria-expanded")||!1;i.setAttribute("aria-expanded",!t),n.hidden=t}}))}(),i((function(t){o("isotope",r,t);var e=t(".books");e.isotope({itemSelector:".book",getSortData:{title:".book__title a",subject:"[data-subject]",latest:"[data-date-published]"},sortAscending:{title:!0,subject:!1,latest:!1}});var n=document.querySelector(".license-filters"),i=document.querySelector(".subject-filters"),s=document.querySelector(".sorts"),a=document.querySelector(".clear-filters");a.hidden=!1,n.addEventListener("click",(function(t){if("radio"===t.target.type){var n="",r="",o="*";i.querySelector('input[type="radio"]:checked').value&&(r='[data-subject="'.concat(i.querySelector('input[type="radio"]:checked').value,'"]')),t.target.value&&(n='[data-license="'.concat(t.target.value,'"]')),(n||r)&&(o="".concat(n).concat(r)),e.isotope({filter:o})}})),i.addEventListener("click",(function(t){if("radio"===t.target.type){var i="",r="",o="*";n.querySelector('input[type="radio"]:checked').value&&(i='[data-license="'.concat(n.querySelector('input[type="radio"]:checked').value,'"]')),t.target.value&&(r='[data-subject="'.concat(t.target.value,'"]')),(i||r)&&(o="".concat(i).concat(r)),e.isotope({filter:o})}})),a.addEventListener("click",(function(){var t=document.getElementById("all-licenses"),n=document.getElementById("all-subjects");t.checked=!0,n.checked=!0,e.isotope({filter:"*"})})),s.addEventListener("click",(function(t){"radio"===t.target.type&&e.isotope({sortBy:t.target.value})}))}))},finalize:function(){}},a=n(755),u={init:function(){document.body.classList.remove("no-js"),document.body.classList.add("js"),a((function(t){t(document).ready((function(){for(var e=document.getElementsByTagName("section"),n=0,i=e.length;n<i;n++)e[n].setAttribute("tabindex",-1),e[n].className+=" focusable";if(document.location.hash&&"#"!==document.location.hash){var r=document.location.hash;setTimeout((function(){t(r).scrollTo({duration:1500}),t(r).trigger("focus")}),100)}})),t(".js-header-nav-toggle").on("click",(function(e){e.preventDefault(),t(".header__nav").toggleClass("header__nav--active")}))})),document.querySelectorAll("input, textarea").forEach((function(t){t.addEventListener("invali