Making WordPress.org

Changeset 14457


Ignore:
Timestamp:
05/28/2025 05:37:40 AM (9 months ago)
Author:
dd32
Message:

WP I18N Teams: Update the team page styling with the newer block buttons.

Props dd32, dhrumilk, mikinc860, rollybueno.
Fixes #7916, #7986.
Closes https://github.com/WordPress/wordpress.org/pull/490.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/css/i18n-teams.css

    r13686 r14457  
    104104    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
    105105}
    106 #locale-header ul,
    107 #main ul#postlist .postcontent #locale-header ul {
    108     overflow: auto;
    109     margin-left: 0 !important; /* !important is necessary here to override P2's use of !important in .postcontent ul */
    110 }
     106
    111107#locale-header ul li {
    112108    list-style-type: none;
    113109}
    114 #locale-header ul#locale-details {
    115     margin-bottom: 0 !important; /* !important is necessary here to override P2's use of !important in .postcontent ul */
    116 }
    117 #locale-download {
    118     margin-bottom: 0 !important; /* !important is necessary here to override P2's use of !important in .postcontent ul */
    119 }
    120 #locale-header ul li.download-button,
    121 #main ul#postlist .postcontent #locale-header ul li.download-button {
    122     float: left;
    123     height: unset;
    124     margin: 8px 12px 0 0;   /* todo put list spacing on the button itself, so that the ul takes up no space when there are no li's inside it */
    125     padding: 6px 12px;
    126     text-align: center;
    127     white-space: unset;
    128 }
    129 #locale-header ul li.download-button a {
    130     font-size: 14px;
    131     font-size: 1.4rem;
    132     line-height: 1.5;
    133     color: white;
    134     text-decoration: none;
    135 }
    136 @media only screen and (max-width: 600px) {
    137     #locale-header ul li.download-button,
    138     #main ul#postlist .postcontent #locale-header ul li.download-button {
    139         width: 100%;
    140     }
    141 }
    142 
    143 #locale-details,
    144 #main ul#locale-details {
     110
     111#locale-details {
    145112    font-size: 1.2em;
    146 }
    147 
    148 .validators,
    149 #main ul#postlist .postcontent ul.validators {
     113    padding-left: 0;
     114}
     115
     116.validators {
    150117    overflow: auto;
    151     margin: 0 !important; /* !important is necessary here to override P2's use of !important in .postcontent ul */
    152118    padding: 0;
    153119}
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/inc/locales.php

    r13603 r14457  
    2626function enqueue_assets(): void {
    2727    if ( is_singular() && false !== strpos( get_post()->post_content, '[wp-locales' ) ) {
    28         wp_enqueue_style( 'wp-i18n-teams', plugins_url( 'css/i18n-teams.css', PLUGIN_FILE ), [], 13 );
    29         wp_enqueue_script( 'wp-i18n-teams', plugins_url( 'js/i18n-teams.js', PLUGIN_FILE ), [ 'jquery', 'o2-app' ], 5 );
     28        wp_enqueue_style( 'wp-i18n-teams', plugins_url( 'css/i18n-teams.css', PLUGIN_FILE ), [], filemtime( dirname( __DIR__ ) . '/css/i18n-teams.css' ) );
     29        wp_enqueue_script( 'wp-i18n-teams', plugins_url( 'js/i18n-teams.js', PLUGIN_FILE ), [ 'jquery', 'o2-app' ], filemtime( dirname( __DIR__ ) . '/js/i18n-teams.js' ) );
    3030    }
    3131}
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/locale-details.php

    r11373 r14457  
    4545
    4646    <?php if ( $locale_data['localized_core_url'] ) : ?>
    47         <ul id="locale-download">
    48             <li class="button download-button">
    49                 <a href="<?php echo esc_url( $locale_data['localized_core_url'] ); ?>" role="button">
    50                     <?php printf( __( 'Download WordPress in %s', 'wporg' ), $locale->english_name ); ?>
     47        <div id="locale-download" class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
     48            <div class="wp-block-button">
     49                <a class="wp-block-button__link wp-element-button" href="<?php echo esc_url( $locale_data['localized_core_url'] ); ?>">
     50                    <?php
     51                    // translators: %s is the english variant of the locale name.
     52                    printf( __( 'Download WordPress in %s', 'wporg' ), $locale->english_name );
     53                    ?>
    5154                </a>
    52             </li>
    53 
     55            </div>
    5456            <?php if ( $locale_data['language_pack_url'] ) : ?>
    55                 <li class="button download-button">
    56                     <a href="<?php echo esc_url( $locale_data['language_pack_url'] ); ?>" role="button">
     57                <div class="wp-block-button is-style-outline">
     58                    <a class="wp-block-button__link wp-element-button" href="<?php echo esc_url( $locale_data['language_pack_url'] ); ?>" role="button">
    5759                        <?php
    58                         // translators: %s is the latest version
     60                        // translators: %s is the latest version.
    5961                        printf( __( 'Download language pack (%s)', 'wporg' ), $locale_data['language_pack_version'] );
    6062                        ?>
    6163                    </a>
    62                 </li>
     64                </div>
    6365            <?php endif; ?>
    64         </ul>
     66        </div>
    6567    <?php endif;  ?>
    6668</div>
Note: See TracChangeset for help on using the changeset viewer.