Browse Source

Major improvements to landing page.

pull/43/head
Ned Zimmerman 7 years ago
parent
commit
be61b96d2b
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 14
      assets/styles/aldine.scss
  2. 59
      assets/styles/components/_book.scss
  3. 5
      assets/styles/components/_comments.scss
  4. 13
      assets/styles/components/_forms.scss
  5. 6
      assets/styles/components/_grid.scss
  6. 58
      assets/styles/components/_wp-classes.scss
  7. 2
      assets/styles/editor.scss
  8. 132
      assets/styles/layouts/_footer.scss
  9. 67
      assets/styles/layouts/_front-page.scss
  10. 53
      assets/styles/layouts/_header.scss
  11. 48
      assets/styles/layouts/pages/_front-page.scss
  12. 4
      dist/mix-manifest.json
  13. 2
      dist/styles/aldine.css
  14. 2
      dist/styles/editor.css
  15. 46
      footer.php
  16. 9
      header.php
  17. 2
      package.json
  18. 8
      partials/book.php
  19. 71
      partials/content-front-page.php
  20. 6
      yarn.lock

14
assets/styles/aldine.scss

@ -1,4 +1,4 @@
// @import "common/variables";
@import "common/variables";
/**
* Import npm dependencies
@ -9,14 +9,8 @@
@import "~aetna/assets/styles/aetna.scss";
/** Import theme styles */
// @import "common/global";
// @import "components/comments";
@import "common/global";
@import "components/book";
@import "components/forms";
// @import "components/grid";
// @import "components/wp-classes";
@import "layouts/header";
// @import "layouts/sidebar";
// @import "layouts/footer";
// @import "layouts/pages";
// @import "layouts/posts";
// @import "layouts/tinymce";
@import "layouts/front-page";

59
assets/styles/components/_book.scss

@ -0,0 +1,59 @@
.book {
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 100%;
max-width: 22.9375rem;
height: 24.125rem;
margin: 0 0 2rem;
padding: 1.5rem 1.85rem 2.1875rem;
border: solid 2px var(--accent, $brand-accent);
background: var(--accent, $brand-accent);
a {
margin: 0;
font-family: $font-family-sans-serif;
color: var(--accent-fg, #fff);
text-decoration: none;
text-align: center;
}
&__subject {
height: 4.625rem;
margin: 0;
font-size: rem(24);
text-align: center;
}
&__title {
height: 13rem;
margin: 0;
font-size: rem(30);
font-weight: 500;
line-height: (40/30);
text-align: left;
}
&__read-more {
margin: 0;
font-size: rem(18);
text-align: left;
a {
svg {
width: rem(18);
height: rem(18);
margin-left: 0.5rem;
vertical-align: middle;
}
}
}
&:last-child {
margin-bottom: 0;
@media #{$breakpoint-large} {
margin-bottom: 2rem;
}
}
}

5
assets/styles/components/_comments.scss

@ -1,5 +0,0 @@
// TODO: .comment-list {}
// TODO: .comment-list ol {}
// TODO: .comment-form p {}
// TODO: .comment-form input {}
// TODO: .comment-form textarea {}

13
assets/styles/components/_forms.scss

