Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Feb 27, 2018
2 parents d0cdd62 + e40f12a commit 1b2c225
Show file tree
Hide file tree
Showing 45 changed files with 3,639 additions and 2,103 deletions.
35 changes: 2 additions & 33 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,13 @@
<div id="primary" class="content-area">
<main id="main" class="site-main">

<section class="error-404 not-found">
<section class="error-404 not-found page-section">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'pressbooks-aldine' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'pressbooks-aldine' ); ?></p>

<?php
get_search_form();

the_widget( 'WP_Widget_Recent_Posts' );
?>

<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'pressbooks-aldine' ); ?></h2>
<ul>
<?php
wp_list_categories( [
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
] );
?>
</ul>
</div><!-- .widget -->

<?php

/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'pressbooks-aldine' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );

the_widget( 'WP_Widget_Tag_Cloud' );
?>

<p><?php esc_html_e( 'It looks like nothing was found at this location.', 'pressbooks-aldine' ); ?></p>
</div><!-- .page-content -->
</section><!-- .error-404 -->

Expand Down
978 changes: 657 additions & 321 deletions LICENSE.md

Large diffs are not rendered by default.

44 changes: 13 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

**Tags:** publishing, catalog, pressbooks, default-theme

**Requires at least:** 4.9.1
**Tested up to:** 4.9.1
**Stable tag:** 1.0.0-beta.1
**License:** GNU General Public License v2 or later
**Requires at least:** 4.9.4
**Tested up to:** 4.9.4
**Stable tag:** 1.0.0
**License:** GNU General Public License v3
**License URI:** LICENSE

