Changeset 21398
- Timestamp:
- 08/01/2012 06:52:20 PM (13 years ago)
- Location:
- trunk/wp-content/themes/twentytwelve
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21395 r21398 116 116 wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" ); 117 117 } 118 118 119 119 /** 120 120 * Load our main CSS file. … … 339 339 * 1. Using a full-width layout, when no active widgets in the sidebar 340 340 * or full-width template. 341 * 2. White or empty background color to change the layout and spacing. 341 * 2. A thumbnail in the Homepage page template. 342 * 3. White or empty background color to change the layout and spacing. 342 343 * 343 344 * @since Twenty Twelve 1.0 … … 348 349 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width-page.php' ) ) 349 350 $classes[] = 'full-width'; 351 352 if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() ) 353 $classes[] = 'has-post-thumbnail'; 350 354 351 355 if ( empty( $background_color ) ) -
trunk/wp-content/themes/twentytwelve/homepage.php
r21261 r21398 13 13 <div id="content" role="main"> 14 14 15 <div class="home-top"> 16 <?php while ( have_posts() ) : the_post(); ?> 17 <?php if ( has_post_thumbnail() ) { ?> 18 <div class="entry-page-image"> 19 <?php the_post_thumbnail(); ?> 20 </div> 21 <?php } ?> 22 <section class="home-content<?php echo ( has_post_thumbnail() ) ? ' thumbnail' : ''; ?>"> 23 <div class="entry-content"> 24 <header class="entry-header"> 25 <h1 class="entry-title"><?php the_title(); ?></h1> 26 </header><!-- .entry-header --> 27 <?php the_content(); ?> 28 </div><!-- .entry-content --> 29 </section> 30 <?php endwhile; // end of the loop. ?> 31 </div><!-- .home-top --> 15 <?php while ( have_posts() ) : the_post(); ?> 16 <?php if ( has_post_thumbnail() ) { ?> 17 <div class="entry-page-image"> 18 <?php the_post_thumbnail(); ?> 19 </div> 20 <?php } ?> 21 22 <?php get_template_part( 'content', 'page' ); ?> 23 24 <?php endwhile; // end of the loop. ?> 32 25 33 26 </div><!-- #content --> -
trunk/wp-content/themes/twentytwelve/style.css
r21397 r21398 1319 1319 -------------------------------------------------------------- */ 1320 1320 1321 .page-template-homepage-php #content article { 1322 border: 0; 1323 margin-bottom: 0; 1324 } 1321 1325 @media screen and (min-width: 600px) { 1322 div.home-top,1323 div.home-middle {1326 .page-template-homepage-php #content, 1327 .page-template-homepage-php article { 1324 1328 overflow: hidden; 1325 1329 } 1326 } 1327 div.home-top { 1328 margin-bottom: 24px; 1329 margin-bottom: 1.714285714rem; 1330 } 1331 @media screen and (min-width: 600px) { 1332 section.home-content { 1333 overflow: hidden; 1334 } 1335 section.home-content h1.entry-title { 1336 margin: 0 0 24px; 1337 margin: 0 0 1.714285714rem; 1338 } 1339 section.home-content.thumbnail { 1330 .page-template-homepage-php.has-post-thumbnail article { 1340 1331 float: left; 1341 1332 width: 47.916666667%; 1342 1333 } 1343 }1344 @media screen and (min-width: 600px) {1345 1334 .entry-page-image { 1346 1335 float: right; 1347 1336 width: 47.916666667%; 1348 margin-bottom: 24px;1349 margin-bottom: 1.714285714rem;1350 }1351 }1352 @media screen and (min-width: 600px) {1353 .page-template-homepage-php #content {1354 overflow: hidden;1355 1337 } 1356 1338 }
Note: See TracChangeset
for help on using the changeset viewer.