Ticket #21245: 21245.diff
File 21245.diff, 4.3 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentytwelve/style.css
1319 1319 -------------------------------------------------------------- */ 1320 1320 1321 1321 @media screen and (min-width: 600px) { 1322 div.home-top,1323 div.home-middle {1322 .page-template-homepage-php #content, 1323 .page-template-homepage-php article { 1324 1324 zoom: 1; 1325 1325 } 1326 div.home-top:before,1327 div.home-top:after,1328 div.home-middle:before,1329 div.home-middle:after {1326 .page-template-homepage-php #content:before, 1327 .page-template-homepage-php #content:after, 1328 .page-template-homepage-php article:before, 1329 .page-template-homepage-php article:after { 1330 1330 display: table; 1331 1331 content: ""; 1332 1332 } 1333 div.home-top:after,1334 div.home-middle:after {1333 .page-template-homepage-php #content:after, 1334 .page-template-homepage-php article:after { 1335 1335 clear: both; 1336 1336 } 1337 1337 } 1338 div.home-top{1339 margin-bottom: 24px;1340 margin -bottom: 1.714285714rem;1338 .page-template-homepage-php #content article { 1339 border: 0 none; 1340 margin: 0; 1341 1341 } 1342 1342 @media screen and (min-width: 600px) { 1343 section.home-content { 1344 zoom: 1; 1345 } 1346 section.home-content:before, 1347 section.home-content:after { 1348 display: table; 1349 content: ""; 1350 } 1351 section.home-content:after { 1352 clear: both; 1353 } 1354 section.home-content h1.entry-title { 1355 margin: 0 0 24px; 1356 margin: 0 0 1.714285714rem; 1357 } 1358 section.home-content.thumbnail { 1343 .page-template-homepage-php.has-thumbnail article { 1359 1344 float: left; 1360 1345 width: 47.916666667%; 1361 1346 } 1362 }1363 @media screen and (min-width: 600px) {1364 1347 .entry-page-image { 1365 1348 float: right; 1366 1349 width: 47.916666667%; 1367 margin-bottom: 24px;1368 margin-bottom: 1.714285714rem;1369 1350 } 1370 1351 } 1371 @media screen and (min-width: 600px) { 1372 .page-template-homepage-php #content { 1373 zoom: 1; 1374 } 1375 .page-template-homepage-php #content:before, 1376 .page-template-homepage-php #content:after { 1377 display: table; 1378 content: ""; 1379 } 1380 .page-template-homepage-php #content:after { 1381 clear: both; 1382 } 1352 .entry-page-image { 1353 margin-bottom: 24px; 1354 margin-bottom: 1.714285714rem; 1383 1355 } 1384 1356 .page-template-homepage-php #secondary { 1385 1357 clear: both; -
wp-content/themes/twentytwelve/functions.php
300 300 endif; 301 301 302 302 /** 303 * Extends the default WordPress body class to denote a full-width layout. 304 * 305 * Used in two cases: no active widgets in sidebar, and full-width page template. 303 * Extends the default WordPress body class to denote a thumbnail in the 304 * Homepage page template. 306 305 * 307 306 * @since Twenty Twelve 1.0 308 307 */ 309 308 function twentytwelve_body_class( $classes ) { 310 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width') )311 $classes[] = ' full-width';309 if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() ) 310 $classes[] = 'has-thumbnail'; 312 311 313 312 return $classes; 314 313 } -
wp-content/themes/twentytwelve/homepage.php
12 12 <div id="primary"> 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 } ?> 32 21 22 <?php get_template_part( 'content', 'page' ); ?> 23 24 <?php endwhile; // end of the loop. ?> 25 33 26 </div><!-- #content --> 34 27 </div><!-- #primary --> 35 28