Skip to content

Commit

Permalink
Merge pull request #308 from pressbooks/include-buckram
Browse files Browse the repository at this point in the history
Include Buckram as package (fix #278, fix #307)
  • Loading branch information
Ned Zimmerman authored Nov 6, 2018
2 parents 24cd02c + 6bd90e2 commit 46e41fb
Show file tree
Hide file tree
Showing 142 changed files with 47,970 additions and 58 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tests
.gitignore
.travis.yml
.tx
packages
phpcs.ruleset.xml
phpunit.xml
webpack.mix.js
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ before_install:
install:
- node -v
- npm install -g yarn
- npm install -g lerna
- yarn
- yarn run bootstrap
- composer install
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]] && php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- yarn run test
- composer test
- lerna run test
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
Expand Down
Binary file added assets/book/images/cc-zero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/book/images/cc-zero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/book/images/public-domain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/book/styles/components/elements/_headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
}
text-align: map-get($_heading-align, $heading);
text-transform: map-get($_heading-text-transform, $heading);
letter-spacing: if-map-get(map-get($_heading-letter-spacing, $heading), $type);
word-spacing: if-map-get(map-get($_heading-word-spacing, $heading), $type);
}
}

Expand Down
72 changes: 72 additions & 0 deletions assets/book/styles/components/elements/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,26 @@
line-height: $table-caption-line-height;
}
}
&.lines {
border-color: if-map-get($line-color-1, $type);
}

&.lines tr {
border-top: $table-border-width solid;
border-bottom: $table-border-width solid;
border-color: if-map-get($line-color-1, $type);
border-top-color: if-map-get($line-color-1, $type);
border-bottom-color: if-map-get($line-color-1, $type);
}

&.lines th {
border-color: if-map-get($line-color-1, $type);
}

&.lines td {
border-color: if-map-get($line-color-1, $type);
}

&.no-lines tr,
&.no-lines td {
border-top: 0;
Expand Down Expand Up @@ -76,6 +88,21 @@
border-bottom: 0;
border-left: 0;
}

&.alignleft {
float: left;
margin-right: if-map-get($table-alignleft-margin-right, $type);
}

&.aligncenter {
margin-left: auto;
margin-right: auto;
}

&.alignright {
float: right;
margin-left: if-map-get($table-alignright-margin-left, $type);
}
}

table,
Expand All @@ -91,6 +118,8 @@
}
text-align: $table-th-align;
vertical-align: $table-th-vertical-align;
border-top: if-map-get($table-th-border-top-width, $type) if-map-get($table-th-border-top-style, $type) if-map-get($line-color-1, $type);
border-bottom: if-map-get($table-th-border-bottom-width, $type) if-map-get($table-th-border-bottom-style, $type) if-map-get($line-color-1, $type);
}

td {
Expand All @@ -100,6 +129,12 @@
}
text-align: $table-td-align;
vertical-align: $table-td-vertical-align;
border-color: if-map-get($line-color-1, $type);
}

tr {
border-top: if-map-get($table-tr-border-top-width, $type) if-map-get($table-tr-border-top-style, $type) if-map-get($line-color-1, $type);
border-bottom: if-map-get($table-tr-border-bottom-width, $type) if-map-get($table-tr-border-bottom-style, $type) if-map-get($line-color-1, $type);
}
}

Expand All @@ -123,6 +158,7 @@
border-collapse: collapse;
border-top: $table-border-width solid;
border-bottom: $table-border-width solid;
border-color: if-map-get($line-color-1, $type);
border-top-color: if-map-get($line-color-1, $type);
border-bottom-color: if-map-get($line-color-1, $type);

Expand All @@ -136,13 +172,26 @@
line-height: $table-caption-line-height;
}

&.lines {
border-color: if-map-get($line-color-1, $type);
}

&.lines tr {
border-top: $table-border-width solid;
border-bottom: $table-border-width solid;
border-color: if-map-get($line-color-1, $type);
border-top-color: if-map-get($line-color-1, $type);
border-bottom-color: if-map-get($line-color-1, $type);
}

&.lines th {
border-color: if-map-get($line-color-1, $type);
}

