Skip to:
Content

bbPress.org

Changeset 2662


Ignore:
Timestamp:
11/29/2010 12:02:46 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Add some primitive styling to favorites links

Location:
branches/plugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-template.php

    r2661 r2662  
    26882688        }
    26892689
    2690         if ( bbp_is_user_favorite( $user_id, $topic_id ) ) {
     2690        if ( $is_fav = bbp_is_user_favorite( $user_id, $topic_id ) ) {
    26912691            $url  = esc_url( bbp_get_favorites_permalink( $user_id ) );
    26922692            $rem  = preg_replace( '|%(.+)%|', "<a href='$url'>$1</a>", $rem );
     
    27062706        $permalink = bbp_is_favorites() ? bbp_get_favorites_permalink( $user_id ) : bbp_get_topic_permalink( $topic_id );
    27072707        $url       = esc_url( wp_nonce_url( add_query_arg( $favs, $permalink ), 'toggle-favorite_' . $topic_id ) );
    2708 
    2709         return apply_filters( 'bbp_get_user_favorites_link', "<span id='favorite-toggle'><span id='favorite-$topic_id'>$pre<a href='$url' class='dim:favorite-toggle:favorite-$topic_id:is-favorite'>$mid</a>$post</span></span>" );
     2708        $is_fav    = $is_fav ? 'is-favorite' : '';
     2709
     2710        return apply_filters( 'bbp_get_user_favorites_link', "<span id='favorite-toggle'><span id='favorite-$topic_id' class='$is_fav'>$pre<a href='$url' class='dim:favorite-toggle:favorite-$topic_id:is-favorite'>$mid</a>$post</span></span>" );
    27102711    }
    27112712
  • branches/plugin/bbp-themes/bbp-twentyten/style.css

    r2660 r2662  
    13501350    text-align: center;
    13511351}
    1352 
    13531352.bbp-topic-freshness, .bbp-forum-freshness {
    13541353    text-align: center;
     
    13591358    text-align: center;
    13601359}
     1360
     1361.bbp-topic-action #favorite-toggle a {
     1362    text-decoration: none;
     1363    padding: 0px 3px 1px;
     1364    color: #7c7;
     1365    border: 1px solid #aca;
     1366    background-color: #dfd;
     1367    font-weight: bold;
     1368    font-size: 13px;
     1369    -moz-border-radius: 8px;
     1370    -webkit-border-radius: 8px;
     1371    }
     1372    .bbp-topic-action #favorite-toggle a:hover {
     1373        color: #5a5;
     1374        border-color: #7c7;
     1375        background-color: #beb;
     1376    }
     1377    .bbp-topic-action #favorite-toggle span.is-favorite a {
     1378        color: #faa;
     1379        border: 1px solid #faa;
     1380        background-color: #fee;
     1381        -moz-border-radius: 5px;
     1382        -webkit-border-radius: 5px;
     1383        }
     1384        .bbp-topic-action #favorite-toggle span.is-favorite a:hover {
     1385            color: #c88;
     1386            border-color: #c88;
     1387            background-color: #fdd;
     1388        }
     1389
    13611390#content p.bbp-topic-meta {
    13621391    margin-bottom: 0;
Note: See TracChangeset for help on using the changeset viewer.