Making WordPress.org

Ticket #4476: 4467.2.diff

File 4467.2.diff, 6.0 KB (added by welcher, 6 years ago)
  • wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js
    index 5284df090..ea574fef9 100644
     
    11// Mobile Subnav open/close
    2 jQuery(document).ready(function() {
     2jQuery( document ).ready( function () {
    33
    44        jQuery( document ).on( 'click', '.code-tab', function ( e ) {
    55                var $tab = jQuery( e.target );
    jQuery(document).ready(function() { 
    1212                $tab.parent().find( '.is-active, .' + lang ).toggleClass( 'is-active' );
    1313        } );
    1414
    15         var tocContainer = jQuery( 'div[class*="-table-of-contents-container"]').first();
     15        var tocContainer = jQuery( 'div[class*="-table-of-contents-container"]' ).first();
    1616
    1717        if ( 0 === tocContainer.length ) {
    1818                return;
    1919        }
    2020
    2121        // Add our expandable button
    22         tocContainer.find( '> ul > .menu-item-has-children > a' )
     22        tocContainer.find( '> ul .menu-item-has-children > a' )
    2323                .wrap( '<div class="expandable"></div>' )
    2424                .after( '<button class="dashicons dashicons-arrow-down-alt2" aria-expanded="false"></button>' );
    2525
    26         // Invisibly open all of the submenus
    27         jQuery( '.menu-item-has-children > ul ul' ).addClass( 'default-open' );
     26        // Invisibly hide all of the submenus
     27        jQuery( '.menu-item-has-children > ul ul' ).hide();
    2828
    2929        // Open the current menu
    3030        tocContainer.find( '.current-menu-item a' ).first()
    3131                .addClass( 'active' )
    3232                .parents( '.menu-item-has-children' )
    33                         .toggleClass( 'open' )
     33                .toggleClass( 'open' )
    3434                .find( '> div > .dashicons' )
    35                         .attr( 'aria-expanded', true );
    36 
     35                .attr( 'aria-expanded', true );
     36
     37        // Open the current submenu
     38        $secondary_menu = tocContainer.find( '.current-menu-item > ul' );
     39        console.log( $secondary_menu.length );
     40        if ( $secondary_menu.length ) {
     41                $secondary_menu.show();
     42        } else {
     43                tocContainer.find( '.current-menu-item' ).parents( 'ul' ).show();
     44        }
    3745        // Or if wrapped in a div.expandable
    38         jQuery( '.menu-item-has-children > div > .dashicons' ).click( function() {
     46        jQuery( '.menu-item-has-children > div > .dashicons' ).click( function () {
    3947                var menuToggle = jQuery( this ).closest( '.menu-item-has-children' );
    4048
    4149                jQuery( this ).parent().siblings( '.sub-menu' ).length
  • wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss
    index dcce75998..2c65e6db9 100644
     
    545545                        width: 640px;
    546546                        margin: 0 auto;
    547547                }
    548                
     548
    549549        }
    550550        .color.section {
    551551                color: #fff;
     
    736736                padding-top: 0;
    737737        }
    738738
    739                 div#inner-search {
    740                         background-color: #666;
    741                         margin-bottom: 1em;
    742                         padding-top: 2px;
    743                         .section.search-section {
     739        div#inner-search {
     740                background-color: #666;
     741                margin-bottom: 1em;
     742                padding-top: 2px;
     743                .section.search-section {
     744                        color: #ffffff;
     745                }
     746                div#inner-search-icon-container {
     747                        margin: 0 auto;
     748                        max-width: 60em;
     749                        cursor: pointer;
     750                        div#inner-search-icon {
     751                                background-color: #666;
    744752                                color: #ffffff;
    745                         }
    746                         div#inner-search-icon-container {
    747                                 margin: 0 auto;
    748                                 max-width: 60em;
    749                                 cursor: pointer;
    750                                 div#inner-search-icon {
    751                                         background-color: #666;
    752                                         color: #ffffff;
    753                                         text-align: center;
    754                                         margin-right: 26px;
    755                                         margin-left: 4px;
    756                                         float: right;
    757                                         padding: 5px;
    758                                         -webkit-border-bottom-right-radius: 5px;
    759                                         -webkit-border-bottom-left-radius: 5px;
    760                                         -moz-border-radius-bottomright: 5px;
    761                                         -moz-border-radius-bottomleft: 5px;
    762                                         border-bottom-right-radius: 5px;
    763                                         border-bottom-left-radius: 5px;
    764                                         .dashicons-search {
    765                                                 height: auto;
    766                                                 width: auto;
    767                                                 &:before {
    768                                                         font-size: 36px;
    769                                                         line-height: 36px;
    770                                                 }
     753                                text-align: center;
     754                                margin-right: 26px;
     755                                margin-left: 4px;
     756                                float: right;
     757                                padding: 5px;
     758                                -webkit-border-bottom-right-radius: 5px;
     759                                -webkit-border-bottom-left-radius: 5px;
     760                                -moz-border-radius-bottomright: 5px;
     761                                -moz-border-radius-bottomleft: 5px;
     762                                border-bottom-right-radius: 5px;
     763                                border-bottom-left-radius: 5px;
     764                                .dashicons-search {
     765                                        height: auto;
     766                                        width: auto;
     767                                        &:before {
     768                                                font-size: 36px;
     769                                                line-height: 36px;
    771770                                        }
    772771                                }
    773772                        }
    774773                }
     774        }
    775775
    776776        .archive-filter-form {
    777777                margin: 5rem 0;
     
    12821282                .comment-list li.depth-1,
    12831283                #comment-preview {
    12841284                        border: 1px solid #dfdfdf;
    1285                         border-radius: 2px;     
     1285                        border-radius: 2px;
    12861286                        width: 100%;
    12871287                }
    12881288
     
    16961696                a {
    16971697                        font-size: 68.6646px;
    16981698                        font-size: 6.86646rem;
    1699                
     1699
    17001700                        @media (max-width: 500px) {
    17011701                                font-size: 50px;
    17021702                                font-size: 5rem;
    div[class*="-table-of-contents-container"] { 
    21312131                display: block;
    21322132        }
    21332133        .current-menu-ancestor:not(.open) .expandable .dashicons:not(:focus),
    2134         .current-menu-item .expandable .dashicons:not(:focus) {
     2134        .current-menu-item > .expandable .dashicons:not(:focus) {
    21352135                background: #fff;
    21362136                color: #0073aa;
    21372137        }
  • wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css
    index 8f460c7d9..96d97e19e 100644
    div[class*="-table-of-contents-container"] .current-menu-ancestor ul { 
    25172517}
    25182518
    25192519div[class*="-table-of-contents-container"] .current-menu-ancestor:not(.open) .expandable .dashicons:not(:focus),
    2520 div[class*="-table-of-contents-container"] .current-menu-item .expandable .dashicons:not(:focus) {
     2520div[class*="-table-of-contents-container"] .current-menu-item > .expandable .dashicons:not(:focus) {
    25212521  background: #fff;
    25222522  color: #0073aa;
    25232523}