@ -1,3 +1,5 @@
label {
margin-bottom: 1rem;
font-family: $font-family-sans-serif;
@ -45,8 +47,10 @@ input[type="submit"] {
&__notice {
margin-bottom: 2rem;
font-size: 0.875rem;
font-weight: 600;
font-weight: $font-weight-bold;
font-family: $font-family-sans-serif;
text-transform: uppercase;
text-align: center;
&--error {
color: #c00;
@ -71,18 +75,18 @@ input[type="submit"] {
left: 0;
top: 0;
transition: 0.2s;
background: #f6f6f6;
line-height: 1;
}
input,
textarea {
z-index: 1;
&:focus,
&:valid,
&.error {
+ label {
top: 100%;
margin-top: -1.25rem;
margin-top: -1.125rem;
font-size: 0.75rem;
}
}
@ -113,7 +117,6 @@ input[type="submit"] {
background: #f6f6f6;
h2 {
font-size: rem(24);
margin-bottom: rem(40);
}
}

6
assets/styles/components/_grid.scss

@ -1,6 +0,0 @@
.main {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

58
assets/styles/components/_wp-classes.scss

@ -1,58 +0,0 @@
/**
* WordPress Generated Classes
* @see http://codex.wordpress.org/CSS#WordPress_Generated_Classes
*/
$spacer: 2rem;
/** Media alignment */
.alignnone {
margin-left: 0;
margin-right: 0;
max-width: 100%;
height: auto;
}
.aligncenter {
display: block;
margin: ($spacer / 2) auto;
height: auto;
}
.alignleft,
.alignright {
margin-bottom: ($spacer / 2);
height: auto;
}
@media (min-width: 30rem) {
.alignleft {
float: left;
margin-right: ($spacer / 2);
}
.alignright {
float: right;
margin-left: ($spacer / 2);
}
}
/** Captions */
// TODO: .wp-caption {}
// TODO: .wp-caption img {}
// TODO: .wp-caption-text {}
/** Text meant only for screen readers */
.screen-reader-text {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
color: #000;
background: #fff;
}

2
assets/styles/editor.scss

@ -3,5 +3,5 @@
#tinymce.wp-editor {
@import '~aetna/assets/styles/components/_buttons.scss';
@import '~aetna/assets/styles/layouts/_block.scss';
@import '~aetna/assets/styles/layouts/_blocks.scss';
}

132
assets/styles/layouts/_footer.scss

@ -1,132 +0,0 @@
.social-media {
margin-top: 1em;
a {
font-size: rem(32);
margin: 0 0.25em;
transition: all 0.4s;
}
}
.network-footer {
margin-bottom: 0;
padding: 60px 42.5px 40px;
font-family: $font-family-sans-serif;
font-size: rem(16);
color: var(--accent-fg, $white);
background-color: var(--accent, $brand-accent);
ul {
margin: 0;
padding: 0;
list-style: none;
text-align: center;
font-weight: 600;
line-height: (36/16);
}
a {
color: var(--accent-fg, $white);
text-decoration: none;
border-bottom: solid 1px transparent;
&:hover,
&:focus {
border-bottom: solid 1px var(--accent-fg, $white);
}
}
&__block {
border-top: solid 1px var(--accent-fg, $white);
&:first-of-type {
border-top: 0;
}
}
&__block--1 {
margin: 0 -5px;
padding: 0 0 40px;
}
&__block--2 {
padding: 30px 7.5px;
.widget {
margin-bottom: 1em;
}
}
&__menu {
padding: 30px 7.5px 0;
}
&__block .social-media {
margin-top: 0;
width: 100%;
a {
margin: 0 0.5em 0 0;
border-bottom: none;
&:hover,
&:focus {
border-bottom: none;
}
}
}
}
@media (min-width: $medium) {
.network-footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
ul {
text-align: left;
}
&__block {
display: flex;
align-items: center;
height: 142.5px;
margin: 0;
padding: 0 69.5px;
border-top: 0;
border-right: solid 1px var(--accent-fg, $white);
}
&__block--empty {
display: none;
}
&__block--2 {
flex-direction: column;
justify-content: center;
}
&__block:last-of-type {
border-right: 0;
}
}
.social-media {
a {
font-size: rem(24);
margin: 0 0.5em 0 0;
}
}
}
@media (min-width: $extra-large) {
.network-footer {
ul {
li {
display: inline-block;
margin-right: 3em;
}
}
}
}

67
assets/styles/layouts/_front-page.scss

@ -0,0 +1,67 @@
.home #content {
width: 100%;
@media #{$breakpoint-extra-large} {
max-width: 1440px;
}
}
.latest-books {
padding: 0 0 9.625rem;
.books {
display: flex;
flex-direction: column;
align-items: center;
}
.booknav {
width: 100%;
@media #{$breakpoint-large} {
max-width: 22.9375rem;
}
margin: 1rem auto 2rem;
display: flex;
flex-direction: row;
justify-content: center;
}
.previous,
.next {
display: block;
svg {
width: rem(25);
height: rem(25);
path {
fill: var(--primary, $brand);
}
}
}
@media #{$breakpoint-large} {
.books {
flex-direction: row;
justify-content: center;
.book {
margin-right: 1rem;
margin-left: 1rem;
}
}
}
.previous {
order: 1;
margin-right: auto;
}
.next {
order: 2;
margin-left: auto;
}
.catalog-link {
text-align: center;
}
}

53
assets/styles/layouts/_header.scss

