Ejemplo n.º 1
0
/**
 * Print .wrap style
 */
function calibrefx_print_wrap()
{
    $wrap = '';
    $body = '';
    // if using fluid layout then do nothing
    if (calibrefx_layout_is_fluid()) {
        return;
    }
    if (!current_theme_supports('calibrefx-responsive-style')) {
        $body = sprintf('
body{
	min-width: %1dpx;
}', calibrefx_get_option('calibrefx_layout_width'));
    }
    if (current_theme_supports('calibrefx-responsive-style')) {
        $wrap = sprintf('
.layout-wrapper-fluid .container, 
.layout-wrapper-fixed #wrapper {
max-width: %dpx;
}', calibrefx_get_option('calibrefx_layout_width'));
    } else {
        $wrap = sprintf('
.layout-wrapper-fluid .container, 
.layout-wrapper-fixed #wrapper {
	max-width: none;
	width: %dpx;
}', calibrefx_get_option('calibrefx_layout_width'));
    }
    printf('<style type="text/css">%1$s %2$s' . "\n" . '</style>' . "\n", $body, $wrap);
}
Ejemplo n.º 2
0
/**
 * This function/filter adds new classes to the <body>
 * so that we can use psuedo-variables in our CSS file,
 * which helps us achieve multiple header layouts with minimal code
 *
 * @since 0.2.2
 */
function calibrefx_header_body_classes($classes)
{
    // add header classes to $classes array
    if (!is_active_sidebar('header-right')) {
        $classes[] = 'header-full-width';
    }
    if (current_theme_supports('calibrefx-custom-header') && ('image' == calibrefx_get_option('blog_title') || 'blank' == get_header_textcolor())) {
        $classes[] = 'header-image';
    }
    if (calibrefx_is_responsive_enabled()) {
        $classes[] = 'responsive';
    } else {
        $classes[] = 'non-responsive';
    }
    if (calibrefx_layout_is_fluid()) {
        $classes[] = 'fluid';
    } else {
        $classes[] = 'static';
    }
    $custom_body = calibrefx_get_custom_field('_calibrefx_custom_body_class');
    if (!empty($custom_body)) {
        $classes[] = $custom_body;
    }
    // return filtered $classes
    return $classes;
}
Ejemplo n.º 3
0
/**
 * Get the container class for the html. will have post fix '-fluid' for responsive layout
 *
 * @return string
 */
function calibrefx_container_class()
{
    $containerClass = '';
    if (calibrefx_layout_is_fluid()) {
        $containerClass = 'container-fluid';
    }
    if (calibrefx_layout_is_static() && !calibrefx_layout_is_fixed_wrapper()) {
        $containerClass = 'container';
    }
    return apply_filters('calibrefx_container_class', $containerClass);
}