Skip to:
Content

BuddyPress.org

Changeset 5005


Ignore:
Timestamp:
08/18/2011 10:29:48 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Add some responsiveness to bp-default. See #3494.

Location:
trunk/bp-themes/bp-default
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/css/default.css

    r4979 r5005  
    7373    font-family: Arial, Tahoma, Verdana, sans-serif;
    7474    line-height: 170%;
    75     min-width: 960px;
    7675    max-width: 1250px;
    7776    margin: 0 auto;
    78     width: 90%;
     77    width: 95%;
    7978}
    8079.padder {
     
    152151    border-bottom-right-radius: 6px;
    153152    color: #fff;
    154     height: 100px;
     153    height: auto;
    155154    margin-bottom: 20px;
    156155    padding-top: 25px;
     
    165164#header #search-bar .padder {
    166165    padding: 10px 15px 0 20px;
     166    height: auto;
    167167}
    168168#header #search-bar input[type=text] {
     
    504504    outline: 1px dotted #ccc;
    505505}
     506#navigation {
     507    position: relative;
     508    text-align: right;
     509    width: 100%;
     510}
    506511#nav {
    507     margin: 0;
     512    margin: 40px 20px 0 0;
    508513    list-style: none;
    509     max-width: 95%;
    510514    padding: 0;
    511     position: absolute;
    512     right: 15px;
     515    position: relative;
     516    right: auto;
    513517    bottom: 0;
    514518}
     
    519523    padding: 5px 15px;
    520524    text-decoration: none;
     525    text-align: left;
    521526}
    522527#nav li {
    523528    margin-left: 5px;
    524     float: left;
     529    display: inline-block;
    525530}
    526531#nav li li {
  • trunk/bp-themes/bp-default/functions.php

    r4936 r5005  
    7373    add_theme_support( 'automatic-feed-links' );
    7474
     75    // Add responsive layout support to bp-default without forcing child
     76    // themes to inherit it if they don't want to
     77    add_theme_support( 'bp-default-responsive' );
     78
    7579    // This theme uses wp_nav_menu() in one location.
    7680    register_nav_menus( array(
     
    8791        // The height and width of your custom header. You can hook into the theme's own filters to change these values.
    8892        // Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values.
    89         define( 'HEADER_IMAGE_WIDTH', apply_filters( 'bp_dtheme_header_image_width', 1250 ) );
    90         define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'bp_dtheme_header_image_height', 125 ) );
     93        define( 'HEADER_IMAGE_WIDTH',  apply_filters( 'bp_dtheme_header_image_width', 1250 ) );
     94        define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'bp_dtheme_header_image_height', 125  ) );
    9195
    9296        // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 125 pixels tall.
     
    136140function bp_dtheme_enqueue_scripts() {
    137141    // Bump this when changes are made to bust cache
    138     $version = '20110804';
     142    $version = '20110818';
    139143
    140144    // Enqueue the global JS - Ajax will not work without it
     
    167171function bp_dtheme_enqueue_styles() {
    168172    // Bump this when changes are made to bust cache
    169     $version = '20110804';
     173    $version = '20110818';
    170174
    171175    // Default CSS
    172176    wp_enqueue_style( 'bp-default-main', get_template_directory_uri() . '/_inc/css/default.css', array(), $version );
    173177
     178    // Responsive Layout
     179    if ( current_theme_supports( 'bp-default-responsive' ) ) {
     180        wp_enqueue_style( 'bp-default-responsive', get_template_directory_uri() . '/_inc/css/responsive.css', array( 'bp-default-main' ), $version );
     181    }
     182
    174183    // Right to left CSS
    175     if ( is_rtl() )
     184    if ( is_rtl() ) {
    176185        wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), $version );
     186    }
    177187}
    178188add_action( 'wp_print_styles', 'bp_dtheme_enqueue_styles' );
Note: See TracChangeset for help on using the changeset viewer.