Making WordPress.org

Changeset 10434

Timestamp:
11/10/2020 12:44:13 AM (4 years ago)
Author:
dd32
Message:

WordPress.org Theme: Fix the styling of https://wordpress.org/about/testimonials/ which had overlapping twitter embeds, not-centered embeds, and different WP vs Twitter card margins.

Props melchoyce for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-testimonials.php

    r10000 r10434  
    6565
    6666    embed_holder_masonry = embed_holder_jq.masonry({
    67         itemSelector: 'iframe, twitter-widget',
     67        itemSelector: '',
    6868        columnWidth: 372,
    6969        gutter: 10,
     
    7979                conversation: 'none',
    8080                cards: 'hidden',
     81
    8182                margin: 0,
    8283                width: 372
     
    8889
    8990    embeds.wpembeds.forEach( function( wpembed ) {
    90         var iframe = jQuery( '<iframe security="restricted" src="' + wpembed + '" width="372" height="500" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>' );
     91        var >' );
    9192
    92         iframe.on( 'load', function() {
     93        // Extra margin top/bottom to match Twitter embeds (that have set a 0 margin)
     94        embed.css( 'margin', '10px 0' );
     95
     96        embed.on( 'load', function() {
    9397            embed_holder_masonry.masonry('reloadItems').masonry();
    9498        });
    9599
    96         embed_holder_jq.append( iframe );
     100        embed_holder_jq.append( );
    97101    });
    98102
     
    144148                    </div>
    145149                    <div class="row">
    146                         <div class="col-10">   
     150                        <div class="col-10">   
    147151                            <div  id="embeds"></div>
    148152                        </div>
Note: See TracChangeset for help on using the changeset viewer.