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. 6
      footer.php
  5. 2
      header.php
  6. 2
      package.json
  7. 32
      partials/contact-form.php
  8. 2
      partials/content-front-page.php
  9. 12
      yarn.lock

12
assets/styles/layouts/_header.scss

@ -34,9 +34,17 @@
} }
.page .header { .page .header {
// TODO height: 560px;
@media #{$breakpoint-large} {
height: 880px;
}
} }
.page.catalog .header { .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", "/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" "/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

6
footer.php

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

2
header.php

@ -71,8 +71,10 @@
] ); ?> ] ); ?>
</div> </div>
</div> </div>
<?php if ( is_front_page() ) { ?>
<h1 class="header__title"><?php echo get_bloginfo( 'name', 'display' ); ?></h1> <h1 class="header__title"><?php echo get_bloginfo( 'name', 'display' ); ?></h1>
<p class="header__description"><?php echo get_bloginfo( 'description', 'display' ); ?></p> <p class="header__description"><?php echo get_bloginfo( 'description', 'display' ); ?></p>
<?php } ?>
</header> <!-- .header --> </header> <!-- .header -->
<div id="content" class="site-content"> <div id="content" class="site-content">

2
package.json

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

32
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' ); ?> <?php wp_nonce_field( 'pb_root_contact_form', 'pb_root_contact_form_nonce' ); ?>
<input type="hidden" name="submitted" value="1"> <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; ?>"> <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' ) : <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']; echo $contact_form_response['values']['visitor_name'];
endif; ?>" required></p> 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; ?>"> <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' ) : <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']; echo $contact_form_response['values']['visitor_email'];
endif; ?>" required></p> 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; ?>"> <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' ) : <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']; echo $contact_form_response['values']['visitor_institution'];
endif; ?>" required></p> 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; ?>"> <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' ) : <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']; echo $contact_form_response['values']['message'];
endif; ?></textarea></p> endif; ?></textarea>
</label>
</p>
<p class="form__row"><input class="button button--small button--outline" type="submit" value="<?php _e( 'Send', 'pressbooks-aldine' ); ?>" /></p> <p class="form__row"><input class="button button--small button--outline" type="submit" value="<?php _e( 'Send', 'pressbooks-aldine' ); ?>" /></p>
</form> </form>
</section> </section>

2
partials/content-front-page.php

@ -28,7 +28,7 @@ $next_page = $page + 1;
<?php if ( is_active_sidebar( 'front-page-block' ) ) : <?php if ( is_active_sidebar( 'front-page-block' ) ) :
dynamic_sidebar( 'front-page-block' ); dynamic_sidebar( 'front-page-block' );
else : ?> else : ?>
<div class="block flex flex-column items-center justify-center p-0 w-100"> <div class="block">
<div class="inside tc"> <div class="inside tc">
<h3 class="tc ttu"><?php _e( 'About Pressbooks', 'pressbooks-aldine' ) ?></h3> <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> <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>

12
yarn.lock

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

Loading…
Cancel
Save