Ticket #24863: 24863.4.diff
| File 24863.4.diff, 6.2 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, 128 ); ?></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 genericon-document" href="<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>"> 372 <?php printf( __( '%d Articles', '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
326 326 *overflow: visible; /* Corrects inner spacing displayed oddly in IE6/7 */ 327 327 } 328 328 button, 329 .contributor-posts-link, 329 330 html input[type="button"], 330 331 input[type="reset"], 331 332 input[type="submit"] { … … 343 344 vertical-align: top; 344 345 } 345 346 button:hover, 347 .contributor-posts-link:hover, 346 348 html input[type="button"]:hover, 347 349 input[type="reset"]:hover, 348 350 input[type="submit"]:hover, … … 354 356 cursor: pointer; 355 357 } 356 358 button:active, 359 .contributor-posts-link:active, 357 360 html input[type="button"]:active, 358 361 input[type="reset"]:active, 359 362 input[type="submit"]:active { … … 1715 1718 margin: 24px 0 0; 1716 1719 margin: 2.4rem 0 0; 1717 1720 } 1721 1718 1722 .post-navigation [rel="prev"], 1719 1723 .post-navigation [rel="next"], 1720 1724 .image-navigation .previous-image, 1721 1725 .image-navigation .next-image { 1722 1726 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1723 1727 -moz-box-sizing: border-box; 1724 box-sizing: border-box;1728 box-sizing: border-box; 1725 1729 float: none; 1726 1730 padding: 11px 10px; 1727 1731 padding: 1.1rem 1.0rem; … … 2301 2305 width: 198px; 2302 2306 } 2303 2307 2308 /* =Contributor Page 2309 ----------------------------------------------- */ 2310 2311 .contributor { 2312 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 2313 -moz-box-sizing: border-box; 2314 box-sizing: border-box; 2315 padding: 50px 0 35px; 2316 } 2317 .contributor-avatar { 2318 float: left; 2319 padding: 2px; 2320 border: 1px solid #e7e7e7; 2321 margin-right: 30px; 2322 } 2323 .contributor-avatar .avatar { 2324 vertical-align: middle; 2325 } 2326 .contributor-summary { 2327 float: left; 2328 max-width: 474px; 2329 width: -webkit-calc(100% - 164px); 2330 width: calc(100% - 164px); 2331 } 2332 .contributor-name { 2333 font-size: 18px; 2334 font-size: 1.8rem; 2335 margin-bottom: 5px; 2336 margin-bottom: 0.5rem; 2337 text-transform: uppercase; 2338 } 2339 .contributor-bio { 2340 color: #767676; 2341 } 2342 .contributor-posts-link { 2343 display: inline-block; 2344 } 2345 .contributor-posts-link:before { 2346 vertical-align: text-top; 2347 } 2348 2349 2304 2350 /* =Media Queries 2305 2351 ----------------------------------------------- */ 2306 2352 … … 2384 2430 .parent-post-link:before { 2385 2431 content: ''; 2386 2432 } 2433 2387 2434 .content-area .featured-post:before, 2388 2435 .content-area .post-format a:before, 2389 2436 .content-area .post-format + .entry-date a:before, … … 2401 2448 margin: 0 2px 0 0; 2402 2449 margin: 0 0.2rem 0 0; 2403 2450 text-transform: none; 2404 vertical-align: top;2405 2451 } 2406 2452 .content-area .entry-meta > span { 2407 2453 margin-right: 10px; … … 2676 2722 .error404 .content-area .page-header { 2677 2723 margin: 0 8.03571428% 0 12.5%; 2678 2724 } 2725 .contributor, 2679 2726 .content-area .full-width .entry-header, 2680 2727 .content-area .full-width .entry-content, 2681 2728 .content-area .full-width footer.entry-meta { … … 2894 2941 padding: 0 0 12px; 2895 2942 padding: 0 0 1.2rem; 2896 2943 } 2944 .contributor, 2897 2945 .content-area .full-width .entry-header, 2898 2946 .content-area .full-width .entry-content, 2899 2947 .content-area .full-width .page-content, … … 3015 3063 .error404 .content-area .page-header { 3016 3064 margin: 0 8.03571428% 0 12.5%; 3017 3065 } 3066 .contributor, 3018 3067 .content-area .full-width .entry-header, 3019 3068 .content-area .full-width .entry-content, 3020 3069 .content-area .full-width .page-content, … … 3055 3104 .ephemera { 3056 3105 padding-right: 0; 3057 3106 } 3107 .contributor, 3058 3108 .content-area .full-width .entry-header, 3059 3109 .content-area .full-width .entry-content, 3060 3110 .content-area .full-width .page-content,
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)