Browse Source

Merge branch 'dev'

1.15.0
Ho Man Chan 2 years ago
parent
commit
dac7cf2747
  1. 8
      .github/workflows/build-and-lint.yml
  2. 8
      .github/workflows/standards-and-tests.yml
  3. 19
      .github/workflows/update-pot.yml
  4. 13
      .github/workflows/update-translations.yml
  5. 41
      README.md
  6. 2
      assets/scripts/aldine.js
  7. 1
      assets/scripts/call-to-action.js
  8. 1
      assets/scripts/page-section.js
  9. 2
      assets/styles/aldine.scss
  10. 9
      assets/styles/components/_book.scss
  11. 4
      assets/styles/components/_forms.scss
  12. 10
      assets/styles/editor.scss
  13. 5
      assets/styles/layouts/_header.scss
  14. 17
      assets/styles/layouts/_page-catalog.scss
  15. 2
      assets/styles/layouts/_page-home.scss
  16. 1
      assets/styles/layouts/_signup.scss
  17. 4
      composer.json
  18. 1819
      composer.lock
  19. 34
      dist/mix-manifest.json
  20. 397
      dist/scripts/aldine.js
  21. 2
      dist/scripts/aldine.js.LICENSE.txt
  22. 33
      dist/scripts/call-to-action.js
  23. 68
      dist/scripts/catalog-admin.js
  24. 33
      dist/scripts/customizer-toggle.js
  25. 33
      dist/scripts/customizer.js
  26. 33
      dist/scripts/page-section.js
  27. 2696
      dist/styles/aldine.css
  28. 387
      dist/styles/editor.css
  29. 2
      functions.php
  30. 4
      inc/actions/namespace.php
  31. 9
      inc/activation/namespace.php
  32. 13
      inc/helpers/namespace.php
  33. BIN
      languages/bg_BG.mo
  34. BIN
      languages/de_DE.mo
  35. BIN
      languages/en_GB.mo
  36. BIN
      languages/es_ES.mo
  37. BIN
      languages/fr_FR.mo
  38. BIN
      languages/he.mo
  39. BIN
      languages/hr.mo
  40. BIN
      languages/hu_HU.mo
  41. BIN
      languages/it_IT.mo
  42. BIN
      languages/kn.mo
  43. BIN
      languages/lt_LT.mo
  44. BIN
      languages/lv.mo
  45. BIN
      languages/nl_NL.mo
  46. 78
      languages/pressbooks-aldine.pot
  47. BIN
      languages/ru_RU.mo
  48. BIN
      languages/tr_TR.mo
  49. 24589
      package-lock.json
  50. 22
      package.json
  51. 5
      page-catalog.php
  52. 12
      partials/content-front-page.php
  53. 58
      readme.txt
  54. 12
      style.css

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

@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14' ]
node: [ '14', '16' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}

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

@ -15,7 +15,7 @@ jobs:
matrix:
php: [ 7.4 ]
os: [ ubuntu-20.04 ]
wordpress: [ 5.9.3, latest ]
wordpress: [ 6.0.2, latest ]
experimental: [ false ]
include:
- php: 8.0
@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v2
@ -41,7 +41,7 @@ jobs:
run: sudo systemctl start mysql.service
- name: Cache PHP dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
@ -93,7 +93,7 @@ jobs:
if: matrix.experimental == false
- name: Upload Coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v3
if: matrix.experimental == false
- name: Prepare Build

19
.github/workflows/update-pot.yml

@ -7,29 +7,22 @@ on:
paths:
- '**.php'
- '**.js'
workflow_dispatch:
jobs:
update-pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer, wp-cli
- name: Install dependencies
run: |
wp package install wp-cli/i18n-command:2.2.8
cd /home/runner/.wp-cli/packages/
composer config repositories.wp-cli '{"type": "composer","url": "https://wp-cli.org/package-index/","canonical": false}'
cd ./
wp package install pressbooks/pb-cli:2.1.0
composer require jenssegers/blade:1.1.0
php-version: '7.4'
tools: composer, wp-cli/wp-cli-bundle
- name: Update POT file
run: wp pb make-pot . languages/pressbooks-aldine.pot --require=vendor/autoload.php --domain=pressbooks-aldine --slug=pressbooks-aldine --package-name="Aldine" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-aldine/issues\"}"
run: wp i18n make-pot . languages/pressbooks-aldine.pot --domain=pressbooks-aldine --slug=pressbooks-aldine --package-name="Aldine" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-aldine/issues\"}"
- name: Commit updated POT file
uses: stefanzweifel/git-auto-commit-action@v4.13.1
uses: stefanzweifel/git-auto-commit-action@v4.1.1
with:
commit_message: 'chore(l10n): update languages/pressbooks-aldine.pot'
file_pattern: '*.pot'

13
.github/workflows/update-translations.yml

