Skip to content

Commit fa0df44

Browse files
committed
Merge branch 'dev'
2 parents bb659d1 + 8fc6e15 commit fa0df44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+252
-291
lines changed

.github/workflows/.pipeline.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
node-version: '10'
3232

3333
- name: Install OS dependencies
34-
run: sudo apt-get install libxml2-utils ghostscript poppler-utils
34+
run: |
35+
sudo apt update
36+
sudo apt-get install libxml2-utils ghostscript poppler-utils
3537
3638
- name: Start required services
3739
run: sudo systemctl start mysql.service

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This theme is named after Canadian media theorist Marshall McLuhan, who coined t
1616
## Requirements
1717

1818
* PHP >= 7.3
19-
* WordPress >= 5.6.2
20-
* Pressbooks >= 5.20.0
19+
* WordPress >= 5.7.2
20+
* Pressbooks >= 5.24.0
2121

2222
## Installation
2323

@@ -41,7 +41,7 @@ Then, from the GitHub Updater interface, navigate to the "Install Theme" tab. En
4141

4242
## Changelog
4343

44-
### 2.11.2
44+
### 2.11.3
4545

46-
* See: https://github.com/pressbooks/pressbooks-book/releases/tag/2.11.2
46+
* See: https://github.com/pressbooks/pressbooks-book/releases/tag/2.11.3
4747
* Full release history available at: https://github.com/pressbooks/pressbooks-book/releases

assets/src/scripts/book.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// import external dependencies
22

33
// import local dependencies
4-
import Router from './util/Router';
54
import common from './routes/common';
65
import home from './routes/home';
76
import single from './routes/single';
7+
import Router from './util/Router';
88

