Ticket #24863: 24863.7.diff
| File 24863.7.diff, 6.5 KB (added by , 13 years ago) |
|---|
-
wp-content/themes/twentyfourteen/contributor-page.php
1 <?php 2 /** 3 * Template Name: Contributor Page 4 * 5 * @package WordPress 6 * @subpackage Twenty_Fourteen 7 */ 8 9 get_header(); ?> 10 11 <div id="primary" class="content-area"> 12 <div id="content" class="site-content full-width" role="main"> 13 <?php 14 while ( have_posts() ) : 15 the_post(); 16 ?> 17 18 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 19 <?php 20 the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); 21 22 twentyfourteen_list_authors(); 23 24 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); 25 ?> 26 </article><!-- #post-## --> 27 28 <?php 29 // If comments are open or we have at least one comment, load up the comment template. 30 if ( comments_open() || get_comments_number() ) 31 comments_template(); 32 endwhile; 33 ?> 34 </div><!-- #content --> 35 </div><!-- #primary --> 36 37 <?php 38 get_sidebar(); 39 get_footer(); -
wp-content/themes/twentyfourteen/functions.php
340 340 } 341 341 endif; 342 342 343 if ( ! function_exists( 'twentyfourteen_list_authors' ) ) : 344 /** 345 * Prints a list of all site contributors who published at least one post. 346 * 347 * @return void 348 */ 349 function twentyfourteen_list_authors() { 350 $contributor_ids = get_users( array( 351 'fields' => 'ID', 352 'orderby' => 'post_count', 353 'who' => 'authors', 354 ) ); 355 356 foreach ( $contributor_ids as $contributor_id ) : 357 $post_count = count_user_posts( $contributor_id ); 358 359 // Move on if user has not published a post (yet). 360 if ( ! $post_count ) 361 continue; 362 ?> 363 364 <div class="contributor clear"> 365 <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div> 366 <div class="contributor-summary"> 367 <h2 class="contributor-name"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2> 368 <p class="contributor-bio"> 369 <?php echo get_the_author_meta( 'description', $contributor_id ); ?> 370 </p> 371 <a class="contributor-posts-link" href="<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>"> 372 <?php printf( _n( '%d Article', '%d Articles', $post_count, 'twentyfourteen' ), $post_count ); ?> 373 </a> 374 </div> 375 </div><!-- .contributor --> 376 377 <?php 378 endforeach; 379 } 380 endif; 381 343 382 /** 344 383 * Gets recent formatted posts that are not featured in FC plugin. 345 384 * -
wp-content/themes/twentyfourteen/style.css
306 306 *overflow: visible; /* Corrects inner spacing displayed oddly in IE6/7 */ 307 307 } 308 308 button, 309 .contributor-posts-link, 309 310 html input[type="button"], 310 311 input[type="reset"], 311 312 input[type="submit"] { … … 323 324 vertical-align: top; 324 325 } 325 326 button:hover, 327 .contributor-posts-link:hover, 326 328 html input[type="button"]:hover, 327 329 input[type="reset"]:hover, 328 330 input[type="submit"]:hover, … … 331 333 input[type="reset"]:focus, 332 334 input[type="submit"]:focus { 333 335 background-color: #24890d; 336 color: #fff; 334 337 cursor: pointer; 335 338 } 336 339 button:active, 340 .contributor-posts-link:active, 337 341 html input[type="button"]:active, 338 342 input[type="reset"]:active, 339 343 input[type="submit"]:active { … … 495 499 496 500 /* Genericons */ 497 501 .search-toggle:before, 502 .contributor-posts-link:before, 498 503 .widget_twentyfourteen_ephemera .widget-title:before { 499 504 display: inline-block; 500 505 -webkit-font-smoothing: antialiased; … … 1726 1731 margin: 24px 0 0; 1727 1732 margin: 2.4rem 0 0; 1728 1733 } 1734 1729 1735 .post-navigation [rel="prev"], 1730 1736 .post-navigation [rel="next"], 1731 1737 .image-navigation .previous-image, … … 2314 2320 width: 198px; 2315 2321 } 2316 2322 2323 2324 /* =Contributor Page 2325 ----------------------------------------------- */ 2326 2327 .contributor { 2328 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 2329 -moz-box-sizing: border-box; 2330 box-sizing: border-box; 2331 padding: 48px 0; 2332 padding: 4.8rem 0; 2333 } 2334 .contributor-avatar { 2335 float: left; 2336 padding: 2px; 2337 padding: 0.2rem; 2338 border: 1px solid rgba(0, 0, 0, 0.1); 2339 margin-right: 30px; 2340 margin-right: 3.0rem; 2341 } 2342 .contributor-avatar .avatar { 2343 vertical-align: middle; 2344 } 2345 .contributor-summary { 2346 float: left; 2347 max-width: 474px; 2348 max-width: 47.4rem; 2349 width: -webkit-calc(100% - 164px); 2350 width: calc(100% - 164px); 2351 } 2352 .contributor-name { 2353 font-size: 16px; 2354 font-size: 1.6rem; 2355 font-weight: 900; 2356 line-height: 1.5; 2357 margin-bottom: 0; 2358 text-transform: uppercase; 2359 } 2360 .contributor-bio { 2361 color: #767676; 2362 } 2363 .contributor-posts-link { 2364 display: inline-block; 2365 } 2366 .contributor-posts-link:before { 2367 content: '\f443'; 2368 vertical-align: text-bottom; 2369 } 2370 2371 2317 2372 /* =Media Queries 2318 2373 ----------------------------------------------- */ 2319 2374 … … 2397 2452 .parent-post-link:before { 2398 2453 content: ''; 2399 2454 } 2455 2400 2456 .content-area .featured-post:before, 2401 2457 .content-area .post-format a:before, 2402 2458 .content-area .post-format + .entry-date a:before, … … 2414 2470 margin: 0 2px 0 0; 2415 2471 margin: 0 0.2rem 0 0; 2416 2472 text-transform: none; 2417 vertical-align: top;2418 2473 } 2419 2474 .content-area .entry-meta > span { 2420 2475 margin-right: 10px; … … 2689 2744 .error404 .content-area .page-header { 2690 2745 margin: 0 8.03571428% 0 12.5%; 2691 2746 } 2747 .contributor, 2692 2748 .content-area .full-width .entry-header, 2693 2749 .content-area .full-width .entry-content, 2694 2750 .content-area .full-width footer.entry-meta { … … 2907 2963 padding: 0 0 12px; 2908 2964 padding: 0 0 1.2rem; 2909 2965 } 2966 .contributor, 2910 2967 .content-area .full-width .entry-header, 2911 2968 .content-area .full-width .entry-content, 2912 2969 .content-area .full-width .page-content, … … 3028 3085 .error404 .content-area .page-header { 3029 3086 margin: 0 8.03571428% 0 12.5%; 3030 3087 } 3088 .contributor, 3031 3089 .content-area .full-width .entry-header, 3032 3090 .content-area .full-width .entry-content, 3033 3091 .content-area .full-width .page-content, … … 3068 3126 .ephemera { 3069 3127 padding-right: 0; 3070 3128 } 3129 .contributor, 3071 3130 .content-area .full-width .entry-header, 3072 3131 .content-area .full-width .entry-content, 3073 3132 .content-area .full-width .page-content,
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)