Changeset 21975
- Timestamp:
- 09/24/2012 04:57:42 PM (12 years ago)
- Location:
- trunk/wp-content/themes/twentytwelve
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21929 r21975 216 216 } 217 217 add_action( 'widgets_init', 'twentytwelve_widgets_init' ); 218 219 /**220 * Counts the number of footer sidebars to enable dynamic classes for the footer.221 *222 * @since Twenty Twelve 1.0223 */224 function twentytwelve_frontpage_sidebar_class() {225 $classes = array( 'widget-area' );226 227 if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )228 $classes[] = 'two';229 230 echo 'class="' . implode( ' ', $classes ) . '"';231 }232 218 233 219 if ( ! function_exists( 'twentytwelve_content_nav' ) ) : … … 365 351 * 1. Using a full-width layout, when no active widgets in the sidebar 366 352 * or full-width template. 367 * 2. A thumbnail in the Front Page template. 353 * 2. Front Page template: thumbnail in use and number of sidebars for 354 * widget areas. 368 355 * 3. White or empty background color to change the layout and spacing. 356 * 4. Custom fonts enabled. 357 * 5. Single or multiple authors. 369 358 * 370 359 * @since Twenty Twelve 1.0 … … 383 372 if ( has_post_thumbnail() ) 384 373 $classes[] = 'has-post-thumbnail'; 374 if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) 375 $classes[] = 'two-sidebars'; 385 376 } 386 377 -
trunk/wp-content/themes/twentytwelve/rtl.css
r21941 r21975 200 200 } 201 201 .template-front-page .widget-area .widget, 202 .template-front-page .widget-area.two.front-widgets {202 .template-front-page.two-sidebars .widget-area .front-widgets { 203 203 float: right; 204 204 } … … 207 207 } 208 208 .template-front-page .widget-area .widget:nth-child(even), 209 .template-front-page .widget-area.two.front-widgets + .front-widgets {209 .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { 210 210 float: left; 211 211 margin: 0 24px 0; -
trunk/wp-content/themes/twentytwelve/sidebar-front.php
r21886 r21975 21 21 // If we get this far, we have widgets. Let do this. 22 22 ?> 23 <div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?>role="complementary">23 <div id="secondary" class="widget-area" role="complementary"> 24 24 <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> 25 25 <div class="first front-widgets"> -
trunk/wp-content/themes/twentytwelve/style.css
r21941 r21975 1475 1475 } 1476 1476 .template-front-page .widget-area .widget, 1477 .template-front-page .widget-area.two.front-widgets {1477 .template-front-page.two-sidebars .widget-area .front-widgets { 1478 1478 float: left; 1479 1479 width: 51.875%; … … 1485 1485 } 1486 1486 .template-front-page .widget-area .widget:nth-child(even), 1487 .template-front-page .widget-area.two.front-widgets + .front-widgets {1487 .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { 1488 1488 float: right; 1489 1489 width: 39.0625%; … … 1491 1491 margin: 0 0 1.714285714rem; 1492 1492 } 1493 .template-front-page .widget-area.two.widget,1494 .template-front-page .widget-area.two.widget:nth-child(even) {1493 .template-front-page.two-sidebars .widget, 1494 .template-front-page.two-sidebars .widget:nth-child(even) { 1495 1495 float: none; 1496 1496 width: auto;
Note: See TracChangeset
for help on using the changeset viewer.