Changeset 24720
- Timestamp:
- 07/17/2013 04:51:06 AM (12 years ago)
- Location:
- trunk/wp-content/themes/twentythirteen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentythirteen/functions.php
r24682 r24720 502 502 503 503 /** 504 * Sets the image size in featured galleries to large.505 *506 * @since Twenty Thirteen 1.0507 *508 * @param array $atts Combined and filtered attribute list.509 * @return array The filtered attribute list.510 */511 function twentythirteen_gallery_atts( $atts ) {512 if ( has_post_format( 'gallery' ) && ! is_single() )513 $atts['size'] = wp_is_mobile() ? 'thumbnail' : 'medium';514 515 return $atts;516 }517 add_filter( 'shortcode_atts_gallery', 'twentythirteen_gallery_atts' );518 519 /**520 504 * Extends the default WordPress body classes. 521 505 * -
trunk/wp-content/themes/twentythirteen/rtl.css
r24536 r24720 262 262 } 263 263 264 .blog .format-gallery .gallery-item,265 .archive .format-gallery .gallery-item,266 .search .format-gallery .gallery-item {267 margin-left: 4px;268 margin-right: auto;269 }270 .blog .format-gallery .gallery-item img,271 .archive .format-gallery .gallery-item img,272 .search .format-gallery .gallery-item img {273 position: absolute;274 left: 0;275 }276 277 264 .format-image .wp-caption-text { 278 265 text-align: right; … … 727 714 } 728 715 729 . single .gallery-columns-3 .gallery-item:nth-of-type(3n) {716 .gallery-columns-3 .gallery-item:nth-of-type(3n) { 730 717 margin-left: 4px; 731 718 margin-right: auto; … … 739 726 } 740 727 728 .gallery .gallery-item:nth-of-type(even) { 729 margin-left: 0; 730 margin-right: auto; 731 } 732 741 733 .gallery .gallery-item, 742 .single .gallery-columns-2.gallery-size-thumbnail .gallery-item, 743 .blog .format-gallery .gallery-item, 744 .archive .format-gallery .gallery-item, 745 .search .format-gallery .gallery-item, 746 .single .gallery.gallery-columns-3 .gallery-item:nth-of-type(even), 734 .gallery.gallery-columns-3 .gallery-item:nth-of-type(even), 747 735 .gallery-columns-3 .gallery-item:nth-of-type(3n), 748 736 .gallery-columns-5 .gallery-item:nth-of-type(5n), … … 753 741 } 754 742 755 .blog .format-gallery .gallery-item:nth-of-type(odd),756 .archive .format-gallery .gallery-item:nth-of-type(odd),757 .search .format-gallery .gallery-item:nth-of-type(odd),758 .single .gallery .gallery-item:nth-of-type(even) {759 margin-left: 0;760 margin-right: auto;761 }762 763 743 .comment-author .avatar { 764 744 margin-left: 5px; -
trunk/wp-content/themes/twentythirteen/style.css
r24657 r24720 1233 1233 } 1234 1234 1235 .gallery-columns-1 .gallery-item { 1236 max-width: 100%; 1237 } 1238 1239 .gallery-columns-2 .gallery-item { 1240 max-width: 48%; 1241 max-width: -webkit-calc(50% - 4px); 1242 max-width: calc(50% - 4px); 1243 text-align: center; 1244 } 1245 1235 .gallery-columns-1 .gallery-item, 1236 .gallery-columns-2 .gallery-item, 1246 1237 .gallery-columns-3 .gallery-item { 1247 max-width: 31%;1248 max-width: -webkit-calc(33.3% - 4px);1249 max-width: calc(33.3% - 4px);1250 1238 text-align: center; 1251 1239 } … … 1480 1468 .format-gallery .entry-content a { 1481 1469 color: #722d19; 1482 }1483 1484 /* Blog gallery */1485 .blog .format-gallery .gallery,1486 .archive .format-gallery .gallery,1487 .search .format-gallery .gallery {1488 margin-bottom: 20px;1489 margin-left: -4px;1490 max-width: 608px;1491 }1492 1493 .blog .format-gallery .gallery-item,1494 .archive .format-gallery .gallery-item,1495 .search .format-gallery .gallery-item {1496 display: block;1497 height: 148px;1498 margin-right: 4px;1499 max-height: 100%;1500 max-width: 100%;1501 overflow: hidden;1502 width: 148px;1503 }1504 1505 .blog .format-gallery .gallery-item img,1506 .archive .format-gallery .gallery-item img,1507 .search .format-gallery .gallery-item img {1508 height: 100%;1509 max-height: 148px;1510 max-width: none;1511 width: auto;1512 }1513 1514 .blog .format-gallery .gallery-item .portrait img,1515 .archive .format-gallery .gallery-item .portrait img,1516 .search .format-gallery .gallery-item .portrait img {1517 height: auto;1518 max-height: none;1519 max-width: 148px;1520 width: 100%;1521 }1522 1523 .blog .format-gallery .gallery-item:first-child,1524 .archive .format-gallery .gallery-item:first-child,1525 .search .format-gallery .gallery-item:first-child {1526 height: 300px;1527 width: 300px;1528 }1529 1530 .blog .format-gallery .gallery-item:first-child img,1531 .archive .format-gallery .gallery-item:first-child img,1532 .search .format-gallery .gallery-item:first-child img {1533 max-height: 300px;1534 }1535 1536 .blog .format-gallery .gallery-item:first-child .portrait img,1537 .archive .format-gallery .gallery-item:first-child .portrait img,1538 .search .format-gallery .gallery-item:first-child .portrait img {1539 max-height: none;1540 max-width: 300px;1541 }1542 1543 .blog .format-gallery .gallery-item .gallery-icon,1544 .archive .format-gallery .gallery-item .gallery-icon,1545 .search .format-gallery .gallery-item .gallery-icon {1546 height: 100%;1547 -webkit-transform: translate(50%, 50%);1548 -ms-transform: translate(50%, 50%);1549 transform: translate(50%, 50%);1550 width: 100%;1551 }1552 1553 .blog .format-gallery .gallery-item .gallery-icon img,1554 .archive .format-gallery .gallery-item .gallery-icon img,1555 .search .format-gallery .gallery-item .gallery-icon img {1556 -webkit-transform: translate(-50%, -50%);1557 -ms-transform: translate(-50%, -50%);1558 transform: translate(-50%, -50%);1559 }1560 1561 .blog .format-gallery .gallery br,1562 .archive .format-gallery .gallery br,1563 .search .format-gallery .gallery br {1564 display: none;1565 1470 } 1566 1471 … … 3013 2918 3014 2919 .gallery .gallery-item, 3015 .single .gallery-columns-2.gallery-size-thumbnail .gallery-item, 3016 .blog .format-gallery .gallery-item, 3017 .archive .format-gallery .gallery-item, 3018 .search .format-gallery .gallery-item { 2920 .gallery-columns-2.gallery-size-thumbnail .gallery-item { 3019 2921 max-width: none; 3020 2922 width: 49%; … … 3023 2925 } 3024 2926 3025 . single .gallery-columns-1.gallery-size-medium,3026 . single .gallery-columns-1.gallery-size-thumbnail,3027 . single .gallery-columns-2.gallery-size-thumbnail,3028 . single .gallery-columns-3.gallery-size-thumbnail {2927 .gallery-columns-1.gallery-size-medium, 2928 .gallery-columns-1.gallery-size-thumbnail, 2929 .gallery-columns-2.gallery-size-thumbnail, 2930 .gallery-columns-3.gallery-size-thumbnail { 3029 2931 display: block; 3030 2932 } 3031 2933 3032 2934 .gallery-columns-1 .gallery-item, 3033 .single .gallery-columns-1.gallery-size-medium .gallery-item, 3034 .single .gallery-columns-1.gallery-size-thumbnail .gallery-item, 3035 .blog .format-gallery .gallery-item:first-child, 3036 .archive .format-gallery .gallery-item:first-child, 3037 .search .format-gallery .gallery-item:first-child { 2935 .gallery-columns-1.gallery-size-medium .gallery-item, 2936 .gallery-columns-1.gallery-size-thumbnail .gallery-item { 3038 2937 text-align: center; 3039 2938 width: 98%; … … 3053 2952 } 3054 2953 3055 .blog .format-gallery .gallery-item:nth-of-type(odd), 3056 .archive .format-gallery .gallery-item:nth-of-type(odd), 3057 .search .format-gallery .gallery-item:nth-of-type(odd), 3058 .single .gallery .gallery-item:nth-of-type(even) { 2954 .gallery .gallery-item:nth-of-type(even) { 3059 2955 margin-right: 0; 3060 2956 }
Note: See TracChangeset
for help on using the changeset viewer.