Compare commits

..

No commits in common. 'dev' and 'production' have entirely different histories.

  1. 2
      .github/CONTRIBUTING.md
  2. 27
      .github/workflows/build-and-lint.yml
  3. 4
      .github/workflows/standards-and-tests.yml
  4. 1
      .nvmrc
  5. 13
      composer.lock
  6. 19
      header.php
  7. 163
      package-lock.json
  8. 4
      package.json
  9. 2
      style.css

2
.github/CONTRIBUTING.md

@ -1,3 +1,3 @@
# Contributing
Issues related to this theme and its use on the root site of a Pressbooks network are welcomed on this repository. Issues related to general functionality of Pressbooks should be posted to [pressbooks/pressbooks](https://github.com/pressbooks/pressbooks). All contributions are subject to the [Contributor Code of Conduct](https://github.com/pressbooks/pressbooks-publisher/blob/production/.github/CODE_OF_CONDUCT.md).
Issues related to this theme and its use on the root site of a Pressbooks network are welcomed on this repository. Issues related to general functionality of Pressbooks should be posted to [pressbooks/pressbooks](https://github.com/pressbooks/pressbooks). All contributions are subject to the [Contributor Code of Conduct](https://github.com/pressbooks/pressbooks-publisher/blob/master/.github/CODE_OF_CONDUCT.md).

27
.github/workflows/build-and-lint.yml

@ -1,11 +1,34 @@
name: Build & Lint
on:
push:
branches: [ dev, production ]
branches: [ dev, master ]
tags:
- '*.*.*'
pull_request:
branches: [ dev ]
jobs:
build:
uses: pressbooks/composer-autoupdate-bedrock/.github/workflows/lint-build.yml@v1
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14', '16' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Cache Node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install Node dependencies & build assets
run: |
node -v
npm install
npm run build
- name: Run ESLint and Stylelint
run: npm run lint

4
.github/workflows/standards-and-tests.yml

@ -1,7 +1,7 @@
name: Run Standards & Tests
on:
push:
branches: [dev, production]
branches: [dev, master]
tags:
- '*.*.*'
pull_request:
@ -101,7 +101,7 @@ jobs:
- name: Trigger Bedrock Update
if: github.ref == 'refs/heads/dev' && matrix.experimental == false
uses: pressbooks/composer-autoupdate-bedrock@v1
uses: pressbooks/composer-autoupdate-bedrock@v1.0
with:
triggered-by: ${{ github.repository }}
token: ${{ secrets.PAT_COMPOSER_UPDATE }}

1
.nvmrc

@ -1 +0,0 @@
v18

13
composer.lock generated

@ -254,23 +254,22 @@
},
{
"name": "spatie/color",
"version": "1.5.3",
"version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/color.git",
"reference": "49739265900cabce4640cd26c3266fd8d2cca390"
"reference": "d6e9b2766d8e24aab835e414248728762bd63530"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/color/zipball/49739265900cabce4640cd26c3266fd8d2cca390",
"reference": "49739265900cabce4640cd26c3266fd8d2cca390",
"url": "https://api.github.com/repos/spatie/color/zipball/d6e9b2766d8e24aab835e414248728762bd63530",
"reference": "d6e9b2766d8e24aab835e414248728762bd63530",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^6.5||^9.0"
},
"type": "library",
@ -301,7 +300,7 @@
],
"support": {
"issues": "https://github.com/spatie/color/issues",
"source": "https://github.com/spatie/color/tree/1.5.3"
"source": "https://github.com/spatie/color/tree/1.5.2"
},
"funding": [
{
@ -309,7 +308,7 @@
"type": "github"
}
],
"time": "2022-12-18T12:58:32+00:00"
"time": "2022-06-24T21:50:06+00:00"
},
{
"name": "squizlabs/php_codesniffer",

19
header.php

@ -45,7 +45,24 @@ use function Aldine\Helpers\custom_homepage;
</svg>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'pressbooks-aldine' ); ?></a>
<header class="header" role="banner">
<header class="header" role="banner" style="background-image: url(
<?php
if ( has_post_thumbnail() ) {
echo get_the_post_thumbnail_url();
} else {
if ( is_front_page() ) {
if ( has_header_image() ) {
echo( get_header_image() );
} else {
echo get_template_directory_uri() . '/dist/images/header.jpg';
}
} else {
echo get_template_directory_uri() . '/dist/images/catalog-header.jpg';
}
}
?>
);">
<div class="header__inside">
<div class="header__brand">
<a title="<?php echo get_bloginfo( 'name', 'display' ); ?>" href="<?php echo network_home_url(); ?>">

