Changeset 39078
- Timestamp:
- 11/01/2016 08:39:54 PM (8 years ago)
- Location:
- trunk/src/wp-content/themes/twentyseventeen
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/inc/customizer.php
r38986 r39078 80 80 'section' => 'theme_options', 81 81 'type' => 'radio', 82 'description' => __( 'When no sidebar widgets are assigned, you can opt to display all pages with a one column or two column layout. Whenthe two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),82 'description' => __( 'When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), 83 83 'choices' => array( 84 84 'one-column' => __( 'One Column', 'twentyseventeen' ), 85 85 'two-column' => __( 'Two Column', 'twentyseventeen' ), 86 86 ), 87 'active_callback' => 'twentyseventeen_is_ page_without_sidebar',87 'active_callback' => 'twentyseventeen_is_view_with_layout_option', 88 88 ) ); 89 89 … … 185 185 186 186 /** 187 * Return whether we're previewing a page and there are no widgets in the sidebar. 188 */ 189 function twentyseventeen_is_page_without_sidebar() { 190 return ( is_page() && ! is_active_sidebar( 'sidebar-1' ) ); 187 * Return whether we're on a view that supports a one or two column layout. 188 */ 189 function twentyseventeen_is_view_with_layout_option() { 190 // This option is available on all pages. It's also available on archives when there isn't a sidebar. 191 return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) ); 191 192 } 192 193 -
trunk/src/wp-content/themes/twentyseventeen/inc/template-functions.php
r38986 r39078 46 46 47 47 // Add class for one or two column page layouts. 48 if ( is_page() ) {48 if ( is_page() || is_archive() ) { 49 49 if ( 'one-column' === get_theme_mod( 'page_layout' ) ) { 50 50 $classes[] = 'page-one-column'; -
trunk/src/wp-content/themes/twentyseventeen/rtl.css
r39072 r39078 382 382 } 383 383 384 body:not(.has-sidebar) .page-header,384 body:not(.has-sidebar):not(.page-one-column) .page-header, 385 385 body.has-sidebar.error404 #primary .page-header, 386 body.page-two-column #primary .entry-header { 386 body.page-two-column:not(.archive) #primary .entry-header, 387 body.page-two-column.archive:not(.has-sidebar) #primary .page-header { 387 388 float: right; 388 389 } 389 390 390 391 .blog:not(.has-sidebar) #primary article, 391 .archive:not(.has-sidebar) #primary article,392 .archive:not(.has-sidebar):not(.page-one-column) #primary article, 392 393 .search:not(.has-sidebar) #primary article, 393 394 .has-sidebar.error404 #primary .page-content, 394 395 .error404.has-sidebar #primary .page-content, 395 body.page-two-column #primary .entry-content,396 body.page-two-column:not(.archive) #primary .entry-content, 396 397 body.page-two-column #comments { 397 398 float: left; … … 452 453 } 453 454 454 .has-sidebar .navigation.pagination { 455 .has-sidebar .navigation.pagination, 456 .archive.page-one-column:not(.has-sidebar) .navigation.pagination { 455 457 float: none; 456 458 } -
trunk/src/wp-content/themes/twentyseventeen/style.css
r39072 r39078 2024 2024 2025 2025 .single-post:not(.has-sidebar) #primary, 2026 .page.page-one-column:not(.twentyseventeen-front-page) #primary { 2026 .page.page-one-column:not(.twentyseventeen-front-page) #primary, 2027 .archive.page-one-column:not(.has-sidebar) .page-header, 2028 .archive.page-one-column:not(.has-sidebar) #primary { 2027 2029 margin-left: auto; 2028 2030 margin-right: auto; … … 3665 3667 } 3666 3668 3667 body:not(.has-sidebar) .page-header,3669 body:not(.has-sidebar):not(.page-one-column) .page-header, 3668 3670 body.has-sidebar.error404 #primary .page-header, 3669 body.page-two-column #primary .entry-header { 3671 body.page-two-column:not(.archive) #primary .entry-header, 3672 body.page-two-column.archive:not(.has-sidebar) #primary .page-header { 3670 3673 float: left; 3671 3674 width: 36%; … … 3673 3676 3674 3677 .blog:not(.has-sidebar) #primary article, 3675 .archive:not(. has-sidebar) #primary article,3678 .archive:not(.page-one-column):not(.has-sidebar) #primary article, 3676 3679 .search:not(.has-sidebar) #primary article, 3677 3680 .error404:not(.has-sidebar) #primary .page-content, 3678 3681 .error404.has-sidebar #primary .page-content, 3679 body.page-two-column #primary .entry-content,3682 body.page-two-column:not(.archive) #primary .entry-content, 3680 3683 body.page-two-column #comments { 3681 3684 float: right; … … 3695 3698 } 3696 3699 3697 .has-sidebar .navigation.pagination { 3700 .has-sidebar .navigation.pagination, 3701 .archive.page-one-column:not(.has-sidebar) .navigation.pagination { 3698 3702 float: none; 3699 3703 width: 100%; … … 3779 3783 /* Pages */ 3780 3784 3781 .page-one-column .entry-header { 3785 .page.page-one-column .entry-header, 3786 .twentyseventeen-front-page.page-one-column .entry-header, 3787 .archive.page-one-column:not(.has-sidebar) .page-header { 3782 3788 margin-bottom: 4em; 3783 3789 }
Note: See TracChangeset
for help on using the changeset viewer.