Skip to content

Commit

Permalink
Use a separate cookie for root font size.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Mar 5, 2018
1 parent 1409a01 commit d109496
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
10 changes: 5 additions & 5 deletions assets/scripts/routes/common.js
Expand Up @@ -9,7 +9,7 @@ export default {
.addClass( 'js' );
$( document ).ready( function () {
// Fontsize handler
if ( Cookies.get( 'a11y-larger-fontsize' ) === '1' ) {
if ( Cookies.get( 'a11y-root-larger-fontsize' ) === '1' ) {
$( 'html' ).addClass( 'fontsize' );
$( '#is_normal_fontsize' )
.attr( 'id', 'is_large_fontsize' )
Expand All @@ -28,9 +28,9 @@ export default {
.addClass( 'active' )
.text( PB_A11y.decrease_label )
.attr( 'title', PB_A11y.decrease_label );
Cookies.set( 'a11y-larger-fontsize', '1', {
Cookies.set( 'a11y-root-larger-fontsize', '1', {
expires: 365,
path: '',
path: '/',
} );
return false;
} else {
Expand All @@ -41,9 +41,9 @@ export default {
.removeClass( 'active' )
.text( PB_A11y.increase_label )
.attr( 'title', PB_A11y.increase_label );
Cookies.set( 'a11y-larger-fontsize', '0', {
Cookies.set( 'a11y-root-larger-fontsize', '0', {
expires: 365,
path: '',
path: '/',
} );
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/mix-manifest.json
@@ -1,5 +1,5 @@
{
"/scripts/aldine.js": "/scripts/aldine.js?id=1f58027f7de9942caf57",
"/scripts/aldine.js": "/scripts/aldine.js?id=e222d7e1e1c71c6bdb98",
"/styles/aldine.css": "/styles/aldine.css?id=2648daa49889948f53c9",
"/styles/editor.css": "/styles/editor.css?id=e96b3d10ea63fa07d09b",
"/scripts/customizer.js": "/scripts/customizer.js?id=1b0d3cfc1d85f460af53",
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/aldine.js

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions inc/activation/namespace.php
Expand Up @@ -21,7 +21,7 @@ function create_default_content() {
$home_content = apply_filters(
'pb_root_home_page_content',
sprintf(
'[aldine_page_section title="%1$s"]<p>"%2$s</p><p>[aldine_call_to_action link="/about" text="%3$s"]</p>',
'[aldine_page_section title="%1$s"]<p>%2$s</p><p>[aldine_call_to_action link="/about" text="%3$s"]</p>[/aldine_page_section]',
__( 'About Pressbooks', 'pressbooks-aldine' ),
__( 'Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'pressbooks-aldine' ),
__( 'Learn More', 'pressbooks-aldine' )
Expand Down Expand Up @@ -69,10 +69,7 @@ function create_default_content() {
],
'home' => [
'post_title' => __( 'Home', 'pressbooks-aldine' ),
'post_content' => sprintf(
'<div class="page-section">%s</div>',
$home_content
),
'post_content' => $home_content,
],
];

Expand Down

0 comments on commit d109496

Please sign in to comment.