diff --git a/assets/scripts/call-to-action.js b/assets/scripts/call-to-action.js index 8c57917..0799dc4 100644 --- a/assets/scripts/call-to-action.js +++ b/assets/scripts/call-to-action.js @@ -1,3 +1,4 @@ +/* eslint-disable no-unused-vars */ ( function () { tinymce.create( 'tinymce.plugins.aldine_call_to_action', { /** diff --git a/assets/scripts/page-section.js b/assets/scripts/page-section.js index 1d38bf9..5c9c2c6 100644 --- a/assets/scripts/page-section.js +++ b/assets/scripts/page-section.js @@ -1,3 +1,4 @@ +/* eslint-disable no-unused-vars */ ( function () { tinymce.create( 'tinymce.plugins.aldine_page_section', { /** diff --git a/assets/scripts/routes/catalog.js b/assets/scripts/routes/catalog.js index 6a3c06a..3414188 100644 --- a/assets/scripts/routes/catalog.js +++ b/assets/scripts/routes/catalog.js @@ -15,7 +15,7 @@ export default { // Give each

a toggle button child heading.innerHTML = ` `; @@ -85,7 +85,7 @@ export default { // Give each

a toggle button child heading.innerHTML = ` `; @@ -175,16 +175,16 @@ export default { } const subject = subjects.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-subject="${subjects.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-subject="${ subjects.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const institution = institutions.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-institution*="${institutions.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-institution*="${ institutions.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const license = event.target.value - ? `[data-license="${event.target.value}"]` + ? `[data-license="${ event.target.value }"]` : ''; - const filterValue = subject || license || institution ? `${subject}${license}${institution}` : '*'; + const filterValue = subject || license || institution ? `${ subject }${ license }${ institution }` : '*'; $grid.isotope( { filter: filterValue } ); } ); @@ -194,16 +194,16 @@ export default { } const subject = subjects.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-subject="${subjects.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-subject="${ subjects.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const license = licenses.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-license="${licenses.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-license="${ licenses.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const institution = event.target.value - ? `[data-institution*="${event.target.value}"]` + ? `[data-institution*="${ event.target.value }"]` : ''; - const filterValue = subject || license || institution ? `${subject}${license}${institution}` : '*'; + const filterValue = subject || license || institution ? `${ subject }${ license }${ institution }` : '*'; $grid.isotope( { filter: filterValue } ); } ); @@ -213,16 +213,16 @@ export default { } const license = licenses.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-license="${licenses.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-license="${ licenses.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const institution = institutions.querySelector( 'input[type="radio"]:checked' ).value - ? `[data-institution*="${institutions.querySelector( 'input[type="radio"]:checked' ).value}"]` + ? `[data-institution*="${ institutions.querySelector( 'input[type="radio"]:checked' ).value }"]` : ''; const subject = event.target.value - ? `[data-subject="${event.target.value}"]` + ? `[data-subject="${ event.target.value }"]` : ''; - const filterValue = subject || license || institution ? `${subject}${license}${institution}` : '*'; + const filterValue = subject || license || institution ? `${ subject }${ license }${ institution }` : '*'; $grid.isotope( { filter: filterValue } ); } ); diff --git a/assets/scripts/util/camelCase.js b/assets/scripts/util/camelCase.js index 0f9a968..94fef9d 100644 --- a/assets/scripts/util/camelCase.js +++ b/assets/scripts/util/camelCase.js @@ -5,9 +5,9 @@ * @returns {string} String converted to camel-case, e.g., camelCaseIsHard */ export default str => - `${str.charAt( 0 ).toLowerCase()}${str + `${ str.charAt( 0 ).toLowerCase() }${ str .replace( /[\W_]/g, '|' ) .split( '|' ) - .map( part => `${part.charAt( 0 ).toUpperCase()}${part.slice( 1 )}` ) + .map( part => `${ part.charAt( 0 ).toUpperCase() }${ part.slice( 1 ) }` ) .join( '' ) - .slice( 1 )}`; + .slice( 1 ) }`; diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index bc7f337..339cd83 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,19 +1,19 @@ { - "/scripts/aldine.js": "/scripts/aldine.js?id=f7e0ad5cfcc135b918f6", - "/scripts/call-to-action.js": "/scripts/call-to-action.js?id=33370b66c7af12320fc0", - "/scripts/catalog-admin.js": "/scripts/catalog-admin.js?id=e8d84fb090536b8e49e9", - "/scripts/customizer.js": "/scripts/customizer.js?id=14dca3944228dd789c27", - "/scripts/customizer-toggle.js": "/scripts/customizer-toggle.js?id=c31594589675d7c5662a", - "/scripts/page-section.js": "/scripts/page-section.js?id=19d5c30146ea1a763bcf", - "/styles/editor.css": "/styles/editor.css?id=b7c2449babe566571767", - "/styles/aldine.css": "/styles/aldine.css?id=8d3bfb61118a9ee435a1", - "/fonts/pressbooks-theme.woff": "/fonts/pressbooks-theme.woff?id=2a7aae81673f4707bbe7", - "/images/banner.jpg": "/images/banner.jpg?id=04a813e0b4f94ddfef19", - "/images/catalog-header.jpg": "/images/catalog-header.jpg?id=223b9f7a23985f2a72df", - "/images/header.jpg": "/images/header.jpg?id=c6712212b6aa749cf1cf", - "/images/left-arrow.svg": "/images/left-arrow.svg?id=91d479e2d001857a3ee4", - "/images/logo.svg": "/images/logo.svg?id=d71cb98d33ef823ffd27", - "/images/pb.svg": "/images/pb.svg?id=c08fb158c15a470648a7", - "/images/right-arrow.svg": "/images/right-arrow.svg?id=ee2d7230318ea54ae20b", - "/images/yt_icon_mono_dark.png": "/images/yt_icon_mono_dark.png?id=ee68b73409979a929440" + "/scripts/aldine.js": "/scripts/aldine.js?id=9a92306ccdc10e63f9f74ea17764c5f6", + "/scripts/call-to-action.js": "/scripts/call-to-action.js?id=33370b66c7af12320fc0e1250f6be399", + "/scripts/catalog-admin.js": "/scripts/catalog-admin.js?id=2bc3bfa90831ab142ee9ebeb14ddab3c", + "/scripts/customizer.js": "/scripts/customizer.js?id=14dca3944228dd789c27c772d55bf471", + "/scripts/customizer-toggle.js": "/scripts/customizer-toggle.js?id=c31594589675d7c5662aaddcf7a9669a", + "/scripts/page-section.js": "/scripts/page-section.js?id=19d5c30146ea1a763bcf2bd733a75e77", + "/styles/editor.css": "/styles/editor.css?id=3fd7086e0f2bcacabc5152bf57ca90ca", + "/styles/aldine.css": "/styles/aldine.css?id=accdc9da7cfbe324a98fa31f514dbe20", + "/fonts/pressbooks-theme.woff": "/fonts/pressbooks-theme.woff?id=2a7aae81673f4707bbe78c8f12b72b64", + "/images/banner.jpg": "/images/banner.jpg?id=04a813e0b4f94ddfef1951557166e417", + "/images/catalog-header.jpg": "/images/catalog-header.jpg?id=223b9f7a23985f2a72df72e4e4a2ffdc", + "/images/header.jpg": "/images/header.jpg?id=c6712212b6aa749cf1cf1f077c679f9f", + "/images/left-arrow.svg": "/images/left-arrow.svg?id=91d479e2d001857a3ee46691c0187854", + "/images/logo.svg": "/images/logo.svg?id=d71cb98d33ef823ffd27b15ae07e723a", + "/images/pb.svg": "/images/pb.svg?id=c08fb158c15a470648a74591e1fc94a4", + "/images/right-arrow.svg": "/images/right-arrow.svg?id=ee2d7230318ea54ae20bd9d5fd96efd6", + "/images/yt_icon_mono_dark.png": "/images/yt_icon_mono_dark.png?id=ee68b73409979a92944025ae95a18011" } diff --git a/dist/scripts/aldine.js b/dist/scripts/aldine.js index 9fee860..58f4fc9 100644 --- a/dist/scripts/aldine.js +++ b/dist/scripts/aldine.js @@ -1,2 +1,2 @@ /*! 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\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\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("all-institutions");t.checked=!0,n.checked=!0,i.checked=!0,e.isotope({filter:"*"})})),a.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;n1&&void 0!==arguments[1]?arguments[1]:"init",n=arguments.length>2?arguments[2]:void 0,i=""!==t&&this.routes[t]&&"function"==typeof this.routes[t][e];i&&this.routes[t][e](n)}},{key:"loadEvents",value:function(){var t=this;this.fire("common"),document.body.className.toLowerCase().replace(/-/g,"_").split(/\s+/).map(l).forEach((function(e){t.fire(e),t.fire(e,"finalize")})),this.fire("common","finalize")}}])&&c(e.prototype,n),i&&c(e,i),t}(),d=n(755),h=new f({common:u,home:{init:function(){},finalize:function(){}},catalog:s});d(document).ready((function(){return h.loadEvents()}))},741:function(t,e,n){var i,r;!function(o,s){"use strict";void 0===(r="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=r)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n