Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lot's of small changes in slider page template and in thumbnails sizes.

  • Loading branch information...
commit c09c40630a42df2ba9bda1c105758530b2a53e86 1 parent 1788131
Sami Keijonen authored
View
2  content.php
@@ -33,7 +33,7 @@
<?php } else { ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) ); ?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) ); ?>
<header class="entry-header">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
View
2  functions.php
@@ -209,7 +209,7 @@ function path_disable_sidebars( $sidebars_widgets ) {
*/
function path_add_image_sizes() {
- add_image_size( 'path-thumbnail', 194, 120, true );
+ add_image_size( 'path-thumbnail', 300, 170, true );
add_image_size( 'path-smaller-thumbnail', 80, 80, true );
add_image_size( 'path-slider-thumbnail', 660, 300, true );
View
2  header.php
@@ -79,7 +79,7 @@
<div id="main">
- <?php if ( ( is_home() || is_page_template( 'page-templates/path-slider.php' ) ) && !is_paged() ) get_template_part( 'content-slider' ); // Loads the content-slider.php template. ?>
+ <?php if ( ( is_home() || is_page_template( 'page-templates/path-slider.php' ) ) && !is_paged() ) get_template_part( 'sticky-slider' ); // Loads the sticky-slider.php template. ?>
<?php get_sidebar( 'before-content' ); // Loads the sidebar-before-content.php template. ?>
View
2  page-templates/most-popular-by-comments.php
@@ -46,7 +46,7 @@
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) );?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) );?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
View
2  page-templates/most-popular-by-month.php
@@ -49,7 +49,7 @@
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) );?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) );?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
View
2  page-templates/most-popular-by-year.php
@@ -48,7 +48,7 @@
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) );?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) );?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
View
2  page-templates/most-popular-last-30-days.php
@@ -50,7 +50,7 @@
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) );?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) );?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
View
2  page-templates/most-popular.php
@@ -47,7 +47,7 @@
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) ); ?>
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) ); ?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
View
59 page-templates/path-slider.php
@@ -23,7 +23,7 @@
<?php
- /* Loop posts but not sticky ones. Sticky posts are displayd in the slider. That is called in header.php (content-slider.php). */
+ /* Loop posts but not sticky ones. Sticky posts are displayd in the slider. That is called in header.php (sticky-slider.php). */
$sticky = get_option('sticky_posts');
$args = array (
@@ -31,15 +31,45 @@
'posts_per_page' => 10
);
- $wp_query = new WP_Query( $args );
+ $loop = new WP_Query( $args );
+ $counter = 1;
?>
- <?php if ( $wp_query->have_posts() ) : ?>
+ <?php if ( $loop->have_posts() ) : ?>
- <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
+ <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <?php get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?>
+ <?php do_atomic( 'before_entry' ); // path_before_entry ?>
+
+ <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); if ( ( $counter % 2 ) == 0 ) echo ' last'; ?>">
+
+ <?php do_atomic( 'open_entry' ); // path_open_entry ?>
+
+ <header class="entry-header">
+ <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) ); ?>
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
+ <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'picturesque' ) . '</div>' ); ?>
+ </header><!-- .entry-header -->
+
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'path' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-summary -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'path' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php do_atomic( 'close_entry' ); // path_close_entry ?>
+
+ </article><!-- .hentry -->
+
+ <?php if ( ( $counter % 2 ) == 0 ) echo '<div class="clear path-line"> </div>'; ?>
+
+ <?php do_atomic( 'after_entry' ); // path_after_entry ?>
+
+ <?php $counter++; ?>
<?php endwhile; ?>
@@ -51,9 +81,9 @@
<?php wp_reset_postdata(); // Reset Query ?>
- <h3 class="section-title"><?php _e( 'More Articles', 'path' ); ?></h3>
-
- <div class="hfeed-more-articles">
+ <div class="hfeed-more-articles">
+
+ <h3 class="section-title"><?php _e( 'More Articles', 'path' ); ?></h3>
<?php
@@ -64,6 +94,7 @@
);
$loop = new WP_Query( $args );
+ $counter = 1;
?>
@@ -71,16 +102,20 @@
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+ <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); if ( ( $counter % 2 ) == 0 ) echo ' last'; ?>">
<?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-smaller-thumbnail' ) ); ?>
<header class="entry-header">
- <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'path' ) . '</div>' ); ?>
</header><!-- .entry-header -->
</article><!-- .hentry -->
+
+ <?php if ( ( $counter % 2 ) == 0 ) echo '<div class="clear path-line"> </div>'; ?>
+
+ <?php $counter++; ?>
<?php endwhile; ?>
@@ -90,9 +125,9 @@
<?php endif; ?>
- <?php wp_reset_postdata(); // Reset Query ?>
+ <?php wp_reset_postdata(); // Reset Query ?>
- </div><!-- .hfeed-more -->
+ </div><!-- .hfeed-more -->
</div><!-- .hfeed -->
View
0  content-slider.php → sticky-slider.php
File renamed without changes
View
35 style.css
@@ -267,8 +267,6 @@ hr {
.path-thumbnail {
float: left;
margin: 0 1.5em .5em 0;
- max-width: 194px;
- max-height: 120px;
}
.path-smaller-thumbnail {
float: left;
@@ -1637,6 +1635,39 @@ img {
overflow: hidden;
}
+/* Slider Page Template. */
+.page-template-path-slider .hentry {
+ float: left;
+ border-bottom: none;
+ margin: 0 4% 0 0;
+ width: 48%;
+}
+.page-template-path-slider .last {
+ margin: 0;
+}
+.page-template-path-slider .path-line {
+ border-bottom: 1px solid #e9edf1;
+ margin-bottom: 1.5em;
+}
+.page-template-path-slider #slider-content .hentry {
+ float: none;
+ margin: 0;
+ width: 100%;
+}
+.page-template-path-slider .path-thumbnail {
+ float: none;
+}
+.page-template-path-slider .entry-header {
+ text-align: center;
+}
+.page-template-path-slider .hfeed-more-articles .entry-header,
+.page-template-path-slider #slider-content .entry-header {
+ text-align: left;
+}
+.page-template-path-slider .hfeed-more-articles h2 {
+ font-size: 1.25em;
+}
+
/* layout-3c-l */
.layout-3c-l #content {
float: left;
Please sign in to comment.
Something went wrong with that request. Please try again.