Changeset 49247
- Timestamp:
- 10/20/2020 06:24:33 PM (4 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwentyone
- Files:
-
- 13 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/assets/css/ie-editor.css
r49216 r49247 33 33 /* OS dark theme preference */ 34 34 @media (prefers-color-scheme: dark) { 35 html. has-default-light-palette-backgroundbody {35 html.respect-color-scheme-preference body { 36 36 background-color: #28303d; 37 37 } 38 38 @media (prefers-color-scheme: dark){ 39 html. has-default-light-palette-backgroundbody{39 html.respect-color-scheme-preference body{ 40 40 background-color: #28303d; 41 41 } … … 2198 2198 } 2199 2199 2200 table.wp-calendar-table thead { 2201 border: 1px solid #28303d; 2202 } 2203 2200 table.wp-calendar-table thead, 2204 2201 table.wp-calendar-table tbody { 2205 border: 1px solid #28303d; 2202 color: currentColor; 2203 border: 1px solid; 2206 2204 } 2207 2205 … … 2210 2208 text-align: left; 2211 2209 margin-bottom: 20px; 2210 color: currentColor; 2212 2211 } 2213 2212 -
trunk/src/wp-content/themes/twentytwentyone/assets/css/ie.css
r49216 r49247 7 7 Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog. 8 8 Requires at least: 5.3 9 Tested up to: 5. 59 Tested up to: 5.6 10 10 Requires PHP: 5.6 11 11 Version: 1.0.0 … … 125 125 /* OS dark theme preference */ 126 126 @media (prefers-color-scheme: dark) { 127 html. has-default-light-palette-backgroundbody {127 html.respect-color-scheme-preference body { 128 128 background-color: #28303d; 129 129 } 130 130 @media (prefers-color-scheme: dark){ 131 html. has-default-light-palette-backgroundbody{131 html.respect-color-scheme-preference body{ 132 132 background-color: #28303d; 133 133 } … … 1365 1365 .entry-content > *.alignleft, .entry-content > *.alignright, 1366 1366 .entry-content > *.alignleft:first-child + *, 1367 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull {1367 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull.has-background { 1368 1368 margin-top: 0; 1369 1369 } 1370 1370 1371 .entry-content > *:last-child, .entry-content > *.alignfull {1371 .entry-content > *:last-child, .entry-content > *.alignfull.has-background { 1372 1372 margin-bottom: 0; 1373 1373 } … … 4250 4250 } 4251 4251 4252 table.wp-calendar-table thead { 4253 border: 1px solid #28303d; 4254 } 4255 4252 table.wp-calendar-table thead, 4256 4253 table.wp-calendar-table tbody { 4257 border: 1px solid #28303d; 4254 color: currentColor; 4255 border: 1px solid; 4258 4256 } 4259 4257 … … 4262 4260 text-align: left; 4263 4261 margin-bottom: 20px; 4262 color: currentColor; 4264 4263 } 4265 4264 … … 4810 4809 color: #28303d; 4811 4810 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 4812 font-size: 1 rem;4811 font-size: 1.125rem; 4813 4812 line-height: 1.7; 4814 4813 border-top: 3px solid #28303d; … … 5706 5705 height: 100vh; 5707 5706 z-index: 499; 5707 border: 2px solid transparent; 5708 5708 } 5709 5709 .has-logo.has-title-and-tagline .primary-navigation > .primary-menu-container { … … 5716 5716 .admin-bar .primary-navigation > .primary-menu-container { 5717 5717 height: calc(100vh - 46px); 5718 } 5719 .primary-navigation > .primary-menu-container:focus { 5720 border: 2px solid #28303d; 5718 5721 } 5719 5722 } … … 6361 6364 padding-bottom: 10px; 6362 6365 color: #28303d; 6363 font-size: 1 rem;6366 font-size: 1.125rem; 6364 6367 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 6365 6368 } -
trunk/src/wp-content/themes/twentytwentyone/assets/css/style-editor.css
r49216 r49247 165 165 --footer--color-link-hover: var(--global--color-primary-hover); 166 166 --footer--font-family: var(--global--font-primary); 167 --footer--font-size: var(--global--font-size- xs);167 --footer--font-size: var(--global--font-size-sm); 168 168 /* Block: Pull quote */ 169 169 --pullquote--font-family: var(--global--font-primary); … … 211 211 /* OS dark theme preference */ 212 212 @media (prefers-color-scheme: dark) { 213 html. has-default-light-palette-background{213 html.respect-color-scheme-preference { 214 214 --global--color-background: var(--global--color-dark-gray); 215 215 --global--color-primary: var(--global--color-light-gray); … … 221 221 --button--color-background-active: var(--global--color-background); 222 222 } 223 html. has-default-light-palette-backgroundbody {223 html.respect-color-scheme-preference body { 224 224 background-color: var(--global--color-background); 225 225 } … … 1590 1590 table.wp-calendar-table thead, 1591 1591 table.wp-calendar-table tbody { 1592 border: 1px solid var(--global--color-dark-gray); 1592 color: currentColor; 1593 border: 1px solid; 1593 1594 } 1594 1595 … … 1597 1598 text-align: left; 1598 1599 margin-bottom: var(--global--spacing-unit); 1600 color: currentColor; 1599 1601 } 1600 1602 -
trunk/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js
r49216 r49247 39 39 * @param {Element} el - The element. 40 40 */ 41 function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line41 function twentytwentyoneExpandSubMenu( el ) { // eslint-disable-line no-unused-vars 42 42 // Close submenu that was opened from a hover action. 43 43 // We'll return early in this case to avoid changing the aria-expanded attribute. -
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
r49216 r49247 33 33 34 34 /** 35 * Determine the luminance of the given color and then return #fff or #000 so that ourtext is always readable.35 * Determine the luminance of the given color and then return #fff or #000 so that the text is always readable. 36 36 * 37 37 * @access public … … 44 44 */ 45 45 public function custom_get_readable_color( $background_color ) { 46 return ( 127 < $this->get_relative_luminance_from_hex( $background_color ) ) ? '#000' : '#fff';46 return ( 127 < self::get_relative_luminance_from_hex( $background_color ) ) ? '#000' : '#fff'; 47 47 } 48 48 … … 116 116 (string) filemtime( get_theme_file_path( 'assets/css/custom-color-overrides.css' ) ) 117 117 ); 118 if ( 'd1e4dd' !== strtolower( get_theme_mod( 'background_color', 'D1E4DD' ) ) ) { 118 119 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 120 if ( 'd1e4dd' !== strtolower( $background_color ) ) { 119 121 wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) ); 122 } 123 124 $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', true ); // @phpstan-ignore-line. Passing true instead of default value of false to get_theme_mod. 125 if ( $should_respect_color_scheme && self::get_relative_luminance_from_hex( $background_color ) > 127 ) { 126 // Add dark mode variable overrides. 127 wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', '@media (prefers-color-scheme: dark) { :root .editor-styles-wrapper { --global--color-background: var(--global--color-dark-gray); --global--color-primary: var(--global--color-light-gray); --global--color-secondary: var(--global--color-light-gray); } }' ); 120 128 } 121 129 } … … 123 131 /** 124 132 * Get luminance from a HEX color. 133 * 134 * @static 125 135 * 126 136 * @access public … … 132 142 * @return int Returns a number (0-255). 133 143 */ 134 public function get_relative_luminance_from_hex( $hex ) {144 public static function get_relative_luminance_from_hex( $hex ) { 135 145 136 146 // Remove the "#" symbol from the beginning of the color. 137 147 $hex = ltrim( $hex, '#' ); 138 148 139 // Make sure we have 6 digits for the below calculations.149 // Make sure there are 6 digits for the below calculations. 140 150 if ( 3 === strlen( $hex ) ) { 141 151 $hex = substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ); … … 165 175 public function body_class( $classes ) { 166 176 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 167 if ( 127 > $this->get_relative_luminance_from_hex( $background_color ) ) {177 if ( 127 > self::get_relative_luminance_from_hex( $background_color ) ) { 168 178 $classes[] = 'is-background-dark'; 169 179 } else { … … 171 181 } 172 182 173 $light_colors_default_palette = array( '#D1E4DD', '#D1DFE4', '#D1D1E4', '#E4D1D1', '#E4DAD1', '#EEEADD', '#FFFFFF' );174 if ( in_array( strtoupper( '#' . ltrim( $background_color, '#' ) ), $light_colors_default_palette, true ) ) {175 $classes[] = 'has-default-light-palette-background';176 }177 178 183 return $classes; 179 184 } -
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php
r49216 r49247 41 41 42 42 // Change site-title & description to postMessage. 43 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 44 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 43 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. 44 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. 45 45 46 46 // Add partial for blogname. … … 127 127 $palette = get_theme_support( 'editor-color-palette' ); 128 128 129 // Build the colors array from ourtheme-support.129 // Build the colors array from theme-support. 130 130 $colors = array(); 131 131 if ( isset( $palette[0] ) && is_array( $palette[0] ) ) { … … 147 147 ) 148 148 ); 149 150 $wp_customize->add_setting( 151 'respect_user_color_preference', 152 array( 153 'capability' => 'edit_theme_options', 154 'default' => true, 155 'sanitize_callback' => function( $value ) { 156 return (bool) $value; 157 }, 158 ) 159 ); 160 161 $wp_customize->add_control( 162 'respect_user_color_preference', 163 array( 164 'type' => 'checkbox', 165 'section' => 'colors', 166 'label' => esc_html__( 'Respect visitor\'s device dark mode settings', 'twentytwentyone' ), 167 'description' => __( 'Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.', 'twentytwentyone' ), 168 'active_callback' => function( $value ) { 169 return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); 170 }, 171 ) 172 ); 149 173 } 150 174 -
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-svg-icons.php
r49216 r49247 188 188 } 189 189 190 // @phpstan-ignore-next-line. 190 191 return $svg; 191 192 } -
trunk/src/wp-content/themes/twentytwentyone/comments.php
r49216 r49247 15 15 /* 16 16 * If the current post is protected by a password and 17 * the visitor has not yet entered the password we will17 * the visitor has not yet entered the password, 18 18 * return early without loading the comments. 19 19 */ -
trunk/src/wp-content/themes/twentytwentyone/functions.php
r49216 r49247 41 41 /* 42 42 * Let WordPress manage the document title. 43 * By adding theme support, we declare that this theme does not use a 44 * hard-coded <title> tag in the document head, and expect WordPress to 45 * provide it for us. 43 * This theme does not use a hard-coded <title> tag in the document head, 44 * WordPress will provide it for us. 46 45 */ 47 46 add_theme_support( 'title-tag' ); … … 127 126 // Add support for editor styles. 128 127 add_theme_support( 'editor-styles' ); 128 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 129 if ( 127 > Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { 130 add_theme_support( 'dark-editor-style' ); 131 } 129 132 130 133 $editor_stylesheet_path = './assets/css/style-editor.css'; … … 146 149 array( 147 150 'name' => esc_html__( 'Extra small', 'twentytwentyone' ), 148 'shortName' => esc_html_ _( 'XS', 'twentytwentyone' ),151 'shortName' => esc_html_x( 'XS', 'Font size', 'twentytwentyone' ), 149 152 'size' => 16, 150 153 'slug' => 'extra-small', … … 152 155 array( 153 156 'name' => esc_html__( 'Small', 'twentytwentyone' ), 154 'shortName' => esc_html_ _( 'S', 'twentytwentyone' ),157 'shortName' => esc_html_x( 'S', 'Font size', 'twentytwentyone' ), 155 158 'size' => 18, 156 159 'slug' => 'small', … … 158 161 array( 159 162 'name' => esc_html__( 'Normal', 'twentytwentyone' ), 160 'shortName' => esc_html_ _( 'M', 'twentytwentyone' ),163 'shortName' => esc_html_x( 'M', 'Font size', 'twentytwentyone' ), 161 164 'size' => 20, 162 165 'slug' => 'normal', … … 164 167 array( 165 168 'name' => esc_html__( 'Large', 'twentytwentyone' ), 166 'shortName' => esc_html_ _( 'L', 'twentytwentyone' ),169 'shortName' => esc_html_x( 'L', 'Font size', 'twentytwentyone' ), 167 170 'size' => 24, 168 171 'slug' => 'large', … … 170 173 array( 171 174 'name' => esc_html__( 'Extra Large', 'twentytwentyone' ), 172 'shortName' => esc_html_ _( 'XL', 'twentytwentyone' ),175 'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ), 173 176 'size' => 40, 174 177 'slug' => 'extra-large', … … 176 179 array( 177 180 'name' => esc_html__( 'Huge', 'twentytwentyone' ), 178 'shortName' => esc_html_ _( 'XXL', 'twentytwentyone' ),181 'shortName' => esc_html_x( 'XXL', 'Font size', 'twentytwentyone' ), 179 182 'size' => 96, 180 183 'slug' => 'huge', … … 182 185 array( 183 186 'name' => esc_html__( 'Gigantic', 'twentytwentyone' ), 184 'shortName' => esc_html_ _( 'XXXL', 'twentytwentyone' ),187 'shortName' => esc_html_x( 'XXXL', 'Font size', 'twentytwentyone' ), 185 188 'size' => 144, 186 189 'slug' => 'gigantic', … … 523 526 function twentytwentyone_customize_preview_init() { 524 527 wp_enqueue_script( 528 'twentytwentyone-customize-helpers', 529 get_theme_file_uri( '/assets/js/customize-helpers.js' ), 530 array(), 531 wp_get_theme()->get( 'Version' ), 532 true 533 ); 534 535 wp_enqueue_script( 525 536 'twentytwentyone-customize-preview', 526 537 get_theme_file_uri( '/assets/js/customize-preview.js' ), 527 array( 'customize-preview', 'customize-selective-refresh', 'jquery' ),528 get_theme_file_path( 'assets/js/customize-preview.js' ),538 array( 'customize-preview', 'customize-selective-refresh', 'jquery', 'twentytwentyone-customize-helpers' ), 539 wp_get_theme()->get( 'Version' ), 529 540 true 530 541 ); … … 532 543 add_action( 'customize_preview_init', 'twentytwentyone_customize_preview_init' ); 533 544 534 /** 535 * Calculate any classes we may want to add to the main <html> element. 545 546 /** 547 * Enqueue scripts for the customizer. 548 * 549 * @since 1.0.0 550 * 551 * @return void 552 */ 553 function twentytwentyone_customize_controls_enqueue_scripts() { 554 555 wp_enqueue_script( 556 'twentytwentyone-customize-helpers', 557 get_theme_file_uri( '/assets/js/customize-helpers.js' ), 558 array(), 559 wp_get_theme()->get( 'Version' ), 560 true 561 ); 562 563 wp_enqueue_script( 564 'twentytwentyone-customize-controls', 565 get_theme_file_uri( '/assets/js/customize.js' ), 566 array( 'customize-base', 'customize-controls', 'underscore', 'jquery', 'twentytwentyone-customize-helpers' ), 567 wp_get_theme()->get( 'Version' ), 568 true 569 ); 570 571 wp_localize_script( 572 'twentytwentyone-customize-controls', 573 'backgroundColorNotice', 574 array( 575 'message' => esc_html__( 'You currently have dark mode enabled on your device. Changing the color picker will allow you to preview light mode.', 'twentytwentyone' ), 576 ) 577 ); 578 } 579 add_action( 'customize_controls_enqueue_scripts', 'twentytwentyone_customize_controls_enqueue_scripts' ); 580 581 /** 582 * Calculate classes for the main <html> element. 536 583 * 537 584 * @since 1.0.0 … … 540 587 */ 541 588 function twentytwentyone_the_html_classes() { 542 $background_color 543 $ light_colors_default_palette = array( '#D1E4DD', '#D1DFE4', '#D1D1E4', '#E4D1D1', '#E4DAD1', '#EEEADD', '#FFFFFF');544 if ( in_array( strtoupper( '#' . ltrim( $background_color, '#' ) ), $light_colors_default_palette, true) ) {545 echo 'class=" has-default-light-palette-background"';546 } 547 } 589 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 590 $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', true ); 591 if ( $should_respect_color_scheme && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { 592 echo 'class="respect-color-scheme-preference"'; 593 } 594 } -
trunk/src/wp-content/themes/twentytwentyone/header.php
r49216 r49247 1 1 <?php 2 2 /** 3 * The header for our theme3 * The header. 4 4 * 5 5 * This is the template that displays all of the <head> section and everything up until main. -
trunk/src/wp-content/themes/twentytwentyone/image.php
r49216 r49247 43 43 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">', 44 44 'after' => '</nav>', 45 /* translators: There is a space after page. */46 'pagelink' => esc_html__( 'Page ', 'twentytwentyone' ) . '%',45 /* translators: %: page number. */ 46 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), 47 47 ) 48 48 ); … … 102 102 </article><!-- #post-## --> 103 103 <?php 104 // If comments are open or we haveat least one comment, load up the comment template.104 // If comments are open or there is at least one comment, load up the comment template. 105 105 if ( comments_open() || get_comments_number() ) { 106 106 comments_template(); -
trunk/src/wp-content/themes/twentytwentyone/inc/back-compat.php
r49216 r49247 40 40 printf( 41 41 /* translators: %s: WordPress Version. */ 42 esc_html__( 'This theme requires at least WordPress version 5.3. You are running version %s. Please upgrade and try again.', 'twentytwentyone' ),42 esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), 43 43 esc_html( $GLOBALS['wp_version'] ) 44 44 ); … … 59 59 sprintf( 60 60 /* translators: %s: WordPress Version. */ 61 esc_html__( 'This theme requires at least WordPress version 5.3. You are running version %s. Please upgrade and try again.', 'twentytwentyone' ),61 esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), 62 62 esc_html( $GLOBALS['wp_version'] ) 63 63 ), … … 84 84 sprintf( 85 85 /* translators: %s: WordPress Version. */ 86 esc_html__( 'This theme requires at least WordPress version 5.3. You are running version %s. Please upgrade and try again.', 'twentytwentyone' ),86 esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), 87 87 esc_html( $GLOBALS['wp_version'] ) 88 88 ) -
trunk/src/wp-content/themes/twentytwentyone/inc/custom-css.php
r49216 r49247 24 24 function twenty_twenty_one_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $echo = true ) { 25 25 26 // Bail early if we haveno $selector elements or properties and $value.26 // Bail early if there is no $selector elements or properties and $value. 27 27 if ( ! $value || ! $selector ) { 28 28 return ''; … … 35 35 * Note to reviewers: $css contains auto-generated CSS. 36 36 * It is included inside <style> tags and can only be interpreted as CSS on the browser. 37 * Using wp_strip_all_tags() here is sufficient escaping since we just needto avoid37 * Using wp_strip_all_tags() here is sufficient escaping to avoid 38 38 * malicious attempts to close </style> and open a <script>. 39 39 */ -
trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r49216 r49247 271 271 */ 272 272 function twenty_twenty_one_change_calendar_nav_arrows( $calendar_output ) { 273 $calendar_output = str_replace( '« ', twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), $calendar_output );274 $calendar_output = str_replace( ' »', twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output );273 $calendar_output = str_replace( '« ', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), $calendar_output ); 274 $calendar_output = str_replace( ' »', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output ); 275 275 return $calendar_output; 276 276 } … … 382 382 383 383 // Return the specified styles. 384 return twenty_twenty_one_generate_css( 384 return twenty_twenty_one_generate_css( // @phpstan-ignore-line. 385 385 implode( ',', $elements[ $type ] ), 386 386 'font-family', … … 399 399 * @param string $block_name The full block type name, or a partial match. 400 400 * Example: `core/image`, `core-embed/*`. 401 * @param string|null $content The content we needto search in. Use null for get_the_content().402 * @param int $instances How many instances of the block w e want to print. Defaults to 1.401 * @param string|null $content The content to search in. Use null for get_the_content(). 402 * @param int $instances How many instances of the block will be printed (max). Defaults to 1. 403 403 * 404 404 * @return bool Returns true if a block was located & printed, otherwise false. … … 423 423 } 424 424 425 // Check if this the block we're looking for.425 // Check if this the block matches the $block_name. 426 426 $is_matching_block = false; 427 427 428 // If the block ends with *, we should justtry to match the first portion.428 // If the block ends with *, try to match the first portion. 429 429 if ( '*' === $block_name[-1] ) { 430 430 $is_matching_block = 0 === strpos( $block['blockName'], rtrim( $block_name, '*' ) ); … … 440 440 $blocks_content .= render_block( $block ); 441 441 442 // Break the loop if we've reached the $instances count.442 // Break the loop if the $instances count was reached. 443 443 if ( $instances_count >= $instances ) { 444 444 break; -
trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php
r49216 r49247 74 74 if ( ! is_single() ) { 75 75 76 if ( is_sticky() ) { 77 echo '<p>' . esc_html__( 'Featured post', 'twentytwentyone' ) . '</p>'; 78 } 79 76 80 $post_format = get_post_format(); 77 81 if ( 'aside' === $post_format || 'status' === $post_format ) { -
trunk/src/wp-content/themes/twentytwentyone/page.php
r49216 r49247 17 17 get_template_part( 'template-parts/content/content-page' ); 18 18 19 // If comments are open or we haveat least one comment, load up the comment template.19 // If comments are open or there is at least one comment, load up the comment template. 20 20 if ( comments_open() || get_comments_number() ) { 21 21 comments_template(); -
trunk/src/wp-content/themes/twentytwentyone/single.php
r49216 r49247 28 28 } 29 29 30 // If comments are open or we haveat least one comment, load up the comment template.30 // If comments are open or there is at least one comment, load up the comment template. 31 31 if ( comments_open() || get_comments_number() ) { 32 32 comments_template(); -
trunk/src/wp-content/themes/twentytwentyone/style-rtl.css
r49216 r49247 257 257 --footer--color-link-hover: var(--global--color-primary-hover); 258 258 --footer--font-family: var(--global--font-primary); 259 --footer--font-size: var(--global--font-size- xs);259 --footer--font-size: var(--global--font-size-sm); 260 260 /* Block: Pull quote */ 261 261 --pullquote--font-family: var(--global--font-primary); … … 303 303 /* OS dark theme preference */ 304 304 @media (prefers-color-scheme: dark) { 305 html. has-default-light-palette-background{305 html.respect-color-scheme-preference { 306 306 --global--color-background: var(--global--color-dark-gray); 307 307 --global--color-primary: var(--global--color-light-gray); … … 313 313 --button--color-background-active: var(--global--color-background); 314 314 } 315 html. has-default-light-palette-backgroundbody {315 html.respect-color-scheme-preference body { 316 316 background-color: var(--global--color-background); 317 317 } … … 1005 1005 .entry-content > *.alignleft, .entry-content > *.alignright, 1006 1006 .entry-content > *.alignleft:first-child + *, 1007 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull {1007 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull.has-background { 1008 1008 margin-top: 0; 1009 1009 } 1010 1010 1011 .entry-content > *:last-child, .entry-content > *.alignfull {1011 .entry-content > *:last-child, .entry-content > *.alignfull.has-background { 1012 1012 margin-bottom: 0; 1013 1013 } … … 2974 2974 table.wp-calendar-table thead, 2975 2975 table.wp-calendar-table tbody { 2976 border: 1px solid var(--global--color-dark-gray); 2976 color: currentColor; 2977 border: 1px solid; 2977 2978 } 2978 2979 … … 2981 2982 text-align: right; 2982 2983 margin-bottom: var(--global--spacing-unit); 2984 color: currentColor; 2983 2985 } 2984 2986 … … 4067 4069 height: 100vh; 4068 4070 z-index: 499; 4071 border: 2px solid transparent; 4069 4072 } 4070 4073 .has-logo.has-title-and-tagline .primary-navigation > .primary-menu-container { … … 4077 4080 .admin-bar .primary-navigation > .primary-menu-container { 4078 4081 height: calc(100vh - 46px); 4082 } 4083 .primary-navigation > .primary-menu-container:focus { 4084 border: 2px solid var(--global--color-primary); 4079 4085 } 4080 4086 } -
trunk/src/wp-content/themes/twentytwentyone/style.css
r49216 r49247 257 257 --footer--color-link-hover: var(--global--color-primary-hover); 258 258 --footer--font-family: var(--global--font-primary); 259 --footer--font-size: var(--global--font-size- xs);259 --footer--font-size: var(--global--font-size-sm); 260 260 /* Block: Pull quote */ 261 261 --pullquote--font-family: var(--global--font-primary); … … 303 303 /* OS dark theme preference */ 304 304 @media (prefers-color-scheme: dark) { 305 html. has-default-light-palette-background{305 html.respect-color-scheme-preference { 306 306 --global--color-background: var(--global--color-dark-gray); 307 307 --global--color-primary: var(--global--color-light-gray); … … 313 313 --button--color-background-active: var(--global--color-background); 314 314 } 315 html. has-default-light-palette-backgroundbody {315 html.respect-color-scheme-preference body { 316 316 background-color: var(--global--color-background); 317 317 } … … 1009 1009 .entry-content > *.alignleft, .entry-content > *.alignright, 1010 1010 .entry-content > *.alignleft:first-child + *, 1011 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull {1011 .entry-content > *.alignright:first-child + *, .entry-content > *.alignfull.has-background { 1012 1012 margin-top: 0; 1013 1013 } 1014 1014 1015 .entry-content > *:last-child, .entry-content > *.alignfull {1015 .entry-content > *:last-child, .entry-content > *.alignfull.has-background { 1016 1016 margin-bottom: 0; 1017 1017 } … … 2978 2978 table.wp-calendar-table thead, 2979 2979 table.wp-calendar-table tbody { 2980 border: 1px solid var(--global--color-dark-gray); 2980 color: currentColor; 2981 border: 1px solid; 2981 2982 } 2982 2983 … … 2985 2986 text-align: left; 2986 2987 margin-bottom: var(--global--spacing-unit); 2988 color: currentColor; 2987 2989 } 2988 2990 … … 4076 4078 height: 100vh; 4077 4079 z-index: 499; 4080 border: 2px solid transparent; 4078 4081 } 4079 4082 .has-logo.has-title-and-tagline .primary-navigation > .primary-menu-container { … … 4086 4089 .admin-bar .primary-navigation > .primary-menu-container { 4087 4090 height: calc(100vh - 46px); 4091 } 4092 .primary-navigation > .primary-menu-container:focus { 4093 border: 2px solid var(--global--color-primary); 4088 4094 } 4089 4095 } -
trunk/src/wp-content/themes/twentytwentyone/template-parts/content/content-page.php
r49216 r49247 33 33 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">', 34 34 'after' => '</nav>', 35 /* translators: There is a space after page. */36 'pagelink' => esc_html__( 'Page ', 'twentytwentyone' ) . '%',35 /* translators: %: page number. */ 36 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), 37 37 ) 38 38 ); -
trunk/src/wp-content/themes/twentytwentyone/template-parts/content/content-single.php
r49216 r49247 27 27 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">', 28 28 'after' => '</nav>', 29 /* translators: There is a space after page. */30 'pagelink' => esc_html__( 'Page ', 'twentytwentyone' ) . '%',29 /* translators: %: page number. */ 30 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), 31 31 ) 32 32 ); -
trunk/src/wp-content/themes/twentytwentyone/template-parts/content/content.php
r49216 r49247 26 26 <?php 27 27 the_content( 28 sprintf( 29 twenty_twenty_one_continue_reading_text(), 30 get_the_title() 31 ) 28 twenty_twenty_one_continue_reading_text() 32 29 ); 33 30 … … 36 33 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">', 37 34 'after' => '</nav>', 38 /* translators: There is a space after page. */39 'pagelink' => esc_html__( 'Page ', 'twentytwentyone' ) . '%',35 /* translators: %: page number. */ 36 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), 40 37 ) 41 38 ); -
trunk/src/wp-content/themes/twentytwentyone/template-parts/excerpt/excerpt-chat.php
r49216 r49247 11 11 12 12 // If there are paragraph blocks, print up to two. 13 // Otherwise this is legacy content, and we can post the excerpt.13 // Otherwise this is legacy content, so print the excerpt. 14 14 if ( has_block( 'core/paragraph', get_the_content() ) ) { 15 15 -
trunk/src/wp-content/themes/twentytwentyone/template-parts/excerpt/excerpt-gallery.php
r49216 r49247 10 10 */ 11 11 12 // Print the 1st gallery we can find.12 // Print the 1st gallery found. 13 13 if ( has_block( 'core/gallery', get_the_content() ) ) { 14 14 -
trunk/src/wp-content/themes/twentytwentyone/template-parts/excerpt/excerpt-image.php
r49216 r49247 10 10 */ 11 11 12 // If there is no featured-image, print the first image block we can find.12 // If there is no featured-image, print the first image block found. 13 13 if ( 14 14 ! twenty_twenty_one_can_show_post_thumbnail() &&
Note: See TracChangeset
for help on using the changeset viewer.