Browse Source

Some restructuring.

pull/43/head
Ned Zimmerman 7 years ago
parent
commit
3ae45dbb31
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 12
      assets/styles/layouts/_header.scss
  2. 2
      dist/mix-manifest.json
  3. 8
      dist/styles/aldine.css
  4. 44
      footer.php
  5. 6
      header.php
  6. 2
      package.json
  7. 40
      partials/contact-form.php
  8. 12
      partials/content-front-page.php
  9. 12
      yarn.lock

12
assets/styles/layouts/_header.scss

@ -34,9 +34,17 @@
}
.page .header {
// TODO
height: 560px;
@media #{$breakpoint-large} {
height: 880px;
}
}
.page.catalog .header {
// TODO
height: 381px;
@media #{$breakpoint-large} {
height: 450px;
}
}

2
dist/mix-manifest.json vendored

@ -1,5 +1,5 @@
{
"/scripts/aldine.js": "/scripts/aldine.js?id=af09fa97e83d238ec459",
"/styles/aldine.css": "/styles/aldine.css?id=28b42418cb02cfbe2c49",
"/styles/aldine.css": "/styles/aldine.css?id=793b6265ed340c8fdede",
"/scripts/customizer.js": "/scripts/customizer.js?id=f1f1f4225cba4c1b35f2"
}

8
dist/styles/aldine.css vendored

File diff suppressed because one or more lines are too long

44
footer.php

@ -25,29 +25,29 @@ $pb_network_contact_form = get_option( 'pb_network_contact_form' );
<?php if ( $pb_network_contact_form ) :
include( locate_template( 'partials/contact-form.php' ) );
endif; ?>
<section 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 } ?>
<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 } ?>
</div>
</div>
<div class="network-footer__block network-footer__menu">
<?php wp_nav_menu( [ 'theme_location' => 'network-footer-menu' ] ); ?>
</div>
</div>
<div class="network-footer__block network-footer__menu">
<?php wp_nav_menu( [ 'theme_location' => 'network-footer-menu' ] ); ?>
</div>
</section>
<section class="footer__pressbooks">
<a class="footer__pressbooks__icon" href="https://pressbooks.com" title="Pressbooks">
<?php // TODO ?>
@ -75,6 +75,8 @@ $pb_network_contact_form = get_option( 'pb_network_contact_form' );
<?php get_template_part( 'partials/content', 'accessibility-toolbar' ); ?>
</div> <!-- .site -->
<?php wp_footer(); ?>
</body>

6
header.php

@ -71,8 +71,10 @@
] ); ?>
</div>
</div>
<h1 class="header__title"><?php echo get_bloginfo( 'name', 'display' ); ?></h1>
<p class="header__description"><?php echo get_bloginfo( 'description', 'display' ); ?></p>
<?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.2.0",
"aetna": "^0.3.1",
"isotope-layout": "^3.0.4",
"jquery-bridget": "^2.0.1",
"js-cookie": "^2.2.0",

40
partials/contact-form.php

@ -22,21 +22,37 @@ $contact_form_response = \Aldine\Helpers\handle_contact_form_submission();
<?php wp_nonce_field( 'pb_root_contact_form', 'pb_root_contact_form_nonce' ); ?>
<input type="hidden" name="submitted" value="1">
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_name' ) : ?> form__row--error<?php endif; ?>">
<input type="text" aria-label="<?php _e( 'Your name (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your name*', 'pressbooks-aldine' ); ?>" name="visitor_name" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_name'];
endif; ?>" required></p>
<label>
<?php _e( 'Your name (required)', 'pressbooks-aldine' ); ?>
<input type="text" name="visitor_name" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_name'];
endif; ?>" required>
</label>
</p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_email' ) : ?> form__row--error<?php endif; ?>">
<input type="email" aria-label="<?php _e( 'Your email address (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your email*', 'pressbooks-aldine' ); ?>" name="visitor_email" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_email'];
endif; ?>" required></p>
<label>
<?php _e( 'Your email address (required)', 'pressbooks-aldine' ); ?>
<input type="email" name="visitor_email" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_email'];
endif; ?>" required>
</label>
</p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_institution' ) : ?> form__row--error<?php endif; ?>">
<input type="text" aria-label="<?php _e( 'Your institution (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your institution*', 'pressbooks-aldine' ); ?>" name="visitor_institution" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_institution'];
endif; ?>" required></p>
<label>
<?php _e( 'Your institution (required)', 'pressbooks-aldine' ); ?>
<input type="text" name="visitor_institution" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_institution'];
endif; ?>" required>
</label>
</p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'message' ) : ?> form__row--error<?php endif; ?>">
<textarea type="text" aria-label="<?php _e( 'Your message (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your message here*', 'pressbooks-aldine' ); ?>" name="message" required><?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['message'];
endif; ?></textarea></p>
<label>
<?php _e( 'Your message (required)', 'pressbooks-aldine' ); ?>
<textarea name="message" required><?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['message'];
endif; ?></textarea>
</label>
</p>
<p class="form__row"><input class="button button--small button--outline" type="submit" value="<?php _e( 'Send', 'pressbooks-aldine' ); ?>" /></p>
</form>
</section>

12
partials/content-front-page.php

@ -28,12 +28,12 @@ $next_page = $page + 1;
<?php if ( is_active_sidebar( 'front-page-block' ) ) :
dynamic_sidebar( 'front-page-block' );
else : ?>
<div class="block flex flex-column items-center justify-center p-0 w-100">
<div class="inside tc">
<h3 class="tc ttu"><?php _e( 'About Pressbooks', 'pressbooks-aldine' ) ?></h3>
<p><?php _e( 'Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'pressbooks-aldine' ); ?></p>
<a class="button" href="<?php echo network_home_url( '/about/' ); ?>"><?php _e( 'Learn More', 'pressbooks-aldine' ) ?></a>
</div>
<div class="block">
<div class="inside tc">
<h3 class="tc ttu"><?php _e( 'About Pressbooks', 'pressbooks-aldine' ) ?></h3>
<p><?php _e( 'Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'pressbooks-aldine' ); ?></p>
<a class="button" href="<?php echo network_home_url( '/about/' ); ?>"><?php _e( 'Learn More', 'pressbooks-aldine' ) ?></a>
</div>
</div>
<?php endif; ?>
<?php if ( get_option( 'pb_front_page_catalog' ) ) : ?>

12
yarn.lock

@ -113,9 +113,11 @@ adjust-sourcemap-loader@^1.1.0:
object-path "^0.9.2"
regex-parser "^2.2.1"
aetna@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/aetna/-/aetna-0.2.0.tgz#d927f2ed9db96754343d8b1eec4f0762aa1a2e85"
aetna@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/aetna/-/aetna-0.3.1.tgz#2ae4af872a51e99a5676cb0bdcfbdacbd738ffb9"
dependencies:
reboot.css "^1.0.1"
after@0.8.1:
version "0.8.1"
@ -6590,6 +6592,10 @@ readdirp@^2.0.0:
readable-stream "^2.0.2"
set-immediate-shim "^1.0.1"
reboot.css@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/reboot.css/-/reboot.css-1.0.1.tgz#371c3782fbf93fb90c7e1d71eb443cbfdf609ccb"
recast@~0.11.12:
version "0.11.23"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3"

Loading…
Cancel
Save