&.lines td {
border-color: if-map-get($line-color-1, $type);
}

&.no-lines tr,
&.no-lines td {
border-top: 0;
Expand Down Expand Up @@ -170,6 +219,21 @@
border-bottom: 0;
border-left: 0;
}

&.alignleft {
float: left;
margin-right: if-map-get($table-alignleft-margin-right, $type);
}

&.aligncenter {
margin-left: auto;
margin-right: auto;
}

&.alignright {
float: right;
margin-left: if-map-get($table-alignright-margin-left, $type);
}
}

table,
Expand All @@ -183,13 +247,21 @@
line-height: $table-th-line-height;
text-align: $table-th-align;
vertical-align: middle;
border-top: if-map-get($table-th-border-top-width, $type) if-map-get($table-th-border-top-style, $type) if-map-get($line-color-1, $type);
border-bottom: if-map-get($table-th-border-bottom-width, $type) if-map-get($table-th-border-bottom-style, $type) if-map-get($line-color-1, $type);
}

td {
padding: $table-td-padding-top $table-td-padding-right $table-td-padding-bottom $table-td-padding-left;
line-height: $table-td-line-height;
text-align: $table-td-align;
vertical-align: middle;
border-color: if-map-get($line-color-1, $type);
}

tr {
border-top: if-map-get($table-tr-border-top-width, $type) if-map-get($table-tr-border-top-style, $type) if-map-get($line-color-1, $type);
border-bottom: if-map-get($table-tr-border-bottom-width, $type) if-map-get($table-tr-border-bottom-style, $type) if-map-get($line-color-1, $type);
}
}
}
4 changes: 2 additions & 2 deletions assets/book/styles/components/media/_images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@
.part,
.chapter,
.back-matter {
figcaption,
.wp-caption-text {
.wp-caption figcaption,
.wp-caption .wp-caption-text {
font-family: $image-caption-font-family;
font-size: if-map-get($image-caption-font-size, $type);
font-style: $image-caption-font-style;
Expand Down
8 changes: 8 additions & 0 deletions assets/book/styles/components/media/_interactive-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@
}
}

.embed div.figcaption {
text-align: if-map-get($media-caption-align, $type);
}

@if $type == 'web' {
iframe {
display: block;
margin: 0 auto if-map-get($interactive-content-margin-bottom, $type);
}

.embed figcaption {
text-align: if-map-get($media-caption-align, $type);
}
}
7 changes: 7 additions & 0 deletions assets/book/styles/components/media/_video.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@
background-image: url(if-map-get($video-icon-url, $type));
}
}

@if $type == 'web' {
.wp-video {
display: block;
margin: 0 auto if-map-get($interactive-content-margin-bottom, $type);
}
}
7 changes: 6 additions & 1 deletion assets/book/styles/components/pages/_front-matter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

#copyright-page {
page-break-before: always;

