WordPress.org

Make WordPress Core

Changeset 46571


Ignore:
Timestamp:
10/22/2019 06:25:45 PM (4 weeks ago)
Author:
desrosj
Message:

Bundled Themes: Update Twenty Twenty.

This brings trunk’s version of Twenty Twenty in-sync with GitHub.

For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.

Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.

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  
    1313
    1414.editor-styles-wrapper > * {
    15     color: #000;
    1615    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    1716    font-size: 18px;
     
    2726
    2827.block-editor-default-block-appender textarea.block-editor-default-block-appender__content {
     28    color: inherit;
    2929    font-family: inherit;
    3030    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;
    3136}
    3237
     
    196201/* Typography -------------------------------- */
    197202
    198 .editor-styles-wrapper a {
     203.editor-styles-wrapper .editor-block-list__layout a {
    199204    color: #cd2653;
    200205    text-decoration: underline;
     
    213218.editor-styles-wrapper .wp-block h5,
    214219.editor-styles-wrapper .wp-block h6 {
    215     color: #000;
    216220    font-feature-settings: "lnum";
    217221    font-variant-numeric: lining-nums;
     
    474478}
    475479
    476 .editor-styles-wrapper  .wp-block-table caption {
     480.editor-styles-wrapper .wp-block-table caption {
    477481    background: #dcd7ca;
    478482    text-align: center;
    479483}
    480484
    481 .editor-styles-wrapper  .wp-block-table th,
    482 .editor-styles-wrapper  .wp-block-table td {
     485.editor-styles-wrapper .wp-block-table th,
     486.editor-styles-wrapper .wp-block-table td {
    483487    line-height: 1.4;
    484488    margin: 0;
     
    576580    border-style: solid;
    577581    border-width: 0 2px 0 0;
    578     color: inherit;
    579582    margin: 20px 0;
    580583    padding: 5px 20px 5px 0;
     
    634637/* Block: Code, Verse and Preformatted ------- */
    635638
     639.editor-styles-wrapper .wp-block-code {
     640    color: inherit;
     641}
     642
    636643.editor-styles-wrapper .wp-block-code,
    637644.editor-styles-wrapper .wp-block-preformatted pre,
     
    642649}
    643650
     651.editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre,
    644652.editor-styles-wrapper .wp-block-preformatted pre,
    645653.editor-styles-wrapper .wp-block-code .block-editor-plain-text,
    646654.editor-styles-wrapper .wp-block-verse pre {
    647655    background: transparent;
     656    color: inherit;
    648657    font-family: monospace;
    649658    font-size: 14px;
     
    939948}
    940949
     950/* Block: Shortcode -------------------------- */
     951
     952.editor-styles-wrapper .wp-block-shortcode textarea {
     953    color: #191e23;
     954}
     955
    941956/* Block: Embed ------------------------------ */
    942957
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

    r46551 r46571  
    1313
    1414.editor-styles-wrapper > * {
    15     color: #000;
    1615    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    1716    font-size: 18px;
     
    2726
    2827.block-editor-default-block-appender textarea.block-editor-default-block-appender__content {
     28    color: inherit;
    2929    font-family: inherit;
    3030    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;
    3136}
    3237
     
    196201/* Typography -------------------------------- */
    197202
    198 .editor-styles-wrapper a {
     203.editor-styles-wrapper .editor-block-list__layout a {
    199204    color: #cd2653;
    200205    text-decoration: underline;
     
    213218.editor-styles-wrapper .wp-block h5,
    214219.editor-styles-wrapper .wp-block h6 {
    215     color: #000;
    216220    font-feature-settings: "lnum";
    217221    font-variant-numeric: lining-nums;
     
    474478}
    475479
    476 .editor-styles-wrapper  .wp-block-table caption {
     480.editor-styles-wrapper .wp-block-table caption {
    477481    background: #dcd7ca;
    478482    text-align: center;
    479483}
    480484
    481 .editor-styles-wrapper  .wp-block-table th,
    482 .editor-styles-wrapper  .wp-block-table td {
     485.editor-styles-wrapper .wp-block-table th,
     486.editor-styles-wrapper .wp-block-table td {
    483487    line-height: 1.4;
    484488    margin: 0;
     
    576580    border-style: solid;
    577581    border-width: 0 0 0 2px;
    578     color: inherit;
    579582    margin: 20px 0;
    580583    padding: 5px 0 5px 20px;
     
    634637/* Block: Code, Verse and Preformatted ------- */
    635638
     639.editor-styles-wrapper .wp-block-code {
     640    color: inherit;
     641}
     642
    636643.editor-styles-wrapper .wp-block-code,
    637644.editor-styles-wrapper .wp-block-preformatted pre,
     
    642649}
    643650
     651.editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre,
    644652.editor-styles-wrapper .wp-block-preformatted pre,
    645653.editor-styles-wrapper .wp-block-code .block-editor-plain-text,
    646654.editor-styles-wrapper .wp-block-verse pre {
    647655    background: transparent;
     656    color: inherit;
    648657    font-family: monospace;
    649658    font-size: 14px;
     
    939948}
    940949
     950/* Block: Shortcode -------------------------- */
     951
     952.editor-styles-wrapper .wp-block-shortcode textarea {
     953    color: #191e23;
     954}
     955
    941956/* Block: Embed ------------------------------ */
    942957
  • trunk/src/wp-content/themes/twentytwenty/assets/js/color-calculations.js

    r46446 r46571  
    3636_twentyTwentyColor.prototype.setAccentColorsArray = function() {
    3737    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,
    4444        pushColor = function() {
    4545            var colorObj = new Color( {
     
    4848                    l: l
    4949                } ),
    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                };
    5165
    5266            item = {
     
    6377            // Get a score for this color by multiplying the 2 contrasts.
    6478            // We'll use that to sort the array.
    65             item.score = item.contrastBackground * item.contrastText;
     79            item.score = getScore( item.contrastBackground, item.contrastText );
    6680
    6781            self.accentColorsArray.push( item );
     
    90104    // Sort colors by contrast.
    91105    this.accentColorsArray.sort( function( a, b ) {
    92         return b.score - a.score;
     106        return a.score - b.score;
    93107    } );
    94108    return this;
  • trunk/src/wp-content/themes/twentytwenty/assets/js/customize-preview.js

    r46446 r46571  
    9595        value.bind( function( to ) {
    9696            // 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 );
    9898
    9999            // 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  
    232232                    }
    233233
    234                     _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );
    235 
    236                     _win.twentytwenty.scrolled = 0;
    237 
    238234                    if ( clickedEl !== false ) {
    239235                        clickedEl.focus();
    240236                        clickedEl = false;
    241237                    }
     238
     239                    _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );
     240
     241                    _win.twentytwenty.scrolled = 0;
    242242                }, 500 );
    243243            } );
     
    621621                _doc.querySelector( '*[data-toggle-target="' + targetString + '"]' ).classList.toggle( activeClass );
    622622            }
    623 
    624             // Toggle aria-expanded on the target
    625             twentytwentyToggleAttribute( target, 'aria-expanded', 'true', 'false' );
    626623
    627624            // Toggle aria-expanded on the toggle
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

    r46551 r46571  
    2626            $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    2727            $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' );
    3428
    3529            $wp_customize->selective_refresh->add_partial(
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php

    r46446 r46571  
    132132
    133133                    // 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>';
    135135
    136136                }
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r46551 r46571  
    603603        'content'       => array(
    604604            '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' ),
    606606                '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' ),
    608608                'fill'         => array( '.fill-children-accent', '.fill-children-accent *' ),
    609609            ),
    610610            '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' ),
    613613            ),
    614614            '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' ),
    617617            ),
    618618            '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' ),
    621621            ),
    622622            'borders'    => array(
    623623                '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' ),
    625625                'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
    626626                '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' ),
    628628            ),
    629629        ),
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r46446 r46571  
    5656
    5757        // 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
    6267        /**
    6368         * Filters the CSS selectors targeting button component on frontend to apply common css
     
    7075
    7176        // 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';
    7479
    7580        // Cover.
     
    127132            // Accent color.
    128133            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 );
    135137            }
    136138
     
    140142            }
    141143
     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
    142150            // Text color.
    143151            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 );
    145163            }
    146164        } elseif ( 'classic-editor' === $type ) {
  • trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php

    r46446 r46571  
    2222    // Define and register starter content to showcase the theme on new sites.
    2323    $starter_content = array(
    24         'widgets'   => array(
     24        'widgets'     => array(
    2525            // Place one core-defined widgets in the first footer widget area.
    2626            'sidebar-1' => array(
     
    3333        ),
    3434
     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
    3543        // Specify the core-defined pages to create and add custom thumbnails to some of them.
    36         'posts'     => array(
     44        'posts'       => array(
    3745            'front' => array(
    3846                'post_type'    => 'page',
    3947                'post_title'   => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ),
     48                // Use the above featured image with the predefined about page.
     49                'thumbnail'    => '{{image-opening}}',
    4050                'post_content' => join(
    4151                    '',
     
    5060                        '<div class="wp-block-column"><!-- wp:group -->',
    5161                        '<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 -->',
    5265                        '<!-- wp:heading {"level":3} -->',
    5366                        '<h3>' . __( 'Works and Days', 'twentytwenty' ) . '</h3>',
     
    6275                        '<!-- wp:group -->',
    6376                        '<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 -->',
    6480                        '<!-- wp:heading {"level":3} -->',
    6581                        '<h3>' . __( 'Theatre of Operations', 'twentytwenty' ) . '</h3>',
     
    7692                        '<div class="wp-block-column"><!-- wp:group -->',
    7793                        '<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 -->',
    7897                        '<!-- wp:heading {"level":3} -->',
    7998                        '<h3>' . __( 'The Life I Deserve', 'twentytwenty' ) . '</h3>',
     
    88107                        '<!-- wp:group -->',
    89108                        '<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 -->',
    90112                        '<!-- wp:heading {"level":3} -->',
    91113                        '<h3>' . __( 'From Signac to Matisse', 'twentytwenty' ) . '</h3>',
     
    100122                        '<!-- /wp:column --></div>',
    101123                        '<!-- /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 -->',
    102127                        '<!-- wp:group {"align":"wide"} -->',
    103128                        '<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center","textColor":"accent"} -->',
     
    127152                        '<!-- /wp:group --></div></div>',
    128153                        '<!-- /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 -->',
    129157                    )
    130158                ),
     
    136164
    137165        // Default to a static front page and assign the front and posts pages.
    138         'options'   => array(
     166        'options'     => array(
    139167            'show_on_front'  => 'page',
    140168            'page_on_front'  => '{{front}}',
     
    143171
    144172        // Set up nav menus for each of the two areas registered in the theme.
    145         'nav_menus' => array(
     173        'nav_menus'   => array(
    146174            // Assign a menu to the "primary" location.
    147175            'primary'  => array(
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r46446 r46571  
    191191 */
    192192function twentytwenty_edit_post_link( $link, $post_id, $text ) {
     193    if ( is_admin() ) {
     194        return $link;
     195    }
    193196
    194197    $edit_url = get_edit_post_link( $post_id );
     
    220223 * Get the post meta.
    221224 *
    222  * @param int    $post_id The iD of the post.
     225 * @param int    $post_id The ID of the post.
    223226 * @param string $location The location where the meta is shown.
    224227 */
     
    544547
    545548            // 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>';
    547550
    548551        }
  • trunk/src/wp-content/themes/twentytwenty/style-rtl.css

    r46551 r46571  
    142142}
    143143
    144 ::selection {
    145     background: #000;
    146     color: #fff;
    147 }
    148 
    149144#site-content {
    150145    overflow: hidden;
     
    14161411
    14171412.toggle-inner {
     1413    display: flex;
     1414    justify-content: center;
    14181415    height: 2.3rem;
    14191416    position: relative;
     
    14611458}
    14621459
    1463 .search-toggle .toggle-text {
    1464     right: 0;
    1465     text-align: right;
    1466 }
    1467 
    14681460/* Navigation Toggle ------------------------- */
    14691461
     
    14841476.nav-toggle .toggle-inner {
    14851477    padding-top: 0.8rem;
    1486 }
    1487 
    1488 .nav-toggle .toggle-text {
    1489     left: 0;
    1490     text-align: left;
    14911478}
    14921479
     
    24802467.author-bio {
    24812468    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;
    24902480}
    24912481
    24922482.author-bio .avatar {
    24932483    margin-left: 1.5rem;
    2494     height: 5rem;
    24952484    width: 5rem;
    24962485}
    24972486
    24982487.author-bio .author-title {
    2499     align-items: center;
    2500     display: flex;
    2501     margin: 0 0 1rem 0;
     2488    margin: 0;
    25022489}
    25032490
     
    25772564/* CUSTOM COLORS */
    25782565
    2579 .has-accent-color {
     2566:root .has-accent-color {
    25802567    color: #cd2653;
    25812568}
    25822569
    2583 .has-accent-background-color {
     2570:root .has-accent-background-color {
    25842571    background-color: #cd2653;
    25852572}
    25862573
    2587 .has-primary-color {
     2574:root .has-primary-color {
    25882575    color: #000;
    25892576}
    25902577
    2591 .has-primary-background-color {
     2578:root .has-primary-background-color {
    25922579    background-color: #000;
    25932580}
    25942581
    2595 .has-secondary-color {
     2582:root .has-secondary-color {
    25962583    color: #6d6d6d;
    25972584}
    25982585
    2599 .has-secondary-background-color {
     2586:root .has-secondary-background-color {
    26002587    background-color: #6d6d6d;
    26012588}
    26022589
    2603 .has-subtle-background-color {
     2590:root .has-subtle-background-color {
    26042591    color: #dcd7ca;
    26052592}
    26062593
    2607 .has-subtle-background-background-color {
     2594:root .has-subtle-background-background-color {
    26082595    background-color: #dcd7ca;
    26092596}
    26102597
    2611 .has-background-color {
     2598:root .has-background-color {
    26122599    color: #f5efe0;
    26132600}
    26142601
    2615 .has-background-background-color {
     2602:root .has-background-background-color {
    26162603    background-color: #f5efe0;
    26172604}
     
    28452832/* Block: Button ----------------------------- */
    28462833
     2834.wp-block-button {
     2835    margin: 3rem 0;
     2836}
     2837
    28472838.wp-block-button.is-style-outline {
    28482839    color: #cd2653;
    28492840}
    28502841
    2851 .wp-block-button.is-style-outline .wp-block-button__link {
     2842.is-style-outline .wp-block-button__link:not(.has-text-color) {
    28522843    color: inherit;
     2844}
     2845
     2846.is-style-outline .wp-block-button__link {
     2847    padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
    28532848}
    28542849
     
    29922987.wp-block-media-text .wp-block-media-text__content p {
    29932988    max-width: none;
     2989}
     2990
     2991.wp-block-media-text__content > *:first-child {
     2992    margin-top: 0;
    29942993}
    29952994
     
    43364335    /* BLOCK: COLUMNS */
    43374336
    4338     .alignfull .wp-block-column > p:not(.has-background-color),
     4337    .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    43394338    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43404339        max-width: calc(100% - 4rem);
     
    43434342}
    43444343
    4345 @media ( min-width: 600px ) {
     4344@media ( min-width: 600px ) and ( max-width: 781px ) {
    43464345
    43474346    /* Blocks -------------------------------- */
     
    43494348    /* BLOCK: COLUMNS */
    43504349
    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),
    43524351    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43534352        padding-right: 2rem;
    43544353    }
    43554354
    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),
    43574356    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43584357        padding-left: 2rem;
     
    47634762        margin-top: 8rem;
    47644763        min-height: 8rem;
    4765         padding-right: 10rem;
    47664764        position: relative;
    47674765    }
    47684766
    47694767    .author-bio .avatar {
    4770         position: absolute;
    4771         right: 0;
    4772         top: 0;
    4773         height: 8rem;
    47744768        width: 8rem;
    47754769    }
     
    52525246    /* BLOCK: COLUMNS */
    52535247
     5248    .wp-block-column {
     5249        margin-bottom: 0;
     5250    }
     5251
    52545252    .alignfull .wp-block-column:first-child > p,
    52555253    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
     
    52575255    }
    52585256
    5259     .alignfull .wp-block-column:last-child > p,
     5257    .alignfull:not(.has-background) .wp-block-column:last-child > p,
    52605258    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52615259        padding-left: 2rem;
  • trunk/src/wp-content/themes/twentytwenty/style.css

    r46551 r46571  
    142142}
    143143
    144 ::selection {
    145     background: #000;
    146     color: #fff;
    147 }
    148 
    149144#site-content {
    150145    overflow: hidden;
     
    14221417
    14231418.toggle-inner {
     1419    display: flex;
     1420    justify-content: center;
    14241421    height: 2.3rem;
    14251422    position: relative;
     
    14671464}
    14681465
    1469 .search-toggle .toggle-text {
    1470     left: 0;
    1471     text-align: left;
    1472 }
    1473 
    14741466/* Navigation Toggle ------------------------- */
    14751467
     
    14901482.nav-toggle .toggle-inner {
    14911483    padding-top: 0.8rem;
    1492 }
    1493 
    1494 .nav-toggle .toggle-text {
    1495     right: 0;
    1496     text-align: right;
    14971484}
    14981485
     
    24882475.author-bio {
    24892476    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;
    24982488}
    24992489
    25002490.author-bio .avatar {
    25012491    margin-right: 1.5rem;
    2502     height: 5rem;
    25032492    width: 5rem;
    25042493}
    25052494
    25062495.author-bio .author-title {
    2507     align-items: center;
    2508     display: flex;
    2509     margin: 0 0 1rem 0;
     2496    margin: 0;
    25102497}
    25112498
     
    25852572/* CUSTOM COLORS */
    25862573
    2587 .has-accent-color {
     2574:root .has-accent-color {
    25882575    color: #cd2653;
    25892576}
    25902577
    2591 .has-accent-background-color {
     2578:root .has-accent-background-color {
    25922579    background-color: #cd2653;
    25932580}
    25942581
    2595 .has-primary-color {
     2582:root .has-primary-color {
    25962583    color: #000;
    25972584}
    25982585
    2599 .has-primary-background-color {
     2586:root .has-primary-background-color {
    26002587    background-color: #000;
    26012588}
    26022589
    2603 .has-secondary-color {
     2590:root .has-secondary-color {
    26042591    color: #6d6d6d;
    26052592}
    26062593
    2607 .has-secondary-background-color {
     2594:root .has-secondary-background-color {
    26082595    background-color: #6d6d6d;
    26092596}
    26102597
    2611 .has-subtle-background-color {
     2598:root .has-subtle-background-color {
    26122599    color: #dcd7ca;
    26132600}
    26142601
    2615 .has-subtle-background-background-color {
     2602:root .has-subtle-background-background-color {
    26162603    background-color: #dcd7ca;
    26172604}
    26182605
    2619 .has-background-color {
     2606:root .has-background-color {
    26202607    color: #f5efe0;
    26212608}
    26222609
    2623 .has-background-background-color {
     2610:root .has-background-background-color {
    26242611    background-color: #f5efe0;
    26252612}
     
    28552842/* Block: Button ----------------------------- */
    28562843
     2844.wp-block-button {
     2845    margin: 3rem 0;
     2846}
     2847
    28572848.wp-block-button.is-style-outline {
    28582849    color: #cd2653;
    28592850}
    28602851
    2861 .wp-block-button.is-style-outline .wp-block-button__link {
     2852.is-style-outline .wp-block-button__link:not(.has-text-color) {
    28622853    color: inherit;
     2854}
     2855
     2856.is-style-outline .wp-block-button__link {
     2857    padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
    28632858}
    28642859
     
    30022997.wp-block-media-text .wp-block-media-text__content p {
    30032998    max-width: none;
     2999}
     3000
     3001.wp-block-media-text__content > *:first-child {
     3002    margin-top: 0;
    30043003}
    30053004
     
    43544353    /* BLOCK: COLUMNS */
    43554354
    4356     .alignfull .wp-block-column > p:not(.has-background-color),
     4355    .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    43574356    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43584357        max-width: calc(100% - 4rem);
     
    43614360}
    43624361
    4363 @media ( min-width: 600px ) {
     4362@media ( min-width: 600px ) and ( max-width: 781px ) {
    43644363
    43654364    /* Blocks -------------------------------- */
     
    43674366    /* BLOCK: COLUMNS */
    43684367
    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),
    43704369    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43714370        padding-left: 2rem;
    43724371    }
    43734372
    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),
    43754374    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43764375        padding-right: 2rem;
     
    47894788        margin-top: 8rem;
    47904789        min-height: 8rem;
    4791         padding-left: 10rem;
    47924790        position: relative;
    47934791    }
    47944792
    47954793    .author-bio .avatar {
    4796         position: absolute;
    4797         left: 0;
    4798         top: 0;
    4799         height: 8rem;
    48004794        width: 8rem;
    48014795    }
     
    52785272    /* BLOCK: COLUMNS */
    52795273
     5274    .wp-block-column {
     5275        margin-bottom: 0;
     5276    }
     5277
    52805278    .alignfull .wp-block-column:first-child > p,
    52815279    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
     
    52835281    }
    52845282
    5285     .alignfull .wp-block-column:last-child > p,
     5283    .alignfull:not(.has-background) .wp-block-column:last-child > p,
    52865284    .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52875285        padding-right: 2rem;
  • trunk/src/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php

    r46446 r46571  
    1010if ( (bool) get_the_author_meta( 'description' ) ) : ?>
    1111<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 &rarr;', '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 &rarr;', 'twentytwenty' ); ?>
     27                </a>
     28            </p><!-- .author-description -->
     29        </div>
    3230</div><!-- .author-bio -->
    3331<?php endif; ?>
  • trunk/src/wp-content/themes/twentytwenty/template-parts/modal-menu.php

    r46446 r46571  
    1010?>
    1111
    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">
    1313
    1414    <div class="menu-modal-inner modal-inner">
  • trunk/src/wp-content/themes/twentytwenty/template-parts/modal-search.php

    r46551 r46571  
    99
    1010?>
    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">
    1212
    1313    <div class="search-modal-inner modal-inner">
     
    2323            ?>
    2424
    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">
    2626                <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span>
    2727                <?php twentytwenty_the_theme_svg( 'cross' ); ?>
Note: See TracChangeset for help on using the changeset viewer.