Aldine is the root theme for Pressbooks.
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 root theme for [Pressbooks](https://pressbooks.org), based on [Underscores](https://underscores.me/).
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
Expand All @@ -32,38 +32,20 @@ TK.

## Changelog

### 1.0.0-beta.1

* Many changes; rebuilt on \_s.
# Aldine 1.0.0

### 1.0.0-alpha6
* **[FEATURE]** Add Per Soderlind's WCAG validator to customizer.
* **[FEATURE]** Add Thema subject support.
#### Customisation & Branding

Aldine is the new default network theme for Pressbooks installations. Its creation was supported by [Ryerson University](https://ryerson.ca). Designed with customization in mind, it allows network managers to add institutional branding in the form of colours, logos and contact information, as well as custom content in blocks on the front page.

### 1.0.0-alpha5
* **[CORE ENHANCEMENT]** Configure for use without Pressbooks (see #26).
#### Standalone Catalog

In addition, Aldine introduces a standalone catalog page that is sortable and filterable by subject or license. Adding books to the catalog is controlled in the [same way as before](https://eduguide.pressbooks.com/chapter/catalogs/).

### 1.0.0-alpha4
* **[CORE ENHANCEMENT]** Save `/dist` folder.
* **[FIX]** Add temporary fix for roots/sage-lib#2.
#### Additional Pages


### 1.0.0-alpha3
* **[CORE ENHANCEMENT]** Move required theme files to root (see #24 and #25).


### 1.0.0-alpha2
* **[CORE ENHANCEMENT]** Optimize activation routine.
* **[FIX]** Remove extra wrapper on catalog and landing pages.
* **[FIX]** Resolve error when activating without active widgets.


### 1.0.0-alpha1
* Basic landing page implementation
* Basic catalog page implementation
* Basic customizer capabilities
You can now more easily add additional pages to the network root, such as an “About Us” or “Help” page.


## Credits
Expand Down
Binary file modified assets/images/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions assets/scripts/catalog-admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* global ajaxurl, PB_Aldine_Admin */
( function ( $ ) {
$( document ).ready( function () {
$( '.wrap' ).on( 'click', '.notice-dismiss', function () {
$( this ).parent( '#message' ).fadeOut( 500, function () {
$( this ).remove();
} );
} );
$( 'input.in-catalog' ).on( 'change', function () {
let book_id = $( this ).parent( 'td' ).siblings( 'th' ).children( 'input' ).val();
let in_catalog = $( this ).prop( 'checked' );
$.ajax( {
url: ajaxurl,
type: 'POST',
data: {
action: 'pressbooks_aldine_update_catalog',
book_id: book_id,
in_catalog: in_catalog,
_ajax_nonce: PB_Aldine_Admin.aldineAdminNonce,
},
success: function (){
if ( $( '#message' ).length < 1 ) {
$( '<div id="message" class="updated notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
} else {
$( '#message' ).fadeOut( 500, function () {
$( this ).remove();
$( '<div id="message" class="updated notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
} );
}

},
error: function ( jqXHR, textStatus, errorThrown ) {
if ( $( '#message' ).length < 1 ) {
$( '<div id="message" class="error notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_not_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
} else {
$( '#message' ).fadeOut( 500, function () {
$( this ).remove();
$( '<div id="message" class="error notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_not_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
} );
}
},
} );
} );
} );
} )( jQuery );
8 changes: 5 additions & 3 deletions assets/styles/aldine.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
@import "common/global";
@import "components/book";
@import "components/forms";
@import "layouts/footer";
@import "layouts/header";
@import "layouts/front-page";
@import "layouts/pages";
@import "layouts/catalog";
@import "layouts/page";
@import "layouts/page-home";
@import "layouts/page-catalog";
@import "layouts/signup";
17 changes: 10 additions & 7 deletions assets/styles/components/_book.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.book {
display: flex;
flex-direction: column;
justify-content: space-between;
justify-content: flex-start;
width: 100%;
max-width: 22.9375rem;
height: 24.125rem;
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, $brand-accent);
background: var(--accent, $brand-accent);
border: solid 2px var(--accent);
background: var(--accent);

a {
margin: 0;
font-family: $font-family-sans-serif;
color: var(--accent-fg, #fff);
color: var(--accent-fg);
text-decoration: none;
text-align: center;
hyphens: auto;
}

&__title {
Expand All @@ -30,13 +31,15 @@

&__subject {
margin: 0;
font-size: 0.8rem;
@media #{$breakpoint-not-small} { font-size: 1.25rem; }
font-size: 0.75rem;
@media #{$breakpoint-not-small} {
font-size: 1rem;
}
text-align: left;
}

&__read-more {
margin: 0;
margin: auto 0 0;
font-size: 1rem;
@media #{$breakpoint-not-small} { font-size: 1.125rem; }
text-align: left;
Expand Down
14 changes: 7 additions & 7 deletions assets/styles/components/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ textarea {
border-top: 0;
border-right: 0;
border-left: 0;
border-bottom: solid 2px var(--black, #000);
border-bottom: solid 2px var(--body-text);
border-radius: 0;
padding: 0 0 1.5em;
font-size: 1rem;
Expand All @@ -40,7 +40,7 @@ input[type="submit"] {
width: rem(354);

::placeholder {
color: #000;
color: var(--black);
}

&__notice {
Expand All @@ -52,11 +52,11 @@ input[type="submit"] {
text-align: center;

&--error {
color: #c00;
color: var(--error);
}

&--success {
color: #070;
color: var(--success);
}
}

Expand Down Expand Up @@ -89,10 +89,10 @@ input[type="submit"] {
}
}
&.error {
border-bottom: solid 2px #c00;
border-bottom: solid 2px var(--error);

+ label {
color: #c00;
color: var(--error);
}
}
}
Expand All @@ -112,7 +112,7 @@ input[type="submit"] {
align-items: center;
width: 100%;
padding: rem(65) 0 rem(120);
background: #f6f6f6;
background: var(--body-bg-alt);

h2 {
margin-bottom: rem(40);
Expand Down
3 changes: 2 additions & 1 deletion assets/styles/editor.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@import '~aetna/assets/styles/common/_variables.scss';
@import '~aetna/assets/styles/common/_global.scss';

#tinymce.wp-editor {
body#tinymce {
margin: 12px !important;
@import '~aetna/assets/styles/components/_buttons.scss';
@import '~aetna/assets/styles/layouts/_page-sections.scss';
}
File renamed without changes.
9 changes: 7 additions & 2 deletions assets/styles/layouts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

@media #{$breakpoint-large} {
height: 880px;
.header__inside {
position: relative;
z-index: 99;
}
}
}

Expand All @@ -31,8 +35,8 @@
height: 540px;

@media #{$breakpoint-large} {
height: 300px;
margin: 120px 0;
height: 160px;
margin: 80px 0 0;
}

.entry-title {
Expand All @@ -49,6 +53,7 @@
.entry-description {
font-family: $font-family-sans-serif;
font-size: 1.125rem;
margin-top: 0;
margin-bottom: 0;
text-align: center;
max-width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fieldset {
h2 {
[aria-expanded="true"] {
border-bottom: solid 2px var(--accent);
background: #fafdff;
background: var(--body-bg-alt);
}
}

Expand Down Expand Up @@ -145,7 +145,7 @@ fieldset {
font-family: $font-family-sans-serif;

a {
color: #000;
color: var(--body-text);

&:hover,
&:focus {
Expand Down Expand Up @@ -190,7 +190,7 @@ fieldset {
}
}

@media #{$breakpoint-tablet-and-up} {
@media #{$breakpoint-medium} {
.filter-sort {
width: calc(100% - 1rem);
height: 7rem;
Expand Down Expand Up @@ -249,27 +249,18 @@ fieldset {

@media #{$breakpoint-large} {
.catalog #content {
width: 100%;
max-width: rem(1440);
background: transparent;
}

.catalog .book {
max-width: calc(100% / 3 - 1rem);
}
}

@media #{$breakpoint-extra-large} {
.catalog #content {
width: 100%;
width: calc(100% - 1rem);
margin-left: auto;
margin-right: auto;
max-width: rem(1650);
background: transparent;
}

.filter-sort {
width: calc(25% - 1rem);
width: calc(25% - 2rem);
height: auto;
float: left;
margin-left: 0;
margin: 2rem 1rem 1rem;
}

fieldset {
Expand All @@ -294,6 +285,12 @@ fieldset {
margin-left: 0;
}

.catalog .book {
height: 16.25rem;
max-width: calc(100% / 3 - 1rem);
margin: 0 1rem 1rem 0;
}

.catalog-navigation {
width: 75%;
float: right;
Expand Down
Loading

0 comments on commit 1b2c225

Please sign in to comment.