Changeset 25971
- Timestamp:
- 10/28/2013 05:57:57 PM (11 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php
r25804 r25971 13 13 <?php 14 14 if ( has_post_thumbnail() ) : 15 the_post_thumbnail( ' featured-thumbnail-featured' );15 the_post_thumbnail( 'post-thumbnail-grid' ); 16 16 17 17 else : … … 27 27 if ( $images ) : 28 28 $image = array_shift( $images ); 29 echo wp_get_attachment_image( $image->ID, ' featured-thumbnail-featured' );29 echo wp_get_attachment_image( $image->ID, 'post-thumbnail-grid' ); 30 30 endif; 31 31 endif; -
trunk/src/wp-content/themes/twentyfourteen/functions.php
r25864 r25971 69 69 70 70 // Add several sizes for Post Thumbnails. 71 add_image_size( 'featured-thumbnail-large', 672, 0 ); 72 add_image_size( 'featured-thumbnail-featured', 672, 372, true ); 73 add_image_size( 'featured-thumbnail-formatted', 306, 0 ); 71 add_image_size( 'post-thumbnail-grid', 672, 372, true ); 72 add_image_size( 'post-thumbnail', 672, 0 ); 74 73 75 74 // This theme uses wp_nav_menu() in two locations. … … 362 361 * Adds body classes to denote: 363 362 * 1. Single or multiple authors. 364 * 2. Index views. 365 * 3. Full-width content layout. 366 * 4. Presence of footer widgets. 363 * 2. Presense of header image. 364 * 3. Index views. 365 * 4. Full-width content layout. 366 * 5. Presence of footer widgets. 367 * 6. Single views. 367 368 * 368 369 * @since Twenty Fourteen 1.0 … … 392 393 $classes[] = 'footer-widgets'; 393 394 395 if ( is_singular() ) 396 $classes[] = 'singular'; 397 394 398 return $classes; 395 399 } … … 400 404 * 401 405 * Adds a post class to denote: 402 * Non-password protected page with a featured image.406 * Non-password protected page with a post thumbnail. 403 407 * 404 408 * @since Twenty Fourteen 1.0 … … 409 413 function twentyfourteen_post_classes( $classes ) { 410 414 if ( ! post_password_required() && has_post_thumbnail() ) 411 $classes[] = 'has-featured-image'; 415 $classes[] = 'has-post-thumbnail'; 416 else 417 $classes[] = 'no-post-thumbnail'; 412 418 413 419 return $classes; -
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r25856 r25971 160 160 161 161 /** 162 * Displays an optional featured image, with an anchor element162 * Displays an optional post thumbnail, with an anchor element 163 163 * when on index views, and a div element when on a single view. 164 164 * … … 172 172 ?> 173 173 174 <div class=" featured-thumbnail">175 <?php the_post_thumbnail( ' featured-thumbnail-large' ); ?>174 <div class="post-thumbnail"> 175 <?php the_post_thumbnail( 'post-thumbnail' ); ?> 176 176 </div> 177 177 178 178 <?php else : ?> 179 179 180 <a class=" featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">180 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 181 181 <?php if ( has_post_thumbnail() ) : 182 the_post_thumbnail( ' featured-thumbnail-large' );182 the_post_thumbnail( 'post-thumbnail' ); 183 183 else : ?> 184 184 <p class="screen-reader-text"><?php _e( 'No featured image.', 'twentyfourteen' ); ?></p> -
trunk/src/wp-content/themes/twentyfourteen/rtl.css
r25864 r25971 362 362 /* Mobile list style */ 363 363 @media screen and (max-width: 400px) { 364 .list-view . featured-thumbnail img {364 .list-view .post-thumbnail img { 365 365 float: right; 366 366 margin: 0 0 3px 10px; -
trunk/src/wp-content/themes/twentyfourteen/style.css
r25969 r25971 36 36 * 6.10 - 404 Page 37 37 * 6.11 - Front Page 38 * 6.12 - Comments 38 * 6.12 - Full-width 39 * 6.13 - Comments 39 40 * 7.0 - Sidebar 40 41 * 7.1 - Widgets … … 562 563 563 564 .attachment-featured-featured img, 564 . featured-thumbnail img {565 .post-thumbnail img { 565 566 height: auto; 566 567 max-width: 100%; … … 985 986 } 986 987 987 .full-width .hentry {988 max-width: 100%;989 }990 991 988 .site-content .entry-header, 992 989 .site-content .entry-content, … … 1004 1001 */ 1005 1002 1006 . featured-thumbnail {1003 .post-thumbnail { 1007 1004 background: url(images/pattern-light.svg) #767676 repeat fixed; 1008 1005 display: none; … … 1016 1013 } 1017 1014 1018 a. featured-thumbnail:hover {1015 a.post-thumbnail:hover { 1019 1016 background: url(images/pattern-light.svg) #919191 repeat fixed; 1020 1017 } 1021 1018 1022 . featured-thumbnail img {1019 .post-thumbnail img { 1023 1020 display: block; 1024 1021 margin: 0 auto; 1025 1022 } 1026 1023 1027 .has- featured-image .featured-thumbnail,1028 .format-standard . featured-thumbnail {1024 .has-post-thumbnail .post-thumbnail, 1025 .format-standard .post-thumbnail { 1029 1026 display: block; 1030 1027 } … … 1046 1043 } 1047 1044 1048 .site-content .has- featured-image.entry-header,1045 .site-content .has-post-thumbnail .entry-header, 1049 1046 .site-content .format-standard .entry-header { 1050 1047 padding-top: 24px; … … 1733 1730 1734 1731 /** 1735 * 6.11 Comments 1732 * 6.12 Full-width 1733 * ----------------------------------------------------------------------------- 1734 */ 1735 1736 .full-width.singular .content-area { 1737 padding-top: 0; 1738 } 1739 1740 .full-width .hentry { 1741 max-width: 100%; 1742 } 1743 1744 .full-width.singular .hentry.no-post-thumbnail, 1745 .full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required { 1746 padding-top: 24px; 1747 } 1748 1749 .full-width.singular .hentry.no-post-thumbnail.format-standard { 1750 padding-top: 0; 1751 } 1752 1753 1754 /** 1755 * 6.13 Comments 1736 1756 * ----------------------------------------------------------------------------- 1737 1757 */ … … 2520 2540 2521 2541 @media screen and (max-width: 400px) { 2522 .list-view . featured-thumbnail {2542 .list-view .post-thumbnail { 2523 2543 background: none; 2524 2544 min-height: 0; … … 2527 2547 } 2528 2548 2529 .list-view . featured-thumbnail img {2549 .list-view .post-thumbnail img { 2530 2550 float: left; 2531 2551 margin: 0 10px 3px 0; … … 2590 2610 2591 2611 @media screen and (min-width: 401px) { 2592 a. featured-thumbnail:hover img {2612 a.post-thumbnail:hover img { 2593 2613 opacity: 0.85; 2594 2614 } … … 2692 2712 } 2693 2713 2694 .list-view .site-content .has- featured-image .featured-thumbnail,2695 .list-view .site-content .format-standard . featured-thumbnail {2714 .list-view .site-content .has-post-thumbnail .post-thumbnail, 2715 .list-view .site-content .format-standard .post-thumbnail { 2696 2716 margin-top: -49px; 2697 2717 } … … 2715 2735 } 2716 2736 2717 .site-content .has- featured-image.entry-header,2737 .site-content .has-post-thumbnail .entry-header, 2718 2738 .site-content .format-standard .entry-header { 2719 2739 margin-top: -48px; … … 2732 2752 } 2733 2753 2754 .full-width.singular .content-area { 2755 padding-top: 0; 2756 } 2757 2734 2758 .site-content { 2735 2759 margin-right: 33.33333333%; … … 2740 2764 } 2741 2765 2742 .site-content .has- featured-image.entry-header,2766 .site-content .has-post-thumbnail .entry-header, 2743 2767 .site-content .format-standard .entry-header { 2744 2768 margin-top: 0; 2745 2769 } 2746 2770 2747 .full-width .site-content .has- featured-image.entry-header,2771 .full-width .site-content .has-post-thumbnail .entry-header, 2748 2772 .full-width .site-content .format-standard .entry-header { 2749 2773 margin-top: -48px; 2774 } 2775 2776 .full-width.singular .hentry.no-post-thumbnail, 2777 .full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required { 2778 padding-top: 36px; 2779 } 2780 2781 .full-width.singular .hentry.no-post-thumbnail.format-standard { 2782 padding-top: 0; 2750 2783 } 2751 2784 … … 2972 3005 } 2973 3006 2974 .site-content .has-featured-image .entry-header, 3007 .full-width.singular .content-area { 3008 padding-top: 0; 3009 } 3010 3011 .full-width.singular .hentry.no-post-thumbnail, 3012 .full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required { 3013 padding-top: 72px; 3014 } 3015 3016 .full-width.singular .hentry.no-post-thumbnail.format-standard { 3017 padding-top: 0; 3018 } 3019 3020 .site-content .has-post-thumbnail .entry-header, 2975 3021 .site-content .format-standard .entry-header { 2976 3022 margin-top: -48px; … … 3031 3077 } 3032 3078 3033 .site-content .has- featured-image.entry-header,3079 .site-content .has-post-thumbnail .entry-header, 3034 3080 .site-content .format-standard .entry-header { 3035 3081 margin-top: 0; … … 3192 3238 3193 3239 @media screen and (min-width: 1040px) { 3194 .site-content .has- featured-image.entry-header,3240 .site-content .has-post-thumbnail .entry-header, 3195 3241 .site-content .format-standard .entry-header { 3196 3242 margin-top: -48px;
Note: See TracChangeset
for help on using the changeset viewer.