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
127 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(".institution-filters"),a=document.querySelector(".sorts"),u=document.querySelector(".clear-filters");u.hidden=!1,n.addEventListener("click",(function(t){if("radio"===t.target.type){var n=i.querySelector('input[type="radio"]:checked').value?'[data-subject="'.concat(i.querySelector('input[type="radio"]:checked').value,'"]'):"",r=s.querySelector('input[type="radio"]:checked').value?'[data-institution*="'.concat(s.querySelector('input[type="radio"]:checked').value,'"]'):"",o=t.target.value?'[data-license="'.concat(t.target.value,'"]'):"",a=n||o||r?"".concat(n).concat(o).concat(r):"*";e.isotope({filter:a})}})),s.addEventListener("click",(function(t){if("radio"===t.target.type){var r=i.querySelector('input[type="radio"]:checked').value?'[data-subject="'.concat(i.querySelector('input[type="radio"]:checked').value,'"]'):"",o=n.querySelector('input[type="radio"]:checked').value?'[data-license="'.concat(n.querySelector('input[type="radio"]:checked').value,'"]'):"",s=t.target.value?'[data-institution*="'.concat(t.target.value,'"]'):"",a=r||o||s?"".concat(r).concat(o).concat(s):"*";e.isotope({filter:a})}})),i.addEventListener("click",(function(t){if("radio"===t.target.type){var i=n.querySelector('input[type="radio"]:checked').value?'[data-license="'.concat(n.querySelector('input[type="radio"]:checked').value,'"]'):"",r=s.querySelector('input[type="radio"]:checked').value?'[data-institution*="'.concat(s.querySelector('input[type="radio"]:checked').value,'"]'):"",o=t.target.value?'[data-subject="'.concat(t.target.value,'"]'):"",a=o||i||r?"".concat(o).concat(i).concat(r):"*";e.isotope({filter:a})}})),u.addEventListener("click",(function(){var t=document.getElementById("all-licenses"),n=document.getElementById("all-subjects"),i=document.getElementById