Ticket #2574: 2574.multiple-templates.patch
File 2574.multiple-templates.patch, 19.7 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
31 31 'forum-wp4-style', 32 32 get_template_directory_uri() . '/style.css', 33 33 array( 'bb-base' ), 34 '20170310 b'34 '20170310c' 35 35 ); 36 36 37 37 wp_style_add_data( 'forum-wp4-style', 'rtl', 'replace' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page-forums-sidebar.php
2 2 /** 3 3 * Template Name: Page with a Forums Sidebar 4 4 * 5 * @package bbPress 6 * @subpackage Theme 5 * @package WPBBP 7 6 */ 8 7 9 8 get_header(); ?> 10 9 11 <main id="main" class="site-main" role="main">10 <main id="main" class="site-main page-forums-sidebar" role="main"> 12 11 13 <div class="entry-content">14 <?php bbp_breadcrumb(); ?>12 <?php 13 while ( have_posts() ) : the_post(); 15 14 16 <?php while ( have_posts() ) : the_post(); ?> 15 get_template_part( 'template-parts/content', 'page' ); 16 endwhile; // End of the loop. 17 ?> 17 18 18 <header class="page-header"> 19 <h1 class="page-title"><?php the_title(); ?></h1> 20 </header><!-- .page-header --> 19 <?php get_sidebar(); ?> 20 </main> 21 21 22 <?php the_content(); ?>23 24 <?php endwhile; ?>25 </div>26 27 <?php get_sidebar(); ?>28 </main>29 30 22 <?php get_footer(); ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page-full-width.php
1 <?php 2 /** 3 * Template Name: Full-width Page 4 * 5 * @package WPBBP 6 */ 7 8 get_header(); ?> 9 10 <main id="main" class="site-main page-full-width" role="main"> 11 12 <?php 13 while ( have_posts() ) : the_post(); 14 15 get_template_part( 'template-parts/content', 'page' ); 16 endwhile; // End of the loop. 17 ?> 18 19 </main><!-- #main --> 20 21 <?php 22 get_footer(); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page.php
Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page-full-width.php ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property
4 4 * 5 5 * This is the template that displays all pages by default. 6 6 * Please note that this is the WordPress construct of pages 7 * and that other 'pages' on your WordPress site willuse a7 * and that other 'pages' on your WordPress site may use a 8 8 * different template. 9 9 * 10 * @package WPBBP 10 11 */ 11 12 12 13 get_header(); ?> 13 14 14 <main id="main" class="site-main" role="main">15 <main id="main" class="site-main" role="main"> 15 16 16 <div class="entry-content">17 <?php bbp_breadcrumb(); ?>17 <?php 18 while ( have_posts() ) : the_post(); 18 19 19 <?php while ( have_posts() ) : the_post(); ?> 20 get_template_part( 'template-parts/content', 'page' ); 21 endwhile; // End of the loop. 22 ?> 20 23 21 <header class="page-header"> 22 <h1 class="page-title"><?php the_title(); ?></h1> 23 </header><!-- .page-header --> 24 </main><!-- #main --> 24 25 25 <?php the_content(); ?> 26 27 <?php endwhile; ?> 28 </div> 29 30 </main> 31 32 <?php get_footer(); ?> 26 <?php 27 get_footer(); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/site/_bbpress.scss
72 72 } 73 73 74 74 75 .bbpress, 76 .page-template-page-forums-sidebar { 77 main#main { 78 .entry-content, 79 .entry-meta { 80 padding: 0; 81 82 @media(min-width:568px) { 83 padding: 0 ms(4); 84 } 85 } 86 87 .entry-header .entry-title, 88 .entry-content .container { 89 padding: 0; 90 } 91 92 > .entry-content, 93 > article { 94 max-width: 48rem; 95 96 @media screen and ( min-width: $ms-breakpoint ) { 97 float: left; 98 padding: 0; 99 width: 65%; 100 } 101 } 102 103 @media screen and ( min-width: $ms-breakpoint ) { 104 .entry-content, 105 .entry-meta { 106 padding-left: 0; 107 padding-right: 0; 108 } 109 110 .entry-meta { 111 float: right; 112 width: 30%; 113 } 114 } 115 } 116 } 117 75 118 .bbpress { 119 main#main { 120 margin-top: 2rem; 121 padding: 0 10px 10px; 122 123 @extend .clear; 124 } 125 76 126 #bbpress-forums { 77 127 78 128 div.bbp-template-notice { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/site/_site.scss
5 5 font-size: ms(0); 6 6 } 7 7 8 main#main {9 margin-top: 2rem;10 padding: 0 10px 10px;11 font-size: ms(-2);12 13 @extend .clear;14 }15 16 .bbpress main#main,17 .page-template-page-forums-sidebar main#main {18 19 .entry-content,20 .entry-meta {21 padding: 0;22 23 @media(min-width:568px) {24 padding: 0 ms(4);25 }26 }27 28 > .entry-content {29 max-width: 48rem;30 31 @media screen and ( min-width: $ms-breakpoint ) {32 float: left;33 padding: 0;34 width: 65%;35 }36 }37 38 @media screen and ( min-width: $ms-breakpoint ) {39 .entry-content,40 .entry-meta {41 padding-left: 0;42 padding-right: 0;43 }44 45 .entry-meta {46 float: right;47 width: 30%;48 }49 }50 }51 52 8 /*-------------------------------------------------------------- 53 9 # .site-header 54 10 --------------------------------------------------------------*/ … … 307 263 } 308 264 } 309 265 310 .page & {311 padding -top: 0;266 #page & { 267 padding: 0 10px ms(10); 312 268 } 313 269 314 270 .page-header { … … 539 495 } 540 496 } 541 497 } 498 499 .submenu { 500 margin-left: 0; 501 } 502 503 .submenu li { 504 border-bottom: 1px solid #dedede; 505 font-size: 12px; 506 line-height: 18px; 507 padding: 5px 0; 508 } 509 510 .submenu li.current { 511 font-weight: bold; 512 } 513 514 .submenu li:last-child { 515 border-bottom: 0; 516 } 517 518 .submenu li ul { 519 margin-left: 16px; 520 } 521 522 .submenu li ul li { 523 border: none; 524 line-height: 1.4em; 525 padding-bottom: 2px; 526 } 542 527 } 543 528 529 .page-template-page-full-width { 530 .entry-header .entry-title, 531 .entry-content section .container { 532 max-width: 100%; 533 padding: 0; 534 } 535 } 544 536 545 537 /*-------------------------------------------------------------- 546 538 # 404 Error page -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/style-rtl.css
1911 1911 /*-------------------------------------------------------------- 1912 1912 # Clearings 1913 1913 --------------------------------------------------------------*/ 1914 .clear:before, main#main:before, .three-up:before, .bbp-view .review-ratings:before,1914 .clear:before, .three-up:before, .bbpress main#main:before, .bbp-view .review-ratings:before, 1915 1915 .clear:after, 1916 main#main:after,1917 1916 .three-up:after, 1917 .bbpress main#main:after, 1918 1918 .bbp-view .review-ratings:after, 1919 1919 .entry-content:before, 1920 1920 .entry-content:after, … … 1931 1931 table-layout: fixed; 1932 1932 } 1933 1933 1934 .clear:after, main#main:after, .three-up:after, .bbp-view .review-ratings:after,1934 .clear:after, .three-up:after, .bbpress main#main:after, .bbp-view .review-ratings:after, 1935 1935 .entry-content:after, 1936 1936 .comment-content:after, 1937 1937 .site-header:after, … … 2003 2003 font-size: 1rem; 2004 2004 } 2005 2005 2006 main#main {2007 margin-top: 2rem;2008 padding: 0 10px 10px;2009 font-size: 0.8rem;2010 }2011 2012 .bbpress main#main .entry-content,2013 .bbpress main#main .entry-meta,2014 .page-template-page-forums-sidebar main#main .entry-content,2015 .page-template-page-forums-sidebar main#main .entry-meta {2016 padding: 0;2017 }2018 2019 @media (min-width: 568px) {2020 .bbpress main#main .entry-content,2021 .bbpress main#main .entry-meta,2022 .page-template-page-forums-sidebar main#main .entry-content,2023 .page-template-page-forums-sidebar main#main .entry-meta {2024 padding: 0 1.5625rem;2025 }2026 }2027 2028 .bbpress main#main > .entry-content,2029 .page-template-page-forums-sidebar main#main > .entry-content {2030 max-width: 48rem;2031 }2032 2033 @media screen and (min-width: 48em) {2034 .bbpress main#main > .entry-content,2035 .page-template-page-forums-sidebar main#main > .entry-content {2036 float: right;2037 padding: 0;2038 width: 65%;2039 }2040 }2041 2042 @media screen and (min-width: 48em) {2043 .bbpress main#main .entry-content,2044 .bbpress main#main .entry-meta,2045 .page-template-page-forums-sidebar main#main .entry-content,2046 .page-template-page-forums-sidebar main#main .entry-meta {2047 padding-right: 0;2048 padding-left: 0;2049 }2050 .bbpress main#main .entry-meta,2051 .page-template-page-forums-sidebar main#main .entry-meta {2052 float: left;2053 width: 30%;2054 }2055 }2056 2057 2006 /*-------------------------------------------------------------- 2058 2007 # .site-header 2059 2008 --------------------------------------------------------------*/ … … 2296 2245 } 2297 2246 } 2298 2247 2299 .page .site-main {2300 padding -top: 0;2248 #page .site-main { 2249 padding: 0 10px 3.0517578125rem; 2301 2250 } 2302 2251 2303 2252 .site-main .page-header h1 { … … 2516 2465 border-top: 2px solid #eee; 2517 2466 } 2518 2467 2468 .page .submenu { 2469 margin-right: 0; 2470 } 2471 2472 .page .submenu li { 2473 border-bottom: 1px solid #dedede; 2474 font-size: 12px; 2475 line-height: 18px; 2476 padding: 5px 0; 2477 } 2478 2479 .page .submenu li.current { 2480 font-weight: bold; 2481 } 2482 2483 .page .submenu li:last-child { 2484 border-bottom: 0; 2485 } 2486 2487 .page .submenu li ul { 2488 margin-right: 16px; 2489 } 2490 2491 .page .submenu li ul li { 2492 border: none; 2493 line-height: 1.4em; 2494 padding-bottom: 2px; 2495 } 2496 2497 .page-template-page-full-width .entry-header .entry-title, 2498 .page-template-page-full-width .entry-content section .container { 2499 max-width: 100%; 2500 padding: 0; 2501 } 2502 2519 2503 /*-------------------------------------------------------------- 2520 2504 # 404 Error page 2521 2505 --------------------------------------------------------------*/ … … 2590 2574 } 2591 2575 } 2592 2576 2577 .bbpress main#main .entry-content, 2578 .bbpress main#main .entry-meta, 2579 .page-template-page-forums-sidebar main#main .entry-content, 2580 .page-template-page-forums-sidebar main#main .entry-meta { 2581 padding: 0; 2582 } 2583 2584 @media (min-width: 568px) { 2585 .bbpress main#main .entry-content, 2586 .bbpress main#main .entry-meta, 2587 .page-template-page-forums-sidebar main#main .entry-content, 2588 .page-template-page-forums-sidebar main#main .entry-meta { 2589 padding: 0 1.5625rem; 2590 } 2591 } 2592 2593 .bbpress main#main .entry-header .entry-title, 2594 .bbpress main#main .entry-content .container, 2595 .page-template-page-forums-sidebar main#main .entry-header .entry-title, 2596 .page-template-page-forums-sidebar main#main .entry-content .container { 2597 padding: 0; 2598 } 2599 2600 .bbpress main#main > .entry-content, 2601 .bbpress main#main > article, 2602 .page-template-page-forums-sidebar main#main > .entry-content, 2603 .page-template-page-forums-sidebar main#main > article { 2604 max-width: 48rem; 2605 } 2606 2607 @media screen and (min-width: 48em) { 2608 .bbpress main#main > .entry-content, 2609 .bbpress main#main > article, 2610 .page-template-page-forums-sidebar main#main > .entry-content, 2611 .page-template-page-forums-sidebar main#main > article { 2612 float: right; 2613 padding: 0; 2614 width: 65%; 2615 } 2616 } 2617 2618 @media screen and (min-width: 48em) { 2619 .bbpress main#main .entry-content, 2620 .bbpress main#main .entry-meta, 2621 .page-template-page-forums-sidebar main#main .entry-content, 2622 .page-template-page-forums-sidebar main#main .entry-meta { 2623 padding-right: 0; 2624 padding-left: 0; 2625 } 2626 .bbpress main#main .entry-meta, 2627 .page-template-page-forums-sidebar main#main .entry-meta { 2628 float: left; 2629 width: 30%; 2630 } 2631 } 2632 2633 .bbpress main#main { 2634 margin-top: 2rem; 2635 padding: 0 10px 10px; 2636 } 2637 2593 2638 .bbpress #bbpress-forums div.bbp-template-notice { 2594 2639 padding: .5rem; 2595 2640 border: none; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/style.css
1913 1913 /*-------------------------------------------------------------- 1914 1914 # Clearings 1915 1915 --------------------------------------------------------------*/ 1916 .clear:before, main#main:before, .three-up:before, .bbp-view .review-ratings:before,1916 .clear:before, .three-up:before, .bbpress main#main:before, .bbp-view .review-ratings:before, 1917 1917 .clear:after, 1918 main#main:after,1919 1918 .three-up:after, 1919 .bbpress main#main:after, 1920 1920 .bbp-view .review-ratings:after, 1921 1921 .entry-content:before, 1922 1922 .entry-content:after, … … 1933 1933 table-layout: fixed; 1934 1934 } 1935 1935 1936 .clear:after, main#main:after, .three-up:after, .bbp-view .review-ratings:after,1936 .clear:after, .three-up:after, .bbpress main#main:after, .bbp-view .review-ratings:after, 1937 1937 .entry-content:after, 1938 1938 .comment-content:after, 1939 1939 .site-header:after, … … 2005 2005 font-size: 1rem; 2006 2006 } 2007 2007 2008 main#main {2009 margin-top: 2rem;2010 padding: 0 10px 10px;2011 font-size: 0.8rem;2012 }2013 2014 .bbpress main#main .entry-content,2015 .bbpress main#main .entry-meta,2016 .page-template-page-forums-sidebar main#main .entry-content,2017 .page-template-page-forums-sidebar main#main .entry-meta {2018 padding: 0;2019 }2020 2021 @media (min-width: 568px) {2022 .bbpress main#main .entry-content,2023 .bbpress main#main .entry-meta,2024 .page-template-page-forums-sidebar main#main .entry-content,2025 .page-template-page-forums-sidebar main#main .entry-meta {2026 padding: 0 1.5625rem;2027 }2028 }2029 2030 .bbpress main#main > .entry-content,2031 .page-template-page-forums-sidebar main#main > .entry-content {2032 max-width: 48rem;2033 }2034 2035 @media screen and (min-width: 48em) {2036 .bbpress main#main > .entry-content,2037 .page-template-page-forums-sidebar main#main > .entry-content {2038 float: left;2039 padding: 0;2040 width: 65%;2041 }2042 }2043 2044 @media screen and (min-width: 48em) {2045 .bbpress main#main .entry-content,2046 .bbpress main#main .entry-meta,2047 .page-template-page-forums-sidebar main#main .entry-content,2048 .page-template-page-forums-sidebar main#main .entry-meta {2049 padding-left: 0;2050 padding-right: 0;2051 }2052 .bbpress main#main .entry-meta,2053 .page-template-page-forums-sidebar main#main .entry-meta {2054 float: right;2055 width: 30%;2056 }2057 }2058 2059 2008 /*-------------------------------------------------------------- 2060 2009 # .site-header 2061 2010 --------------------------------------------------------------*/ … … 2298 2247 } 2299 2248 } 2300 2249 2301 .page .site-main {2302 padding -top: 0;2250 #page .site-main { 2251 padding: 0 10px 3.0517578125rem; 2303 2252 } 2304 2253 2305 2254 .site-main .page-header h1 { … … 2518 2467 border-top: 2px solid #eee; 2519 2468 } 2520 2469 2470 .page .submenu { 2471 margin-left: 0; 2472 } 2473 2474 .page .submenu li { 2475 border-bottom: 1px solid #dedede; 2476 font-size: 12px; 2477 line-height: 18px; 2478 padding: 5px 0; 2479 } 2480 2481 .page .submenu li.current { 2482 font-weight: bold; 2483 } 2484 2485 .page .submenu li:last-child { 2486 border-bottom: 0; 2487 } 2488 2489 .page .submenu li ul { 2490 margin-left: 16px; 2491 } 2492 2493 .page .submenu li ul li { 2494 border: none; 2495 line-height: 1.4em; 2496 padding-bottom: 2px; 2497 } 2498 2499 .page-template-page-full-width .entry-header .entry-title, 2500 .page-template-page-full-width .entry-content section .container { 2501 max-width: 100%; 2502 padding: 0; 2503 } 2504 2521 2505 /*-------------------------------------------------------------- 2522 2506 # 404 Error page 2523 2507 --------------------------------------------------------------*/ … … 2592 2576 } 2593 2577 } 2594 2578 2579 .bbpress main#main .entry-content, 2580 .bbpress main#main .entry-meta, 2581 .page-template-page-forums-sidebar main#main .entry-content, 2582 .page-template-page-forums-sidebar main#main .entry-meta { 2583 padding: 0; 2584 } 2585 2586 @media (min-width: 568px) { 2587 .bbpress main#main .entry-content, 2588 .bbpress main#main .entry-meta, 2589 .page-template-page-forums-sidebar main#main .entry-content, 2590 .page-template-page-forums-sidebar main#main .entry-meta { 2591 padding: 0 1.5625rem; 2592 } 2593 } 2594 2595 .bbpress main#main .entry-header .entry-title, 2596 .bbpress main#main .entry-content .container, 2597 .page-template-page-forums-sidebar main#main .entry-header .entry-title, 2598 .page-template-page-forums-sidebar main#main .entry-content .container { 2599 padding: 0; 2600 } 2601 2602 .bbpress main#main > .entry-content, 2603 .bbpress main#main > article, 2604 .page-template-page-forums-sidebar main#main > .entry-content, 2605 .page-template-page-forums-sidebar main#main > article { 2606 max-width: 48rem; 2607 } 2608 2609 @media screen and (min-width: 48em) { 2610 .bbpress main#main > .entry-content, 2611 .bbpress main#main > article, 2612 .page-template-page-forums-sidebar main#main > .entry-content, 2613 .page-template-page-forums-sidebar main#main > article { 2614 float: left; 2615 padding: 0; 2616 width: 65%; 2617 } 2618 } 2619 2620 @media screen and (min-width: 48em) { 2621 .bbpress main#main .entry-content, 2622 .bbpress main#main .entry-meta, 2623 .page-template-page-forums-sidebar main#main .entry-content, 2624 .page-template-page-forums-sidebar main#main .entry-meta { 2625 padding-left: 0; 2626 padding-right: 0; 2627 } 2628 .bbpress main#main .entry-meta, 2629 .page-template-page-forums-sidebar main#main .entry-meta { 2630 float: right; 2631 width: 30%; 2632 } 2633 } 2634 2635 .bbpress main#main { 2636 margin-top: 2rem; 2637 padding: 0 10px 10px; 2638 } 2639 2595 2640 .bbpress #bbpress-forums div.bbp-template-notice { 2596 2641 padding: .5rem; 2597 2642 border: none; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/template-parts/content-page.php
1 <?php 2 /** 3 * Template part for displaying page content in page.php. 4 * 5 * @link https://codex.wordpress.org/Template_Hierarchy 6 * 7 * @package WPBBP 8 */ 9 10 ?> 11 12 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 13 <?php if ( is_page_template( 'page-forums-sidebar.php' ) ) : ?> 14 <?php bbp_breadcrumb(); ?> 15 <?php endif; ?> 16 17 <header class="entry-header"> 18 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 19 </header><!-- .entry-header --> 20 21 <div class="entry-content"> 22 <section> 23 <div class="container"> 24 <?php 25 the_content(); 26 27 wp_link_pages( array( 28 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'wporg-plugins' ), 29 'after' => '</div>', 30 ) ); 31 ?> 32 </div> 33 </section> 34 </div><!-- .entry-content --> 35 36 <footer class="entry-footer"> 37 <?php 38 edit_post_link( 39 sprintf( 40 /* translators: %s: Name of current post */ 41 esc_html__( 'Edit %s', 'wporg-plugins' ), 42 the_title( '<span class="screen-reader-text">"', '"</span>', false ) 43 ), 44 '<span class="edit-link">', 45 '</span>' 46 ); 47 ?> 48 </footer><!-- .entry-footer --> 49 </article><!-- #post-## --> 50 No newline at end of file