163
package-lock.json generated

@ -15,7 +15,7 @@
"pressbooks-build-tools": "^4.0.0"
},
"engines": {
"node": ">= 18"
"node": ">= 14"
}
},
"node_modules/@allmarkedup/fang": {
@ -3616,6 +3616,20 @@
"node": ">= 0.8"
}
},
"node_modules/body-parser/node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/bonjour-service": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.14.tgz",
@ -3710,12 +3724,12 @@
"dev": true
},
"node_modules/browser-sync": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.11.tgz",
"integrity": "sha512-U5f9u97OYJH66T0MGWWzG9rOQTW6ZmDMj97vsmtqwNS03JAwdLVES8eel2lD3rvAqQCNAFqaJ74NMacBI57vJg==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.10.tgz",
"integrity": "sha512-xKm+6KJmJu6RuMWWbFkKwOCSqQOxYe3nOrFkKI5Tr/ZzjPxyU3pFShKK3tWnazBo/3lYQzN7fzjixG8fwJh1Xw==",
"dependencies": {
"browser-sync-client": "^2.27.11",
"browser-sync-ui": "^2.27.11",
"browser-sync-client": "^2.27.10",
"browser-sync-ui": "^2.27.10",
"bs-recipes": "1.3.4",
"bs-snippet-injector": "^2.0.1",
"chokidar": "^3.5.1",
@ -3733,7 +3747,7 @@
"micromatch": "^4.0.2",
"opn": "5.3.0",
"portscanner": "2.2.0",
"qs": "^6.11.0",
"qs": "6.2.3",
"raw-body": "^2.3.2",
"resp-modifier": "6.0.2",
"rx": "4.1.0",
@ -3753,9 +3767,9 @@
}
},
"node_modules/browser-sync-client": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.11.tgz",
"integrity": "sha512-okMNfD2NasL/XD1/BclP3onXjhahisk3e/kTQ5HPDT/lLqdBqNDd6QFcjI5I1ak7na2hxKQSLjryql+7fp5gKQ==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.10.tgz",
"integrity": "sha512-KCFKA1YDj6cNul0VsA28apohtBsdk5Wv8T82ClOZPZMZWxPj4Ny5AUbrj9UlAb/k6pdxE5HABrWDhP9+cjt4HQ==",
"dependencies": {
"etag": "1.8.1",
"fresh": "0.5.2",
@ -3768,9 +3782,9 @@
}
},
"node_modules/browser-sync-ui": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.11.tgz",
"integrity": "sha512-1T/Y8Pp1R68aUL7zVSFq0nxtr258xWd/nTasCAHX2M6EsGaswVOFtXsw3bKqsr35z+J+LfVfOdz1HFLYKxdgrA==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.10.tgz",
"integrity": "sha512-elbJILq4Uo6OQv6gsvS3Y9vRAJlWu+h8j0JDkF0X/ua+3S6SVbbiWnZc8sNOFlG7yvVGIwBED3eaYQ0iBo1Dtw==",
"dependencies": {
"async-each-series": "0.1.1",
"connect-history-api-fallback": "^1",
@ -7062,6 +7076,20 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"node_modules/express/node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/express/node_modules/send": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
@ -9812,9 +9840,9 @@
"dev": true
},
"node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
@ -10094,9 +10122,9 @@
}
},
"node_modules/loader-utils/node_modules/json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"dependencies": {
"minimist": "^1.2.0"
@ -14740,17 +14768,11 @@
}
},
"node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"dependencies": {
"side-channel": "^1.0.4"
},
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz",
"integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=",
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/querystring": {
@ -18441,9 +18463,9 @@
}
},
"node_modules/tsconfig-paths/node_modules/json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"dependencies": {
"minimist": "^1.2.0"
@ -18507,9 +18529,9 @@
}
},
"node_modules/typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -22735,6 +22757,14 @@
"requires": {
"ee-first": "1.1.1"
}
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"requires": {
"side-channel": "^1.0.4"
}
}
}
},
@ -22815,12 +22845,12 @@
"dev": true
},
"browser-sync": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.11.tgz",
"integrity": "sha512-U5f9u97OYJH66T0MGWWzG9rOQTW6ZmDMj97vsmtqwNS03JAwdLVES8eel2lD3rvAqQCNAFqaJ74NMacBI57vJg==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.10.tgz",
"integrity": "sha512-xKm+6KJmJu6RuMWWbFkKwOCSqQOxYe3nOrFkKI5Tr/ZzjPxyU3pFShKK3tWnazBo/3lYQzN7fzjixG8fwJh1Xw==",
"requires": {
"browser-sync-client": "^2.27.11",
"browser-sync-ui": "^2.27.11",
"browser-sync-client": "^2.27.10",
"browser-sync-ui": "^2.27.10",
"bs-recipes": "1.3.4",
"bs-snippet-injector": "^2.0.1",
"chokidar": "^3.5.1",
@ -22838,7 +22868,7 @@
"micromatch": "^4.0.2",
"opn": "5.3.0",
"portscanner": "2.2.0",
"qs": "^6.11.0",
"qs": "6.2.3",
"raw-body": "^2.3.2",
"resp-modifier": "6.0.2",
"rx": "4.1.0",
@ -22877,9 +22907,9 @@
}
},
"browser-sync-client": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.11.tgz",
"integrity": "sha512-okMNfD2NasL/XD1/BclP3onXjhahisk3e/kTQ5HPDT/lLqdBqNDd6QFcjI5I1ak7na2hxKQSLjryql+7fp5gKQ==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.10.tgz",
"integrity": "sha512-KCFKA1YDj6cNul0VsA28apohtBsdk5Wv8T82ClOZPZMZWxPj4Ny5AUbrj9UlAb/k6pdxE5HABrWDhP9+cjt4HQ==",
"requires": {
"etag": "1.8.1",
"fresh": "0.5.2",
@ -22889,9 +22919,9 @@
}
},
"browser-sync-ui": {
"version": "2.27.11",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.11.tgz",
"integrity": "sha512-1T/Y8Pp1R68aUL7zVSFq0nxtr258xWd/nTasCAHX2M6EsGaswVOFtXsw3bKqsr35z+J+LfVfOdz1HFLYKxdgrA==",
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.10.tgz",
"integrity": "sha512-elbJILq4Uo6OQv6gsvS3Y9vRAJlWu+h8j0JDkF0X/ua+3S6SVbbiWnZc8sNOFlG7yvVGIwBED3eaYQ0iBo1Dtw==",
"requires": {
"async-each-series": "0.1.1",
"connect-history-api-fallback": "^1",
@ -25431,6 +25461,14 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"requires": {
"side-channel": "^1.0.4"
}
},
"send": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
@ -27472,9 +27510,9 @@
"dev": true
},
"json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true
},
"jsonfile": {
@ -27689,9 +27727,9 @@
},
"dependencies": {
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
@ -31271,12 +31309,9 @@
}
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"requires": {
"side-channel": "^1.0.4"
}
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz",
"integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4="
},
"querystring": {
"version": "0.2.0",
@ -34134,9 +34169,9 @@
},
"dependencies": {
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
@ -34187,9 +34222,9 @@
}
},
"typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
"version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA=="
},
"ua-parser-js": {
"version": "1.0.2",

4
package.json

@ -20,7 +20,7 @@
"licenses": [
{
"type": "GPL-3.0-or-later",
"url": "https://github.com/pressbooks/pressbooks-aldine/tree/production/LICENSE.md"
"url": "https://github.com/pressbooks/pressbooks-aldine/tree/master/LICENSE.md"
}
],
"browserslist": [
@ -71,7 +71,7 @@
"test": "npm run lint"
},
"engines": {
"node": ">= 18"
"node": ">= 14"
},
"devDependencies": {
"npm-run-all": "^4.1.5",

2
style.css

@ -10,7 +10,7 @@ Requires at least: 6.1.1
Tested up to: 6.1.1
Requires PHP: 8.0
License: GNU GPL v3 or later
License URI: https://github.com/pressbooks/pressbooks-aldine/tree/production/LICENSE.md
License URI: https://github.com/pressbooks/pressbooks-aldine/tree/master/LICENSE.md
Text Domain: pressbooks-aldine
GitHub Theme URI: pressbooks/pressbooks-aldine
Release Asset: true

Loading…
Cancel
Save