Skip to content

Commit

Permalink
11_08
Browse files Browse the repository at this point in the history
  • Loading branch information
mor10 committed Dec 15, 2016
1 parent 66d696f commit a11b6c0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function humescores_setup() {
*/
add_theme_support( 'post-thumbnails' );
add_image_size( 'humescores-full-bleed', 2000, 1200, true );
add_image_size( 'humescores-index-img', 800, 450, true );

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
Expand Down
2 changes: 1 addition & 1 deletion sass/maps/style.css.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions sass/site/archive/_archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@
}
}

.index-image {
img {
display: block;
margin: 0 auto;
}

a {
&:focus > img,
&:hover > img {
opacity: .8;
}
}
}

.continue-reading {
position: absolute;
Expand Down
10 changes: 10 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post__content">

<?php
if ( has_post_thumbnail() ) { ?>
<figure class="featured-image index-image">
<a href="<?php echo esc_url( get_permalink() ) ?>" rel="bookmark">
<?php
the_post_thumbnail('humescores-index-img');
?>
</a>
</figure><!-- .featured-image full-bleed -->
<?php } ?>

<div class="post__content">
<header class="entry-header">
<?php humescores_the_category_list(); ?>
<?php
Expand Down

0 comments on commit a11b6c0

Please sign in to comment.