Making WordPress.org

Changeset 11985


Ignore:
Timestamp:
07/21/2022 06:03:31 AM (4 years ago)
Author:
dd32
Message:

Make: Replace masonry usage on the make homepage with flexbox css.

This is not a 1:1 replacement and it removes the masonry re-ordering, but masonry.js was affecting a minority of the teams cards and removal makes visual regression testing more viable.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/front-page.php

    r10000 r11985  
    88        <div class="wrapper">
    99                <h2 class="section-title"><?php _e( 'There are many different ways for you to get involved with WordPress:', 'make-wporg' ); ?></h2>
    10                 <div class="js-masonry" data-masonry-options='{ "itemSelector": ".make_site" }'>
     10                <div class="make-sites">
    1111                <?php
    1212                        $sites_query = new WP_Query( 'post_type=make_site&posts_per_page=-1&order=ASC' );
     
    1717                                $make_site_id = get_post_meta( $post->ID, 'make_site_id', true );
    1818                                $url          = $makesites[ $make_site_id ];
    19                 ?>
     19                        ?>
    2020                        <article id="site-<?php the_ID(); ?>" <?php post_class(); ?>>
    2121                                <h2>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/functions.php

    r11962 r11985  
    44function make_enqueue_scripts() {
    55        wp_enqueue_style( 'make-style', get_stylesheet_uri(), array(), filemtime( __DIR__ . '/style.css' ) );
    6         wp_enqueue_script( 'masonry' );
    76}
    87
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/style.css

    r11962 r11985  
    174174}
    175175
     176section.get-involved .make-sites {
     177        display: flex;
     178        flex-flow: wrap;
     179}
     180
    176181section.get-involved article {
    177182        margin: 10px;
     
    181186        font-size: 1.5em;
    182187        background: #fff;
    183         float: left;
    184188        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    185189        -webkit-transition: none 0.4s ease;
     
    198202        background: #fcfcfc;
    199203        box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
    200 }
    201 
    202 section.get-involved article:nth-of-type(odd) {
    203         clear: left;
    204204}
    205205
Note: See TracChangeset for help on using the changeset viewer.