@ -1,36 +1,57 @@
.header {
background-position: bottom;
background-repeat: no-repeat;
background-size: cover;
}
.home .header {
background-position: bottom;
background-repeat: no-repeat;
background-size: cover;
height: 560px;
height: 540px;
@media #{$breakpoint-large} {
height: 880px;
}
}
.home #content {
margin-top: -540px;
background: transparent;
@media #{$breakpoint-large} {
margin-top: -880px;
}
}
&__title {
.home .entry-header {
display: flex;
flex-direction: column;
justify-content: center;
height: 540px;
@media #{$breakpoint-large} {
// TODO
}
.entry-title {
font-family: $font-family-sans-serif;
font-size: 1.875rem;
margin-top: 3rem;
@media #{$breakpoint-large} {
font-size: 4.5rem;
}
margin-bottom: 0;
text-align: center;
max-width: 100%;
}
&__description {
.entry-description {
font-family: $font-family-sans-serif;
font-size: 1.125rem;
margin-bottom: 0;
text-align: center;
max-width: 100%;
}
@media #{$breakpoint-large} {
height: 880px;
&__title {
font-size: 4.5rem;
}
&__description {
font-size: 1.875rem;
}
}
}
.page .header {

48
assets/styles/layouts/pages/_front-page.scss

@ -52,52 +52,6 @@
margin-bottom: rem(34);
}
.book {
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 100%;
max-width: 22.9375rem;
height: 24.125rem;
margin: 0 0 2rem;
padding: 1.5rem 1.85rem 2.1875rem;
border: solid 2px var(--accent, $brand-accent);
background: var(--accent, $brand-accent);
a {
margin: 0;
font-family: $font-family-sans-serif;
color: var(--accent-fg, $white);
text-decoration: none;
text-align: center;
}
&__subject {
height: 4.625rem;
margin: 0;
font-size: rem(24);
text-align: center;
}
&__title {
height: 13rem;
margin: 0;
font-size: rem(30);
font-weight: 500;
line-height: (40/30);
text-align: left;
}
&__read-more {
margin: 0;
font-size: rem(18);
text-align: left;
}
&:last-child {
margin-bottom: 0;
}
}
.previous,
.next {
@ -107,7 +61,7 @@
svg {
path {
fill: var(--primary, $brand-primary);
fill: var(--primary, $brand);
}
}
}

4
dist/mix-manifest.json vendored

@ -1,6 +1,6 @@
{
"/scripts/aldine.js": "/scripts/aldine.js?id=c8641d03dfb38dc75e0d",
"/styles/aldine.css": "/styles/aldine.css?id=c40439621e3e29db44b3",
"/styles/editor.css": "/styles/editor.css?id=1db52e0f56b8d56e059f",
"/styles/aldine.css": "/styles/aldine.css?id=d6c1da7e85562b83b2d5",
"/styles/editor.css": "/styles/editor.css?id=16680c95cc79caed750f",
"/scripts/customizer.js": "/scripts/customizer.js?id=f1f1f4225cba4c1b35f2"
}

2
dist/styles/aldine.css vendored

File diff suppressed because one or more lines are too long

2
dist/styles/editor.css vendored

File diff suppressed because one or more lines are too long

46
footer.php

