Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1159 from olefredrik/bugfix/layout
Browse files Browse the repository at this point in the history
Separate grid element from container
  • Loading branch information
colin-marshall authored Nov 20, 2017
2 parents 2eb74e7 + a894c57 commit 4a726b8
Show file tree
Hide file tree
Showing 13 changed files with 1,032 additions and 1,021 deletions.
59 changes: 30 additions & 29 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,35 @@

get_header(); ?>

<div class="main-wrap">
<main class="main-content">
<article>
<header>
<h1 class="entry-title"><?php _e( 'File Not Found', 'foundationpress' ); ?></h1>
</header>
<div class="entry-content">
<div class="error">
<p class="bottom"><?php _e( 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'foundationpress' ); ?></p>
</div>
<p><?php _e( 'Please try the following:', 'foundationpress' ); ?></p>
<ul>
<li><?php _e( 'Check your spelling', 'foundationpress' ); ?></li>
<li>
<?php
/* translators: %s: home page url */
printf( __(
'Return to the <a href="%s">home page</a>', 'foundationpress' ),
home_url()
);
?>
</li>
<li><?php _e( 'Click the <a href="javascript:history.back()">Back</a> button', 'foundationpress' ); ?></li>
</ul>
</div>
</article>
</main>
<?php get_sidebar(); ?>
<div class="main-container">
<div class="main-grid">
<main class="main-content">
<article>
<header>
<h1 class="entry-title"><?php _e( 'File Not Found', 'foundationpress' ); ?></h1>
</header>
<div class="entry-content">
<div class="error">
<p class="bottom"><?php _e( 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'foundationpress' ); ?></p>
</div>
<p><?php _e( 'Please try the following:', 'foundationpress' ); ?></p>
<ul>
<li><?php _e( 'Check your spelling', 'foundationpress' ); ?></li>
<li>
<?php
/* translators: %s: home page url */
printf( __(
'Return to the <a href="%s">home page</a>', 'foundationpress' ),
home_url()
);
?>
</li>
<li><?php _e( 'Click the <a href="javascript:history.back()">Back</a> button', 'foundationpress' ); ?></li>
</ul>
</div>
</article>
</main>
<?php get_sidebar(); ?>
</div>
</div>

<?php get_footer();
60 changes: 31 additions & 29 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,37 @@

get_header(); ?>

<div class="main-wrap">
<main class="main-content">
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; // End have_posts() check. ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php
if ( function_exists( 'foundationpress_pagination' ) ) :
foundationpress_pagination();
elseif ( is_paged() ) :
?>
<nav id="post-nav">
<div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div>
</nav>
<?php endif; ?>

</main>
<?php get_sidebar(); ?>

<div class="main-container">
<div class="main-grid">
<main class="main-content">
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; // End have_posts() check. ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php
if ( function_exists( 'foundationpress_pagination' ) ) :
foundationpress_pagination();
elseif ( is_paged() ) :
?>
<nav id="post-nav">
<div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div>
</nav>
<?php endif; ?>

</main>
<?php get_sidebar(); ?>

</div>
</div>

<?php get_footer();
11 changes: 5 additions & 6 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
*/
?>

</div><!-- Close container -->
<div class="footer-container">
<footer class="footer">
<?php dynamic_sidebar( 'footer-widgets' ); ?>
</footer>
</div>
<div class="footer-container">
<footer class="footer">
<?php dynamic_sidebar( 'footer-widgets' ); ?>
</footer>
</div>

<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) : ?>
</div><!-- Close off-canvas content -->
Expand Down
4 changes: 1 addition & 3 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,5 @@
<?php endif; ?>
</div>
</nav>

</header>

<div class="container">
</header>
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

get_header(); ?>

<div class="main-wrap">
<div class="main-grid">
<main class="main-content">
<?php if ( have_posts() ) : ?>

Expand Down
Loading

0 comments on commit 4a726b8

Please sign in to comment.