Skip to:
Content

BuddyPress.org

Changeset 11860


Ignore:
Timestamp:
02/17/2018 05:34:00 PM (7 years ago)
Author:
hnla
Message:

Nouveau: Refactor activity comments 'Show All' link

Changes the anchor to button element.

Adds span for icon support plus dashicon class.

Updates styles to better display as a link than simply a text line, adding an underline, hover color change for the icon and text size reduction.

Location:
trunk/src/bp-templates/bp-nouveau
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp_activity_comments.scss

    r11686 r11860  
    9999        }
    100100
     101        .show-all {
     102
     103            button {
     104
     105                @include font-size(14);
     106                text-decoration: underline;
     107                padding-left: $pad-sml;
     108
     109                span {
     110                    text-decoration: none;
     111                }
     112
     113                &:hover,
     114                &:focus {
     115
     116                    span {
     117                        color: $blue;
     118                    }
     119                }
     120            }
     121        }
     122
    101123    } // close .activity-comments
    102124
     
    113135
    114136} // close .buddypress-wrap
    115 
    116 @include medium-up() {
    117 
    118     .buddypress-wrap {
    119 
    120         .activity-comments {
    121             margin-left: 17%;
    122 
    123             ul {
    124                 //  margin: $marg-med 0 0;
    125             }
    126         }
    127     }
    128 }
    129137
    130138// Single Activity Comment Entry View
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp_activity_entries.scss

    r11686 r11860  
    287287
    288288            .activity-content {
    289                 margin: 0 5% 0 0;
     289                margin: 0;
    290290                position: relative;
    291291
  • trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css

    r11813 r11860  
    13761376    }
    13771377    .activity-list .activity-item .activity-content {
    1378         margin: 0 0 0 5%;
     1378        margin: 0;
    13791379        position: relative;
    13801380    }
     
    15871587}
    15881588
     1589.buddypress-wrap .activity-comments .show-all button {
     1590    font-size: 14px;
     1591    text-decoration: underline;
     1592    padding-right: 0.5em;
     1593}
     1594
     1595.buddypress-wrap .activity-comments .show-all button span {
     1596    text-decoration: none;
     1597}
     1598
     1599.buddypress-wrap .activity-comments .show-all button:hover span, .buddypress-wrap .activity-comments .show-all button:focus span {
     1600    color: #5087e5;
     1601}
     1602
    15891603.buddypress-wrap .mini .activity-comments {
    15901604    clear: both;
    15911605    margin-top: 0;
    1592 }
    1593 
    1594 @media screen and (min-width: 46.8em) {
    1595     .buddypress-wrap .activity-comments {
    1596         margin-right: 17%;
    1597     }
    15981606}
    15991607
  • trunk/src/bp-templates/bp-nouveau/css/buddypress.css

    r11813 r11860  
    13761376    }
    13771377    .activity-list .activity-item .activity-content {
    1378         margin: 0 5% 0 0;
     1378        margin: 0;
    13791379        position: relative;
    13801380    }
     
    15871587}
    15881588
     1589.buddypress-wrap .activity-comments .show-all button {
     1590    font-size: 14px;
     1591    text-decoration: underline;
     1592    padding-left: 0.5em;
     1593}
     1594
     1595.buddypress-wrap .activity-comments .show-all button span {
     1596    text-decoration: none;
     1597}
     1598
     1599.buddypress-wrap .activity-comments .show-all button:hover span, .buddypress-wrap .activity-comments .show-all button:focus span {
     1600    color: #5087e5;
     1601}
     1602
    15891603.buddypress-wrap .mini .activity-comments {
    15901604    clear: both;
    15911605    margin-top: 0;
    1592 }
    1593 
    1594 @media screen and (min-width: 46.8em) {
    1595     .buddypress-wrap .activity-comments {
    1596         margin-left: 17%;
    1597     }
    15981606}
    15991607
  • trunk/src/bp-templates/bp-nouveau/js/buddypress-activity.js

    r11859 r11860  
    351351                        // Prepend a link to display all
    352352                        if ( ! i ) {
    353                             $( item ).before( '<li class="show-all"><a href="#' + activity_item.prop( 'id' ) + '/show-all/">' + BP_Nouveau.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
     353                            $( item ).before( '<li class="show-all"><button class="text-button" type="button" data-bp-show-comments-id="#' + activity_item.prop( 'id' ) + '/show-all/"><span class="icon dashicons dashicons-visibility" aria-hidden="true"></span> ' + BP_Nouveau.show_x_comments.replace( '%d', comment_count ) + '</button></li>' );
    354354                        }
    355355                    }
     
    375375
    376376            setTimeout( function() {
    377                 $( event.target ).closest( 'ul' ).find( 'li' ).removeClass('bp-hidden').fadeIn( 200, function() {
     377                $( event.target ).closest( 'ul' ).find( 'li' ).removeClass('bp-hidden').fadeIn( 300, function() {
    378378                    $( event.target ).parent( 'li' ).remove();
    379379                } );
Note: See TracChangeset for help on using the changeset viewer.