Changeset 25735
- Timestamp:
- 10/08/2013 09:21:19 PM (11 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/content-aside.php
r25088 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <header class="entry-header"> 12 14 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> -
trunk/src/wp-content/themes/twentyfourteen/content-image.php
r25088 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <header class="entry-header"> 12 14 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> -
trunk/src/wp-content/themes/twentyfourteen/content-link.php
r25088 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <header class="entry-header"> 12 14 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> -
trunk/src/wp-content/themes/twentyfourteen/content-page.php
r25021 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?> 12 14 -
trunk/src/wp-content/themes/twentyfourteen/content-quote.php
r25088 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <header class="entry-header"> 12 14 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> -
trunk/src/wp-content/themes/twentyfourteen/content-video.php
r25088 r25735 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <?php twentyfourteen_featured_thumbnail(); ?> 12 11 13 <header class="entry-header"> 12 14 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> -
trunk/src/wp-content/themes/twentyfourteen/content.php
r25088 r25735 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 7 6 ?> 8 7 9 8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 10 <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail"> 11 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 12 </a> 9 <?php twentyfourteen_featured_thumbnail(); ?> 13 10 14 11 <header class="entry-header"> -
trunk/src/wp-content/themes/twentyfourteen/functions.php
r25624 r25735 60 60 61 61 // Enable support for Post Thumbnails. 62 add_theme_support( 'post-thumbnails' , array( 'post' ));62 add_theme_support( 'post-thumbnails' ); 63 63 64 64 // Adding several sizes for Post Thumbnails. … … 482 482 483 483 /** 484 * Extends the default WordPress post classes. 485 * 486 * Adds a post class to denote: 487 * Non-password protected page with a featured image. 488 * 489 * @param array $classes A list of existing post class values. 490 * @return array The filtered post class list. 491 */ 492 function twentyfourteen_post_classes( $classes ) { 493 if ( ! post_password_required() && has_post_thumbnail() ) 494 $classes[] = 'has-featured-image'; 495 496 return $classes; 497 } 498 add_filter( 'post_class', 'twentyfourteen_post_classes' ); 499 500 /** 484 501 * Creates a nicely formatted and more specific title element text for output 485 502 * in head of document, based on current view. -
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r25088 r25735 144 144 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); 145 145 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); 146 147 /** 148 * Displays featured image with appropriate html tag. 149 * 150 * @return void 151 */ 152 function twentyfourteen_featured_thumbnail() { 153 if ( ! post_password_required() ) : 154 if ( has_post_thumbnail() && is_singular() ) : 155 ?> 156 <div class="attachment-featured-thumbnail"> 157 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 158 </div> 159 <?php 160 else : 161 ?> 162 <a href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail"> 163 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 164 </a> 165 <?php 166 endif; 167 endif; 168 } -
trunk/src/wp-content/themes/twentyfourteen/js/theme.js
r25731 r25735 129 129 } 130 130 ); 131 131 132 132 } )( jQuery ); -
trunk/src/wp-content/themes/twentyfourteen/style.css
r25731 r25735 454 454 .clear:before, 455 455 .clear:after, 456 .hentry:before, 457 .hentry:after, 456 458 [class*="content"]:before, 457 459 [class*="content"]:after, … … 463 465 464 466 .clear:after, 467 .hentry:after, 465 468 [class*="content"]:after, 466 469 [class*="site"]:after { … … 717 720 .primary-navigation ul li:hover > ul, 718 721 .primary-navigation ul li.a11y-focus > ul { 719 left: auto; 722 left: auto; 720 723 } 721 724 .primary-navigation ul ul li:hover > ul, … … 818 821 background-image: linear-gradient(135deg, #767676 12.5%, #fff 12.5%, #fff 50%, #767676 50%, #767676 62.5%, #fff 62.5%); 819 822 background-size: 4px 4px; 820 display: block;823 display: none; 821 824 float: none; 822 825 margin: 0; … … 827 830 z-index: 0; 828 831 } 832 .has-featured-image .attachment-featured-thumbnail, 833 .format-standard .attachment-featured-thumbnail { 834 display: block; 835 } 829 836 .attachment-featured-thumbnail:hover { 830 837 background: #919191; … … 834 841 background-size: 4px 4px; 835 842 } 836 . full-width .attachment-featured-thumbnail img {843 .attachment-featured-thumbnail img { 837 844 display: block; 838 845 margin: 0 auto; … … 949 956 .content-area .entry-header, 950 957 .content-area .entry-content, 951 .content-area .page-content,952 958 .content-area .entry-summary, 953 .content-area .entry-meta { 959 .content-area .entry-meta, 960 .page-content { 954 961 margin: 0 auto; 955 962 max-width: 474px; … … 957 964 .content-area .entry-header { 958 965 background-color: #fff; 959 padding: 24px 10px 12px; 966 padding: 0 10px 12px; 967 } 968 .content-area .has-featured-image .entry-header, 969 .content-area .format-standard .entry-header { 970 padding-top: 24px; 971 } 972 .content-area .format-standard.post-password-required .entry-header { 973 padding-top: 0; 960 974 } 961 975 .content-area .entry-title { … … 972 986 } 973 987 .content-area .entry-content, 974 .content-area . page-content,975 . content-area .entry-summary{988 .content-area .entry-summary, 989 .page-content { 976 990 background-color: #fff; 977 991 padding: 12px 10px 0; … … 982 996 } 983 997 .content-area footer.entry-meta { 984 margin-bottom: 36px;998 margin-bottom: 24px; 985 999 } 986 1000 .content-area footer.entry-meta .entry-title { … … 996 1010 footer.entry-meta .entry-title a:hover { 997 1011 color: #2b2b2b; 998 }999 .format-aside,1000 .format-quote,1001 .format-link,1002 .format-image,1003 .format-video {1004 border-top: 1px solid rgba(0, 0, 0, 0.1);1005 1012 } 1006 1013 .format-aside .entry-content, … … 1012 1019 padding-top: 0; 1013 1020 } 1014 1015 /* Single specific styles */1016 .single .format-aside .entry-header,1017 .single .format-quote .entry-header,1018 .single .format-link .entry-header,1019 .single .format-image .entry-header,1020 .single .format-video .entry-header {1021 padding-top: 0;1022 }1023 .single .format-aside,1024 .single .format-quote,1025 .single .format-link,1026 .single .format-image,1027 .single .format-video {1028 border-top: none;1029 }1030 1031 1021 /* Page specific styles */ 1032 1022 .page .entry-content, … … 1160 1150 font-weight: 900; 1161 1151 line-height: 1.5; 1162 margin -bottom:24px;1152 margin: 0 0 24px; 1163 1153 } 1164 1154 .taxonomy-description { … … 1587 1577 .post-navigation, 1588 1578 .image-navigation { 1589 margin: 24px auto ;1579 margin: 24px auto 48px; 1590 1580 max-width: 474px; 1591 1581 padding: 0 10px; … … 1656 1646 1657 1647 .comments-area { 1658 margin: 36px auto;1648 margin: 48px auto; 1659 1649 max-width: 474px; 1660 1650 padding: 0 10px; … … 2209 2199 text-transform: none; 2210 2200 } 2211 .list-view .content-area .format-aside,2212 .list-view .content-area .format-quote,2213 .list-view .content-area .format-link,2214 .list-view .content-area .format-image,2215 .list-view .content-area .format-video {2216 border-top: 0;2217 }2218 2201 .list-view .content-area .format-aside .entry-title, 2219 2202 .list-view .content-area .format-quote .entry-title, … … 2233 2216 2234 2217 @media screen and (min-width: 401px) { 2235 .attachment-featured-thumbnail:hover img {2218 a.attachment-featured-thumbnail:hover img { 2236 2219 opacity: 0.85; 2237 2220 } … … 2316 2299 padding: 0 10px; 2317 2300 } 2318 . search-results .content-area .type-page{2301 .list-view .content-area .hentry { 2319 2302 border-top: 1px solid rgba(0, 0, 0, 0.1); 2320 } 2321 .search-results .content-area .type-page .entry-header { 2322 margin-top: 24px; 2303 padding-top: 48px; 2304 } 2305 .list-view .content-area .has-featured-image .attachment-featured-thumbnail, 2306 .list-view .content-area .format-standard .attachment-featured-thumbnail { 2307 margin-top: -49px; 2323 2308 } 2324 2309 } … … 2326 2311 @media screen and (min-width: 642px) { 2327 2312 .content-area .entry-header { 2328 margin-top: -48px;2329 2313 padding-right: 30px; 2330 2314 padding-left: 30px; 2331 2315 } 2332 .attachment .content-area .entry-header { 2316 .content-area .has-featured-image .entry-header, 2317 .content-area .format-standard .entry-header { 2318 margin-top: -48px; 2319 } 2320 .content-area .format-standard.post-password-required .entry-header { 2333 2321 margin-top: 0; 2334 2322 } … … 2344 2332 margin-right: 33.33333333%; 2345 2333 } 2346 .content-area .entry-header { 2334 .content-area .has-featured-image .entry-header, 2335 .content-area .format-standard .entry-header { 2347 2336 margin-top: 0; 2348 2337 } … … 2386 2375 margin-right: 0; 2387 2376 } 2377 .full-width .content-area .has-featured-image .entry-header, 2378 .full-width .content-area .format-standard .entry-header { 2379 margin-top: -48px; 2380 } 2388 2381 } 2389 2382 … … 2418 2411 max-width: 810px; 2419 2412 } 2420 .single-attachment .entry-content .attachment {2421 text-align: center;2413 .single-attachment .entry-content .attachment img { 2414 margin: 0 auto; 2422 2415 } 2423 2416 .full-width .entry-content blockquote.alignleft, … … 2435 2428 2436 2429 @media screen and (min-width: 870px) { 2437 .content-area { 2430 .content-area, 2431 .content-sidebar, 2432 .ephemera { 2438 2433 padding-top: 72px; 2439 2434 } 2440 .home .content-area { 2441 padding-top: 36px; 2442 } 2443 .content-area .entry-header { 2435 .content-area .has-featured-image .entry-header, 2436 .content-area .format-standard .entry-header { 2444 2437 margin-top: -48px; 2445 2438 } 2446 .content-area .format-aside .entry-header, 2447 .content-area .format-quote .entry-header, 2448 .content-area .format-link .entry-header, 2449 .content-area .format-video .entry-header, 2450 .content-area .format-image .entry-header { 2451 margin-top: 12px; 2452 } 2453 .single .content-area .format-aside .entry-header, 2454 .single .content-area .format-quote .entry-header, 2455 .single .content-area .format-link .entry-header, 2456 .single .content-area .format-image .entry-header, 2457 .single .content-area .format-video .entry-header { 2439 .content-area .format-standard.post-password-required .entry-header { 2458 2440 margin-top: 0; 2459 2441 } … … 2512 2494 .content-area .entry-header { 2513 2495 margin-top: 0; 2514 }2515 .content-area .entry-header2516 .content-area .entry-content,2517 .content-area .entry-summary,2518 .content-area footer.entry-meta,2519 .archive-header,2520 .page-header,2521 .page-content,2522 .post-navigation,2523 .image-navigation,2524 .comments-area {2525 padding-right: 0;2526 padding-left: 0;2527 2496 } 2528 2497 .site-footer { … … 2611 2580 padding-left: 182px; 2612 2581 } 2582 .content-area .has-featured-image .entry-header, 2583 .content-area .format-standard .entry-header { 2584 margin-top: 0; 2585 } 2613 2586 } 2614 2587 2615 2588 @media screen and (min-width: 1040px) { 2616 .content-area .entry-header { 2589 .content-area .has-featured-image .entry-header, 2590 .content-area .format-standard .entry-header { 2617 2591 margin-top: -48px; 2592 } 2593 .content-area .format-standard.post-password-required .entry-header { 2594 margin-top: 0; 2618 2595 } 2619 2596 .content-area .entry-header, … … 2629 2606 padding-right: 15px; 2630 2607 padding-left: 15px; 2608 } 2609 .full-width .content-area .entry-header, 2610 .full-width .content-area .entry-content, 2611 .full-width .content-area .entry-summary, 2612 .full-width .content-area footer.entry-meta, 2613 .full-width .archive-header, 2614 .full-width .page-header, 2615 .full-width .page-content, 2616 .full-width .post-navigation, 2617 .full-width .image-navigation, 2618 .full-width .comments-area { 2619 padding-right: 30px; 2620 padding-left: 30px; 2631 2621 } 2632 2622 }
Note: See TracChangeset
for help on using the changeset viewer.