Ticket #38995: 38995.patch
| File 38995.patch, 14.7 KB (added by , 10 years ago) |
|---|
-
src/wp-content/themes/twentyseventeen/assets/css/ie9.css
4 4 */ 5 5 6 6 .has-header-image.twentyseventeen-front-page .custom-header, 7 .has-header-image.home.blog .custom-header { 7 .header-video-loaded.twentyseventeen-front-page .custom-header, 8 .has-header-image.home.blog .custom-header, 9 .header-video-loaded.home.blog .custom-header { 8 10 height: 300px; 9 11 } 10 12 11 13 .has-header-image .custom-header-image img, 12 .h as-header-image.custom-header-image video,13 .h as-header-image.custom-header-image iframe {14 .header-video-loaded .custom-header-image video, 15 .header-video-loaded .custom-header-image iframe { 14 16 min-width: 100%; 15 17 } 16 18 … … 17 19 @media screen and (min-width: 30em) { 18 20 19 21 .has-header-image.twentyseventeen-front-page .custom-header, 22 .header-video-loaded.twentyseventeen-front-page .custom-header, 20 23 .has-header-image.home.blog .custom-header, 24 .header-video-loaded.home.blog .custom-header, 21 25 .twentyseventeen-front-page.has-header-image .custom-header-image, 26 .twentyseventeen-front-page.header-video-loaded .custom-header-image, 22 27 .home.blog.has-header-image .custom-header-image, 28 .home.blog.header-video-loaded .custom-header-image, 23 29 .panel-image { 24 30 height: 700px; 25 31 } … … 28 34 @media screen and (min-width: 48em) { 29 35 30 36 .has-header-image.twentyseventeen-front-page .custom-header, 37 .header-video-loaded.twentyseventeen-front-page .custom-header, 31 38 .has-header-image.home.blog .custom-header, 39 .header-video-loaded.home.blog .custom-header, 32 40 .twentyseventeen-front-page.has-header-image .custom-header-image, 41 .twentyseventeen-front-page.header-video-loaded .custom-header-image, 33 42 .home.blog.has-header-image .custom-header-image, 43 .home.blog.header-video-loaded .custom-header-image, 34 44 .panel-image { 35 45 height: 1000px; 36 46 } -
src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js
60 60 clip: 'auto', 61 61 position: 'relative' 62 62 }); 63 $( '.site- branding, .site-branding a, .site-description, .site-description a' ).css({63 $( '.site-title a, .site-description' ).css({ 64 64 color: to 65 65 }); 66 66 $( 'body' ).removeClass( 'title-tagline-hidden' ); … … 123 123 $.each( [ 'external_header_video', 'header_image', 'header_video' ], function( index, settingId ) { 124 124 wp.customize( settingId, function( setting ) { 125 125 setting.bind(function() { 126 if ( hasHeaderImage() || ( hasHeaderVideo() && $( 'body' ).hasClass( 'twentyseventeen-front-page' ) )) {126 if ( hasHeaderImage() ) { 127 127 $( document.body ).addClass( 'has-header-image' ); 128 128 } else { 129 129 $( document.body ).removeClass( 'has-header-image' ); 130 130 } 131 132 if( ! hasHeaderVideo() ) { 133 $( document.body ).removeClass( 'header-video-loaded' ); 134 } 131 135 } ); 132 136 } ); 133 137 } ); -
src/wp-content/themes/twentyseventeen/assets/js/global.js
4 4 // Variables and DOM Caching. 5 5 var $body = $( 'body' ), 6 6 $customHeader = $body.find( '.custom-header' ), 7 $customHeaderImage = $customHeader.find( '.custom-header-image' ),8 7 $branding = $customHeader.find( '.site-branding' ), 9 8 $navigation = $body.find( '.navigation-top' ), 10 9 $navWrap = $navigation.find( '.wrap' ), … … 65 64 if ( navIsNotTooTall ) { 66 65 67 66 // When there's a custom header image, the header offset includes the height of the navigation. 68 if ( isFrontPage && $customHeaderImage.length) {67 if ( isFrontPage && ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'header-video-loaded' ) ) ) { 69 68 headerOffset = $customHeader.innerHeight() - navigationOuterHeight; 70 69 } else { 71 70 headerOffset = $customHeader.innerHeight(); … … 176 175 } 177 176 } 178 177 178 /* 179 * Add a class when the custom header video is loaded. 180 * Used for styles that should only be applied when a video is on page. Similar to `.has-header-image` class. 181 */ 182 $( document ).on( 'wp-custom-header-video-loaded', function () { 183 // Apply only on the front page. 184 if ( isFrontPage ) { 185 $body.addClass( 'header-video-loaded' ); 186 } 187 } ); 188 179 189 // Fire on document ready. 180 190 $( document ).ready( function() { 181 191 -
src/wp-content/themes/twentyseventeen/inc/color-patterns.php
443 443 .colors-custom .next.page-numbers:focus, 444 444 .colors-custom .next.page-numbers:hover, 445 445 .colors-custom.has-header-image .site-title, 446 .colors-custom.header-video-loaded .site-title, 446 447 .colors-custom.has-header-image .site-title a, 447 .colors-custom.has-header-image .site-description { 448 .colors-custom.header-video-loaded .site-title a, 449 .colors-custom.has-header-image .site-description, 450 .colors-custom.header-video-loaded .site-description { 448 451 color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ 449 452 } 450 453 -
src/wp-content/themes/twentyseventeen/inc/custom-header.php
87 87 .colors-dark .site-title a, 88 88 .colors-custom .site-title a, 89 89 body.has-header-image .site-title a, 90 body.header-video-loaded .site-title a, 90 91 body.has-header-image.colors-dark .site-title a, 92 body.header-video-loaded.colors-dark .site-title a, 91 93 body.has-header-image.colors-custom .site-title a, 94 body.header-video-loaded.colors-custom .site-title a, 92 95 .site-description, 93 96 .colors-dark .site-description, 94 97 .colors-custom .site-description, 95 98 body.has-header-image .site-description, 99 body.header-video-loaded .site-description, 96 100 body.has-header-image.colors-dark .site-description, 97 body.has-header-image.colors-custom .site-description { 101 body.header-video-loaded.colors-dark .site-description, 102 body.has-header-image.colors-custom .site-description, 103 body.header-video-loaded.colors-custom .site-description { 98 104 color: #<?php echo esc_attr( $header_text_color ); ?>; 99 105 } 100 106 <?php endif; ?> -
src/wp-content/themes/twentyseventeen/inc/template-functions.php
34 34 $classes[] = 'twentyseventeen-front-page'; 35 35 } 36 36 37 // Add a class if there is a custom header .38 if ( has_header_image() || has_header_video()&& is_front_page() ) {37 // Add a class if there is a custom header image. 38 if ( has_header_image() && is_front_page() ) { 39 39 $classes[] = 'has-header-image'; 40 40 } 41 41 -
src/wp-content/themes/twentyseventeen/style.css
1580 1580 opacity: 1; /* Prevent opacity from changing during selective refreshes in the customize preview */ 1581 1581 } 1582 1582 1583 body.has-header-image .site-title ,1584 body.h as-header-image.site-title a {1583 body.has-header-image .site-title a, 1584 body.header-video-loaded .site-title a { 1585 1585 color: #fff; 1586 1586 } 1587 1587 … … 1592 1592 margin-bottom: 0; 1593 1593 } 1594 1594 1595 body.has-header-image .site-description { 1595 body.has-header-image .site-description, 1596 body.header-video-loaded .site-description { 1596 1597 color: #fff; 1597 1598 opacity: 0.8; 1598 1599 } … … 1610 1611 width: auto; 1611 1612 } 1612 1613 1613 body.home.title-tagline-hidden.has-header-image .custom-logo-link img { 1614 body.home.title-tagline-hidden.has-header-image .custom-logo-link img, 1615 body.home.title-tagline-hidden.header-video-loaded .custom-logo-link img { 1614 1616 max-height: 200px; 1615 1617 max-width: 100%; 1616 1618 } … … 1630 1632 } 1631 1633 1632 1634 .has-header-image.twentyseventeen-front-page .custom-header, 1633 .has-header-image.home.blog .custom-header { 1635 .has-header-image.home.blog .custom-header, 1636 .header-video-loaded.twentyseventeen-front-page .custom-header, 1637 .header-video-loaded.home.blog .custom-header { 1634 1638 display: table; 1635 1639 height: 300px; 1636 1640 height: 75vh; … … 1637 1641 width: 100%; 1638 1642 } 1639 1643 1640 .custom-header-image { 1644 .has-header-image .custom-header-image, 1645 .header-video-loaded .custom-header-image { 1641 1646 bottom: 0; 1642 1647 left: 0; 1643 1648 overflow: hidden; … … 1647 1652 width: 100%; 1648 1653 } 1649 1654 1650 .custom-header-image:before { 1655 .has-header-image .custom-header-image:before, 1656 .header-video-loaded .custom-header-image:before { 1651 1657 /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,0.3+75 */ 1652 1658 background: -moz-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.3) 100%); /* FF3.6-15 */ 1653 1659 background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.3) 100%); /* Chrome10-25,Safari5.1-6 */ … … 1664 1670 } 1665 1671 1666 1672 .has-header-image .custom-header-image img, 1667 .h as-header-image.custom-header-image video,1668 .h as-header-image.custom-header-image iframe {1673 .header-video-loaded .custom-header-image video, 1674 .header-video-loaded .custom-header-image iframe { 1669 1675 position: fixed; 1670 1676 height: auto; 1671 1677 left: 50%; … … 1720 1726 1721 1727 /* Hides div in Customizer preview when header images or videos change. */ 1722 1728 1723 body:not(.has-header-image) .custom-header-image {1729 body:not(.has-header-image):not(.header-video-loaded) .custom-header-image { 1724 1730 display: none; 1725 1731 } 1726 1732 1727 1733 .has-header-image.twentyseventeen-front-page .site-branding, 1728 .has-header-image.home.blog .site-branding { 1734 .has-header-image.home.blog .site-branding, 1735 .header-video-loaded.twentyseventeen-front-page .site-branding, 1736 .header-video-loaded.home.blog .site-branding { 1729 1737 display: table-cell; 1730 1738 height: 100%; 1731 1739 vertical-align: bottom; … … 3271 3279 } 3272 3280 3273 3281 .has-header-image.twentyseventeen-front-page .site-branding, 3274 .has-header-image.home.blog .site-branding { 3282 .has-header-image.home.blog .site-branding, 3283 .header-video-loaded.twentyseventeen-front-page .site-branding, 3284 .header-video-loaded.home.blog .site-branding { 3275 3285 bottom: 0; 3276 3286 display: block; 3277 3287 left: 0; … … 3282 3292 } 3283 3293 3284 3294 .has-header-image.twentyseventeen-front-page .custom-header, 3285 .has-header-image.home.blog .custom-header { 3295 .has-header-image.home.blog .custom-header, 3296 .header-video-loaded.twentyseventeen-front-page .custom-header, 3297 .header-video-loaded.home.blog .custom-header { 3286 3298 display: block; 3287 3299 height: auto; 3288 3300 } … … 3293 3305 } 3294 3306 3295 3307 .twentyseventeen-front-page.has-header-image .custom-header-image, 3296 .home.blog.has-header-image .custom-header-image { 3308 .home.blog.has-header-image .custom-header-image, 3309 .twentyseventeen-front-page.header-video-loaded .custom-header-image, 3310 .home.blog.header-video-loaded .custom-header-image { 3297 3311 height: 0; 3298 3312 position: relative; 3299 3313 } 3300 3314 3301 .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-image { 3315 .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-image, 3316 .header-video-loaded:not(.twentyseventeen-front-page):not(.home) .custom-header-image { 3302 3317 bottom: 0; 3303 3318 height: auto; 3304 3319 left: 0; … … 3312 3327 } 3313 3328 3314 3329 .custom-logo-link img, 3315 body.home.title-tagline-hidden.has-header-image .custom-logo-link img { 3330 body.home.title-tagline-hidden.has-header-image .custom-logo-link img, 3331 body.home.title-tagline-hidden.header-video-loaded .custom-logo-link img { 3316 3332 max-width: 350px; 3317 3333 } 3318 3334 3319 .title-tagline-hidden.home.has-header-image .custom-logo-link img { 3335 .title-tagline-hidden.home.has-header-image .custom-logo-link img, 3336 .title-tagline-hidden.home.header-video-loaded .custom-logo-link img { 3320 3337 max-height: 200px; 3321 3338 } 3322 3339 … … 3578 3595 /* Front Page */ 3579 3596 3580 3597 .twentyseventeen-front-page.has-header-image .site-branding, 3581 .home.blog.has-header-image .site-branding { 3598 .home.blog.has-header-image .site-branding, 3599 .twentyseventeen-front-page.header-video-loaded .site-branding, 3600 .home.blog.header-video-loaded .site-branding { 3582 3601 margin-bottom: 70px; 3583 3602 } 3584 3603 3585 3604 .twentyseventeen-front-page.has-header-image .custom-header-image, 3586 .home.blog.has-header-image .custom-header-image { 3605 .home.blog.has-header-image .custom-header-image, 3606 .twentyseventeen-front-page.header-video-loaded .custom-header-image, 3607 .home.blog.header-video-loaded .custom-header-image { 3587 3608 height: 1200px; 3588 3609 height: 100vh; 3589 3610 max-height: 100%; … … 3591 3612 } 3592 3613 3593 3614 .twentyseventeen-front-page.has-header-image .custom-header-image:before, 3594 .home.blog.has-header-image .custom-header-image:before { 3615 .home.blog.has-header-image .custom-header-image:before, 3616 .twentyseventeen-front-page.header-video-loaded .custom-header-image:before, 3617 .home.blog.header-video-loaded .custom-header-image:before { 3595 3618 height: 33%; 3596 3619 } 3597 3620 3598 3621 .admin-bar.twentyseventeen-front-page.has-header-image .custom-header-image, 3599 .admin-bar.home.blog.has-header-image .custom-header-image { 3622 .admin-bar.home.blog.has-header-image .custom-header-image, 3623 .admin-bar.twentyseventeen-front-page.header-video-loaded .custom-header-image, 3624 .admin-bar.home.blog.header-video-loaded .custom-header-image { 3600 3625 height: calc(100vh - 32px); 3601 3626 } 3602 3627 … … 4111 4136 } 4112 4137 4113 4138 .twentyseventeen-front-page.has-header-image .site-branding, 4114 .home.blog.has-header-image .site-branding { 4139 .home.blog.has-header-image .site-branding, 4140 .twentyseventeen-front-page.header-video-loaded .site-branding, 4141 .home.blog.header-video-loaded .site-branding { 4115 4142 position: relative; 4116 4143 } 4117 4144 … … 4149 4176 body, 4150 4177 a, 4151 4178 .site-title a, 4152 .twentyseventeen-front-page.has-header-image .site-title ,4153 .twentyseventeen-front-page.h as-header-image.site-title a {4179 .twentyseventeen-front-page.has-header-image .site-title a, 4180 .twentyseventeen-front-page.header-video-loaded .site-title a { 4154 4181 color: #222 !important; /* Make sure color schemes don't affect to print */ 4155 4182 } 4156 4183 … … 4159 4186 blockquote, 4160 4187 .site-description, 4161 4188 .twentyseventeen-front-page.has-header-image .site-description, 4189 .twentyseventeen-front-page.header-video-loaded .site-description, 4162 4190 .entry-meta, 4163 4191 .entry-meta a { 4164 4192 color: #777 !important; /* Make sure color schemes don't affect to print */