Add a CSS class to remove padding when using mattewhite class for figures
[WebKit-https.git] / Websites / webkit.org / wp-content / themes / webkit / loop.php
1 <?php
2     
3 $background_image = '';
4 if ( $post_thumbnail_id = get_post_thumbnail_id() ) {
5     $post_thumbnail_url = wp_get_attachment_url( $post_thumbnail_id );
6     // $background_image = " style=\"background-image: url('" . $post_thumbnail_url . "')\"";
7     $background_image = " data-url=\"" . $post_thumbnail_url . "\"";
8 }
9
10
11 $classes = array('tile', 'third-tile');
12 $classes[] = 'third-tile';
13 ?>
14     <div <?php echo post_class(join(' ', $classes)); ?>>
15         <a class="tile-link" href="<?php the_permalink(); ?>">Clickable link</a>
16         <div class="background-image">
17             <div class="featured-image"<?php echo $background_image; ?>></div>
18             <?php if ( $featured ): ?><div class="background-vignette"></div><?php endif; ?>
19         </div>
20         <div class="tile-content">
21             <h1><?php the_title(); ?></h1>
22             <div class="summary"><?php the_excerpt(); ?></div>
23             <p><a href="<?php the_permalink(); ?>">Read more &rsaquo;</a></p>
24         </div>        
25     </div>