@ -6,7 +6,7 @@ jobs:
update-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Install Transifex Client
@ -15,12 +15,15 @@ jobs:
run: tx pull --all --force --minimum-perc=25
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Install xgettext
run: sudo apt-get install -y gettext
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer, wp-cli/wp-cli-bundle
- name: Generate MO files
run: for file in languages/*.po ; do msgfmt $file -o `echo $file | sed 's/\(.*\.\)po/\1mo/'` ; done
run: wp i18n make-mo languages
- name: Commit updated translation files
uses: stefanzweifel/git-auto-commit-action@v4.13.1
with:
commit_message: 'chore(l10n): update translations'
file_pattern: '*.mo *.po'
file_pattern: '*.mo'

41
README.md

@ -6,39 +6,54 @@
[![PHP from Packagist](https://img.shields.io/packagist/php-v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Packagist](https://img.shields.io/packagist/dt/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Build Status](https://travis-ci.org/pressbooks/pressbooks-aldine.svg?branch=dev)](https://travis-ci.org/pressbooks/pressbooks-aldine)
[![Translate Aldine](https://img.shields.io/badge/dynamic/json.svg?label=translated&url=https%3A%2F%2Ftenpercent.now.sh%2F%3Forganization%3Dpressbooks%26project%3Daldine&query=%24.status&colorB=e05d44&suffix=%25)](https://www.transifex.com/pressbooks/aldine/translate/)
**Tags:** publishing, catalog, pressbooks, default-theme
**Requires at least:** 5.9.3
**Tested up to:** 5.9.3
**Stable tag:** 1.14.1
**License:** GNU General Public License v3 or later
**License URI:** LICENSE
Contributors: conner_bw, greatislander, steelwagstaff
Tags: publishing, catalog, pressbooks, default-theme
Requires at least: 6.0.2
Tested up to: 6.0.2
Stable tag: 1.15.0
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.
## Description
Aldine is the default theme for the home page of [Pressbooks](https://pressbooks.org) networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is based on [Underscores](https://underscores.me/).
## Installation
1. In your admin panel, go to Appearance > Themes and click the Add New button.
2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now.
3. Click Activate to use your new theme right away.
## Changelog
### 1.14.1
### 1.15.0
* See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.14.1
* See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.15.0
* Full release history available at: https://github.com/pressbooks/pressbooks-aldine/releases
## Upgrade Notice
### 1.14.1
- Aldine requires Pressbooks >= 5.34.1
### 1.14.0
- Aldine requires Pressbooks >= 5.33.0
### 1.13.0
- Aldine requires Pressbooks >= 5.32.0
### 1.8.3
- Aldine requires Pressbooks >= 5.17.0
## Credits
- Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)

2
assets/scripts/aldine.js

@ -11,7 +11,7 @@ const routes = new Router( {
// Home page
home,
// Catalog page
catalog,
pageTemplatePageCatalog: catalog,
} );
// Load Events

1
assets/scripts/call-to-action.js

@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
( function () {
tinymce.create( 'tinymce.plugins.aldine_call_to_action', {
/**

1
assets/scripts/page-section.js

@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
( function () {
tinymce.create( 'tinymce.plugins.aldine_page_section', {
/**

2
assets/styles/aldine.scss

@ -6,7 +6,7 @@
* Prefix your imports with `~` to grab from node_modules/
* @see https://github.com/webpack-contrib/sass-loader#imports
*/
@import "~aetna/assets/styles/aetna.scss";
@import "~aetna/assets/styles/aetna";
/** Import theme styles */
@import "common/global";

9
assets/styles/components/_book.scss

@ -8,6 +8,7 @@
margin: 0 0 2rem;
padding: 1.5rem 1rem 2rem;
@media #{$breakpoint-not-small} { padding: 1.5rem 1.85rem 2.1875rem; }
border: solid 2px var(--accent);
background: var(--accent);
@ -27,6 +28,7 @@
margin: 0;
font-size: 1.25rem;
@media #{$breakpoint-not-small} { font-size: 1.75rem; }
font-weight: 500;
line-height: 1.2;
text-align: left;
@ -38,14 +40,15 @@
@media #{$breakpoint-not-small} {
font-size: 1rem;
}
text-align: left;
}
&__institutions {
margin: .5rem 0 0 0;
margin: .5rem 0 0;
font-size: 0.875rem;
text-align: left;
display: -webkit-box;
display: box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
@ -55,6 +58,7 @@
margin: auto 0 0;
font-size: 1rem;
@media #{$breakpoint-not-small} { font-size: 1.125rem; }
text-align: left;
a {
@ -66,6 +70,7 @@
height: 1.125rem;
margin-left: 0.5rem;
}
vertical-align: middle;
}
}

4
assets/styles/components/_forms.scss

