Making WordPress.org

Changeset 13792


Ignore:
Timestamp:
06/10/2024 03:36:07 AM (6 months ago)
Author:
dufresnesteven
Message:

wporg-plugins-2024: Change searchbar layout to stop it sticking to window.

Fixes: https://github.com/WordPress/wordpress.org/issues/327

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/build/blocks/archive-page/render.php

    r13691 r13792  
    1010}
    1111
    12 $container_top_padding = '40';
    13 
    14 if ( 'favorites' == get_query_var( 'browse' ) ) {
    15     echo do_blocks(  <<<BLOCKS
    16     <!-- wp:group {"align":"full","layout":{"type":"default"}} -->
    17         <div class="wp-block-group alignfull">
    18         <!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    19         </div>
    20     <!-- /wp:group -->
    21     BLOCKS);
    22 
    23     $container_top_padding = '30';
    24 }
    25 
    2612// TODO: There's no block for this.
    2713$archive_description = get_the_archive_description();
    2814
    2915echo do_blocks( <<<BLOCKS
    30 <!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|$container_top_padding"}}},"layout":{"type":"default"}} -->
    31 <div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--$container_top_padding)">
     16<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|40"}}},"layout":{"type":"default"}} -->
     17<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--40)">
    3218    <!-- wp:template-part {"slug":"grid-controls"} /-->
    3319    <!-- wp:query-title {"type":"archive","fontFamily":"inter","style":{"typography":{"fontStyle":"normal","fontWeight":"600"},"spacing":{"margin":{"bottom":"var:preset|spacing|10"}}},"fontSize":"heading-5"} /-->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/build/blocks/filter-bar/render.php

    r13692 r13792  
    33
    44global $wp_query;
    5 
    6 if ( isset( $wp_query ) && ( ! empty( $wp_query->query_vars['browse'] ) && 'favorites' === $wp_query->query_vars['browse'] ) ) {
    7     return '';
    8 }
    95
    106$search_placeholder = esc_attr__( 'Search plugins', 'wporg-plugins' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/patterns/full-width-search.php

    r13564 r13792  
    1111<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}}} -->
    1212    <div class="wp-block-group alignfull" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)">
    13         <!-- wp:search {"label":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","showLabel":false,"placeholder":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","width":232,"widthUnit":"px","buttonText":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","buttonPosition":"button-inside","buttonUseIcon":true} /-->
     13    <!-- wp:group {"tagName":"div","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space"}}}} -->
     14        <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)">
     15            <!-- wp:search {"label":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","showLabel":false,"placeholder":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","width":232,"widthUnit":"px","buttonText":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","buttonPosition":"button-inside","buttonUseIcon":true} /-->
     16        </div>
     17    <!-- /wp:group -->
    1418    </div>
    1519<!-- /wp:group -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/render.php

    r13691 r13792  
    1010}
    1111
    12 $container_top_padding = '40';
    13 
    14 if ( 'favorites' == get_query_var( 'browse' ) ) {
    15     echo do_blocks(  <<<BLOCKS
    16     <!-- wp:group {"align":"full","layout":{"type":"default"}} -->
    17         <div class="wp-block-group alignfull">
    18         <!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    19         </div>
    20     <!-- /wp:group -->
    21     BLOCKS);
    22 
    23     $container_top_padding = '30';
    24 }
    25 
    2612// TODO: There's no block for this.
    2713$archive_description = get_the_archive_description();
    2814
    2915echo do_blocks( <<<BLOCKS
    30 <!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|$container_top_padding"}}},"layout":{"type":"default"}} -->
    31 <div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--$container_top_padding)">
     16<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|40"}}},"layout":{"type":"default"}} -->
     17<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--40)">
    3218    <!-- wp:template-part {"slug":"grid-controls"} /-->
    3319    <!-- wp:query-title {"type":"archive","fontFamily":"inter","style":{"typography":{"fontStyle":"normal","fontWeight":"600"},"spacing":{"margin":{"bottom":"var:preset|spacing|10"}}},"fontSize":"heading-5"} /-->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/filter-bar/render.php

    r13692 r13792  
    33
    44global $wp_query;
    5 
    6 if ( isset( $wp_query ) && ( ! empty( $wp_query->query_vars['browse'] ) && 'favorites' === $wp_query->query_vars['browse'] ) ) {
    7     return '';
    8 }
    95
    106$search_placeholder = esc_attr__( 'Search plugins', 'wporg-plugins' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/single-plugin.html

    r13564 r13792  
    11<!-- wp:template-part {"slug":"header","tagName":"div","className":"has-display-contents"} /-->
    22
     3<!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    34<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
    45<main class="wp-block-group" style="padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--edge-space)">
    5     <!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    66    <!-- wp:wporg/single-plugin /-->
    77</main>
Note: See TracChangeset for help on using the changeset viewer.