Changeset 46571
- Timestamp:
- 10/22/2019 06:25:45 PM (5 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwenty
- Files:
-
- 11 added
- 3 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css
r46551 r46571 13 13 14 14 .editor-styles-wrapper > * { 15 color: #000;16 15 font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif; 17 16 font-size: 18px; … … 27 26 28 27 .block-editor-default-block-appender textarea.block-editor-default-block-appender__content { 28 color: inherit; 29 29 font-family: inherit; 30 30 font-size: inherit; 31 } 32 33 .block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:hover):not(:focus), 34 .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:hover):not(:focus) { 35 color: inherit; 31 36 } 32 37 … … 196 201 /* Typography -------------------------------- */ 197 202 198 .editor-styles-wrapper a {203 .editor-styles-wrapper .editor-block-list__layout a { 199 204 color: #cd2653; 200 205 text-decoration: underline; … … 213 218 .editor-styles-wrapper .wp-block h5, 214 219 .editor-styles-wrapper .wp-block h6 { 215 color: #000;216 220 font-feature-settings: "lnum"; 217 221 font-variant-numeric: lining-nums; … … 474 478 } 475 479 476 .editor-styles-wrapper 480 .editor-styles-wrapper .wp-block-table caption { 477 481 background: #dcd7ca; 478 482 text-align: center; 479 483 } 480 484 481 .editor-styles-wrapper 482 .editor-styles-wrapper 485 .editor-styles-wrapper .wp-block-table th, 486 .editor-styles-wrapper .wp-block-table td { 483 487 line-height: 1.4; 484 488 margin: 0; … … 576 580 border-style: solid; 577 581 border-width: 0 2px 0 0; 578 color: inherit;579 582 margin: 20px 0; 580 583 padding: 5px 20px 5px 0; … … 634 637 /* Block: Code, Verse and Preformatted ------- */ 635 638 639 .editor-styles-wrapper .wp-block-code { 640 color: inherit; 641 } 642 636 643 .editor-styles-wrapper .wp-block-code, 637 644 .editor-styles-wrapper .wp-block-preformatted pre, … … 642 649 } 643 650 651 .editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre, 644 652 .editor-styles-wrapper .wp-block-preformatted pre, 645 653 .editor-styles-wrapper .wp-block-code .block-editor-plain-text, 646 654 .editor-styles-wrapper .wp-block-verse pre { 647 655 background: transparent; 656 color: inherit; 648 657 font-family: monospace; 649 658 font-size: 14px; … … 939 948 } 940 949 950 /* Block: Shortcode -------------------------- */ 951 952 .editor-styles-wrapper .wp-block-shortcode textarea { 953 color: #191e23; 954 } 955 941 956 /* Block: Embed ------------------------------ */ 942 957 -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
r46551 r46571 13 13 14 14 .editor-styles-wrapper > * { 15 color: #000;16 15 font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif; 17 16 font-size: 18px; … … 27 26 28 27 .block-editor-default-block-appender textarea.block-editor-default-block-appender__content { 28 color: inherit; 29 29 font-family: inherit; 30 30 font-size: inherit; 31 } 32 33 .block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:hover):not(:focus), 34 .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:hover):not(:focus) { 35 color: inherit; 31 36 } 32 37 … … 196 201 /* Typography -------------------------------- */ 197 202 198 .editor-styles-wrapper a {203 .editor-styles-wrapper .editor-block-list__layout a { 199 204 color: #cd2653; 200 205 text-decoration: underline; … … 213 218 .editor-styles-wrapper .wp-block h5, 214 219 .editor-styles-wrapper .wp-block h6 { 215 color: #000;216 220 font-feature-settings: "lnum"; 217 221 font-variant-numeric: lining-nums; … … 474 478 } 475 479 476 .editor-styles-wrapper 480 .editor-styles-wrapper .wp-block-table caption { 477 481 background: #dcd7ca; 478 482 text-align: center; 479 483 } 480 484 481 .editor-styles-wrapper 482 .editor-styles-wrapper 485 .editor-styles-wrapper .wp-block-table th, 486 .editor-styles-wrapper .wp-block-table td { 483 487 line-height: 1.4; 484 488 margin: 0; … … 576 580 border-style: solid; 577 581 border-width: 0 0 0 2px; 578 color: inherit;579 582 margin: 20px 0; 580 583 padding: 5px 0 5px 20px; … … 634 637 /* Block: Code, Verse and Preformatted ------- */ 635 638 639 .editor-styles-wrapper .wp-block-code { 640 color: inherit; 641 } 642 636 643 .editor-styles-wrapper .wp-block-code, 637 644 .editor-styles-wrapper .wp-block-preformatted pre, … … 642 649 } 643 650 651 .editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre, 644 652 .editor-styles-wrapper .wp-block-preformatted pre, 645 653 .editor-styles-wrapper .wp-block-code .block-editor-plain-text, 646 654 .editor-styles-wrapper .wp-block-verse pre { 647 655 background: transparent; 656 color: inherit; 648 657 font-family: monospace; 649 658 font-size: 14px; … … 939 948 } 940 949 950 /* Block: Shortcode -------------------------- */ 951 952 .editor-styles-wrapper .wp-block-shortcode textarea { 953 color: #191e23; 954 } 955 941 956 /* Block: Embed ------------------------------ */ 942 957 -
trunk/src/wp-content/themes/twentytwenty/assets/js/color-calculations.js
r46446 r46571 36 36 _twentyTwentyColor.prototype.setAccentColorsArray = function() { 37 37 var self = this, 38 minSaturation = 55,39 maxSaturation = 90,40 minLightness = 25,41 maxLighness = 75,42 stepSaturation = 2 .5,43 stepLightness = 2 .5,38 minSaturation = 65, 39 maxSaturation = 100, 40 minLightness = 30, 41 maxLighness = 80, 42 stepSaturation = 2, 43 stepLightness = 2, 44 44 pushColor = function() { 45 45 var colorObj = new Color( { … … 48 48 l: l 49 49 } ), 50 item; 50 item, 51 /** 52 * Get a score for this color in contrast to its background color and surrounding text. 53 * 54 * @since 1.0.0 55 * @param {number} contrastBackground - WCAG contrast with the background color. 56 * @param {number} contrastSurroundingText - WCAG contrast with surrounding text. 57 * @return {number} - 0 is best, higher numbers have bigger difference with the desired scores. 58 */ 59 getScore = function( contrastBackground, contrastSurroundingText ) { 60 var diffBackground = ( 7 >= contrastBackground ) ? 0 : 7 - contrastBackground, 61 diffSurroundingText = ( 3 >= contrastSurroundingText ) ? 0 : 3 - contrastSurroundingText; 62 63 return diffBackground + diffSurroundingText; 64 }; 51 65 52 66 item = { … … 63 77 // Get a score for this color by multiplying the 2 contrasts. 64 78 // We'll use that to sort the array. 65 item.score = item.contrastBackground * item.contrastText;79 item.score = getScore( item.contrastBackground, item.contrastText ); 66 80 67 81 self.accentColorsArray.push( item ); … … 90 104 // Sort colors by contrast. 91 105 this.accentColorsArray.sort( function( a, b ) { 92 return b.score - a.score;106 return a.score - b.score; 93 107 } ); 94 108 return this; -
trunk/src/wp-content/themes/twentytwenty/assets/js/customize-preview.js
r46446 r46571 95 95 value.bind( function( to ) { 96 96 // Add background color to header and footer wrappers. 97 $( ' #site-header,#site-footer' ).css( 'background-color', to );97 $( 'body:not(.overlay-header)#site-header, #site-footer' ).css( 'background-color', to ); 98 98 99 99 // Change body classes if this is the same background-color as the content background. -
trunk/src/wp-content/themes/twentytwenty/assets/js/index.js
r46551 r46571 232 232 } 233 233 234 _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );235 236 _win.twentytwenty.scrolled = 0;237 238 234 if ( clickedEl !== false ) { 239 235 clickedEl.focus(); 240 236 clickedEl = false; 241 237 } 238 239 _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) ); 240 241 _win.twentytwenty.scrolled = 0; 242 242 }, 500 ); 243 243 } ); … … 621 621 _doc.querySelector( '*[data-toggle-target="' + targetString + '"]' ).classList.toggle( activeClass ); 622 622 } 623 624 // Toggle aria-expanded on the target625 twentytwentyToggleAttribute( target, 'aria-expanded', 'true', 'false' );626 623 627 624 // Toggle aria-expanded on the toggle -
trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
r46551 r46571 26 26 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 27 27 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 28 29 /**30 * Removes the background image section.31 * The theme only supports the background color option.32 */33 $wp_customize->remove_section( 'background_image' );34 28 35 29 $wp_customize->selective_refresh->add_partial( -
trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php
r46446 r46571 132 132 133 133 // Add the sub menu toggle. 134 $args['list_item_after'] .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" ><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';134 $args['list_item_after'] .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" aria-expanded="false"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>'; 135 135 136 136 } -
trunk/src/wp-content/themes/twentytwenty/functions.php
r46551 r46571 603 603 'content' => array( 604 604 'accent' => array( 605 'color' => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ' .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),605 'color' => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ), 606 606 'border-color' => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ), 607 'background' => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ' .has-accent-background-color', '.comment-reply-link' ),607 'background' => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ), 608 608 'fill' => array( '.fill-children-accent', '.fill-children-accent *' ), 609 609 ), 610 610 'background' => array( 611 'color' => array( ' button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-button__link:active', '.wp-block-button__link:focus', '.wp-block-button__link:visited', '.wp-block-button__link:hover', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.comment-reply-link' ),612 'background' => array( ' .has-background-background-color' ),611 'color' => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link' ), 612 'background' => array( ':root .has-background-background-color' ), 613 613 ), 614 614 'text' => array( 615 'color' => array( 'body', '.entry-title a', ' .has-primary-color' ),616 'background' => array( ' .has-primary-background-color' ),615 'color' => array( 'body', '.entry-title a', ':root .has-primary-color' ), 616 'background' => array( ':root .has-primary-background-color' ), 617 617 ), 618 618 'secondary' => array( 619 'color' => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ' .has-secondary-color' ),620 'background' => array( ' .has-secondary-background-color' ),619 'color' => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ), 620 'background' => array( ':root .has-secondary-background-color' ), 621 621 ), 622 622 'borders' => array( 623 623 'border-color' => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ), 624 'background' => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ' .has-subtle-background-background-color' ),624 'background' => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ), 625 625 'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ), 626 626 'border-top-color' => array( '.wp-block-latest-posts.is-grid li' ), 627 'color' => array( ' .has-subtle-background-color' ),627 'color' => array( ':root .has-subtle-background-color' ), 628 628 ), 629 629 ), -
trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php
r46446 r46571 56 56 57 57 // Get variables. 58 $body = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) ); 59 $body_default = '#000000'; 60 $accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) ); 61 $accent_default = '#cd2653'; 58 $body = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) ); 59 $body_default = '#000000'; 60 $secondary = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'secondary' ) ); 61 $secondary_default = '#6d6d6d'; 62 $borders = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'borders' ) ); 63 $borders_default = '#dcd7ca'; 64 $accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) ); 65 $accent_default = '#cd2653'; 66 62 67 /** 63 68 * Filters the CSS selectors targeting button component on frontend to apply common css … … 70 75 71 76 // Header. 72 $header_footer_ text = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'text' ) );73 $header_footer_ accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'accent' ) );77 $header_footer_background = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'background' ) ); 78 $header_footer_background_default = '#ffffff'; 74 79 75 80 // Cover. … … 127 132 // Accent color. 128 133 if ( $accent && $accent !== $accent_default ) { 129 twentytwenty_generate_css( '.editor-styles-wrapper a, .editor-styles-wrapper .has-drop-cap:not(:focus):first-letter', 'color', $accent ); 130 twentytwenty_generate_css( '.editor-styles-wrapper blockquote, .editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '', ' !important' ); 131 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent ); 132 twentytwenty_generate_css( $buttons_targets, 'background', $accent ); 133 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'border-color', $accent ); 134 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'color', $accent ); 134 twentytwenty_generate_css( '.has-accent-color, .editor-styles-wrapper .editor-block-list__layout a, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, .editor-styles-wrapper .wp-block-pullquote::before, .editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent ); 135 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' ); 136 twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent ); 135 137 } 136 138 … … 140 142 } 141 143 144 // Borders color. 145 if ( $borders && $borders !== $borders_default ) { 146 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-code, .editor-styles-wrapper pre, .editor-styles-wrapper .wp-block-preformatted pre, .editor-styles-wrapper .wp-block-verse pre, .editor-styles-wrapper fieldset, .editor-styles-wrapper .wp-block-table, .editor-styles-wrapper .wp-block-table *, .editor-styles-wrapper .wp-block-table.is-style-stripes, .editor-styles-wrapper .wp-block-latest-posts.is-grid li', 'border-color', $borders ); 147 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-table caption, .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color', $borders ); 148 } 149 142 150 // Text color. 143 151 if ( $body && $body !== $body_default ) { 144 twentytwenty_generate_css( 'body .editor-styles-wrapper, body .editor-post-title__block, body .editor-post-title__input, body textarea, .editor-post-title__block .editor-post-title__input', 'color', $body ); 152 twentytwenty_generate_css( 'body .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body ); 153 } 154 155 // Secondary color. 156 if ( $secondary && $secondary !== $secondary_default ) { 157 twentytwenty_generate_css( '.editor-styles-wrapper figcaption, .editor-styles-wrapper cite, .editor-styles-wrapper .wp-block-quote__citation, .editor-styles-wrapper .wp-block-quote cite, .editor-styles-wrapper .wp-block-quote footer, .editor-styles-wrapper .wp-block-pullquote__citation, .editor-styles-wrapper .wp-block-pullquote cite, .editor-styles-wrapper .wp-block-pullquote footer, .editor-styles-wrapper ul.wp-block-archives li, .editor-styles-wrapper ul.wp-block-categories li, .editor-styles-wrapper ul.wp-block-latest-posts li, .editor-styles-wrapper ul.wp-block-categories__list li, .editor-styles-wrapper .wp-block-latest-comments time, .editor-styles-wrapper .wp-block-latest-posts time', 'color', $secondary ); 158 } 159 160 // Header Footer Background Color. 161 if ( $header_footer_background && $header_footer_background !== $header_footer_background_default ) { 162 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-pullquote::before', 'background-color', $header_footer_background ); 145 163 } 146 164 } elseif ( 'classic-editor' === $type ) { -
trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php
r46446 r46571 22 22 // Define and register starter content to showcase the theme on new sites. 23 23 $starter_content = array( 24 'widgets' => array(24 'widgets' => array( 25 25 // Place one core-defined widgets in the first footer widget area. 26 26 'sidebar-1' => array( … … 33 33 ), 34 34 35 // Create the custom image attachments used as post thumbnails for pages. 36 'attachments' => array( 37 'image-opening' => array( 38 'post_title' => _x( 'The New UMoMA Opens its Doors', 'Theme starter content', 'twentytwenty' ), 39 'file' => 'assets/images/2020-landscape-1.png', // URL relative to the template directory. 40 ), 41 ), 42 35 43 // Specify the core-defined pages to create and add custom thumbnails to some of them. 36 'posts' => array(44 'posts' => array( 37 45 'front' => array( 38 46 'post_type' => 'page', 39 47 'post_title' => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ), 48 // Use the above featured image with the predefined about page. 49 'thumbnail' => '{{image-opening}}', 40 50 'post_content' => join( 41 51 '', … … 50 60 '<div class="wp-block-column"><!-- wp:group -->', 51 61 '<div class="wp-block-group"><div class="wp-block-group__inner-container">', 62 '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->', 63 '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-1.png" alt="" class="wp-image-37"/></figure>', 64 '<!-- /wp:image -->', 52 65 '<!-- wp:heading {"level":3} -->', 53 66 '<h3>' . __( 'Works and Days', 'twentytwenty' ) . '</h3>', … … 62 75 '<!-- wp:group -->', 63 76 '<div class="wp-block-group"><div class="wp-block-group__inner-container">', 77 '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->', 78 '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-3.png" alt="" class="wp-image-37"/></figure>', 79 '<!-- /wp:image -->', 64 80 '<!-- wp:heading {"level":3} -->', 65 81 '<h3>' . __( 'Theatre of Operations', 'twentytwenty' ) . '</h3>', … … 76 92 '<div class="wp-block-column"><!-- wp:group -->', 77 93 '<div class="wp-block-group"><div class="wp-block-group__inner-container">', 94 '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->', 95 '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-2.png" alt="" class="wp-image-37"/></figure>', 96 '<!-- /wp:image -->', 78 97 '<!-- wp:heading {"level":3} -->', 79 98 '<h3>' . __( 'The Life I Deserve', 'twentytwenty' ) . '</h3>', … … 88 107 '<!-- wp:group -->', 89 108 '<div class="wp-block-group"><div class="wp-block-group__inner-container">', 109 '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->', 110 '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-4.png" alt="" class="wp-image-37"/></figure>', 111 '<!-- /wp:image -->', 90 112 '<!-- wp:heading {"level":3} -->', 91 113 '<h3>' . __( 'From Signac to Matisse', 'twentytwenty' ) . '</h3>', … … 100 122 '<!-- /wp:column --></div>', 101 123 '<!-- /wp:columns -->', 124 '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->', 125 '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-landscape-2.png" alt="" class="wp-image-37"/></figure>', 126 '<!-- /wp:image -->', 102 127 '<!-- wp:group {"align":"wide"} -->', 103 128 '<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center","textColor":"accent"} -->', … … 127 152 '<!-- /wp:group --></div></div>', 128 153 '<!-- /wp:group -->', 154 '<!-- wp:gallery {"ids":[39,38],"align":"wide"} -->', 155 '<figure class="wp-block-gallery alignwide columns-2 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-2.png" alt="" data-id="39" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-2.png" data-link="assets/images/2020-square-2/" class="wp-image-39"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-1.png" alt="" data-id="38" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-1.png" data-link="' . get_theme_file_uri() . '/assets/images/2020-square-1/" class="wp-image-38"/></figure></li></ul></figure>', 156 '<!-- /wp:gallery -->', 129 157 ) 130 158 ), … … 136 164 137 165 // Default to a static front page and assign the front and posts pages. 138 'options' => array(166 'options' => array( 139 167 'show_on_front' => 'page', 140 168 'page_on_front' => '{{front}}', … … 143 171 144 172 // Set up nav menus for each of the two areas registered in the theme. 145 'nav_menus' => array(173 'nav_menus' => array( 146 174 // Assign a menu to the "primary" location. 147 175 'primary' => array( -
trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php
r46446 r46571 191 191 */ 192 192 function twentytwenty_edit_post_link( $link, $post_id, $text ) { 193 if ( is_admin() ) { 194 return $link; 195 } 193 196 194 197 $edit_url = get_edit_post_link( $post_id ); … … 220 223 * Get the post meta. 221 224 * 222 * @param int $post_id The iD of the post.225 * @param int $post_id The ID of the post. 223 226 * @param string $location The location where the meta is shown. 224 227 */ … … 544 547 545 548 // Add the sub menu toggle. 546 $args->after .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" ><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';549 $args->after .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" aria-expanded="false"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>'; 547 550 548 551 } -
trunk/src/wp-content/themes/twentytwenty/style-rtl.css
r46551 r46571 142 142 } 143 143 144 ::selection {145 background: #000;146 color: #fff;147 }148 149 144 #site-content { 150 145 overflow: hidden; … … 1416 1411 1417 1412 .toggle-inner { 1413 display: flex; 1414 justify-content: center; 1418 1415 height: 2.3rem; 1419 1416 position: relative; … … 1461 1458 } 1462 1459 1463 .search-toggle .toggle-text {1464 right: 0;1465 text-align: right;1466 }1467 1468 1460 /* Navigation Toggle ------------------------- */ 1469 1461 … … 1484 1476 .nav-toggle .toggle-inner { 1485 1477 padding-top: 0.8rem; 1486 }1487 1488 .nav-toggle .toggle-text {1489 left: 0;1490 text-align: left;1491 1478 } 1492 1479 … … 2480 2467 .author-bio { 2481 2468 margin-top: 4rem; 2482 } 2483 2484 .hide-avatars .author-bio { 2485 padding-right: 0; 2486 } 2487 2488 .author-bio-inner p:last-child { 2489 margin-bottom: 0; 2469 display: flex; 2470 flex-wrap: wrap; 2471 align-items: flex-start; 2472 } 2473 2474 .author-info { 2475 flex: 1; 2476 } 2477 2478 .hide-avatars img.avatar { 2479 display: none; 2490 2480 } 2491 2481 2492 2482 .author-bio .avatar { 2493 2483 margin-left: 1.5rem; 2494 height: 5rem;2495 2484 width: 5rem; 2496 2485 } 2497 2486 2498 2487 .author-bio .author-title { 2499 align-items: center; 2500 display: flex; 2501 margin: 0 0 1rem 0; 2488 margin: 0; 2502 2489 } 2503 2490 … … 2577 2564 /* CUSTOM COLORS */ 2578 2565 2579 .has-accent-color {2566 :root .has-accent-color { 2580 2567 color: #cd2653; 2581 2568 } 2582 2569 2583 .has-accent-background-color {2570 :root .has-accent-background-color { 2584 2571 background-color: #cd2653; 2585 2572 } 2586 2573 2587 .has-primary-color {2574 :root .has-primary-color { 2588 2575 color: #000; 2589 2576 } 2590 2577 2591 .has-primary-background-color {2578 :root .has-primary-background-color { 2592 2579 background-color: #000; 2593 2580 } 2594 2581 2595 .has-secondary-color {2582 :root .has-secondary-color { 2596 2583 color: #6d6d6d; 2597 2584 } 2598 2585 2599 .has-secondary-background-color {2586 :root .has-secondary-background-color { 2600 2587 background-color: #6d6d6d; 2601 2588 } 2602 2589 2603 .has-subtle-background-color {2590 :root .has-subtle-background-color { 2604 2591 color: #dcd7ca; 2605 2592 } 2606 2593 2607 .has-subtle-background-background-color {2594 :root .has-subtle-background-background-color { 2608 2595 background-color: #dcd7ca; 2609 2596 } 2610 2597 2611 .has-background-color {2598 :root .has-background-color { 2612 2599 color: #f5efe0; 2613 2600 } 2614 2601 2615 .has-background-background-color {2602 :root .has-background-background-color { 2616 2603 background-color: #f5efe0; 2617 2604 } … … 2845 2832 /* Block: Button ----------------------------- */ 2846 2833 2834 .wp-block-button { 2835 margin: 3rem 0; 2836 } 2837 2847 2838 .wp-block-button.is-style-outline { 2848 2839 color: #cd2653; 2849 2840 } 2850 2841 2851 . wp-block-button.is-style-outline .wp-block-button__link{2842 .is-style-outline .wp-block-button__link:not(.has-text-color) { 2852 2843 color: inherit; 2844 } 2845 2846 .is-style-outline .wp-block-button__link { 2847 padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem); 2853 2848 } 2854 2849 … … 2992 2987 .wp-block-media-text .wp-block-media-text__content p { 2993 2988 max-width: none; 2989 } 2990 2991 .wp-block-media-text__content > *:first-child { 2992 margin-top: 0; 2994 2993 } 2995 2994 … … 4336 4335 /* BLOCK: COLUMNS */ 4337 4336 4338 .alignfull .wp-block-column > p:not(.has-background-color),4337 .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color), 4339 4338 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4340 4339 max-width: calc(100% - 4rem); … … 4343 4342 } 4344 4343 4345 @media ( min-width: 600px ) {4344 @media ( min-width: 600px ) and ( max-width: 781px ) { 4346 4345 4347 4346 /* Blocks -------------------------------- */ … … 4349 4348 /* BLOCK: COLUMNS */ 4350 4349 4351 .alignfull .wp-block-column:nth-child(odd) > p:not(.has-background-color),4350 .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color), 4352 4351 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4353 4352 padding-right: 2rem; 4354 4353 } 4355 4354 4356 .alignfull .wp-block-column:nth-child(even) > p:not(.has-background-color),4355 .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color), 4357 4356 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4358 4357 padding-left: 2rem; … … 4763 4762 margin-top: 8rem; 4764 4763 min-height: 8rem; 4765 padding-right: 10rem;4766 4764 position: relative; 4767 4765 } 4768 4766 4769 4767 .author-bio .avatar { 4770 position: absolute;4771 right: 0;4772 top: 0;4773 height: 8rem;4774 4768 width: 8rem; 4775 4769 } … … 5252 5246 /* BLOCK: COLUMNS */ 5253 5247 5248 .wp-block-column { 5249 margin-bottom: 0; 5250 } 5251 5254 5252 .alignfull .wp-block-column:first-child > p, 5255 5253 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { … … 5257 5255 } 5258 5256 5259 .alignfull .wp-block-column:last-child > p,5257 .alignfull:not(.has-background) .wp-block-column:last-child > p, 5260 5258 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 5261 5259 padding-left: 2rem; -
trunk/src/wp-content/themes/twentytwenty/style.css
r46551 r46571 142 142 } 143 143 144 ::selection {145 background: #000;146 color: #fff;147 }148 149 144 #site-content { 150 145 overflow: hidden; … … 1422 1417 1423 1418 .toggle-inner { 1419 display: flex; 1420 justify-content: center; 1424 1421 height: 2.3rem; 1425 1422 position: relative; … … 1467 1464 } 1468 1465 1469 .search-toggle .toggle-text {1470 left: 0;1471 text-align: left;1472 }1473 1474 1466 /* Navigation Toggle ------------------------- */ 1475 1467 … … 1490 1482 .nav-toggle .toggle-inner { 1491 1483 padding-top: 0.8rem; 1492 }1493 1494 .nav-toggle .toggle-text {1495 right: 0;1496 text-align: right;1497 1484 } 1498 1485 … … 2488 2475 .author-bio { 2489 2476 margin-top: 4rem; 2490 } 2491 2492 .hide-avatars .author-bio { 2493 padding-left: 0; 2494 } 2495 2496 .author-bio-inner p:last-child { 2497 margin-bottom: 0; 2477 display: flex; 2478 flex-wrap: wrap; 2479 align-items: flex-start; 2480 } 2481 2482 .author-info { 2483 flex: 1; 2484 } 2485 2486 .hide-avatars img.avatar { 2487 display: none; 2498 2488 } 2499 2489 2500 2490 .author-bio .avatar { 2501 2491 margin-right: 1.5rem; 2502 height: 5rem;2503 2492 width: 5rem; 2504 2493 } 2505 2494 2506 2495 .author-bio .author-title { 2507 align-items: center; 2508 display: flex; 2509 margin: 0 0 1rem 0; 2496 margin: 0; 2510 2497 } 2511 2498 … … 2585 2572 /* CUSTOM COLORS */ 2586 2573 2587 .has-accent-color {2574 :root .has-accent-color { 2588 2575 color: #cd2653; 2589 2576 } 2590 2577 2591 .has-accent-background-color {2578 :root .has-accent-background-color { 2592 2579 background-color: #cd2653; 2593 2580 } 2594 2581 2595 .has-primary-color {2582 :root .has-primary-color { 2596 2583 color: #000; 2597 2584 } 2598 2585 2599 .has-primary-background-color {2586 :root .has-primary-background-color { 2600 2587 background-color: #000; 2601 2588 } 2602 2589 2603 .has-secondary-color {2590 :root .has-secondary-color { 2604 2591 color: #6d6d6d; 2605 2592 } 2606 2593 2607 .has-secondary-background-color {2594 :root .has-secondary-background-color { 2608 2595 background-color: #6d6d6d; 2609 2596 } 2610 2597 2611 .has-subtle-background-color {2598 :root .has-subtle-background-color { 2612 2599 color: #dcd7ca; 2613 2600 } 2614 2601 2615 .has-subtle-background-background-color {2602 :root .has-subtle-background-background-color { 2616 2603 background-color: #dcd7ca; 2617 2604 } 2618 2605 2619 .has-background-color {2606 :root .has-background-color { 2620 2607 color: #f5efe0; 2621 2608 } 2622 2609 2623 .has-background-background-color {2610 :root .has-background-background-color { 2624 2611 background-color: #f5efe0; 2625 2612 } … … 2855 2842 /* Block: Button ----------------------------- */ 2856 2843 2844 .wp-block-button { 2845 margin: 3rem 0; 2846 } 2847 2857 2848 .wp-block-button.is-style-outline { 2858 2849 color: #cd2653; 2859 2850 } 2860 2851 2861 . wp-block-button.is-style-outline .wp-block-button__link{2852 .is-style-outline .wp-block-button__link:not(.has-text-color) { 2862 2853 color: inherit; 2854 } 2855 2856 .is-style-outline .wp-block-button__link { 2857 padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem); 2863 2858 } 2864 2859 … … 3002 2997 .wp-block-media-text .wp-block-media-text__content p { 3003 2998 max-width: none; 2999 } 3000 3001 .wp-block-media-text__content > *:first-child { 3002 margin-top: 0; 3004 3003 } 3005 3004 … … 4354 4353 /* BLOCK: COLUMNS */ 4355 4354 4356 .alignfull .wp-block-column > p:not(.has-background-color),4355 .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color), 4357 4356 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4358 4357 max-width: calc(100% - 4rem); … … 4361 4360 } 4362 4361 4363 @media ( min-width: 600px ) {4362 @media ( min-width: 600px ) and ( max-width: 781px ) { 4364 4363 4365 4364 /* Blocks -------------------------------- */ … … 4367 4366 /* BLOCK: COLUMNS */ 4368 4367 4369 .alignfull .wp-block-column:nth-child(odd) > p:not(.has-background-color),4368 .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color), 4370 4369 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4371 4370 padding-left: 2rem; 4372 4371 } 4373 4372 4374 .alignfull .wp-block-column:nth-child(even) > p:not(.has-background-color),4373 .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color), 4375 4374 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 4376 4375 padding-right: 2rem; … … 4789 4788 margin-top: 8rem; 4790 4789 min-height: 8rem; 4791 padding-left: 10rem;4792 4790 position: relative; 4793 4791 } 4794 4792 4795 4793 .author-bio .avatar { 4796 position: absolute;4797 left: 0;4798 top: 0;4799 height: 8rem;4800 4794 width: 8rem; 4801 4795 } … … 5278 5272 /* BLOCK: COLUMNS */ 5279 5273 5274 .wp-block-column { 5275 margin-bottom: 0; 5276 } 5277 5280 5278 .alignfull .wp-block-column:first-child > p, 5281 5279 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { … … 5283 5281 } 5284 5282 5285 .alignfull .wp-block-column:last-child > p,5283 .alignfull:not(.has-background) .wp-block-column:last-child > p, 5286 5284 .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) { 5287 5285 padding-right: 2rem; -
trunk/src/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php
r46446 r46571 10 10 if ( (bool) get_the_author_meta( 'description' ) ) : ?> 11 11 <div class="author-bio"> 12 <h2 class="author-title heading-size-4"> 13 <div class="author-avatar vcard"> 14 <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?> 15 </div> 16 <span class="author-name"> 17 <?php 18 printf( 19 /* translators: %s: Author name */ 20 __( 'By %s', 'twentytwenty' ), 21 esc_html( get_the_author() ) 22 ); 23 ?> 24 </span> 25 </h2> 26 <p class="author-description"> 27 <?php the_author_meta( 'description' ); ?> 28 <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> 29 <?php _e( 'View Archive →', 'twentytwenty' ); ?> 30 </a> 31 </p><!-- .author-description --> 12 <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?> 13 <div class="author-info"> 14 <h2 class="author-title heading-size-4"> 15 <?php 16 printf( 17 /* translators: %s: Author name */ 18 __( 'By %s', 'twentytwenty' ), 19 esc_html( get_the_author() ) 20 ); 21 ?> 22 </h2> 23 <p class="author-description"> 24 <?php the_author_meta( 'description' ); ?> 25 <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> 26 <?php _e( 'View Archive →', 'twentytwenty' ); ?> 27 </a> 28 </p><!-- .author-description --> 29 </div> 32 30 </div><!-- .author-bio --> 33 31 <?php endif; ?> -
trunk/src/wp-content/themes/twentytwenty/template-parts/modal-menu.php
r46446 r46571 10 10 ?> 11 11 12 <div class="menu-modal cover-modal header-footer-group" data-modal-target-string=".menu-modal" aria-expanded="false">12 <div class="menu-modal cover-modal header-footer-group" data-modal-target-string=".menu-modal"> 13 13 14 14 <div class="menu-modal-inner modal-inner"> -
trunk/src/wp-content/themes/twentytwenty/template-parts/modal-search.php
r46551 r46571 9 9 10 10 ?> 11 <div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal" aria-expanded="false">11 <div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal"> 12 12 13 13 <div class="search-modal-inner modal-inner"> … … 23 23 ?> 24 24 25 <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field" >25 <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field" aria-expanded="false"> 26 26 <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span> 27 27 <?php twentytwenty_the_theme_svg( 'cross' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.