@ -23,8 +23,7 @@ textarea {
font-weight: 600;
font-family: $font-family-sans-serif;
background: transparent;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
&:focus {
outline: none;
@ -88,6 +87,7 @@ input[type="submit"] {
font-size: 0.75rem;
}
}
&.error {
border-bottom: solid 2px var(--error);

10
assets/styles/editor.scss

@ -1,8 +1,10 @@
@import '~aetna/assets/styles/common/_variables.scss';
@import '~aetna/assets/styles/common/_global.scss';
@import '~aetna/assets/styles/common/variables';
@import '~aetna/assets/styles/common/global';
body#tinymce {
margin: 12px !important;
@import '~aetna/assets/styles/components/_buttons.scss';
@import '~aetna/assets/styles/layouts/_page-sections.scss';
/* stylelint-disable no-invalid-position-at-import-rule */
@import '~aetna/assets/styles/components/buttons';
@import '~aetna/assets/styles/layouts/page-sections';
/* stylelint-enable */
}

5
assets/styles/layouts/_header.scss

@ -12,6 +12,7 @@
@media #{$breakpoint-large} {
height: 880px;
.header__inside {
position: relative;
z-index: 99;
@ -47,6 +48,7 @@
line-height: 1.25em;
margin-top: 1.5em;
}
margin-bottom: 0;
text-align: center;
max-width: 100%;
@ -58,6 +60,7 @@
@media #{$breakpoint-large} {
font-size: 2rem;
}
margin-top: 0;
margin-bottom: 0;
text-align: center;
@ -73,7 +76,7 @@
}
}
.page.catalog {
.page.page-template-page-catalog {
.header {
height: rem(381);
}

17
assets/styles/layouts/_page-catalog.scss

@ -12,7 +12,7 @@ fieldset {
text-align: left;
text-transform: none;
&:before {
&::before {
display: none;
}
@ -121,12 +121,13 @@ fieldset {
margin: 0 1rem;
}
.catalog {
.page-template-page-catalog {
.books {
width: calc(100% - 1rem);
padding: 0;
margin: 2rem 0 1rem 1rem;
}
.book {
height: 14.375rem;
width: calc(50% - 1rem);
@ -224,12 +225,12 @@ fieldset {
.subject-groups {
width: calc(100% + 0.125rem);
margin-left: -0.06125rem;
margin-left: -0.0612rem;
div {
position: relative;
width: calc(100% + 0.125rem);
margin-left: -0.06125rem;
margin-left: -0.0612rem;
border-bottom: 0;
}
}
@ -240,7 +241,7 @@ fieldset {
margin-left: 0;
}
.catalog .book {
.page-template-page-catalog .book {
height: 16.25rem;
width: calc(100% / 3 - 1rem);
margin: 0 1rem 1rem 0;
@ -248,7 +249,7 @@ fieldset {
}
@media #{$breakpoint-large} {
.catalog #content {
.page-template-page-catalog #content {
width: calc(100% - 1rem);
margin-left: auto;
margin-right: auto;
@ -279,13 +280,13 @@ fieldset {
margin-left: 0;
}
.catalog .books {
.page-template-page-catalog .books {
width: 75%;
float: right;
margin-left: 0;
}
.catalog .book {
.page-template-page-catalog .book {
height: 16.25rem;
max-width: calc(100% / 3 - 1rem);
margin: 0 1rem 1rem 0;

2
assets/styles/layouts/_page-home.scss

@ -74,6 +74,7 @@
width: calc(100vw - 5.125rem);
max-width: 75rem;
}
.books {
flex-direction: row;
justify-content: center;
@ -93,6 +94,7 @@
.previous,
.next {
width: rem(32);
svg {
width: rem(32);
height: rem(32);

1
assets/styles/layouts/_signup.scss

@ -1,6 +1,7 @@
.wp-activate-container,
.mu_register.wp-signup-container {
@extend .page-section;
margin: rem(120) auto 4rem;
* {

4
composer.json

@ -36,7 +36,6 @@
},
"require-dev": {
"pressbooks/coding-standards": "^1.1",
"wpreadme2markdown/wp2md": "^4.0",
"yoast/phpunit-polyfills": "^1.0.1"
},
"scripts": {
@ -54,7 +53,6 @@
],
"localize": [
"wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) <code@pressbooks.com>' -s '**/*.php'"
],
"readme": ["vendor/bin/wp2md -i readme.txt -o README.md"]
]
}
}

1819
composer.lock generated

File diff suppressed because it is too large Load Diff

34
dist/mix-manifest.json vendored

@ -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",
"/scripts/call-to-action.js": "/scripts/call-to-action.js",
"/scripts/catalog-admin.js": "/scripts/catalog-admin.js",
"/scripts/customizer.js": "/scripts/customizer.js",
"/scripts/customizer-toggle.js": "/scripts/customizer-toggle.js",
"/scripts/page-section.js": "/scripts/page-section.js",
"/styles/editor.css": "/styles/editor.css",
"/styles/aldine.css": "/styles/aldine.css",
"/fonts/pressbooks-theme.woff": "/fonts/pressbooks-theme.woff",
"/images/banner.jpg": "/images/banner.jpg",
"/images/catalog-header.jpg": "/images/catalog-header.jpg",
"/images/header.jpg": "/images/header.jpg",
"/images/left-arrow.svg": "/images/left-arrow.svg",
"/images/logo.svg": "/images/logo.svg",
"/images/pb.svg": "/images/pb.svg",
"/images/right-arrow.svg": "/images/right-arrow.svg",
"/images/yt_icon_mono_dark.png": "/images/yt_icon_mono_dark.png"
}

397
dist/scripts/aldine.js vendored

File diff suppressed because one or more lines are too long

2
dist/scripts/aldine.js.LICENSE.txt vendored

@ -15,7 +15,7 @@
*/
/*!
* Masonry v4.2.1
* Masonry v4.2.2
* Cascading grid layout library
* https://masonry.desandro.com
* MIT License

33
dist/scripts/call-to-action.js vendored

File diff suppressed because one or more lines are too long

68
dist/scripts/catalog-admin.js vendored

File diff suppressed because one or more lines are too long

33
dist/scripts/customizer-toggle.js vendored

@ -1 +1,32 @@
document.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("_customize-input-pb_network_contact_form"),e=document.getElementById("customize-control-pb_network_contact_email"),s=document.getElementById("customize-control-pb_network_contact_link"),n=document.getElementById("customize-control-pb_network_contact_form_title");function c(){!1===t.checked?(e.classList.add("hidden"),e.style.cssText=null,n.classList.add("hidden"),n.style.cssText=null,s.classList.remove("hidden"),s.style.cssText="display: list-item;"):(e.classList.remove("hidden"),e.style.cssText="display: list-item;",n.classList.remove("hidden"),n.style.cssText="display: list-item;",s.classList.add("hidden"),s.style.cssText=null)}t.addEventListener("click",c),c()}));
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./assets/scripts/customizer-toggle.js":
/*!*********************************************!*\
!*** ./assets/scripts/customizer-toggle.js ***!
\*********************************************/
/***/ (function() {
eval("document.addEventListener('DOMContentLoaded', function () {\n var checkbox = document.getElementById('_customize-input-pb_network_contact_form');\n var email = document.getElementById('customize-control-pb_network_contact_email');\n var link = document.getElementById('customize-control-pb_network_contact_link');\n var title = document.getElementById('customize-control-pb_network_contact_form_title');\n checkbox.addEventListener('click', toggleReadOnly);\n /**\n *\n */\n\n function toggleReadOnly() {\n if (checkbox.checked === false) {\n email.classList.add('hidden');\n email.style.cssText = null;\n title.classList.add('hidden');\n title.style.cssText = null;\n link.classList.remove('hidden');\n link.style.cssText = 'display: list-item;';\n } else {\n email.classList.remove('hidden');\n email.style.cssText = 'display: list-item;';\n title.classList.remove('hidden');\n title.style.cssText = 'display: list-item;';\n link.classList.add('hidden');\n link.style.cssText = null;\n }\n }\n\n toggleReadOnly();\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AcHJlc3Nib29rcy9wcmVzc2Jvb2tzLWFsZGluZS8uL2Fzc2V0cy9zY3JpcHRzL2N1c3RvbWl6ZXItdG9nZ2xlLmpzP2U0Y2IiXSwibmFtZXMiOlsiZG9jdW1lbnQiLCJhZGRFdmVudExpc3RlbmVyIiwiY2hlY2tib3giLCJnZXRFbGVtZW50QnlJZCIsImVtYWlsIiwibGluayIsInRpdGxlIiwidG9nZ2xlUmVhZE9ubHkiLCJjaGVja2VkIiwiY2xhc3NMaXN0IiwiYWRkIiwic3R5bGUiLCJjc3NUZXh0IiwicmVtb3ZlIl0sIm1hcHBpbmdzIjoiQUFBQUEsUUFBUSxDQUFDQyxnQkFBVCxDQUEyQixrQkFBM0IsRUFBK0MsWUFBWTtBQUMxRCxNQUFJQyxRQUFRLEdBQUdGLFFBQVEsQ0FBQ0csY0FBVCxDQUF5QiwwQ0FBekIsQ0FBZjtBQUNBLE1BQUlDLEtBQUssR0FBR0osUUFBUSxDQUFDRyxjQUFULENBQXlCLDRDQUF6QixDQUFaO0FBQ0EsTUFBSUUsSUFBSSxHQUFHTCxRQUFRLENBQUNHLGNBQVQsQ0FBeUIsMkNBQXpCLENBQVg7QUFDQSxNQUFJRyxLQUFLLEdBQUdOLFFBQVEsQ0FBQ0csY0FBVCxDQUF5QixpREFBekIsQ0FBWjtBQUVBRCxFQUFBQSxRQUFRLENBQUNELGdCQUFULENBQTJCLE9BQTNCLEVBQW9DTSxjQUFwQztBQUVBO0FBQ0Q7QUFDQTs7QUFDQyxXQUFTQSxjQUFULEdBQTBCO0FBQ3pCLFFBQUtMLFFBQVEsQ0FBQ00sT0FBVCxLQUFxQixLQUExQixFQUFrQztBQUNqQ0osTUFBQUEsS0FBSyxDQUFDSyxTQUFOLENBQWdCQyxHQUFoQixDQUFxQixRQUFyQjtBQUNBTixNQUFBQSxLQUFLLENBQUNPLEtBQU4sQ0FBWUMsT0FBWixHQUFzQixJQUF0QjtBQUVBTixNQUFBQSxLQUFLLENBQUNHLFNBQU4sQ0FBZ0JDLEdBQWhCLENBQXFCLFFBQXJCO0FBQ0FKLE1BQUFBLEtBQUssQ0FBQ0ssS0FBTixDQUFZQyxPQUFaLEdBQXNCLElBQXRCO0FBRUFQLE1BQUFBLElBQUksQ0FBQ0ksU0FBTCxDQUFlSSxNQUFmLENBQXVCLFFBQXZCO0FBQ0FSLE1BQUFBLElBQUksQ0FBQ00sS0FBTCxDQUFXQyxPQUFYLEdBQXFCLHFCQUFyQjtBQUNBLEtBVEQsTUFTTztBQUNOUixNQUFBQSxLQUFLLENBQUNLLFNBQU4sQ0FBZ0JJLE1BQWhCLENBQXdCLFFBQXhCO0FBQ0FULE1BQUFBLEtBQUssQ0FBQ08sS0FBTixDQUFZQyxPQUFaLEdBQXNCLHFCQUF0QjtBQUVBTixNQUFBQSxLQUFLLENBQUNHLFNBQU4sQ0FBZ0JJLE1BQWhCLENBQXdCLFFBQXhCO0FBQ0FQLE1BQUFBLEtBQUssQ0FBQ0ssS0FBTixDQUFZQyxPQUFaLEdBQXNCLHFCQUF0QjtBQUVBUCxNQUFBQSxJQUFJLENBQUNJLFNBQUwsQ0FBZUMsR0FBZixDQUFvQixRQUFwQjtBQUNBTCxNQUFBQSxJQUFJLENBQUNNLEtBQUwsQ0FBV0MsT0FBWCxHQUFxQixJQUFyQjtBQUNBO0FBQ0Q7O0FBRURMLEVBQUFBLGNBQWM7QUFFZCxDQW5DRCIsInNvdXJjZXNDb250ZW50IjpbImRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoICdET01Db250ZW50TG9hZGVkJywgZnVuY3Rpb24gKCkge1xuXHRsZXQgY2hlY2tib3ggPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCggJ19jdXN0b21pemUtaW5wdXQtcGJfbmV0d29ya19jb250YWN0X2Zvcm0nICk7XG5cdGxldCBlbWFpbCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCAnY3VzdG9taXplLWNvbnRyb2wtcGJfbmV0d29ya19jb250YWN0X2VtYWlsJyApO1xuXHRsZXQgbGluayA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCAnY3VzdG9taXplLWNvbnRyb2wtcGJfbmV0d29ya19jb250YWN0X2xpbmsnICk7XG5cdGxldCB0aXRsZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCAnY3VzdG9taXplLWNvbnRyb2wtcGJfbmV0d29ya19jb250YWN0X2Zvcm1fdGl0bGUnICk7XG5cblx0Y2hlY2tib3guYWRkRXZlbnRMaXN0ZW5lciggJ2NsaWNrJywgdG9nZ2xlUmVhZE9ubHkgKTtcblxuXHQvKipcblx0ICpcblx0ICovXG5cdGZ1bmN0aW9uIHRvZ2dsZVJlYWRPbmx5KCkge1xuXHRcdGlmICggY2hlY2tib3guY2hlY2tlZCA9PT0gZmFsc2UgKSB7XG5cdFx0XHRlbWFpbC5jbGFzc0xpc3QuYWRkKCAnaGlkZGVuJyApO1xuXHRcdFx0ZW1haWwuc3R5bGUuY3NzVGV4dCA9IG51bGw7XG5cblx0XHRcdHRpdGxlLmNsYXNzTGlzdC5hZGQoICdoaWRkZW4nICk7XG5cdFx0XHR0aXRsZS5zdHlsZS5jc3NUZXh0ID0gbnVsbDtcblxuXHRcdFx0bGluay5jbGFzc0xpc3QucmVtb3ZlKCAnaGlkZGVuJyApO1xuXHRcdFx0bGluay5zdHlsZS5jc3NUZXh0ID0gJ2Rpc3BsYXk6IGxpc3QtaXRlbTsnO1xuXHRcdH0gZWxzZSB7XG5cdFx0XHRlbWFpbC5jbGFzc0xpc3QucmVtb3ZlKCAnaGlkZGVuJyApO1xuXHRcdFx0ZW1haWwuc3R5bGUuY3NzVGV4dCA9ICdkaXNwbGF5OiBsaXN0LWl0ZW07JztcblxuXHRcdFx0dGl0bGUuY2xhc3NMaXN0LnJlbW92ZSggJ2hpZGRlbicgKTtcblx0XHRcdHRpdGxlLnN0eWxlLmNzc1RleHQgPSAnZGlzcGxheTogbGlzdC1pdGVtOyc7XG5cblx0XHRcdGxpbmsuY2xhc3NMaXN0LmFkZCggJ2hpZGRlbicgKTtcblx0XHRcdGxpbmsuc3R5bGUuY3NzVGV4dCA9IG51bGw7XG5cdFx0fVxuXHR9XG5cblx0dG9nZ2xlUmVhZE9ubHkoKTtcblxufSApO1xuIl0sImZpbGUiOiIuL2Fzc2V0cy9zY3JpcHRzL2N1c3RvbWl6ZXItdG9nZ2xlLmpzLmpzIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./assets/scripts/customizer-toggle.js\n");
/***/ })
/******/ });
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./assets/scripts/customizer-toggle.js"]();
/******/
/******/ })()
;

33
dist/scripts/customizer.js vendored

@ -1 +1,32 @@
wp.customize("blogname",(function(t){t.bind((function(t){return document.querySelector(".home .entry-title").textContent=t}))})),wp.customize("blogdescription",(function(t){t.bind((function(t){return document.querySelector(".home .entry-description").textContent=t}))}));
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./assets/scripts/customizer.js":
/*!**************************************!*\
!*** ./assets/scripts/customizer.js ***!
\**************************************/
/***/ (function() {
eval("wp.customize('blogname', function (value) {\n value.bind(function (to) {\n return document.querySelector('.home .entry-title').textContent = to;\n });\n});\nwp.customize('blogdescription', function (value) {\n value.bind(function (to) {\n return document.querySelector('.home .entry-description').textContent = to;\n });\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AcHJlc3Nib29rcy9wcmVzc2Jvb2tzLWFsZGluZS8uL2Fzc2V0cy9zY3JpcHRzL2N1c3RvbWl6ZXIuanM/ZWIyMCJdLCJuYW1lcyI6WyJ3cCIsImN1c3RvbWl6ZSIsInZhbHVlIiwiYmluZCIsInRvIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yIiwidGV4dENvbnRlbnQiXSwibWFwcGluZ3MiOiJBQUFBQSxFQUFFLENBQUNDLFNBQUgsQ0FBYyxVQUFkLEVBQTBCLFVBQUFDLEtBQUssRUFBSTtBQUNsQ0EsRUFBQUEsS0FBSyxDQUFDQyxJQUFOLENBQVksVUFBQUMsRUFBRTtBQUFBLFdBQUlDLFFBQVEsQ0FBQ0MsYUFBVCxDQUF3QixvQkFBeEIsRUFBK0NDLFdBQS9DLEdBQTZESCxFQUFqRTtBQUFBLEdBQWQ7QUFDQSxDQUZEO0FBSUFKLEVBQUUsQ0FBQ0MsU0FBSCxDQUFjLGlCQUFkLEVBQWlDLFVBQUFDLEtBQUssRUFBSTtBQUN6Q0EsRUFBQUEsS0FBSyxDQUFDQyxJQUFOLENBQVksVUFBQUMsRUFBRTtBQUFBLFdBQUlDLFFBQVEsQ0FBQ0MsYUFBVCxDQUF3QiwwQkFBeEIsRUFBcURDLFdBQXJELEdBQW1FSCxFQUF2RTtBQUFBLEdBQWQ7QUFDQSxDQUZEIiwic291cmNlc0NvbnRlbnQiOlsid3AuY3VzdG9taXplKCAnYmxvZ25hbWUnLCB2YWx1ZSA9PiB7XG5cdHZhbHVlLmJpbmQoIHRvID0+IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoICcuaG9tZSAuZW50cnktdGl0bGUnICkudGV4dENvbnRlbnQgPSB0byApO1xufSApO1xuXG53cC5jdXN0b21pemUoICdibG9nZGVzY3JpcHRpb24nLCB2YWx1ZSA9PiB7XG5cdHZhbHVlLmJpbmQoIHRvID0+IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoICcuaG9tZSAuZW50cnktZGVzY3JpcHRpb24nICkudGV4dENvbnRlbnQgPSB0byApO1xufSApO1xuIl0sImZpbGUiOiIuL2Fzc2V0cy9zY3JpcHRzL2N1c3RvbWl6ZXIuanMuanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/scripts/customizer.js\n");
/***/ })
/******/ });
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./assets/scripts/customizer.js"]();
/******/
/******/ })()
;

33
dist/scripts/page-section.js vendored

File diff suppressed because one or more lines are too long

2696
dist/styles/aldine.css vendored

File diff suppressed because one or more lines are too long

387
dist/styles/editor.css vendored

File diff suppressed because one or more lines are too long

2
functions.php

@ -55,7 +55,7 @@ add_filter( 'body_class', '\Aldine\Filters\body_classes' );
add_filter( 'excerpt_more', '\Aldine\Filters\excerpt_more' );
add_filter( 'query_vars', '\Aldine\Filters\register_query_vars' );
add_filter( 'wp_nav_menu_items', '\Aldine\Filters\adjust_menu', 10, 2 );
add_filter( 'the_content', 'do_shortcode' );
add_filter( 'the_content', 'apply_shortcodes' );
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'widgets_init', '\Aldine\Actions\widgets_init' );
add_action( 'widgets_init', '\Aldine\Actions\remove_widgets' );

4
inc/actions/namespace.php

@ -230,8 +230,8 @@ function hide_catalog_content_editor() {
if ( ! isset( $post_id ) ) {
return;
}
$pagename = get_the_title( $post_id );
if ( $pagename === 'Catalog' ) {
$template = get_page_template_slug( $post_id );
if ( $template === 'page-catalog.php' ) {
add_action(
'edit_form_after_title', function() {
printf( '<p>%s</p>', __( 'This page displays your network catalog, so there is no content to edit.', 'pressbooks-aldine' ) );

9
inc/activation/namespace.php

@ -7,6 +7,8 @@
namespace Aldine\Activation;
use function Aldine\Helpers\get_catalog_page;
/**
* Create default page content, importing from Pressbooks Publisher, if possible.
*/
@ -87,6 +89,9 @@ function create_default_content() {
'catalog' => [
'post_title' => __( 'Catalog', 'pressbooks-aldine' ),
'post_content' => '',
'meta_input' => [
'_wp_page_template' => 'page-catalog.php',
],
],
'home' => [
'post_title' => __( 'Home', 'pressbooks-aldine' ),
@ -141,7 +146,7 @@ function create_menus() {
if ( ! wp_get_nav_menu_object( $menu_name ) ) {
$menu_id = wp_create_nav_menu( $menu_name );
$catalog = get_page_by_title( __( 'Catalog', 'pressbooks-aldine' ) );
$catalog = get_catalog_page();
if ( $catalog && defined( 'PB_PLUGIN_VERSION' ) ) {
wp_update_nav_menu_item(
$menu_id,
@ -177,7 +182,7 @@ function create_menus() {
);
}
$catalog = get_page_by_title( __( 'Catalog', 'pressbooks-aldine' ) );
$catalog = get_catalog_page();
if ( $catalog && defined( 'PB_PLUGIN_VERSION' ) ) {
wp_update_nav_menu_item(
$menu_id,

13
inc/helpers/namespace.php

@ -437,3 +437,16 @@ function maybe_truncate_string( $string, $length = 40 ) {
}
return $string;
}
/**
* Get catalog page.
*
* @return WP_Post|null
*/
function get_catalog_page(): ?\WP_Post {
$catalog_pages = get_pages( [
'meta_key' => '_wp_page_template',
'meta_value' => 'page-catalog.php', //phpcs:ignore HM.Performance.SlowMetaQuery.slow_query_meta_value
]);
return $catalog_pages[0] ?? null;
}

BIN
languages/bg_BG.mo

Binary file not shown.

BIN
languages/de_DE.mo

Binary file not shown.

BIN
languages/en_GB.mo

Binary file not shown.

BIN
languages/es_ES.mo

Binary file not shown.

BIN
languages/fr_FR.mo

Binary file not shown.

BIN
languages/he.mo

Binary file not shown.

BIN
languages/hr.mo

Binary file not shown.

BIN
languages/hu_HU.mo

Binary file not shown.

BIN
languages/it_IT.mo

Binary file not shown.

BIN
languages/kn.mo

Binary file not shown.

BIN
languages/lt_LT.mo

Binary file not shown.

BIN
languages/lv.mo

Binary file not shown.

BIN
languages/nl_NL.mo

Binary file not shown.

78
languages/pressbooks-aldine.pot

@ -2,16 +2,16 @@
# This file is distributed under the GNU GPL v3 or later.
msgid ""
msgstr ""
"Project-Id-Version: Aldine 1.14.1\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-aldine/\n"
"Project-Id-Version: Aldine 1.15.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-aldine/issues\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-05-03T20:56:57+00:00\n"
"POT-Creation-Date: 2022-09-12T23:16:57+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Generator: WP-CLI 2.6.0\n"
"X-Domain: pressbooks-aldine\n"
#. Theme Name of the theme
@ -127,12 +127,12 @@ msgid "Toggle Menu"
msgstr ""
#: inc/actions/namespace.php:48
#: inc/activation/namespace.php:139
#: inc/activation/namespace.php:144
msgid "Primary Menu"
msgstr ""
#: inc/actions/namespace.php:49
#: inc/activation/namespace.php:160
#: inc/activation/namespace.php:165
msgid "Footer Menu"
msgstr ""
@ -185,109 +185,107 @@ msgstr ""
msgid "Link"
msgstr ""
#: inc/activation/namespace.php:26
#: inc/activation/namespace.php:28
msgid "About Pressbooks"
msgstr ""
#: inc/activation/namespace.php:27
#: inc/activation/namespace.php:29
msgid "Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish."
msgstr ""
#: inc/activation/namespace.php:28
#: inc/activation/namespace.php:30
msgid "Learn More"
msgstr ""
#: inc/activation/namespace.php:35
#: inc/activation/namespace.php:165
#: inc/activation/namespace.php:171
#: inc/activation/namespace.php:37
#: inc/activation/namespace.php:170
#: inc/activation/namespace.php:176
msgid "About"
msgstr ""
#: inc/activation/namespace.php:40
#: inc/activation/namespace.php:42
msgid "Pressbooks is simple book production software that makes it easy to write, develop, and share your ideas. You can use Pressbooks to publish open educational resources, textbooks, scholarly monographs, fiction and non-fiction books, white papers, syllabi, and more."
msgstr ""
#: inc/activation/namespace.php:41
#: inc/activation/namespace.php:43
msgid "Pressbooks lets creators quickly publish their content to the web and produce exports in multiple formats, including accessible EPUBs and PDFs specially designed for print-on-demand or digital distribution."
msgstr ""
#: inc/activation/namespace.php:45
#: inc/activation/namespace.php:47
msgid "suite of products"
msgstr ""
#: inc/activation/namespace.php:46
#: inc/activation/namespace.php:48
msgid "Contact us"
msgstr ""
#: inc/activation/namespace.php:52
#: inc/activation/namespace.php:195
#: inc/activation/namespace.php:201
#: inc/activation/namespace.php:54
#: inc/activation/namespace.php:200
#: inc/activation/namespace.php:206
msgid "Help"
msgstr ""
#. translators: %s: link to guide
#: inc/activation/namespace.php:59
#: inc/activation/namespace.php:61
msgid "Are you looking for help on your Pressbooks project? The most comprehensive resource available is the %s, which contains everything you need to know about creating, enriching and exporting your work."
msgstr ""
#: inc/activation/namespace.php:60
#: inc/activation/namespace.php:62
msgid "Pressbooks User Guide"
msgstr ""
#. translators: %1$s: link to Pressbooks YouTube channel; %2$s: link to Fundamental of Pressbooks YouTube playlist
#: inc/activation/namespace.php:64
#: inc/activation/namespace.php:66
msgid "You can find short video tutorials and webinars about features and product updates on the %1$s. If you’re just getting started with Pressbooks, this %2$s will guide you."
msgstr ""
#: inc/activation/namespace.php:65
#: inc/activation/namespace.php:67
msgid "Pressbooks YouTube channel"
msgstr ""
#: inc/activation/namespace.php:66
#: inc/activation/namespace.php:68
msgid "short video series"
msgstr ""
#. translators: %s: link to Pressbooks webinar schedule
#: inc/activation/namespace.php:70
#: inc/activation/namespace.php:72
msgid "If you learn best by learning by attending live training sessions, you can register for and attend one of Pressbooks' %s."
msgstr ""
#: inc/activation/namespace.php:71
#: inc/activation/namespace.php:73
msgid "monthly webinars"
msgstr ""
#. translators: %1$s: link to Pressbooks support page; %2$s: link to Pressbooks community forum
#: inc/activation/namespace.php:75
#: inc/activation/namespace.php:77
msgid "The %1$s also contains links to other useful support resources and has answers to some commonly asked questions. Pressbooks also maintains a %2$s where you can ask and answer questions of other users."
msgstr ""
#: inc/activation/namespace.php:76
#: inc/activation/namespace.php:78
msgid "Pressbooks support page"
msgstr ""
#: inc/activation/namespace.php:77
#: inc/activation/namespace.php:79
msgid "community forum"
msgstr ""
#. translators: %s: link to Pressbooks support request form
#: inc/activation/namespace.php:81
#: inc/activation/namespace.php:83
msgid "For additional support needs, reach out to your institution’s Pressbooks network managers. If you don’t know who your network managers are, please fill out the %s to be put in touch with them."
msgstr ""
#: inc/activation/namespace.php:82
#: inc/activation/namespace.php:84
msgid "support request form"
msgstr ""
#. Template Name of the theme
#: inc/activation/namespace.php:88
#: inc/activation/namespace.php:144
#: inc/activation/namespace.php:150
#: inc/activation/namespace.php:180
#: inc/activation/namespace.php:186
#: inc/activation/namespace.php:90
#: inc/activation/namespace.php:155
#: inc/activation/namespace.php:191
msgid "Catalog"
msgstr ""
#: inc/activation/namespace.php:92
#: inc/activation/namespace.php:97
#: inc/helpers/namespace.php:226
msgid "Home"
msgstr ""
@ -381,7 +379,7 @@ msgid "Show Front Page Catalog"
msgstr ""
#: inc/customizer/namespace.php:194
#: partials/content-front-page.php:19
#: partials/content-front-page.php:14
msgid "Our Latest Titles"
msgstr ""
@ -476,11 +474,11 @@ msgstr ""
msgid "Your message could not be sent."
msgstr ""
#: page-catalog.php:60
#: page-catalog.php:65
msgid "No Books Found"
msgstr ""
#: page-catalog.php:63
#: page-catalog.php:68
msgid "No books have been added to the catalog yet."
msgstr ""

BIN
languages/ru_RU.mo

Binary file not shown.

BIN
languages/tr_TR.mo

Binary file not shown.

24589
package-lock.json generated

File diff suppressed because it is too large Load Diff

22
package.json

@ -55,26 +55,30 @@
"assets/scripts/routes/common.js"
],
"stylelint": {
"extends": "./node_modules/pressbooks-build-tools/config/stylelint.js"
"extends": "./node_modules/pressbooks-build-tools/config/stylelint.js",
"rules": {
"scss/at-extend-no-missing-placeholder": null
}
},
"scripts": {
"watch": "mix watch",
"build": "npm run production",
"build": "mix",
"lint:scripts": "eslint \"assets/scripts/**/*.js\"",
"lint:styles": "stylelint \"assets/styles/**/*.scss\"",
"lint": "run-s lint:*",
"production": "mix --production",
"rmdist": "rimraf dist",
"test": "npm run -s lint",
"lint": "npm run -s lint:scripts && npm run -s lint:styles",
"lint:scripts": "eslint \"assets/scripts/**/*.js\"",
"lint:styles": "stylelint \"assets/styles/**/*.scss\" --syntax scss"
"start": "mix watch",
"test": "npm run lint"
},
"engines": {
"node": ">= 14"
},
"devDependencies": {
"pressbooks-build-tools": "^3.0.1"
"npm-run-all": "^4.1.5",
"pressbooks-build-tools": "^4.0.0"
},
"dependencies": {
"aetna": "^1.0.0-alpha.27",
"aetna": "^1.0.0",
"isotope-layout": "^3.0.6",
"jquery-bridget": "^3.0.1"
}

5
page-catalog.php

@ -9,6 +9,11 @@
* @package Aldine
*/
if ( has_filter( 'pb_network_catalog' ) ) {
echo apply_filters( 'pb_network_catalog', '' );
return;
}
use function Aldine\Helpers\get_available_institutions;
use function Aldine\Helpers\get_available_licenses;
use function Aldine\Helpers\get_available_subjects;

12
partials/content-front-page.php

@ -7,14 +7,9 @@
* @package Aldine
*/
?>
<?php
use function Aldine\Helpers\get_catalog_data;
use function Aldine\Helpers\has_sections;
$front_page_catalog = get_option( 'pb_front_page_catalog' );
$pb_front_page_catalog_title = get_option( 'pb_front_page_catalog_title' );
$latest_books_title = ( ! empty( $pb_front_page_catalog_title ) ) ? $pb_front_page_catalog_title : __( 'Our Latest Titles', 'pressbooks-aldine' );
if ( get_option( 'pb_front_page_catalog' ) ) {
@ -24,6 +19,11 @@ if ( get_option( 'pb_front_page_catalog' ) ) {
$next_page = $page + 1;
}
$catalog_page = \Aldine\Helpers\get_catalog_page();
if ( $catalog_page ) {
$catalog_permalink = get_permalink( $catalog_page->ID );
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@ -73,7 +73,7 @@ if ( get_option( 'pb_front_page_catalog' ) ) {
?>
</div>
<p class="catalog-link">
<a class="call-to-action" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
<a class="call-to-action" href="<?php echo $catalog_permalink ?? ''; ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
</p>
</div>
<?php endif; ?>

58
readme.txt

@ -1,58 +0,0 @@
=== Aldine ===
[![Packagist](https://img.shields.io/packagist/l/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Current Release](https://img.shields.io/github/release/pressbooks/pressbooks-aldine.svg)](https://github.com/pressbooks/pressbooks/releases/latest/)
[![Packagist](https://img.shields.io/packagist/v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Packagist](https://img.shields.io/packagist/dt/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Build Status](https://travis-ci.org/pressbooks/pressbooks-aldine.svg?branch=dev)](https://travis-ci.org/pressbooks/pressbooks-aldine)
[![Translate Aldine](https://img.shields.io/badge/dynamic/json.svg?label=translated&url=https%3A%2F%2Ftenpercent.now.sh%2F%3Forganization%3Dpressbooks%26project%3Daldine&query=%24.status&colorB=e05d44&suffix=%25)](https://www.transifex.com/pressbooks/aldine/translate/)
Tags: publishing, catalog, pressbooks, default-theme
Requires at least: 5.9.3
Tested up to: 5.9.3
Stable tag: 1.14.1
License: GNU General Public License v3 or later
License URI: LICENSE
Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.
== Description ==
Aldine is the default theme for the home page of [Pressbooks](https://pressbooks.org) networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is based on [Underscores](https://underscores.me/).
== Installation ==
1. In your admin panel, go to Appearance > Themes and click the Add New button.
2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now.
3. Click Activate to use your new theme right away.
== Changelog ==
= 1.14.1 =
* See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.14.1
* Full release history available at: https://github.com/pressbooks/pressbooks-aldine/releases
== Upgrade Notice ==
= 1.14.1 =
- Aldine requires Pressbooks >= 5.34.1
= 1.14.0 =
- Aldine requires Pressbooks >= 5.33.0
= 1.13.0 =
- Aldine requires Pressbooks >= 5.32.0
= 1.8.3 =
- Aldine requires Pressbooks >= 5.17.0
== Credits ==
- Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)

12
style.css

@ -1,15 +1,19 @@
/*
Theme Name: Aldine
Theme URI: https://github.com/pressbooks/pressbooks-aldine/
Description: Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the worlds first publisher.
Version: 1.14.1
Author: Pressbooks (Book Oven Inc.)
Author URI: https://pressbooks.org
Description: Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the worlds first publisher.
Tags: publishing, catalog, pressbooks, default-theme
Version: 1.15.0
Requires at least: 6.0.2
Tested up to: 6.0.2
Requires PHP: 7.4
License: GNU GPL v3 or later
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
License: GNU GPL v3 or later
License URI: https://github.com/pressbooks/pressbooks-aldine/tree/master/LICENSE.md
Aldine is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Loading…
Cancel
Save