Skip to content

Commit

Permalink
07_04
Browse files Browse the repository at this point in the history
  • Loading branch information
mor10 committed Dec 15, 2016
1 parent 42a24f0 commit 0543ad3
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 13 deletions.
34 changes: 33 additions & 1 deletion sass/layout/_global.scss
Expand Up @@ -4,4 +4,36 @@
@media screen and (min-width: $query__small) {
padding: 2em;
}
}
}

/*
.site-content {
max-width: $size__max-width;
margin: 0 auto;
}
@media screen and (min-width: $query__medium) {
.has-sidebar {
.hentry {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.entry-header {
width: 100%;
flex: 1 0 100%;
}
.post-content {
width: $size__ratio-large;
}
.widget-area {
width: $size__ratio-small;
}
}
}
}
*/
2 changes: 1 addition & 1 deletion sass/maps/style.css.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions sass/variables-site/_structure.scss
@@ -1,5 +1,7 @@
$size__site-main: 100%;
$size__site-sidebar: 25%;
$size__max-width: 1080px;

$size__ratio-small: 30%;
$size__ratio-large: 60%;

$query__small: 600px;
$query__medium: 900px;
11 changes: 2 additions & 9 deletions single.php
Expand Up @@ -15,14 +15,7 @@
<?php
while ( have_posts() ) : the_post();

get_template_part( 'template-parts/content', get_post_format() );

humescores_post_navigation();

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
get_template_part( 'template-parts/content', 'single' );

endwhile; // End of the loop.
?>
Expand All @@ -31,5 +24,5 @@
</div><!-- #primary -->

<?php
get_sidebar();

get_footer();
31 changes: 31 additions & 0 deletions style.css

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

63 changes: 63 additions & 0 deletions template-parts/content-single.php
@@ -0,0 +1,63 @@
<?php
/**
* Template part for displaying posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Humescores
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php humescores_the_category_list(); ?>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;

if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php humescores_posted_on(); ?>
</div><!-- .entry-meta -->
<?php
endif; ?>
</header><!-- .entry-header -->

<section class="post-content">
<div class="entry-content">
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'humescores' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'humescores' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->

<footer class="entry-footer">
<?php humescores_entry_footer(); ?>
</footer><!-- .entry-footer -->

<?php
humescores_post_navigation();

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</section><!-- .post-content -->

<?php
get_sidebar();
?>
</article><!-- #post-## -->

0 comments on commit 0543ad3

Please sign in to comment.