Skip to content

Commit

Permalink
Added template and styles for people archive and singular view.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Palin committed Jul 29, 2014
1 parent 8fda3c9 commit 444ebc6
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 29 deletions.
69 changes: 40 additions & 29 deletions css/style.scss
Expand Up @@ -882,48 +882,59 @@ a { color: $highlight; }
} // .page.taxonomies

// generalized for custom post type archives
.post-type-archive {
.taxonomies {
.page .our-people {
.people {
list-style-type: none;
margin: 0;
overflow: auto;
}
.taxonomy {
.person {
// border: 1px solid $grayLight;
margin-bottom: 1em;
&:last-child { margin-bottom: 0; }

@media #{$large} {
@include grid_column(4);
padding: 0.5em;

@media #{$medium} {
float: left;
margin-right: 10%;
width: 45%;

.inner {
margin: 0 5% 0 5%;
&:nth-of-type(2n) {
margin-right: 0;
}
}

&:nth-child(2n) {
.inner { margin: 0; }
}
@media #{$large} {
margin-right: 5%;
width: 30%;

&:nth-child(2n+1) {
clear: none;
.inner { margin-left: 5%; }
&:nth-of-type(2n) {
margin-right: 5%;
}

&:first-child .inner { margin-left: 0; }
&:last-child .inner { margin-right: 0; }
&:nth-of-type(3n) {
margin-right: 0;
}
}

.inner {
background-color: $grayLight;
border: 1px solid #bababa;
padding-bottom: 1em;

a {
display: block;
margin: 0 auto;
text-align: center;
width: 200px;
}
img {
display: block;
margin: 0 auto;
}
}
.taxonomy-name {
background-color: $highlight;
color: #fff;
font-size: emCalc(22px);
margin: 0;
padding: 1em 0;
text-align: center;
}

.person {
.avatar {
border: 1px solid $grayLight;
padding: 0.5em;
}
}
.taxonomy-term-list {
// list-style-type: none;
margin: 1em;
Expand Down
61 changes: 61 additions & 0 deletions page-our-people.php
@@ -0,0 +1,61 @@
<?php
/**
* The template for displaying the People page.
*
* @package infectionNet
* @since infectionNet 0.1
*/
get_header();
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php inet_breadcrumb(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('our-people'); ?>>
<header class="entry-header">
<div class="standardsub-left">
<div class="header-icon">
<img src="<?php bloginfo('template_url'); ?>/img/header-icon-about.png" width="78" height="79" alt="" />
</div>
</div>
<div class="standardsub-right" style="background:url(<?php bloginfo('template_url'); ?>/img/header-image-about.jpg) top left no-repeat;">
<h1 class="entry-title"><?php the_title(); ?></h1>
</div>
</header><!-- .entry-header -->

<div class="entry-content">
<div class="entry-content-right">
<p class="intro"><?php echo get_field('introduction'); ?></p>
<?php if (get_field('people')): ?>
<ul class="people">
<?php
while(has_sub_field('people')):
$postObject = get_sub_field('page');
$authorID = get_the_author_meta('ID', $postObject->post_author);
$authorName = get_the_author_meta('user_nicename', $postObject->ID);
?>
<li class="person"><?php
echo get_avatar($authorID, 200, '', $postObject->post_title);
?><a href="<?php echo get_permalink($postObject->ID); ?>"><?php echo $postObject->post_title; ?></a></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
<div class="entry-content-left">
<p class="browse">In this section:</p>
<?php wp_nav_menu( array( 'theme_location' => 'about', 'menu_class' => 'links-list' ) ); ?>
</div>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
endwhile;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php
//get_sidebar();
get_footer();
?>

0 comments on commit 444ebc6

Please sign in to comment.