Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #52 from washingtonstateuniversity/template-fixes
Browse files Browse the repository at this point in the history
Template fixes
  • Loading branch information
Adam Turner authored Jul 27, 2018
2 parents 2604b06 + 577dd52 commit 067997c
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 80 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ This document details all notable changes to the WSU HRS Child Theme. Uses [Sema
### Removed (for deprecated features removed in this release)
-->

## 0.17.6 (2018-07-27)

### Fixed

- Fix #50, Jiggering on site reference nav menu hover.
- Fix #48, Apply `.article-header` bottom margin only on single pages.
- Fix #49, Empty feature image link URL on single views by echoing the Spine image URL function.

### Changed

- Switch the footer cougar head logo to crimson.
- Shift Builder banner title down slightly.
- Remove unused color Sass variables.
- Give the site header a little more breathing room.
- Style page template feature image to match single post views.
- Move page template feature image out of the hero position.

## 0.17.5 (2018-07-18)

### Fixed
Expand Down
39 changes: 39 additions & 0 deletions articles/article.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* Single Page Layout Template
*
* The template for layout out the content of page content in single page views.
*
* @package WSU_Human_Resources_Services
*
* @since 0.17.6
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'article-content' ); ?>>

<?php if ( true === spine_get_option( 'articletitle_show' ) ) : ?>
<header class="article-header">
<h1 class="article-title"><?php the_title(); ?></h1>
</header>
<?php endif; ?>

<?php
if ( spine_has_featured_image() ) :
$image_caption = get_post( get_post_thumbnail_id() )->post_excerpt;
?>
<figure class="article-image feature-image">
<a href="<?php echo esc_url( spine_get_featured_image_src() ); ?>">
<?php spine_the_featured_image(); ?>
</a>
<?php if ( ! empty( $image_caption ) ) : ?>
<figcaption class="wp-caption-text"><?php echo esc_html( $image_caption ); ?></figcaption>
<?php endif; ?>
</figure>
<?php
endif;

the_content();
?>