@ -24,28 +24,32 @@ $pb_network_contact_form = get_option( 'pb_network_contact_form' );
include( locate_template( 'partials/contact-form.php' ) );
endif; ?>
<footer class="footer<?php echo is_front_page() ? ' footer--home' : ' footer--inside' ?>" role="contentinfo">
<footer class="footer" role="contentinfo">
<div class="footer__inner">
<div class="footer__network">
<div class="footer__network__block">
<?php dynamic_sidebar( 'network-footer-block-1' ); ?>
</div>
<div class="footer__network__block">
<?php dynamic_sidebar( 'network-footer-block-2' ); ?>
<div class="social-media">
<?php if ( $network_facebook ) { ?>
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_facebook; ?>" title="<?php printf( __( '%s on Facebook', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M15.117 0H.883C.395 0 0 .395 0 .883v14.234c0 .488.395.883.883.883h7.663V9.804H6.46V7.39h2.086V5.607c0-2.066 1.262-3.19 3.106-3.19.883 0 1.642.064 1.863.094v2.16h-1.28c-1 0-1.195.476-1.195 1.176v1.54h2.39l-.31 2.416h-2.08V16h4.077c.488 0 .883-.395.883-.883V.883C16 .395 15.605 0 15.117 0" fill-rule="nonzero"/></svg>
</a>
<?php } ?>
<?php if ( $network_twitter ) { ?>
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_twitter; ?>" title="<?php printf( __( '%s on Twitter', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 3.038c-.59.26-1.22.437-1.885.517.677-.407 1.198-1.05 1.443-1.816-.634.375-1.337.648-2.085.795-.598-.638-1.45-1.036-2.396-1.036-1.812 0-3.282 1.468-3.282 3.28 0 .258.03.51.085.75C5.152 5.39 2.733 4.084 1.114 2.1.83 2.583.67 3.147.67 3.75c0 1.14.58 2.143 1.46 2.732-.538-.017-1.045-.165-1.487-.41v.04c0 1.59 1.13 2.918 2.633 3.22-.276.074-.566.114-.865.114-.21 0-.416-.02-.617-.058.418 1.304 1.63 2.253 3.067 2.28-1.124.88-2.54 1.404-4.077 1.404-.265 0-.526-.015-.783-.045 1.453.93 3.178 1.474 5.032 1.474 6.038 0 9.34-5 9.34-9.338 0-.143-.004-.284-.01-.425.64-.463 1.198-1.04 1.638-1.7z" fill-rule="nonzero"/></svg>
</a>
<?php } ?>
<?php if ( is_active_sidebar( 'network-footer-block-1' ) ) { ?>
<div class="footer__network__block footer__network__block--1">
<?php dynamic_sidebar( 'network-footer-block-1' ); ?>
</div>
</div>
<div class="network-footer__block network-footer__menu">
<?php } ?>
<?php if ( is_active_sidebar( 'network-footer-block-2' ) || ! empty( $network_facebook ) || ! empty( $network_twitter ) ) { ?>
<div class="footer__network__block footer__network__block--2">
<?php dynamic_sidebar( 'network-footer-block-2' ); ?>
<div class="social-media">
<?php if ( ! empty( $network_facebook ) ) { ?>
<a class="icon icon-facebook" href="<?php echo $network_facebook; ?>" title="<?php printf( __( '%s on Facebook', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<span class="screen-reader-text"><?php printf( __( '%s on Facebook', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?></span>
</a>
<?php } ?>
<?php if ( ! empty( $network_twitter ) ) { ?>
<a class="icon icon-twitter" href="<?php echo $network_twitter; ?>" title="<?php printf( __( '%s on Twitter', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<span class="screen-reader-text"><?php printf( __( '%s on Twitter', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?></span>
</a>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="footer__network__block footer__network__menu">
<?php wp_nav_menu( [ 'theme_location' => 'network-footer-menu' ] ); ?>
</div>
</div>
@ -66,8 +70,8 @@ $pb_network_contact_form = get_option( 'pb_network_contact_form' );
</ul>
</div>
<div class="footer__pressbooks__social">
<a class="icon icon-facebook" href="https://facebook.com/pressbooks2" title="<?php _e( 'Pressbooks on Facebook', 'pressbooks-book' ); ?>"> </a>
<a class="icon icon-twitter" href="https://twitter.com/intent/follow?screen_name=pressbooks" title="<?php _e( 'Pressbooks on Twitter', 'pressbooks-book' ); ?>"> </a>
<a class="icon icon-facebook" href="https://facebook.com/pressbooks2" title="<?php _e( 'Pressbooks on Facebook', 'pressbooks-book' ); ?>"><span class="screen-reader-text"><?php _e( 'Pressbooks on Facebook', 'pressbooks-book' ); ?></span></a>
<a class="icon icon-twitter" href="https://twitter.com/intent/follow?screen_name=pressbooks" title="<?php _e( 'Pressbooks on Twitter', 'pressbooks-book' ); ?>"><span class="screen-reader-text"><?php _e( 'Pressbooks on Twitter', 'pressbooks-book' ); ?></span></a>
</div>
</section>

9
header.php

@ -31,6 +31,11 @@
<path fill="#B01109" d="M39.549 37.515c0 .667-.553 1.205-1.232 1.205H1.232A1.217 1.217 0 0 1 0 37.515V1.25C0 .585.553.045 1.232.045h37.083c.681 0 1.234.54 1.234 1.205v36.265z"/>
<path fill="#EDEDED" d="M13.648 10.504c1.44 0 2.588.444 3.444 1.332.793.848 1.19 1.93 1.19 3.245v2.786c0 1.264-.452 2.346-1.354 3.244-.903.898-1.996 1.346-3.28 1.346h-1.705v7.225H8.986V10.504h4.662zm1.77 4.622c0-.5-.155-.903-.462-1.209-.307-.305-.717-.458-1.228-.458h-1.785v6.138h1.784c.468 0 .868-.163 1.197-.49.328-.327.492-.72.492-1.179v-2.802h.002zM20.644 29.682V10.489h4.429c1.169 0 2.222.3 3.16.902.803.511 1.377 1.301 1.722 2.374.188.57.282 1.25.282 2.034 0 1.286-.35 2.317-1.05 3.092a2.976 2.976 0 0 1-1.032.75c.657.245 1.215.73 1.674 1.455.302.49.526 1.123.672 1.899.073.397.11.842.11 1.33 0 1.215-.235 2.245-.705 3.092a4.154 4.154 0 0 1-1.55 1.591c-.75.45-1.497.674-2.238.674h-5.474zm3.193-11.356h1.236c.918 0 1.534-.438 1.847-1.317.115-.327.172-.73.172-1.21 0-.795-.197-1.397-.595-1.806-.365-.377-.84-.567-1.424-.567h-1.236v4.9zm0 8.494h1.236c1 0 1.695-.505 2.081-1.515.136-.347.204-.746.204-1.195 0-1.072-.21-1.85-.626-2.342-.376-.45-.93-.672-1.66-.672h-1.235v5.724z"/>
</symbol>
<symbol id="arrow-right" fill="currentColor" viewBox="0 0 512 512">
<path d="M291 32c0 6 3 12 7 17l133 135H23c-13 0-23 11-23 24s10 24 23 24h408L298 367c-4 4-7 10-7 16s3 12 7 17c10 9 24 9 33 0l173-176c9-9 9-23 0-33L331 15c-9-10-23-10-33 0-4 4-7 10-7 17"/>
</symbol>
<symbol id="arrow-left" fill="currentColor" viewBox="0 0 512 512"><path d="M220 45c0 6-3 12-7 17L79 200h410c12 0 23 11 23 25 0 13-11 24-23 24H79l134 138c4 5 7 11 7 17 0 7-3 13-7 18-10 9-24 9-33 0L7 242c-9-10-9-25 0-34L180 26c9-9 23-9 33 0 4 5 7 11 7 19"/>
</symbol>
</defs>
</svg>
<div id="page" class="site">
@ -71,10 +76,6 @@
] ); ?>
</div>
</div>
<?php if ( is_front_page() ) { ?>
<h1 class="header__title"><?php echo get_bloginfo( 'name', 'display' ); ?></h1>
<p class="header__description"><?php echo get_bloginfo( 'description', 'display' ); ?></p>
<?php } ?>
</header> <!-- .header -->
<div id="content" class="site-content">

2
package.json

@ -53,7 +53,7 @@
"pressbooks-build-tools": "^0.9.0"
},
"dependencies": {
"aetna": "^0.3.2",
"aetna": "^0.4.0",
"isotope-layout": "^3.0.4",
"jquery-bridget": "^2.0.1",
"js-cookie": "^2.2.0",

8
partials/book.php

@ -5,17 +5,17 @@ $date = ( isset( $book['metadata']['datePublished'] ) ) ? str_replace( '-', '',
<div class="book"
<?php if ( $date ) { ?>data-date-published="<?php echo $date; ?>"<?php } ?>
data-license="<?php echo ( new \Pressbooks\Licensing() )->getLicenseFromUrl( $book['metadata']['license']['url'] ); ?>"
data-subject="<?php echo $subject ?>"
<?php if ( ! empty( $subject ) ) { ?> data-subject="<?php echo $subject ?>"<?php } ?>
>
<?php if ( ! empty( $subject ) ) { ?>
<p class="book__subject">
<a href="<?php echo network_home_url( "/catalog/#$subject" ) ?>"><?php echo \Pressbooks\Metadata\get_subject_from_thema( $book['subject'] ); ?></a>
<a href="<?php echo network_home_url( "/catalog/#$subject" ) ?>"><?php echo \Pressbooks\Metadata\get_subject_from_thema( $book['subject'] ); ?></a>
</p>
<?php } ?>
<p class="book__title">
<a href="<?php echo $book['link']; ?>"><?php echo $book['metadata']['name']; ?></a>
<a href="<?php echo $book['link']; ?>"><?php echo $book['metadata']['name']; ?></a>
</p>
<p class="book__read-more">
<a href="<?php echo $book['link']; ?>"><?php _e( 'About this book &rarr;', 'pressbooks-aldine' ); ?></a>
<a href="<?php echo $book['link']; ?>"><?php _e( 'About this book', 'pressbooks-aldine' ); ?> <svg><use xlink:href="#arrow-right" /></svg></a>
</p>
</div>

71
partials/content-front-page.php

@ -23,35 +23,54 @@ $next_page = $page + 1;
?>
<div class="blarg">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php $classes = ( has_blocks( get_the_ID() ) ) ? 'entry-content blocks' : 'entry-content'; ?>
<div class="<?php echo $classes; ?>">
<?php
the_content();
?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php echo get_bloginfo( 'name', 'display' ); ?></h1>
<p class="entry-description"><?php echo get_bloginfo( 'description', 'display' ); ?></p>
</header><!-- .entry-header -->
<?php $classes = ( has_blocks( get_the_ID() ) ) ? 'entry-content blocks' : 'entry-content'; ?>
<div class="<?php echo $classes; ?>">
<?php
the_content();
?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php if ( get_option( 'pb_front_page_catalog' ) ) : ?>
<div id="latest-titles" class="latest-books">
<h3><?php echo $latest_books_title; ?></h3>
<div class="track">
<div class="books" data-total-pages="{{ $catalog_data["pages"] }}" <?php if ( $next_page <= $catalog_data['pages'] ) : ?>data-next-page="{{ $next_page }}"<?php endif; ?>>
<?php foreach ( $catalog_data['books'] as $book ) :
include( locate_template( 'partials/book.php' ) );
endforeach; ?>
</div>
<?php if ( $previous_page ) : ?>
<a class="previous" data-page="<?php echo $previous_page; ?>" href="<?php echo network_home_url( "/page/$previous_page/#latest-titles" ); ?>"></a>
<?php endif; ?>
<?php if ( $next_page <= $catalog_data['pages'] ) : ?>
<a class="next" data-page="<?php echo $next_page; ?>" href="<?php echo network_home_url( "/page/$next_page/#latest-titles" ); ?>"></a>
<?php endif; ?>
<div id="latest-titles" class="latest-books">
<h2><?php echo $latest_books_title; ?></h2>
<div class="track">
<div class="books" data-total-pages="<?php echo $catalog_data['pages']; ?>" <?php if ( $next_page <= $catalog_data['pages'] ) : ?>data-next-page="<?php echo $next_page; ?>"<?php endif; ?>>
<?php foreach ( $catalog_data['books'] as $book ) :
include( locate_template( 'partials/book.php' ) );
endforeach; ?>
</div>
<div class="catalog-link">
<a class="button button--outline button--wide" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
<?php if ( $previous_page || $next_page ) { ?>
<div class="booknav">
<?php } ?>
<?php if ( $previous_page ) : ?>
<a class="previous" rel="previous" data-page="<?php echo $previous_page; ?>" href="<?php echo network_home_url( "/page/$previous_page/#latest-titles" ); ?>">
<span class="screen-reader-text"><?php _e( 'Previous Page', 'pressbooks' ); ?></span>
<svg>
<use xlink:href="#arrow-left" />
</svg>
</a>
<?php endif; ?>
<?php if ( $next_page <= $catalog_data['pages'] ) : ?>
<a class="next" rel="next" data-page="<?php echo $next_page; ?>" href="<?php echo network_home_url( "/page/$next_page/#latest-titles" ); ?>">
<span class="screen-reader-text"><?php _e( 'Next Page', 'pressbooks' ); ?></span>
<svg>
<use xlink:href="#arrow-right" />
</svg>
</a>
<?php endif; ?>
<?php if ( $previous_page || $next_page ) { ?>
</div>
<?php } ?>
</div>
<div class="catalog-link">
<a class="button button--outline button--wide" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
</div>
<?php endif; ?>
</div>
<?php endif; ?>

6
yarn.lock

@ -113,9 +113,9 @@ adjust-sourcemap-loader@^1.1.0:
object-path "^0.9.2"
regex-parser "^2.2.1"
aetna@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/aetna/-/aetna-0.3.2.tgz#49142fc47332b377d871e18bc8f4f3ee13ca4135"
aetna@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/aetna/-/aetna-0.4.0.tgz#3a32705c3299acf3ae98ebde933e3f5d071dfbcf"
after@0.8.1:
version "0.8.1"

Loading…
Cancel
Save