This repository has been archived by the owner on Oct 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from xwp/add/34
Issue 34 - Integrate static blog and index files into dynamic WordPress template.
- Loading branch information
Showing
18 changed files
with
427 additions
and
77 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.nav-links { | ||
width: 100%; | ||
margin-top: $site-gutter; | ||
margin-bottom: $site-gutter; | ||
display: flex; | ||
justify-content: center; | ||
flex-flow: wrap; | ||
|
||
a, | ||
span { | ||
@extend .button; | ||
display: none; | ||
|
||
@media ( query( min, mobile-large ) ) { | ||
display: block; | ||
} | ||
} | ||
|
||
.prev, | ||
.next { | ||
display: block; | ||
flex-basis: 50%; | ||
text-align: center; | ||
|
||
@media ( query( min, mobile-large ) ) { | ||
flex-basis: auto; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,5 @@ | |
</div> | ||
</nav> | ||
</header> | ||
|
||
<div id="content"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
/** | ||
* The home template file | ||
* | ||
* This template is specific to the blog index page, which could be the site | ||
* root or an alternate page, depending on your Homepage Settings. | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | ||
* | ||
* @package AMPConf | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div class="wrap"> | ||
<?php | ||
// Only show the feature and subfeatures when not paged. | ||
if ( ! is_paged() ) { | ||
if ( have_posts() ) { | ||
$post_count = 0; | ||
|
||
while ( have_posts() ) { | ||
the_post(); | ||
|
||
$post_count++; | ||
|
||
if ( 1 === $post_count ) { | ||
?> | ||
<div class="wrap__item wrap__item--full-width"> | ||
<?php get_template_part( 'templates/entry/featured' ); ?> | ||
</div> | ||
<?php | ||
} elseif ( 3 >= $post_count ) { | ||
?> | ||
<div class="wrap__item wrap__item--half wrap__item--half--primary"> | ||
<?php get_template_part( 'templates/entry/default' ); ?> | ||
</div> | ||
<?php | ||
} else { | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
?> | ||
|
||
<main class="wrap__item wrap__item--blog wrap__item--blog--primary"> | ||
<?php | ||
if ( have_posts() ) : | ||
|
||
if ( ! is_front_page() ) : | ||
?> | ||
<header> | ||
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1> | ||
</header> | ||
|
||
<?php | ||
endif; | ||
|
||
/* Start the Loop */ | ||
while ( have_posts() ) : | ||
the_post(); | ||
|
||
?> | ||
<div class="wrap__subitem wrap__subitem--blog"> | ||
<?php get_template_part( 'templates/entry/slim' ); ?> | ||
</div> | ||
<?php | ||
|
||
endwhile; | ||
|
||
else : | ||
?> | ||
<div class="wrap__subitem wrap__subitem--blog"> | ||
<?php get_template_part( 'templates/entry/none' ); ?> | ||
</div> | ||
<?php | ||
|
||
endif; | ||
|
||
the_posts_pagination(); | ||
?> | ||
</main> | ||
|
||
<?php get_sidebar(); ?> | ||
</div><!-- .wrap --> | ||
|
||
<?php | ||
get_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* Default entry template. | ||
* | ||
* @package AMPConf | ||
*/ | ||
|
||
?> | ||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?>> | ||
<figure class="entry__thumbnail"> | ||
<a href="<?php esc_url( the_permalink() ); ?>"> | ||
<?php the_post_thumbnail( 'ampconf-335x225' ); ?> | ||
</a> | ||
</figure><!-- .entry__thumbnail --> | ||
|
||
<header class="entry__header"> | ||
<?php get_template_part( 'templates/entry/meta/date' ); ?> | ||
<?php the_title( '<h3 class="entry__title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?> | ||
</header><!-- .entry__header --> | ||
|
||
<div class="entry__summary"> | ||
<p><?php the_excerpt(); ?></p> | ||
</div><!-- .entry__summary --> | ||
|
||
<footer class="entry__footer"> | ||
<?php get_template_part( 'templates/entry/meta/byline' ); ?> | ||
<?php get_template_part( 'templates/entry/meta/category' ); ?> | ||
</footer><!-- .entry__footer --> | ||
</article><!-- .entry --> |
Oops, something went wrong.