Changeset 21886
- Timestamp:
- 09/18/2012 05:28:36 PM (12 years ago)
- Location:
- trunk/wp-content/themes/twentytwelve
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21882 r21886 180 180 181 181 /** 182 * Registers our main widget area and the homepage widget areas.182 * Registers our main widget area and the front page widget areas. 183 183 * 184 184 * @since Twenty Twelve 1.0 … … 188 188 'name' => __( 'Main Sidebar', 'twentytwelve' ), 189 189 'id' => 'sidebar-1', 190 'description' => __( 'Appears on posts and pages except the optional Homepage template, which has its own widgets', 'twentytwelve' ),190 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ), 191 191 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 192 192 'after_widget' => '</aside>', … … 196 196 197 197 register_sidebar( array( 198 'name' => __( 'First Homepage Widget Area', 'twentytwelve' ),198 'name' => __( 'First Front Page Widget Area', 'twentytwelve' ), 199 199 'id' => 'sidebar-2', 200 'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),200 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), 201 201 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 202 202 'after_widget' => '</aside>', … … 206 206 207 207 register_sidebar( array( 208 'name' => __( 'Second Homepage Widget Area', 'twentytwelve' ),208 'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ), 209 209 'id' => 'sidebar-3', 210 'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),210 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), 211 211 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 212 212 'after_widget' => '</aside>', … … 222 222 * @since Twenty Twelve 1.0 223 223 */ 224 function twentytwelve_ homepage_sidebar_class() {224 function twentytwelve_frontpage_sidebar_class() { 225 225 $classes = array( 'widget-area' ); 226 226 … … 365 365 * 1. Using a full-width layout, when no active widgets in the sidebar 366 366 * or full-width template. 367 * 2. A thumbnail in the Homepage page template.367 * 2. A thumbnail in the Front Page template. 368 368 * 3. White or empty background color to change the layout and spacing. 369 369 * … … 379 379 $classes[] = 'full-width'; 380 380 381 if ( is_page_template( 'page-templates/ home.php' ) ) {382 $classes[] = 'template- home';381 if ( is_page_template( 'page-templates/front-page.php' ) ) { 382 $classes[] = 'template-front-page'; 383 383 if ( has_post_thumbnail() ) 384 384 $classes[] = 'has-post-thumbnail'; -
trunk/wp-content/themes/twentytwelve/page-templates/front-page.php
r21884 r21886 1 1 <?php 2 2 /** 3 * Template Name: Homepage Template3 * Template Name: Front Page Template 4 4 * 5 5 * @todo Better documentation here. … … 29 29 </div><!-- #primary --> 30 30 31 <?php get_sidebar( ' home' ); ?>31 <?php get_sidebar( 'front' ); ?> 32 32 <?php get_footer(); ?> -
trunk/wp-content/themes/twentytwelve/rtl.css
r21726 r21886 147 147 148 148 149 /* = Homepage template styling150 -------------------------------------------------------------- */ 151 152 .template- home .widget-area .widget_text img {149 /* =Front page template styling 150 -------------------------------------------------------------- */ 151 152 .template-front-page .widget-area .widget_text img { 153 153 float: right; 154 154 margin: 8px 0 8px 24px; … … 189 189 @media screen and (min-width: 600px) { 190 190 .site-content, 191 .template- home.has-post-thumbnail article {191 .template-front-page.has-post-thumbnail article { 192 192 float: right; 193 193 } … … 200 200 text-align: right; 201 201 } 202 .template- home .widget-area .widget_text img {202 .template-front-page .widget-area .widget_text img { 203 203 float: right; 204 204 margin: 8px 0 8px 24px; 205 205 } 206 .template- home .widget-area .widget,207 .template- home .widget-area.two .home-widgets {206 .template-front-page .widget-area .widget, 207 .template-front-page .widget-area.two .front-widgets { 208 208 float: right; 209 209 } 210 .template- home .widget-area .widget:nth-child(odd) {210 .template-front-page .widget-area .widget:nth-child(odd) { 211 211 clear: left; 212 212 } 213 .template- home .widget-area .widget:nth-child(even),214 .template- home .widget-area.two .home-widgets + .home-widgets {213 .template-front-page .widget-area .widget:nth-child(even), 214 .template-front-page .widget-area.two .front-widgets + .front-widgets { 215 215 float: left; 216 216 margin: 0 24px 0; -
trunk/wp-content/themes/twentytwelve/sidebar-front.php
r21884 r21886 1 1 <?php 2 2 /** 3 * The sidebar containing the homepage widget areas.3 * The sidebar containing the front page widget areas. 4 4 * 5 5 * If no active widgets in either sidebar, they will be hidden completely. … … 11 11 12 12 /* 13 * The homepage widget area is triggered if any of the areas13 * The front page widget area is triggered if any of the areas 14 14 * have widgets. So let's check that first. 15 15 * … … 21 21 // If we get this far, we have widgets. Let do this. 22 22 ?> 23 <div id="secondary" <?php twentytwelve_ homepage_sidebar_class(); ?> role="complementary">23 <div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?> role="complementary"> 24 24 <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> 25 <div class="first home-widgets">25 <div class="first front-widgets"> 26 26 <?php dynamic_sidebar( 'sidebar-2' ); ?> 27 27 </div><!-- .first --> … … 29 29 30 30 <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> 31 <div class="second home-widgets">31 <div class="second front-widgets"> 32 32 <?php dynamic_sidebar( 'sidebar-3' ); ?> 33 33 </div><!-- .second --> -
trunk/wp-content/themes/twentytwelve/style.css
r21761 r21886 4 4 Author: the WordPress team 5 5 Author URI: http://wordpress.org/ 6 Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a homepage template with a its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background.6 Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front-page template with a its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background. 7 7 Version: 0.9 8 8 License: GNU General Public License v2 or later … … 1205 1205 1206 1206 1207 /* = Homepage template1207 /* =Front page template 1208 1208 -------------------------------------------------------------- */ 1209 1209 … … 1212 1212 margin-bottom: 1rem; 1213 1213 } 1214 .template- home .site-content article {1214 .template-front-page .site-content article { 1215 1215 border: 0; 1216 1216 margin-bottom: 0; 1217 1217 } 1218 .template- home .widget-area {1218 .template-front-page .widget-area { 1219 1219 clear: both; 1220 1220 float: none; … … 1224 1224 border-top: 1px solid #ededed; 1225 1225 } 1226 .template- home .widget-area .widget li {1226 .template-front-page .widget-area .widget li { 1227 1227 margin: 8px 0 0; 1228 1228 margin: 0.571428571rem 0 0; … … 1233 1233 list-style-position: inside; 1234 1234 } 1235 .template- home .widget-area .widget li a {1235 .template-front-page .widget-area .widget li a { 1236 1236 color: #777; 1237 1237 } 1238 .template- home .widget-area .widget li a:hover {1238 .template-front-page .widget-area .widget li a:hover { 1239 1239 color: #21759b; 1240 1240 } 1241 .template- home .widget-area .widget_text img {1241 .template-front-page .widget-area .widget_text img { 1242 1242 float: left; 1243 1243 margin: 8px 24px 8px 0; … … 1332 1332 width: 65.104166667%; 1333 1333 } 1334 body.template- home .site-content,1334 body.template-front-page .site-content, 1335 1335 body.single-attachment .site-content, 1336 1336 body.full-width .site-content { … … 1435 1435 width: 79.666666667%; 1436 1436 } 1437 .template- home .site-content,1438 .template- home article {1437 .template-front-page .site-content, 1438 .template-front-page article { 1439 1439 overflow: hidden; 1440 1440 } 1441 .template- home.has-post-thumbnail article {1441 .template-front-page.has-post-thumbnail article { 1442 1442 float: left; 1443 1443 width: 47.916666667%; … … 1448 1448 width: 47.916666667%; 1449 1449 } 1450 .template- home .widget-area .widget,1451 .template- home .widget-area.two .home-widgets {1450 .template-front-page .widget-area .widget, 1451 .template-front-page .widget-area.two .front-widgets { 1452 1452 float: left; 1453 1453 width: 51.875%; … … 1455 1455 margin-bottom: 1.714285714rem; 1456 1456 } 1457 .template- home .widget-area .widget:nth-child(odd) {1457 .template-front-page .widget-area .widget:nth-child(odd) { 1458 1458 clear: right; 1459 1459 } 1460 .template- home .widget-area .widget:nth-child(even),1461 .template- home .widget-area.two .home-widgets + .home-widgets {1460 .template-front-page .widget-area .widget:nth-child(even), 1461 .template-front-page .widget-area.two .front-widgets + .front-widgets { 1462 1462 float: right; 1463 1463 width: 39.0625%; … … 1465 1465 margin: 0 0 1.714285714rem; 1466 1466 } 1467 .template- home .widget-area.two .widget,1468 .template- home .widget-area.two .widget:nth-child(even) {1467 .template-front-page .widget-area.two .widget, 1468 .template-front-page .widget-area.two .widget:nth-child(even) { 1469 1469 float: none; 1470 1470 width: auto;
Note: See TracChangeset
for help on using the changeset viewer.