Move layout-related code to separate component files

This commit is contained in:
Kelly Dwan 2019-10-07 17:11:35 -04:00
parent 3ebc219416
commit b08effbe8b
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
5 changed files with 55 additions and 41 deletions

View file

@ -10,7 +10,6 @@ if ( ! have_posts() ) {
get_header(); ?> get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main"> <main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
@ -46,7 +45,6 @@ get_header(); ?>
?> ?>
</main><!-- #main --> </main><!-- #main -->
</div><!-- #primary -->
<?php <?php
get_footer(); get_footer();

View file

@ -22,4 +22,6 @@
@import "about"; @import "about";
@import "entry-content"; @import "entry-content";
@import "page"; @import "page";
@import "site-content";
@import "site-title";
@import "wporg-header"; @import "wporg-header";

View file

@ -1,19 +1,4 @@
body.page:not(.home) { body.page:not(.home) {
.site-title a {
color: #fff;
text-decoration: none;
&:hover,
&:active {
color: #fff;
}
}
.site-main {
margin: 0 auto;
padding: 0 ms( 2 );
max-width: calc( #{ $size__content-width } + #{ ms( 2 ) * 2 } );
}
.entry-header { .entry-header {
background: none; background: none;

View file

@ -0,0 +1,14 @@
.site-content {
body:not(.home) & {
margin: auto;
max-width: none;
padding: 0;
.site-main {
margin: 0 auto;
padding: 0 ms( 2 );
max-width: calc( #{ $size__content-width } + #{ ms( 2 ) * 2 } );
}
}
}

View file

@ -0,0 +1,15 @@
.site-title {
body:not(.home) & {
a {
color: #fff;
text-decoration: none;
&:hover,
&:active {
color: #fff;
}
}
}
}