Skip to content

Commit

Permalink
News site update (#169)
Browse files Browse the repository at this point in the history
- replaced vf-summary with vf-card
- fixed height of featured posts container
- added classes to change text color
- added related links custom field
- removed vf-inlay for news items list
* white link color added manually (to update as available)
  • Loading branch information
kasprzyk-sz authored Feb 28, 2020
1 parent d3e7070 commit dc29c03
Show file tree
Hide file tree
Showing 18 changed files with 319 additions and 519 deletions.
17 changes: 9 additions & 8 deletions wp-content/themes/vf-wp-news/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,22 @@

?>

<section class="vf-inlay">
<div class="vf-inlay__content" style="background-color: #fff;">
<main class="vf-inlay__content--full-width category-container">
<div>
<h3 class="vf-section-header__heading vf-u-margin__bottom--md"><?php wp_title(''); ?></h3>

<div class="vf-grid">
<h3 class="vf-text vf-text-heading--1 | vf-u-margin__bottom--xl" style="font-weight: 400;"><?php wp_title(''); ?></h3>
</div>
<div class="vf-grid vf-grid__col-3 category-latest">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
if ( $post->ID == $do_not_duplicate ) continue; ?>
<?php include(locate_template('partials/vf-summary--article.php', false, false)); ?>
<?php endwhile; endif; ?>
</div>
<?php vf_pagination();?>
</main>
</div>
<div class="vf-grid" style="margin: 4%"> <?php vf_pagination();
?>
</div>

<section class="vf-inlay">


<?php include(locate_template('partials/archive-container.php', false, false)); ?>

Expand Down
51 changes: 22 additions & 29 deletions wp-content/themes/vf-wp-news/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,24 @@
}
?>

<section class="vf-inlay">
<div class="vf-inlay__content | vf-u-background-color--green--dark | vf-u-padding__top--0 | author-container">
<main class="vf-inlay__content--full-width">
<div class="vf-grid | pow-article">
<div class="vf-content | pow-article-summary">
<h3 class="vf-links__heading | vf-u-margin__top--sm | author-heading">About the author</h3>
<div class="vf-grid | vf-u-background-color--green--dark | vf-u-padding__bottom--md | vf-u-margin__bottom--xxl">
<div class="vf-u-margin__right--xl vf-u-margin__left--xl">
<h3 class="vf-text vf-text-heading--2 | vf-u-margin__top--sm" style="font-weight: 200; color: #d0d0ce;"><em>About the author</em></h3>
<div class="vf-grid | vf-u-padding--0 | author-summary" style="max-width: fit-content;">
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'ID' ), 90 ); ?>
</div>
<div class="vf-content | author-description">
<h4 class="author-name"><?php the_author(); ?></h4>
<p class="vf-summary__text"><?php echo nl2br(get_the_author_meta('description')); ?> </p>
<i class="fas fa-envelope" style="font-size: 16px;"></i><p class="vf-summary__text" style="display: inline-block;"><?php echo nl2br(get_the_author_meta('email')); ?></p>
<h2 class="vf-u-text-color--ui--white | vf-u-margin__top--0" style="font-weight: 400;"><?php the_author(); ?></h2>
<p class="vf-u-text-color--grey--lightest"><?php echo nl2br(get_the_author_meta('description')); ?> </p>
<i class="fas fa-envelope" style="font-size: 14px;"></i><p class="vf-text--body vf-text-body--5 | vf-u-text-color--ui--white" style="display: inline-block;"><?php echo nl2br(get_the_author_meta('email')); ?></p>
</div>
</div>
</div>
</div>
</main>
</div>

<div class="vf-inlay__content | vf-u-background-color-ui--white">
<main class="vf-inlay__content--full-width">
<div>

<div class="vf-grid">
<h3 class="vf-section-header__heading vf-u-margin__bottom--md">Articles by <?php the_author(); ?></h3>
</div>
<div class="vf-grid | vf-grid__col-3 | category-latest">
Expand All @@ -66,30 +60,29 @@
<?php include(locate_template('partials/vf-summary--article.php', false, false)); ?>
<?php endwhile; endif; ?>
</div>
<?php vf_pagination();
<div class="vf-grid" style="margin: 4%"> <?php vf_pagination();
?>
</main>
</div>
</div>


<div class="vf-inlay__content vf-u-background-color-ui--off-white">


