Browse Source

Merge branch 'dev' into bem

pull/22/head
Ned Zimmerman 8 years ago
parent
commit
26757cb156
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 39
      LICENSE.md
  2. 30
      app/activation.php
  3. 20
      composer.json
  4. 88
      composer.lock
  5. 13951
      package-lock.json
  6. 4
      package.json
  7. 11
      resources/docs/about.md
  8. 6
      resources/docs/help.md

39
LICENSE.md

@ -1,19 +1,24 @@
Copyright (c) 2017 Pressbooks (Book Oven Inc.)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This project is based on work covered by the following copyright and permission notice:
Copyright (c) Ben Word and Scott Walkinshaw
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

30
app/activation.php

@ -2,29 +2,19 @@
namespace Aldine;
add_action('after_switch_theme', function () {
add_action('admin_init', function () {
$extra = new \ParsedownExtra();
$about = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/about.md'));
$help = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/help.md'));
$default_pages = [
'about' => [
'post_title' => __('About', 'aldine'),
// @codingStandardsIgnoreStart
'post_content' => apply_filters('pb_root_about_page_content', __('Pressbooks is simple book production software. You can use Pressbooks to publish textbooks, scholarly monographs, syllabi, fiction and non-fiction books, white papers, and more in multiple formats including:
<ul><li>MOBI (for Kindle ebooks)</li>
<li>EPUB (for all other ebookstores)</li>
<li>designed PDF (for print-on-demand and digital distribution)</li></ul>
Pressbooks is used by educational institutions around the world as well as authors and publishers.
For more information about Pressbooks, see <a href="https://pressbooks.com/about">here</a>.', 'aldine'))
// @codingstandardsIgnoreEnd
'post_content' => apply_filters('pb_root_about_page_content', $about)
],
'help' => [
'post_title' => __('Help', 'aldine'),
// @codingStandardsIgnoreStart
'post_content' => apply_filters('pb_root_help_page_content', __('The easiest way to get started with Pressbooks is to follow our <a href="https://pressbooks.com/how-to-make-a-book-with-pressbooks">4 Step Guide to Making a Book on Pressbooks</a>. Or, you can review our <a href="https://guide.pressbooks.com/">Guide to Using Pressbooks</a>.
If you require further assistance, please contact your network manager.', 'aldine'))
// @codingstandardsIgnoreEnd
'post_content' => apply_filters('pb_root_help_page_content', $help)
],
'catalog' => [
'post_title' => __('Catalog', 'aldine'),
@ -36,7 +26,7 @@ If you require further assistance, please contact your network manager.', 'aldin
],
];
if (! get_site_option('pb_aldine_activated')) {
if (! get_option('pb_aldine_activated')) {
// Add our pages
$pages = [];
@ -64,7 +54,7 @@ If you require further assistance, please contact your network manager.', 'aldin
return;
}
// Add "pb_aldine_activated" site option to enable check above
add_site_option('pb_aldine_activated', true);
// Add "pb_aldine_activated" option to enable check above
add_option('pb_aldine_activated', 1);
}
});

20
composer.json

@ -1,7 +1,7 @@
{
"name": "pressbooks/pressbooks-aldine",
"type": "wordpress-theme",
"license": "MIT",
"license": "GPL-3",
"description": "Aldine is the new root theme for Pressbooks, based on Sage.",
"homepage": "https://github.com/pressbooks/pressbooks-aldine/",
"authors": [
@ -9,6 +9,21 @@
"name": "Pressbooks (Book Oven Inc.)",
"email": "code@pressbooks.com",
"homepage": "https://pressbooks.org"
},
{
"name": "Ben Word",
"email": "ben@benword.com",
"homepage": "https://github.com/retlehs"
},
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw@gmail.com",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "QWp6t",
"email": "hi@qwp6t.me",
"homepage": "https://github.com/qwp6t"
}
],
"keywords": [
@ -32,7 +47,8 @@
"illuminate/support": "~5.4",
"roots/sage-lib": "~9.0.0-beta.4",
"soberwp/controller": "~9.0.0-beta.4",
"soberwp/intervention": "1.2.0-p"
"soberwp/intervention": "1.2.0-p",
"erusev/parsedown-extra": "^0.7.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.8.0"

88
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "b64704b574ef5a22a123a59ab6fbc069",
"content-hash": "f7726a4926f063ad567227228ba400b8",
"packages": [
{
"name": "brain/hierarchy",
@ -246,6 +246,92 @@
],
"time": "2017-07-22T12:18:28+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.6.3",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "Parser for Markdown.",
"homepage": "http://parsedown.org",
"keywords": [
"markdown",
"parser"
],
"time": "2017-05-14T14:47:48+00:00"
},
{
"name": "erusev/parsedown-extra",
"version": "0.7.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
"shasum": ""
},
"require": {
"erusev/parsedown": "~1.4"
},
"type": "library",
"autoload": {
"psr-0": {
"ParsedownExtra": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "An extension of Parsedown that adds support for Markdown Extra.",
"homepage": "https://github.com/erusev/parsedown-extra",
"keywords": [
"markdown",
"markdown extra",
"parsedown",
"parser"
],
"time": "2015-11-01T10:19:22+00:00"
},
{
"name": "hassankhan/config",
"version": "0.10.0",

13951
package-lock.json generated

File diff suppressed because it is too large Load Diff

4
package.json

@ -13,8 +13,8 @@
},
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
"type": "GPL-3.0",
"url": "https://opensource.org/licenses/GPL-3.0"
}
],
"browserslist": [

11
resources/docs/about.md

@ -0,0 +1,11 @@
Pressbooks is simple book production software. You can use Pressbooks to publish textbooks, scholarly monographs, syllabi, fiction and non-fiction books, white papers, and more in multiple formats including:
* MOBI (for Kindle ebooks)
* EPUB (for all other ebookstores)
* designed PDF (for print-on-demand and digital distribution)
Pressbooks is used by educational institutions around the world as well as authors and publishers.
For more information about Pressbooks, see [here][1].
[1]: https://pressbooks.com/about

6
resources/docs/help.md

@ -0,0 +1,6 @@
The easiest way to get started with Pressbooks is to follow our [4 Step Guide to Making a Book on Pressbooks][1]. Or, you can review our [Guide to Using Pressbooks][2].
If you require further assistance, please contact your network manager.
[1]: https://pressbooks.com/how-to-make-a-book-with-pressbooks
[2]: https://guide.pressbooks.com/
Loading…
Cancel
Save