</article>
2 changes: 1 addition & 1 deletion articles/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
} else {
?>
<a href="<?php esc_url( spine_get_featured_image_src() ); ?>">
<a href="<?php echo esc_url( spine_get_featured_image_src() ); ?>">
<?php spine_the_featured_image(); ?>
</a>
<?php if ( ! empty( $image_caption ) ) { ?>
Expand Down
2 changes: 1 addition & 1 deletion assets/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @since 0.17.3
*/
function hrs_get_theme_version() {
$hrs_version = '0.17.5';
$hrs_version = '0.17.6';

return $hrs_version;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hrs.wsu.edu",
"version": "0.17.4",
"version": "0.17.6",
"repository": {
"type": "git",
"url": "https://github.com/washingtonstateuniversity/hrs.wsu.edu"
Expand Down
1 change: 0 additions & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<main id="wsuwp-main" class="spine-page-default">

<?php get_template_part( 'parts/headers' ); ?>
<?php get_template_part( 'parts/featured-images' ); ?>

<section class="row single gutter pad-ends article-container">

Expand Down
3 changes: 1 addition & 2 deletions parts/footers.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
<div class="footer-nav">
<?php wp_nav_menu( $footer_nav_args ); ?>
<div class="wsu-brand">
<svg class="wsu-cougar-head" xmlns="http://www.w3.org/2000/svg" width="50.428" height="50" viewBox="7.481 7.416 50.428 50"><g fill="#FFF"><path d="M38.202 57.372s2.547-1.089 3.948-5.315a10.398 10.398 0 0 1 .903 5.211 33.15 33.15 0 0 1-4.851.104zm10.665-8.489c-7.457 1.088-8.742-14.603-8.742-14.603s2.5 8.002 7.827 7.712c5.511-.277 3.948-8.766 3.948-8.766s5.361 14.499-3.033 15.657zm-34.218-3.544a64.527 64.527 0 0 1-7.168 1.69s4.261-3.22 7.435-13.179l3.068 2.769-.579 1.899a14.269 14.269 0 0 1 1.83 3.474 9.15 9.15 0 0 0-.198-8.025l-.393 1.16-1.159-1.09-2.061-1.887a25.87 25.87 0 0 1 3.844-7.238l.278.302 2.316 2.744-.707 1.159a30.013 30.013 0 0 1 2.999 3.809 17.36 17.36 0 0 0-.289-7.249l-1.065.997-2.628-3.046a29.047 29.047 0 0 1 11.649-7.411c-.27.294-.518.608-.742.938-1.471 2.061-2.952 5.789-1.749 11.799.175.949.499 2.317.823 3.683.635 2.744 1.354 5.858 1.609 7.815.509 4.088.092 6.764-1.263 8.187a5.886 5.886 0 0 1-4.632 1.343v-.972a20.997 20.997 0 0 0-.614-5.165l-.566-1.98-.892 1.842c-1.401 2.919-6.172 10.168-12.379 11.58a20.909 20.909 0 0 0 3.233-9.948z"/><path d="M50.429 18.394l-.068-.405 7.179-1.436-.128-.8-7.398.926c0-.139-.093-.29-.151-.429l6.764-2.628-.29-.706-7.075 2.188a3.327 3.327 0 0 0-1.331-1.402c-2.699.209-5.143.429-7.377.719l1.413-6.624h-.684l-2.166 6.832-1.157.197 1.688-7.411h-.798l-2.49 7.712h-.093a7.88 7.88 0 0 0-3.925 2.988c-1.286 1.83-2.594 5.154-1.505 10.642.196.915.498 2.224.822 3.625.647 2.779 1.376 5.94 1.631 7.979.592 4.632 0 7.632-1.679 9.427-1.4 1.459-3.567 2.039-6.601 1.771l-.764-.069.07-.754c.051-.538.074-1.079.069-1.62 0-.919-.063-1.835-.185-2.746a26.863 26.863 0 0 1-8.616 8.987c5.319.24 10.619.813 15.865 1.712l.845.081h.29c.631.017 1.262-.014 1.887-.092h.302c3.682-.636 6.866-3.357 6.01-9.67-1.007-7.492-2.316-12.261-2.652-15.864-.404-4.376 3.394-11.162 10.145-8.105a10.75 10.75 0 0 1 2.165 3.66 10.114 10.114 0 0 0-.207-4.631 7.793 7.793 0 0 0 .311-2.699l7.365-.312v-.811l-7.481-.232zm-7.48 2.686a10.608 10.608 0 0 0-6.38 1.668 8.502 8.502 0 0 0-2.408 2.767 4.633 4.633 0 0 1 1.887-4.493 9.672 9.672 0 0 1 7.364-.383c.648.383.185.487-.463.441z"/></g>
</svg>
<svg class="wsu-cougar-head" xmlns="http://www.w3.org/2000/svg" width="50.428" height="50" viewBox="7.481 7.416 50.428 50"><g fill="#981e32"><path d="M38.202 57.372s2.547-1.089 3.948-5.315a10.398 10.398 0 0 1 .903 5.211 33.15 33.15 0 0 1-4.851.104zm10.665-8.489c-7.457 1.088-8.742-14.603-8.742-14.603s2.5 8.002 7.827 7.712c5.511-.277 3.948-8.766 3.948-8.766s5.361 14.499-3.033 15.657zm-34.218-3.544a64.527 64.527 0 0 1-7.168 1.69s4.261-3.22 7.435-13.179l3.068 2.769-.579 1.899a14.269 14.269 0 0 1 1.83 3.474 9.15 9.15 0 0 0-.198-8.025l-.393 1.16-1.159-1.09-2.061-1.887a25.87 25.87 0 0 1 3.844-7.238l.278.302 2.316 2.744-.707 1.159a30.013 30.013 0 0 1 2.999 3.809 17.36 17.36 0 0 0-.289-7.249l-1.065.997-2.628-3.046a29.047 29.047 0 0 1 11.649-7.411c-.27.294-.518.608-.742.938-1.471 2.061-2.952 5.789-1.749 11.799.175.949.499 2.317.823 3.683.635 2.744 1.354 5.858 1.609 7.815.509 4.088.092 6.764-1.263 8.187a5.886 5.886 0 0 1-4.632 1.343v-.972a20.997 20.997 0 0 0-.614-5.165l-.566-1.98-.892 1.842c-1.401 2.919-6.172 10.168-12.379 11.58a20.909 20.909 0 0 0 3.233-9.948z"/><path d="M50.429 18.394l-.068-.405 7.179-1.436-.128-.8-7.398.926c0-.139-.093-.29-.151-.429l6.764-2.628-.29-.706-7.075 2.188a3.327 3.327 0 0 0-1.331-1.402c-2.699.209-5.143.429-7.377.719l1.413-6.624h-.684l-2.166 6.832-1.157.197 1.688-7.411h-.798l-2.49 7.712h-.093a7.88 7.88 0 0 0-3.925 2.988c-1.286 1.83-2.594 5.154-1.505 10.642.196.915.498 2.224.822 3.625.647 2.779 1.376 5.94 1.631 7.979.592 4.632 0 7.632-1.679 9.427-1.4 1.459-3.567 2.039-6.601 1.771l-.764-.069.07-.754c.051-.538.074-1.079.069-1.62 0-.919-.063-1.835-.185-2.746a26.863 26.863 0 0 1-8.616 8.987c5.319.24 10.619.813 15.865 1.712l.845.081h.29c.631.017 1.262-.014 1.887-.092h.302c3.682-.636 6.866-3.357 6.01-9.67-1.007-7.492-2.316-12.261-2.652-15.864-.404-4.376 3.394-11.162 10.145-8.105a10.75 10.75 0 0 1 2.165 3.66 10.114 10.114 0 0 0-.207-4.631 7.793 7.793 0 0 0 .311-2.699l7.365-.312v-.811l-7.481-.232zm-7.48 2.686a10.608 10.608 0 0 0-6.38 1.668 8.502 8.502 0 0 0-2.408 2.767 4.633 4.633 0 0 1 1.887-4.493 9.672 9.672 0 0 1 7.364-.383c.648.383.185.487-.463.441z"/></g></svg>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/deprecated/_deprecated.scss
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ button.hrs-button-white {
background-color: rgba(255, 255, 255, .9);
color: $brand-crimson;
font-weight: 600;
padding: .25rem 1rem;
padding: 1em 1rem .25rem;
}

.builder-banner-inner-content {
Expand Down
5 changes: 0 additions & 5 deletions src/assets/scss/globals/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
$brand-crimson: #981e32;
$brand-gray: #5e6a71;

$orange: #b67233;
$green: #8f7e35;
$blue: #4f868e;
$yellow: #c69214;

$accent-crimson: #c60c30;
$accent-green: #ada400;
$accent-orange: #f6861f;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Author: Adam Turner, WSU University Communications
Author URI: https://web.wsu.edu/
Description: A child theme of the WSU Web Communications Spine template.
Template: wsuspine
Version: 0.17.5
Version: 0.17.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Expand Down
67 changes: 30 additions & 37 deletions src/assets/scss/templates/_templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ a.site-title {

a.site-title {
font-size: $font-size-7;
margin: 1.5rem 2rem;
margin: 2.027rem 2rem;
}

}
Expand Down Expand Up @@ -150,6 +150,7 @@ footer {
}

a {
border: none;
color: #fff;
display: block;
font-weight: 400;
Expand Down Expand Up @@ -177,12 +178,18 @@ footer {
* 5.3 Article
*/

.single-post,
.page {
body.single:not(.home) {

.article-header {
margin-bottom: 3rem;
}

.article-container figure.article-image {
margin-bottom: 1.5rem;
margin-left: -2rem;
max-width: none;
width: 100vw;
}
}

.article-taxonomy--primary ul {
Expand All @@ -205,6 +212,26 @@ footer {
}
}

@media (min-width: $medium) {

body.single:not(.home) {

.article-container figure.article-image {
float: right;
margin-right: calc(-43% - 2rem);
margin-left: 0;
padding: 0 2rem;
max-width: $small;
width: 50vw;
}

.article-content {
width: 70%;
}
}

}

/**
* 5.3.1 Article: Post (Single)
*
Expand All @@ -221,13 +248,6 @@ footer {

.single-post {

.article-container figure.article-image {
margin-bottom: 1.5rem;
margin-left: -2rem;
max-width: none;
width: 100vw;
}

.article-body {
padding-bottom: 1.5em;
}
Expand Down Expand Up @@ -271,22 +291,6 @@ footer {

.single-post {

.article-container {

.article-content {
width: 70%;
}

figure.article-image {
float: right;
margin-right: calc(-43% - 2rem);
margin-left: 0;
padding: 0 2rem;
max-width: $small;
width: 50vw;
}
}

.article-footer {
display: flex;
justify-content: space-between;
Expand All @@ -310,17 +314,6 @@ footer {
padding: 1.5rem 2rem;
}

@media (min-width: $large) {

.page {

article.page {
max-width: 80ch;
}
}

}

/**
* 5.4 Archive
*/
Expand Down
55 changes: 26 additions & 29 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Author: Adam Turner, WSU University Communications
Author URI: https://web.wsu.edu/
Description: A child theme of the WSU Web Communications Spine template.
Template: wsuspine
Version: 0.17.5
Version: 0.17.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Expand Down Expand Up @@ -606,7 +606,7 @@ button.hrs-button-white {
background-color: rgba(255, 255, 255, 0.9);
color: #981e32;
font-weight: 600;
padding: .25rem 1rem;
padding: 1em 1rem .25rem;
}

.builder-section-banner .builder-banner-inner-content {
Expand Down Expand Up @@ -1849,7 +1849,7 @@ a.site-title {
}
a.site-title {
font-size: 2.027em;
margin: 1.5rem 2rem;
margin: 2.027rem 2rem;
}
}

Expand Down Expand Up @@ -1933,6 +1933,7 @@ footer dd a:focus {
}

.site-reference a {
border: none;
color: #fff;
display: block;
font-weight: 400;
Expand All @@ -1956,11 +1957,17 @@ footer dd a:focus {
/**
* 5.3 Article
*/
.single-post .article-header,
.page .article-header {
body.single:not(.home) .article-header {
margin-bottom: 3rem;
}

body.single:not(.home) .article-container figure.article-image {
margin-bottom: 1.5rem;
margin-left: -2rem;
max-width: none;
width: 100vw;
}

.article-taxonomy--primary ul {
font-size: 0.79em;
list-style-type: none;
Expand All @@ -1980,6 +1987,20 @@ footer dd a:focus {
color: #c60c30;
}

@media (min-width: 43em) {
body.single:not(.home) .article-container figure.article-image {
float: right;
margin-right: calc(-43% - 2rem);
margin-left: 0;
padding: 0 2rem;
max-width: 34em;
width: 50vw;
}
body.single:not(.home) .article-content {
width: 70%;
}
}

/**
* 5.3.1 Article: Post (Single)
*
Expand All @@ -1993,13 +2014,6 @@ footer dd a:focus {
background-image: url(../images/icons/time.svg);
}

.single-post .article-container figure.article-image {
margin-bottom: 1.5rem;
margin-left: -2rem;
max-width: none;
width: 100vw;
}

.single-post .article-body {
padding-bottom: 1.5em;
}
Expand Down Expand Up @@ -2038,17 +2052,6 @@ footer dd a:focus {
}

@media (min-width: 43em) {
.single-post .article-container .article-content {
width: 70%;
}
.single-post .article-container figure.article-image {
float: right;
margin-right: calc(-43% - 2rem);
margin-left: 0;
padding: 0 2rem;
max-width: 34em;
width: 50vw;
}
.single-post .article-footer {
display: -ms-flexbox;
display: flex;
Expand All @@ -2070,12 +2073,6 @@ footer dd a:focus {
padding: 1.5rem 2rem;
}

@media (min-width: 61.875em) {
.page article.page {
max-width: 80ch;
}
}

/**
* 5.4 Archive
*/
Expand Down

0 comments on commit 067997c

Please sign in to comment.