99
/** Populate Router instance with DOM routes */
1010
const routes = new Router( {

assets/src/scripts/collapse-sections.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ document.addEventListener( 'DOMContentLoaded', function () {
4343

4444
// Function to create a node list
4545
// of the content between this <h1> and the next
46+
/**
47+
* @param elem
48+
*/
4649
const getContent = elem => {
4750
let elems = [];
4851
while (
@@ -82,6 +85,9 @@ document.addEventListener( 'DOMContentLoaded', function () {
8285
// Assign the button
8386
let btn = heading.querySelector( 'button' );
8487

88+
/**
89+
*
90+
*/
8591
btn.onclick = () => {
8692
// Cast the state as a boolean
8793
let expanded = btn.getAttribute( 'aria-expanded' ) === 'true' || false;

assets/src/scripts/pane.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
/**
2+
*
3+
*/
14
window.hypothesisConfig = () => {
25
return {
36
openSidebar: ( pressbooksHypothesis.openSidebar === '1' ) ? true : false,
47
showHighlights: ( pressbooksHypothesis.showHighlights === '1' ) ? true : false,
8+
/**
9+
* @param layoutParams
10+
*/
511
onLayoutChange: layoutParams => {
612
const navReading = document.querySelector( '.nav-reading' );
713
if ( layoutParams.expanded === true ) {
@@ -20,5 +26,5 @@ window.hypothesisConfig = () => {
2026
}
2127
}
2228
},
23-
}
29+
};
2430
};

assets/src/scripts/routes/common.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */
12
export default {
3+
/**
4+
*
5+
*/
26
init() {
37
// JavaScript to be fired on all pages
48
document.body.classList.remove( 'no-js' );
@@ -66,6 +70,9 @@ export default {
6670
// Handle list items and events
6771
Array.prototype.forEach.call( links, link => {
6872
// Collapse the content menu if user tabs out.
73+
/**
74+
* @param e
75+
*/
6976
link.onblur = e => {
7077
if ( link === links[links.length - 1] && e.relatedTarget.parentNode.nodeName !== 'LI' ) {
7178
btn.setAttribute( 'aria-expanded', false );
@@ -92,6 +99,9 @@ export default {
9299
}
93100
} );
94101

102+
/**
103+
* @param e
104+
*/
95105
document.onclick = e => {
96106
const downloadClass = 'book-header__cover__downloads';
97107
const $target = jQuery( e.target );
@@ -109,6 +119,9 @@ export default {
109119
}
110120
};
111121

122+
/**
123+
* @param e
124+
*/
112125
document.onkeydown = e => {
113126
// Hide the content when 'Esc' key is pressed (and content is showing)
114127
if ( e.which === 27 && ! content.hidden ) {
@@ -154,6 +167,9 @@ export default {
154167
// Assign the button
155168
let btn = entityTitle.querySelector( 'button' );
156169

170+
/**
171+
*
172+
*/
157173
btn.onclick = () => {
158174
// Cast the state as a boolean
159175
let expanded = btn.getAttribute( 'aria-expanded' ) === 'true' || false;
@@ -201,6 +217,9 @@ export default {
201217
} );
202218

203219
},
220+
/**
221+
*
222+
*/
204223
finalize() {
205224
// JavaScript to be fired on all pages, after page specific JS is fired
206225
},

assets/src/scripts/util/Router.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ import camelCase from './camelCase';
1111
class Router {
1212
/**
1313
* Create a new Router
14-
* @param {Object} routes
14+
*
15+
* @param {object} routes
1516
*/
1617
constructor( routes ) {
1718
this.routes = routes;
1819
}
1920

2021
/**
2122
* Fire Router events
23+
*
2224
* @param {string} route DOM-based route derived from body classes (`<body class="...">`)
2325
* @param {string} [event] Events on the route. By default, `init` and `finalize` events are called.
2426
* @param {string} [arg] Any custom argument to be passed to the event.
@@ -37,10 +39,10 @@ class Router {
3739
* Automatically load and fire Router events
3840
*
3941
* Events are fired in the following order:
40-
* * common init
41-
* * page-specific init
42-
* * page-specific finalize
43-
* * common finalize
42+
* common init
43+
* page-specific init
44+
* page-specific finalize
45+
* common finalize
4446
*/
4547
loadEvents() {
4648
// Fire common init JS

assets/src/scripts/util/camelCase.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
/* eslint import/no-anonymous-default-export: [2, {"allowArrowFunction": true}] */
12
/**
23
* the most terrible camelizer on the internet, guaranteed!
4+
*
35
* @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD
4-
* @return {string} String converted to camel-case, e.g., camelCaseIsHard
6+
* @returns {string} String converted to camel-case, e.g., camelCaseIsHard
57
*/
68
export default str => `${str.charAt( 0 ).toLowerCase()}${str.replace( /[\W_]/g, '|' ).split( '|' )
79
.map( part => `${part.charAt( 0 ).toUpperCase()}${part.slice( 1 )}` )

dist/mix-manifest.json

Lines changed: 101 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,106 @@
11
{
2-
"/scripts/book.js": "/scripts/book.js?id=af07185482a38384a7bf",
3-
"/styles/book.css": "/styles/book.css?id=3cbb775c3b4e63c64468",
4-
"/styles/web-house-style.css": "/styles/web-house-style.css?id=d3c1aedc7525b0f30ccd",
5-
"/scripts/collapse-sections.js": "/scripts/collapse-sections.js?id=ba8eb815cea5fd273013",
6-
"/scripts/lightbox.js": "/scripts/lightbox.js?id=f3698731576f981b3aa8",
7-
"/scripts/pane.js": "/scripts/pane.js?id=4173f00e886097d83339",
2+
"/scripts/book.js": "/scripts/book.js?id=f97a2577f4e0b419ab12",
3+
"/scripts/pane.js": "/scripts/pane.js?id=7e5b385cb135973c79f7",
4+
"/scripts/collapse-sections.js": "/scripts/collapse-sections.js?id=83a9f50d491bda850fbc",
5+
"/scripts/lightbox.js": "/scripts/lightbox.js?id=cb2b7b2a5fb303c3095d",
6+
"/styles/web-house-style.css": "/styles/web-house-style.css?id=f2ec506de7eae2e9ddc5",
7+
"/styles/book.css": "/styles/book.css?id=4bdd582985aebfe20328",
88
"/scripts/sharer.js": "/scripts/sharer.js?id=40da80ac58b2606eaedf",
99
"/scripts/lity.js": "/scripts/lity.js?id=57482ac9aa162ba60708",
1010
"/scripts/details-element-polyfill.js": "/scripts/details-element-polyfill.js?id=60ad7c2161011e153d53",
11-
"/styles/lity.css": "/styles/lity.css?id=9fc32fbde0b6f07a3ced"
11+
"/styles/lity.css": "/styles/lity.css?id=9fc32fbde0b6f07a3ced",
12+
"/images/amazon.png": "/images/amazon.png?id=800edd49516c95950aaf",
13+
"/images/android-chrome-192x192.png": "/images/android-chrome-192x192.png?id=d3a1f2244b2f7abba374",
14+
"/images/android-chrome-512x512.png": "/images/android-chrome-512x512.png?id=e5ca2f211159d7d43b26",
15+
"/images/apple-touch-icon-120x120.png": "/images/apple-touch-icon-120x120.png?id=0056597639528e87f658",
16+
"/images/apple-touch-icon-152x152.png": "/images/apple-touch-icon-152x152.png?id=19875d7ed3bc5c0ee970",
17+
"/images/apple-touch-icon-180x180.png": "/images/apple-touch-icon-180x180.png?id=649d9918ed6dc0385895",
18+
"/images/apple-touch-icon-60x60.png": "/images/apple-touch-icon-60x60.png?id=1a84de4d2c1f6c6bab46",
19+
"/images/apple-touch-icon-76x76.png": "/images/apple-touch-icon-76x76.png?id=337b96a38827de76d2af",
20+
"/images/apple-touch-icon.png": "/images/apple-touch-icon.png?id=649d9918ed6dc0385895",
21+
"/images/asterisk.png": "/images/asterisk.png?id=574f731dcd3c5a4a462c",
22+
"/images/barnes-and-noble.png": "/images/barnes-and-noble.png?id=3d0eb1de8fcf7f7705e3",
23+
"/images/bg.png": "/images/bg.png?id=be16824e61a1c68f60a9",
24+
"/images/blockquote-close.png": "/images/blockquote-close.png?id=7a2e053ceb8d0aee35c2",
25+
"/images/blockquote-open.png": "/images/blockquote-open.png?id=900534c5c993f32d75fc",
26+
"/images/book-info-detail.png": "/images/book-info-detail.png?id=41a1a3f3b73417c7b984",
27+
"/images/book-info-stroke.png": "/images/book-info-stroke.png?id=ba2ffb1983ef06bb2b63",
28+
"/images/buy-page-border-bottom-stroke.png": "/images/buy-page-border-bottom-stroke.png?id=5965d387f2781b3872b8",
29+
"/images/by.svg": "/images/by.svg?id=7813b5794d8ba96aec20",
30+
"/images/cc.svg": "/images/cc.svg?id=e3defa79f640d165173a",
31+
"/images/em-dash.png": "/images/em-dash.png?id=e1962cf9acd587c8e8de",
32+
"/images/epub-36.png": "/images/epub-36.png?id=75abde76f471b3f876cc",
33+
"/images/epub-48.png": "/images/epub-48.png?id=74455b89af304d08cf1a",
34+
"/images/epub-72.png": "/images/epub-72.png?id=cf929c4b6062eda850b9",
35+
"/images/epub-96.png": "/images/epub-96.png?id=323850d19c2aaf13c568",
36+
"/images/epub3-36.png": "/images/epub3-36.png?id=f1d1c2f13ac265913d1c",
37+
"/images/epub3-48.png": "/images/epub3-48.png?id=acbd1ebb656d94d6b63d",
38+
"/images/epub3-72.png": "/images/epub3-72.png?id=59467439597843410ebc",
39+
"/images/epub3-96.png": "/images/epub3-96.png?id=55a03ff97534a7074b0b",
40+
"/images/facebook-icon.png": "/images/facebook-icon.png?id=a0073ec3a8c90a012bc5",
41+
"/images/favicon-16x16.png": "/images/favicon-16x16.png?id=454616a9f8584e8da1f0",
42+
"/images/favicon-32x32.png": "/images/favicon-32x32.png?id=a6aaebb716b6ea46273f",
43+
"/images/favicon.ico": "/images/favicon.ico?id=0c56238d5180176e5917",
44+
"/images/footer-inner.png": "/images/footer-inner.png?id=b6238761317ce72ac352",
45+
"/images/footer-shadow.png": "/images/footer-shadow.png?id=a1212f13533bbd741fbe",
46+
"/images/google-plus-icon.png": "/images/google-plus-icon.png?id=3a8b54c93cc8975f0d9e",
47+
"/images/ibooks.png": "/images/ibooks.png?id=a8a2dbb70773853ebc6b",
48+
"/images/icml-36.png": "/images/icml-36.png?id=2d89e18440d4b8da476a",
49+
"/images/icml-48.png": "/images/icml-48.png?id=5beaa6e95ab74a585dff",
50+
"/images/icml-72.png": "/images/icml-72.png?id=624b62758f11d5eda43a",
51+
"/images/icml-96.png": "/images/icml-96.png?id=e237bb6dc0c9d3d2da57",
52+
"/images/jpg-36.png": "/images/jpg-36.png?id=21cb4555794bb1a611d5",
53+
"/images/jpg-48.png": "/images/jpg-48.png?id=818f82c0f89155af5504",
54+
"/images/jpg-72.png": "/images/jpg-72.png?id=ee928eee12b33af39c34",
55+
"/images/jpg-96.png": "/images/jpg-96.png?id=46b82276430d098f27de",
56+
"/images/kobo.png": "/images/kobo.png?id=1d0affb385b3b0dfd081",
57+
"/images/login-formwrap.png": "/images/login-formwrap.png?id=47b07b7de9597420046f",
58+
"/images/logo-login.png": "/images/logo-login.png?id=59b5464065612a7221d4",
59+
"/images/mobi-36.png": "/images/mobi-36.png?id=49f06b9a43a158122ee5",
60+
"/images/mobi-48.png": "/images/mobi-48.png?id=525046825b33acfff52d",
61+
"/images/mobi-72.png": "/images/mobi-72.png?id=53512bd9f520a8886aae",
62+
"/images/mobi-96.png": "/images/mobi-96.png?id=06ee2b29236fdf919af2",
63+
"/images/mstile-144x144.png": "/images/mstile-144x144.png?id=94ba7618c01973460be6",
64+
"/images/mstile-150x150.png": "/images/mstile-150x150.png?id=0471d5dac60a846dddfd",
65+
"/images/mstile-310x150.png": "/images/mstile-310x150.png?id=7d2e1d9397bfa34b44e3",
66+
"/images/mstile-310x310.png": "/images/mstile-310x310.png?id=a0ebc01ec5b581e4a012",
67+
"/images/mstile-70x70.png": "/images/mstile-70x70.png?id=18d3275b663e12fe7534",
68+
"/images/nc.svg": "/images/nc.svg?id=e378f908a7f49e2a3812",
69+
"/images/nd.svg": "/images/nd.svg?id=81b46c341b114ea96a5c",
70+
"/images/odt-36.png": "/images/odt-36.png?id=f11a0f89bd448fc7742f",
71+
"/images/odt-48.png": "/images/odt-48.png?id=45b80fb4b9184d5a75d5",
72+
"/images/odt-72.png": "/images/odt-72.png?id=0a1db47f9479358d3883",
73+
"/images/odt-96.png": "/images/odt-96.png?id=d0d502a47b1d6aeef3c7",
74+
"/images/oreilly.png": "/images/oreilly.png?id=11cc749c91fdf936cd2c",
75+
"/images/pdf-36.png": "/images/pdf-36.png?id=c6d9e4fd7bbd0d81f33a",
76+
"/images/pdf-48.png": "/images/pdf-48.png?id=0652db008a130af18473",
77+
"/images/pdf-72.png": "/images/pdf-72.png?id=4af572cf75d29b9efb24",
78+
"/images/pdf-96.png": "/images/pdf-96.png?id=6a7b4a0041cf18aaca6b",
79+
"/images/pressbooks-branding-2x.png": "/images/pressbooks-branding-2x.png?id=55fa2aae7decbf404ade",
80+
"/images/pressbooks-branding.png": "/images/pressbooks-branding.png?id=0ae8f99cf89bd9ed301d",
81+
"/images/pressbooks-logo.svg": "/images/pressbooks-logo.svg?id=54f98c061a5ecdfd77d3",
82+
"/images/print-pdf-36.png": "/images/print-pdf-36.png?id=378d2a9d718dbcabee64",
83+
"/images/print-pdf-48.png": "/images/print-pdf-48.png?id=100556ba19e22bbdc7a7",
84+
"/images/print-pdf-72.png": "/images/print-pdf-72.png?id=40a454e46c7e77b50cf5",
85+
"/images/print-pdf-96.png": "/images/print-pdf-96.png?id=b041015b682dcab185df",
86+
"/images/publicdomain.svg": "/images/publicdomain.svg?id=c2b57d946c5ce46a5fd2",
87+
"/images/remix.svg": "/images/remix.svg?id=5d817e37e145f6a5b3af",
88+
"/images/sa.svg": "/images/sa.svg?id=978acd9d54dfd3c39cd9",
89+
"/images/safari-pinned-tab.svg": "/images/safari-pinned-tab.svg?id=fdc3041c7198fae52920",
90+
"/images/share.svg": "/images/share.svg?id=fb8bd57a03731cfffe4d",
91+
"/images/sprite-book-info.png": "/images/sprite-book-info.png?id=f0e7ea508b404bc5ca24",
92+
"/images/sprite.png": "/images/sprite.png?id=6eb2205118e5005c1828",
93+
"/images/twitter-icon.png": "/images/twitter-icon.png?id=e9d2e24ba38f498c4840",
94+
"/images/vanillawxr-36.png": "/images/vanillawxr-36.png?id=699096f1ea666ec48bd9",
95+
"/images/vanillawxr-48.png": "/images/vanillawxr-48.png?id=7bfb2dcbb3398aef9628",
96+
"/images/vanillawxr-72.png": "/images/vanillawxr-72.png?id=6bde3554e180a05e8609",
97+
"/images/vanillawxr-96.png": "/images/vanillawxr-96.png?id=6f248dbfbe525efeac75",
98+
"/images/wxr-36.png": "/images/wxr-36.png?id=a0eecf15ffa491bb55d0",
99+
"/images/wxr-48.png": "/images/wxr-48.png?id=907e785a36ffb5634962",
100+
"/images/wxr-72.png": "/images/wxr-72.png?id=aad01763ee5c8754eaa3",
101+
"/images/wxr-96.png": "/images/wxr-96.png?id=461e358f0757be252cf2",
102+
"/images/xhtml-36.png": "/images/xhtml-36.png?id=f151cb946ae36f9ac65a",
103+
"/images/xhtml-48.png": "/images/xhtml-48.png?id=09837d9c9a18ea6c6b1f",
104+
"/images/xhtml-72.png": "/images/xhtml-72.png?id=c3182b3d50e84d79cd23",
105+
"/images/xhtml-96.png": "/images/xhtml-96.png?id=a722bb0e5a6e6b1748fb"
12106
}

0 commit comments

Comments
 (0)