margin-top: if-map-get($copyright-margin-top, $type);
margin-right: if-map-get($copyright-margin-right, $type);
margin-left: if-map-get($copyright-margin-left, $type);
.ugc {
float: $copyright-float;

Expand All @@ -36,6 +38,7 @@
// Dedication

div.dedication {
margin-top: if-map-get($dedication-margin-top, $type);
margin-right: $dedication-margin-right;
margin-left: $dedication-margin-left;

Expand All @@ -53,6 +56,7 @@ div.dedication {
// Epigraph

div.epigraph {
margin-top: if-map-get($epigraph-margin-top, $type);
margin-right: $epigraph-margin-right;
margin-left: $epigraph-margin-left;

Expand All @@ -78,6 +82,7 @@ div.epigraph {
font-size: $section-license-font-size;
font-style: $section-license-font-style;
margin-top: $section-license-margin-top;
margin-bottom: if-map-get($section-license-margin-bottom, $type);
page-break-inside: avoid;
text-indent: 0;
}
Expand Down
13 changes: 12 additions & 1 deletion assets/book/styles/components/pages/_titles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ h1.title {
text-transform: $title-title-text-transform;
border-bottom: if-map-get($title-title-border-bottom-width, $type) $title-title-border-bottom-style if-map-get($title-title-border-bottom-color, $type);
padding-bottom: if-map-get($title-title-padding-bottom, $type);
@if $type != 'epub' {
line-height: if-map-get($title-title-line-height, $type);
}

&::after {
font-family: $title-title-decoration-font-family;
Expand Down Expand Up @@ -67,6 +70,9 @@ h2.subtitle {
text-transform: $title-subtitle-text-transform;
border-bottom: if-map-get($title-subtitle-border-bottom-width, $type) $title-subtitle-border-bottom-style if-map-get($title-subtitle-border-bottom-color, $type);
padding-bottom: if-map-get($title-subtitle-padding-bottom, $type);
@if $type != 'epub' {
line-height: if-map-get($title-subtitle-line-height, $type);
}
}

h3.author {
Expand All @@ -84,6 +90,9 @@ h3.author {
text-transform: $title-author-text-transform;
border-bottom: if-map-get($title-author-border-bottom-width, $type) $title-author-border-bottom-style if-map-get($title-author-border-bottom-color, $type);
padding-bottom: if-map-get($title-author-padding-bottom, $type);
@if $type != 'epub' {
line-height: if-map-get($title-author-line-height, $type);
}
}

div.publisher-logo {
Expand All @@ -100,7 +109,7 @@ div.publisher-logo {
h4.publisher {
display: block;
float: bottom;
margin-bottom: $title-publisher-margin-bottom;
margin: if-map-get($title-publisher-margin-top, $type) if-map-get($title-publisher-margin-right, $type) if-map-get($title-publisher-margin-bottom, $type) if-map-get($title-publisher-margin-left, $type);
font-family: $title-publisher-font-family;
font-size: if-map-get($title-publisher-font-size, $type);
font-style: $title-publisher-font-style;
Expand All @@ -120,6 +129,8 @@ h4.publisher {
h5.publisher-city {
float: bottom;
margin-top: 0;
margin-left: if-map-get($title-publisher-city-margin-left, $type);
margin-right: if-map-get($title-publisher-city-margin-right, $type);
font-family: $title-publisher-city-font-family;
font-size: if-map-get($title-publisher-city-font-size, $type);
font-style: $title-publisher-city-font-style;
Expand Down
2 changes: 1 addition & 1 deletion assets/book/styles/components/specials/_footnotes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
margin-left: 0;
font-size: if-map-get($footnote-font-size, $type);
line-height: $footnote-line-height;
text-align: left;
text-align: if-map-get($footnote-align, $type);
text-indent: $footnote-indent;
counter-increment: footnote;
footnote-style-position: outside;
Expand Down
2 changes: 2 additions & 0 deletions assets/book/styles/components/specials/_separators.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ hr {
text-align: center;

&.break-symbols {
padding-top: if-map-get($hr-break-symbols-padding-top, $type);
border-top: if-map-get($hr-break-symbols-border-top-width, $type) if-map-get($hr-break-symbols-border-top-style, $type) if-map-get($hr-break-symbols-border-top-color, $type);
margin-bottom: $hr-break-symbols-margin-bottom;
border: 0;

Expand Down
23 changes: 4 additions & 19 deletions assets/book/styles/components/structure/_content-strings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ meta[name="pb-publisher-city"] {
}

// Parts

.part-title-wrap {
.part-number {
string-set: part-number content();
Expand All @@ -54,24 +53,10 @@ meta[name="pb-publisher-city"] {
string-set: chapter-number content();
}

.front-matter .front-matter-title-wrap .front-matter-title,
.chapter .chapter-title-wrap .chapter-title,
.back-matter .back-matter-title-wrap .back-matter-title {
string-set: section-title content();
}

// If the 'short-title' property is available, this will override the section
// title for use in the running head.

.front-matter .front-matter-title-wrap .short-title,
.chapter .chapter-title-wrap .short-title,
.back-matter .back-matter-title-wrap .short-title {
height: 0;
line-height: 0;
margin: 0;
string-set: section-title content();
visibility: hidden; // display: none causes issues with string-set
width: 0;
.front-matter,
.chapter,
.back-matter {
string-set: section-title attr('title');
}

.chapter-title-wrap {
Expand Down
Loading

0 comments on commit 46e41fb

Please sign in to comment.