Changeset 38986
- Timestamp:
- 10/27/2016 10:08:33 PM (8 years ago)
- Location:
- trunk/src/wp-content/themes/twentyseventeen
- Files:
-
- 7 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/assets/js/customize-controls.js
r38982 r38986 1 1 /** 2 * Theme Customizer enhancements, specific to panels, for a better user experience.2 * Scripts within the customizer controls window. 3 3 * 4 * This allows us to detect when the user has opened specific sections within the Customizer,5 * and adjust our preview pane accordingly.4 * Contextually shows the color hue control and informs the preview 5 * when users open or close the front page sections section. 6 6 */ 7 7 8 8 ( function() { 9 10 9 wp.customize.bind( 'ready', function() { 11 10 12 // Detect when the section for each panel is expanded (or closed) so we can adjust preview accordingly 13 wp.customize.section( 'panel_1' ).expanded.bind( function( isExpanding ) { 11 // Only show the color hue control when there's a custom color scheme. 12 wp.customize( 'colorscheme', function( setting ) { 13 wp.customize.control( 'colorscheme_hue', function( control ) { 14 var visibility = function() { 15 if ( 'custom' === setting.get() ) { 16 control.container.slideDown( 180 ); 17 } else { 18 control.container.slideUp( 180 ); 19 } 20 }; 21 22 visibility(); 23 setting.bind( visibility ); 24 }); 25 }); 26 27 // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly 28 wp.customize.section( 'theme_options' ).expanded.bind( function( isExpanding ) { 14 29 15 30 // Value of isExpanding will = true if you're entering the section, false if you're leaving it 16 wp.customize.previewer.send( 'section-highlight', { section: 'twentyseventeen-panel1',expanded: isExpanding } );31 wp.customize.previewer.send( 'section-highlight', { expanded: isExpanding } ); 17 32 } ); 18 19 // Detect when the section for each panel is expanded (or closed) so we can adjust preview accordingly20 wp.customize.section( 'panel_2' ).expanded.bind( function( isExpanding ) {21 22 // Value of isExpanding = true if you're entering the section, false if you're leaving it23 wp.customize.previewer.send( 'section-highlight', { section: 'twentyseventeen-panel2', expanded: isExpanding } );24 } );25 26 // Detect when the section for each panel is expanded (or closed) so we can adjust preview accordingly27 wp.customize.section( 'panel_3' ).expanded.bind( function( isExpanding ) {28 29 // Value of isExpanding will = true if you're entering the section, false if you're leaving it30 wp.customize.previewer.send( 'section-highlight', { section: 'twentyseventeen-panel3', expanded: isExpanding } );31 } );32 33 // Detect when the section for each panel is expanded (or closed) so we can adjust preview accordingly34 wp.customize.section( 'panel_4' ).expanded.bind( function( isExpanding ) {35 36 // Value of isExpanding will = true if you're entering the section, false if you're leaving it37 wp.customize.previewer.send( 'section-highlight', { section: 'twentyseventeen-panel4', expanded: isExpanding } );38 } );39 40 33 } ); 41 34 } )( jQuery ); -
trunk/src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js
r38985 r38986 1 1 /** 2 * File customize r.js.2 * File customize-preview.js. 3 3 * 4 * Theme Customizer enhancements for a better user experience. 5 * 6 * Contains handlers to make Theme Customizer preview reload changes asynchronously. 4 * Instantly live-update customizer settings in the preview for improved user experience. 7 5 */ 8 6 9 7 ( function( $ ) { 10 8 11 // Collect information from panel-customizer.js about which panels are opening9 // Collect information from customize-controls.js about which panels are opening 12 10 wp.customize.bind( 'preview-ready', function() { 13 11 wp.customize.preview.bind( 'section-highlight', function( data ) { 14 12 15 // If there's an expanded panel section, scroll down to that panel & highlight in the preview 13 // Only on the front page. 14 if ( ! $( 'body' ).hasClass( 'twentyseventeen-front-page' ) ) { 15 return; 16 } 17 18 // When the section is expanded, show and scroll to the content placeholders, exposing the edit links. 16 19 if ( true === data.expanded ) { 17 $.scrollTo( $( '.' + data.section ), { 18 duration: 600, 19 offset: { 'top': -40 } 20 } ); 21 $( '.' + data.section ).addClass( 'twentyseventeen-highlight' ); 20 $( 'body' ).addClass( 'highlight-front-sections' ); 21 $( '.panel-placeholder' ).slideDown( 200, function() { 22 $.scrollTo( $( '#panel1' ), { 23 duration: 600, 24 offset: { 'top': -70 } // Account for sticky menu. 25 } ); 26 }); 22 27 23 // If we've left the panel, remove the highlightand scroll back to the top28 // If we've left the panel, hide the placeholders and scroll back to the top 24 29 } else { 25 $.scrollTo( $( '#masthead' ), { 26 duration: 300, 27 offset: { 'top': 0 } 28 } ); 29 $( '.' + data.section ).removeClass( 'twentyseventeen-highlight' ); 30 $( 'body' ).removeClass( 'highlight-front-sections' ); 31 $( '.panel-placeholder' ).slideUp( 200 ); // Don't change scroll when leaving - it's likely to have unintended consequences. 30 32 } 31 33 } ); … … 72 74 // Update color body class. 73 75 $( 'body' ).removeClass( 'colors-light colors-dark colors-custom' ) 74 76 .addClass( 'colors-' + to ); 75 77 } ); 76 78 } ); … … 92 94 93 95 // Page layouts. 94 wp.customize( 'page_ options', function( value ) {96 wp.customize( 'page_layout', function( value ) { 95 97 value.bind( function( to ) { 96 98 if ( 'one-column' === to ) { -
trunk/src/wp-content/themes/twentyseventeen/front-page.php
r38875 r38986 29 29 <?php 30 30 // Get each of our panels and show the post data. 31 $panels = array( '1', '2', '3', '4' );32 $titles = array();33 34 global $twentyseventeencounter; // Used in template-parts/page/content-front-page-panels.php file.35 36 31 if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show. 37 32 38 $twentyseventeencounter = 1; 33 /** 34 * Filter number of front page sections in Twenty Seventeen. 35 * 36 * @since Twenty Seventeen 1.0 37 * 38 * @param $num_sections integer 39 */ 40 $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); 41 global $twentyseventeencounter; 39 42 40 foreach ( $panels as $panel ) :41 if ( get_theme_mod( 'panel_' . $panel ) ) :42 $post = get_post( get_theme_mod( 'panel_' . $panel ) );43 setup_postdata( $post);44 set_query_var( 'panel', $panel );43 // Create a setting and control for each of the sections available in the theme. 44 for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { 45 $twentyseventeencounter = $i; 46 twentyseventeen_front_page_section( null, $i ); 47 } 45 48 46 $titles[] = get_the_title(); // Put page titles in an array for use in navigation. 47 get_template_part( 'template-parts/page/content', 'front-page-panels' ); 48 49 wp_reset_postdata(); 50 else : 51 // The output placeholder anchor. 52 echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . esc_attr( $twentyseventeencounter ) . '" id="panel' . esc_attr( $twentyseventeencounter ) . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Panel %1$s Placeholder', 'twentyseventeen' ), esc_attr( $twentyseventeencounter ) ) . '</span></article>'; 53 endif; 54 55 $twentyseventeencounter++; 56 endforeach; 57 ?> 58 59 <?php endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. 60 ?> 49 endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. ?> 61 50 62 51 </main><!-- #main --> -
trunk/src/wp-content/themes/twentyseventeen/inc/color-patterns.php
r38918 r38986 313 313 .colors-custom .next.page-numbers:hover, 314 314 .colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover, 315 .colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus { 315 .colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus, 316 .colors-custom .customize-partial-edit-shortcut:before { 316 317 background: hsl( ' . esc_attr( $hue ) . ', ' . esc_attr( $saturation ) . ', 46% ); /* base: #767676; */ 317 318 } -
trunk/src/wp-content/themes/twentyseventeen/inc/customizer.php
r38985 r38986 1 1 <?php 2 2 /** 3 * Twenty Seventeen: ThemeCustomizer3 * Twenty Seventeen: Customizer 4 4 * 5 5 * @package WordPress … … 63 63 64 64 /** 65 * Add the Theme Options section.65 * Theme options. 66 66 */ 67 $wp_customize->add_panel( 'options_panel', array( 68 'title' => __( 'Theme Options', 'twentyseventeen' ), 69 'description' => __( 'Configure your theme settings', 'twentyseventeen' ), 70 ) ); 71 72 // Page Options. 73 $wp_customize->add_section( 'page_options', array( 74 'title' => __( 'Single Page Layout', 'twentyseventeen' ), 75 'active_callback' => 'twentyseventeen_is_page', 76 'panel' => 'options_panel', 77 ) ); 78 79 $wp_customize->add_setting( 'page_options', array( 67 $wp_customize->add_section( 'theme_options', array( 68 'title' => __( 'Theme Options', 'twentyseventeen' ), 69 'priority' => 130, // Before Additional CSS. 70 ) ); 71 72 $wp_customize->add_setting( 'page_layout', array( 80 73 'default' => 'two-column', 81 'sanitize_callback' => 'twentyseventeen_sanitize_ layout',74 'sanitize_callback' => 'twentyseventeen_sanitize_page_layout', 82 75 'transport' => 'postMessage', 83 76 ) ); 84 77 85 $wp_customize->add_control( 'page_ options', array(78 $wp_customize->add_control( 'page_layout', array( 86 79 'label' => __( 'Page Layout', 'twentyseventeen' ), 87 'section' => ' page_options',80 'section' => 'theme_options', 88 81 'type' => 'radio', 89 82 'description' => __( 'When no sidebar widgets are assigned, you can opt to display all pages with a one column or two column layout. When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), … … 92 85 'two-column' => __( 'Two Column', 'twentyseventeen' ), 93 86 ), 94 ) ); 95 96 // Panel 1. 97 $wp_customize->add_section( 'panel_1', array( 98 'title' => __( 'Panel 1', 'twentyseventeen' ), 99 'active_callback' => 'is_front_page', 100 'panel' => 'options_panel', 101 'description' => __( 'Add an image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'twentyseventeen' ), 102 ) ); 103 104 $wp_customize->add_setting( 'panel_1', array( 105 'default' => false, 106 'sanitize_callback' => 'absint', 107 ) ); 108 109 $wp_customize->add_control( 'panel_1', array( 110 'label' => __( 'Panel Content', 'twentyseventeen' ), 111 'section' => 'panel_1', 112 'type' => 'dropdown-pages', 113 ) ); 114 115 // Panel 2. 116 $wp_customize->add_section( 'panel_2', array( 117 'title' => __( 'Panel 2', 'twentyseventeen' ), 118 'active_callback' => 'is_front_page', 119 'panel' => 'options_panel', 120 'description' => __( 'Add an image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'twentyseventeen' ), 121 ) ); 122 123 $wp_customize->add_setting( 'panel_2', array( 124 'default' => false, 125 'sanitize_callback' => 'absint', 126 ) ); 127 128 $wp_customize->add_control( 'panel_2', array( 129 'label' => __( 'Panel Content', 'twentyseventeen' ), 130 'section' => 'panel_2', 131 'type' => 'dropdown-pages', 132 ) ); 133 134 // Panel 3. 135 $wp_customize->add_section( 'panel_3', array( 136 'title' => __( 'Panel 3', 'twentyseventeen' ), 137 'active_callback' => 'is_front_page', 138 'panel' => 'options_panel', 139 'description' => __( 'Add an image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'twentyseventeen' ), 140 ) ); 141 142 $wp_customize->add_setting( 'panel_3', array( 143 'default' => false, 144 'sanitize_callback' => 'absint', 145 ) ); 146 147 $wp_customize->add_control( 'panel_3', array( 148 'label' => __( 'Panel Content', 'twentyseventeen' ), 149 'section' => 'panel_3', 150 'type' => 'dropdown-pages', 151 ) ); 152 153 // Panel 4. 154 $wp_customize->add_section( 'panel_4', array( 155 'title' => __( 'Panel 4', 'twentyseventeen' ), 156 'active_callback' => 'is_front_page', 157 'panel' => 'options_panel', 158 'description' => __( 'Add an image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'twentyseventeen' ), 159 ) ); 160 161 $wp_customize->add_setting( 'panel_4', array( 162 'default' => false, 163 'sanitize_callback' => 'absint', 164 ) ); 165 166 $wp_customize->add_control( 'panel_4', array( 167 'label' => __( 'Panel Content', 'twentyseventeen' ), 168 'section' => 'panel_4', 169 'type' => 'dropdown-pages', 170 ) ); 87 'active_callback' => 'twentyseventeen_is_page_without_sidebar', 88 ) ); 89 90 /** 91 * Filter number of front page sections in Twenty Seventeen. 92 * 93 * @since Twenty Seventeen 1.0 94 * 95 * @param $num_sections integer 96 */ 97 $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); 98 99 // Create a setting and control for each of the sections available in the theme. 100 for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { 101 $wp_customize->add_setting( 'panel_' . $i, array( 102 'default' => false, 103 'sanitize_callback' => 'absint', 104 'transport' => 'postMessage', 105 ) ); 106 107 $wp_customize->add_control( 'panel_' . $i, array( 108 /* translators: %d is the front page section number */ 109 'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ), 110 'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ), 111 'section' => 'theme_options', 112 'type' => 'dropdown-pages', 113 'allow_addition' => true, 114 'active_callback' => 'twentyseventeen_is_static_front_page', 115 ) ); 116 117 $wp_customize->selective_refresh->add_partial( 'panel_' . $i, array( 118 'selector' => '#panel' . $i, 119 'render_callback' => 'twentyseventeen_front_page_section', 120 'container_inclusive' => true, 121 ) ); 122 } 171 123 } 172 124 add_action( 'customize_register', 'twentyseventeen_customize_register' ); 173 125 174 126 /** 175 * Sanitize a radio button.176 */ 177 function twentyseventeen_sanitize_ layout( $input ) {127 * Sanitize the page layout options. 128 */ 129 function twentyseventeen_sanitize_page_layout( $input ) { 178 130 $valid = array( 179 131 'one-column' => __( 'One Column', 'twentyseventeen' ), … … 226 178 227 179 /** 228 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 180 * Return whether we're previewing the front page and it's a static page. 181 */ 182 function twentyseventeen_is_static_front_page() { 183 return ( is_front_page() && ! is_home() ); 184 } 185 186 /** 187 * Return whether we're previewing a page and there are no widgets in the sidebar. 188 */ 189 function twentyseventeen_is_page_without_sidebar() { 190 return ( is_page() && ! is_active_sidebar( 'sidebar-1' ) ); 191 } 192 193 /** 194 * Bind JS handlers to instantly live-preview changes. 229 195 */ 230 196 function twentyseventeen_customize_preview_js() { 231 wp_enqueue_script( 'twentyseventeen-customize r', get_theme_file_uri( '/assets/js/customizer.js' ), array( 'customize-preview' ), '1.0', true );197 wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true ); 232 198 } 233 199 add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); 234 200 235 201 /** 236 * Some extra JavaScript to improve the user experience in the Customizer for this theme.202 * Load dynamic logic for the customizer controls area. 237 203 */ 238 204 function twentyseventeen_panels_js() { 239 wp_enqueue_script( 'twentyseventeen- panel-customizer', get_theme_file_uri( '/assets/js/panel-customizer.js' ), array(), '1.0', true );205 wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true ); 240 206 } 241 207 add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' ); -
trunk/src/wp-content/themes/twentyseventeen/inc/template-functions.php
r38985 r38986 47 47 // Add class for one or two column page layouts. 48 48 if ( is_page() ) { 49 if ( 'one-column' === get_theme_mod( 'page_ options' ) ) {49 if ( 'one-column' === get_theme_mod( 'page_layout' ) ) { 50 50 $classes[] = 'page-one-column'; 51 51 } else { … … 73 73 */ 74 74 function twentyseventeen_panel_count() { 75 $panels = array( '1', '2', '3', '4' ); 75 76 76 $panel_count = 0; 77 77 78 foreach ( $panels as $panel ) { 79 if ( get_theme_mod( 'panel_' . $panel ) ) { 78 /** 79 * Filter number of front page sections in Twenty Seventeen. 80 * 81 * @since Twenty Seventeen 1.0 82 * 83 * @param $num_sections integer 84 */ 85 $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); 86 87 // Create a setting and control for each of the sections available in the theme. 88 for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { 89 if ( get_theme_mod( 'panel_' . $i ) ) { 80 90 $panel_count++; 81 91 } … … 91 101 return ( is_front_page() && ! is_home() ); 92 102 } 93 94 /**95 * Custom Active Callback to check for page.96 */97 function twentyseventeen_is_page() {98 return ( is_page() );99 } -
trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php
r38885 r38986 126 126 endif; 127 127 128 /** 129 * Display a front page section. 130 * 131 * @param $partial WP_Customize_Partial Partial associated with a selective refresh request. 132 * @param $id integer Front page section to display. 133 */ 134 function twentyseventeen_front_page_section( $partial = null, $id = 0 ) { 135 if ( is_a( $partial, 'WP_Customize_Partial' ) ) { 136 // Find out the id and set it up during a selective refresh. 137 global $twentyseventeencounter; 138 $id = str_replace( 'panel_', '', $partial->id ); 139 $twentyseventeencounter = $id; 140 } 141 142 global $post; // Modify the global post object before setting up post data. 143 if ( get_theme_mod( 'panel_' . $id ) ) { 144 global $post; 145 $post = get_post( get_theme_mod( 'panel_' . $id ) ); 146 setup_postdata( $post ); 147 set_query_var( 'panel', $id ); 148 149 get_template_part( 'template-parts/page/content', 'front-page-panels' ); 150 151 wp_reset_postdata(); 152 } else { 153 // The output placeholder anchor. 154 echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . $id . '" id="panel' . $id . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Panel %1$s Placeholder', 'twentyseventeen' ), $id ) . '</span></article>'; 155 } 156 } 128 157 129 158 /** -
trunk/src/wp-content/themes/twentyseventeen/style.css
r38985 r38986 2936 2936 --------------------------------------------------------------*/ 2937 2937 2938 /* Hide this until we're in the Customizer */ 2939 2940 .twentyseventeen-panel-title { 2938 /* Hide placeholders until we're in the front page sections section */ 2939 .panel-placeholder { 2941 2940 display: none; 2942 2941 } 2943 2942 2944 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel { 2945 /* Colour-code all panels (add 1 to account for #twentyseventeen-hero, so 2 is actually panel 1)*/ 2946 } 2947 2948 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:after { 2943 .highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:after { 2949 2944 border: 2px dashed; 2950 2945 bottom: 1em; … … 2955 2950 right: 1em; 2956 2951 top: 1em; 2957 } 2958 2952 z-index: -1; /* Prevent :after from preventing interactions within the section */ 2953 } 2954 2955 /* Used for placeholder text */ 2959 2956 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel .twentyseventeen-panel-title { 2960 color: #fff; 2961 display: inline-block; 2957 display: block; 2962 2958 font-size: 14px; 2963 2959 font-size: 0.875rem; 2964 2960 font-weight: 700; 2965 2961 letter-spacing: 1px; 2966 padding: 5px 10px; 2967 position: absolute; 2968 right: 3.2em; 2962 padding: 3em; 2969 2963 text-transform: uppercase; 2970 top: 3.2em; 2971 -webkit-transform: translate(3px, -3px); 2972 -ms-transform: translate(3px, -3px); 2973 transform: translate(3px, -3px); 2974 z-index: 3; 2975 } 2976 2977 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(1):after { 2964 text-align: center; 2965 } 2966 2967 /* Show borders on the custom page panels only when the front page sections are being edited */ 2968 .highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(1):after { 2978 2969 border: none; 2979 2970 } 2980 2971 2981 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(2) .twentyseventeen-panel-title { 2982 background: #b569a2; 2983 } 2984 2985 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(2):after { 2972 .highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(2):after { 2986 2973 border-color: #b569a2; 2987 2974 color: #b569a2; 2988 2975 } 2989 2976 2990 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(3) .twentyseventeen-panel-title { 2991 background: #8f68bd; 2992 } 2993 2994 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(3):after { 2977 .highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(3):after { 2995 2978 border-color: #8f68bd; 2996 2979 color: #8f68bd; 2997 2980 } 2998 2981 2999 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(4) .twentyseventeen-panel-title { 3000 background: #575ebd; 3001 } 3002 3003 .twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(4):after { 2982 .highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(4):after { 3004 2983 border-color: #575ebd; 3005 2984 color: #575ebd; 3006 2985 } 3007 2986 3008 /* Add a highlight class to improve Customizer behaviour */3009 3010 @-webkit-keyframes flash {3011 3012 0%,3013 20%,3014 40%,3015 60%,3016 80%,3017 100% {3018 opacity: 1;3019 }3020 3021 10%,3022 30%,3023 50%,3024 70%,3025 90% {3026 opacity: 0;3027 }3028 }3029 3030 @keyframes flash {3031 3032 0%,3033 20%,3034 40%,3035 60%,3036 80%,3037 100% {3038 opacity: 1;3039 }3040 3041 10%,3042 30%,3043 50%,3044 70%,3045 90% {3046 opacity: 0;3047 }3048 }3049 3050 article.panel-placeholder {3051 display: none;3052 }3053 3054 2987 .twentyseventeen-front-page.twentyseventeen-customizer #primary article.panel-placeholder { 3055 2988 border: 0; 3056 2989 } 3057 2990 3058 .twentyseventeen-customizer .panel-placeholder.twentyseventeen-highlight { 3059 display: block; 3060 height: 112px; 3061 } 3062 3063 .twentyseventeen-highlight:after { 3064 -webkit-animation-duration: 2s; 3065 animation-duration: 2s; 3066 -webkit-animation-name: flash; 3067 animation-name: flash; 3068 -webkit-animation-timing-function: ease-in-out; 3069 animation-timing-function: ease-in-out; 3070 -webkit-animation-fill-mode: both; 3071 animation-fill-mode: both; 3072 } 2991 /* Add some space around the visual edit shortcut buttons. */ 2992 .twentyseventeen-panel .customize-partial-edit-shortcut:before { 2993 top: 30px; 2994 left: 30px; 2995 } 2996 2997 /* Prevent color schemes from showing 1px dots everywhere. */ 2998 .customize-partial-edit-shortcut { 2999 background: transparent !important; 3000 } 3001 3002 /* Ensure that placeholder icons are visible. */ 3003 .twentyseventeen-panel .customize-partial-edit-shortcut-hidden:before { 3004 visibility: visible; 3005 } 3006 3007 /* Prevent icon colors from clashing with color schemes. */ 3008 .colors-custom .customize-partial-edit-shortcut:before { 3009 text-shadow: 0 -1px 1px rgba(0,0,0,.2), 3010 1px 0 1px rgba(0,0,0,.2), 3011 0 1px 1px rgba(0,0,0,.2), 3012 -1px 0 1px rgba(0,0,0,.2); 3013 } 3014 3073 3015 3074 3016 /*-------------------------------------------------------------- -
trunk/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php
r38875 r38986 13 13 ?> 14 14 15 <article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > 16 17 <span class="panel twentyseventeen-panel<?php echo esc_attr( $twentyseventeencounter ); ?>" id="panel<?php echo esc_attr( $twentyseventeencounter ); ?>"> 18 <span class="twentyseventeen-panel-title"><?php printf( __( 'Panel %1$s', 'twentyseventeen' ), esc_attr( $twentyseventeencounter ) ); ?></span> 19 </span> 15 <article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > 20 16 21 17 <?php if ( has_post_thumbnail() ) : … … 78 74 wp_reset_postdata(); 79 75 ?> 80 </div><!-- . pique-recent-posts -->76 </div><!-- .recent-posts --> 81 77 <?php endif; ?> 82 78 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.