<section class="vf-inlay">
<div class="vf-inlay__content | vf-u-background-color-ui--off-white | vf-u-margin__bottom--xs">
<main class="vf-inlay__content--full-width">
<div class="embl-grid | category-latest | category-top-stories">
<div style="min-width: 141px;">
<h3 class="vf-section-header__heading">Popular</h3>
</div>
<div class="vf-grid vf-grid__col-3">
<?php $popular = new WP_Query(array('posts_per_page'=>3, 'meta_key'=>'popular_posts', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'author__in' => $user_id));
<h3 class="vf-section-header__heading | vf-u-margin__bottom--md">Popular</h3>
<div class="vf-grid vf-grid__col-3">
<?php $popular = new WP_Query(array('posts_per_page'=>3, 'meta_key'=>'popular_posts', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'author__in' => $user_id));
while ($popular->have_posts()) : $popular->the_post();
include(locate_template('partials/vf-summary--article-no-excerpt.php', false, false));?>
include(locate_template('partials/vf-card--article-no-excerpt-no-border.php', false, false));?>
<?php endwhile; wp_reset_postdata(); ?>
</div>
</div>
</main>
</div>

<?php include(locate_template('partials/embletc-container.php', false, false)); ?>

<?php include(locate_template('partials/newsletter-container.php', false, false)); ?>

</section>
<?php get_template_part('partials/footer'); ?>
33 changes: 15 additions & 18 deletions wp-content/themes/vf-wp-news/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,39 @@
}
?>

<section class="vf-inlay">
<div class="vf-inlay__content | vf-u-background-color-ui--white">
<main class="vf-inlay__content--full-width | category-container">
<div>
<h2 class="vf-text vf-text-heading--1 | vf-u-margin__bottom--xl"><?php wp_title(''); ?></h2>
<div class="vf-grid">
<h2 class="vf-text vf-text-heading--1 | vf-u-margin__bottom--xl" style="font-weight: 400;"><?php wp_title(''); ?></h2>
</div>
<div class="vf-section-header vf-u-margin__bottom--md"><a class="vf-section-header__heading vf-section-header__heading--is-link" href="<?php site_url(); ?>/archive"> Latest <svg class="vf-section-header__icon | vf-icon vf-icon-arrow--inline-end" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 12c0 6.627 5.373 12 12 12s12-5.373 12-12S18.627 0 12 0C5.376.008.008 5.376 0 12zm13.707-5.209l4.5 4.5a1 1 0 010 1.414l-4.5 4.5a1 1 0 01-1.414-1.414l2.366-2.367a.25.25 0 00-.177-.424H6a1 1 0 010-2h8.482a.25.25 0 00.177-.427l-2.366-2.368a1 1 0 011.414-1.414z" fill="" fill-rule="nonzero"></path></svg></a></div>
<div class="vf-grid vf-grid__col-3 | category-latest">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
if ( $post->ID == $do_not_duplicate ) continue; ?>
<?php include(locate_template('partials/vf-summary--article.php', false, false)); ?>
<?php endwhile; endif; ?>
</div>
<div class="vf-grid" style="margin: 4%">

<?php vf_pagination(); ?>
</main>
</div>
</div>

<div class="vf-inlay__content vf-u-background-color-ui--off-white">

<section class="vf-inlay">
<div class="vf-inlay__content | vf-u-background-color-ui--off-white | vf-u-margin__bottom--xs">
<main class="vf-inlay__content--full-width">
<div class="embl-grid | category-latest | category-top-stories">
<div style="min-width: 150px;">
<h3 class="vf-section-header__heading ">Popular</h3>
</div>
<div class="vf-grid vf-grid__col-3">
<?php $popular = new WP_Query(array('posts_per_page'=>3, 'meta_key'=>'popular_posts', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'cat' => get_query_var('cat')));
<h3 class="vf-section-header__heading | vf-u-margin__bottom--md">Popular</h3>
<div class="vf-grid vf-grid__col-3">
<?php $popular = new WP_Query(array('posts_per_page'=>3, 'meta_key'=>'popular_posts', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'cat' => get_query_var('cat')));
while ($popular->have_posts()) : $popular->the_post();
include(locate_template('partials/vf-summary--article-no-excerpt.php', false, false)); ?>
include(locate_template('partials/vf-card--article-no-excerpt-no-border.php', false, false)); ?>
<?php endwhile; wp_reset_postdata(); ?>
</div>
</div>
</main>
</div>

<?php include(locate_template('partials/embletc-container.php', false, false)); ?>

<?php include(locate_template('partials/newsletter-container.php', false, false)); ?>

</section>


</section>
<?php get_template_part('partials/footer');?>
5 changes: 1 addition & 4 deletions wp-content/themes/vf-wp-news/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ function add_slug_class_wp_list_categories($list) {
return $list;
}

?>


<?php

// POPULAR POSTS

function shapeSpace_popular_posts($post_id) {
Expand Down Expand Up @@ -104,7 +101,7 @@ function add_class_to_category( $thelist, $separator, $parents){
function mag1_widgets_init() {

register_sidebar( array(
'name' => 'Magazine right',
'name' => 'Magazine cover right',
'id' => 'magazine_cover_1',
'before_widget' => '<div>',
'after_widget' => '</div>',
Expand Down
Loading

0 comments on commit dc29c03

Please sign in to comment.