Exemplo n.º 1
0
    function raindrops_w3standard()
    {
        $font_color = raindrops_colors($num = 5, $select = 'color', $color1 = null);
        $style = <<<DOC
legend,
a:link,a:active,a:visited,a:hover,
.lsidebar,
#sidebar,
.rsidebar,
#doc,#doc2,#doc3,#doc4,
#hd,
h1,
#yui-main,
.entry ol ol ,.entry ul,
.entry ul * {
%c5%
}
.footer-widget h2,.rsidebar h2,.lsidebar h2 {
%c5%
%h2_w3standard_background%
%h_position_rsidebar_h2%
}
body {
margin:0! important;padding:0;
background-repeat:repeat-x;
}
#yui-main{
color:%raindrops_header_color%;
}
#hd{
background-image:url( %raindrops_hd_images_path%%raindrops_header_image% );
}
.hfeed{
background:#fff;
}
#ft {
background:url( %raindrops_images_path%%raindrops_footer_image% ) repeat-x;
color:%raindrops_footer_color%;
}
.footer-widget h2,
.rsidebar h2,
.lsidebar h2 {
/*%h2_w3standard_background%*/
%h_position_rsidebar_h2%
}
.rsidebar ul li ul li,
.lsidebar ul li ul li{
list-style-type:square;
list-style-position:inside;
}
.ie8 .lsidebar .widget ul li a {
list-style:none;
}
.blog .sticky,
.home .sticky {
%c5%
border-top:solid 6px %c_border%;
border-bottom:solid 2px %c_border%;
}
.entry-meta{
%c4%
border-top:solid 1px %c_border%;
border-bottom:solid 1px %c_border%;
}
textarea,
input[type="password"],
input[type="text"],
input[type="submit"],
input[type="reset"],
input[type="file"]{
%c4%
}
input[type="checkbox"],
input[type="radio"],
select{
%c4%
}
.social textarea#comment,
.social input[type="text"] {
outline:none;
%c3%
}
.social textarea#comment:focus,
.social input:focus{
%c4%
}
.entry-content ul li{
list-style-type:square;
}
.entry-content input[type="submit"],
.entry-content input[type="reset"],
.entry-content input[type="file"]{
%c4%
}
.entry-content input[type="submit"],
.entry-content input[type="radio"]{
%c3%
}
.entry-content select{
%c4%
}
.entry-content blockquote{
%c4%
border-left:solid 6px %c_border%;
}
cite{
%c4%
}
cite a:link,
cite a:active,
cite a:visited,
cite a:hover{
{$font_color}
}
.entry-content fieldset {
border:solid 1px %c_border%;
}
.entry-content legend{
%c5%
}
.entry-content td{
%c4%
border:solid 1px %c_border%;
}
.entry-content th{
%c3%
border:solid 1px %c_border%;
}
hr{
border-top:1px dashed %c_border%;
}
/*--------------------------------*/
#access{
/*%c3%*/
}
#access a {
}
#access ul ul a {
%c3%
}
#access li:active > a,
#access ul ul :active > a {
top:0;
%c2%
color:%custom_color%
}
#access ul li.current_page_item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-parent > a {
%c3%
}
.ie6 #access ul li.current_page_item a,
.ie6 #access ul li.current-menu-ancestor a,
.ie6 #access ul li.current-menu-item a,
.ie6 #access ul li.current-menu-parent a,
.ie6 #access ul li a:hover {
%c2%
}
table,
table td,
#access > li{
border:1px solid #ccc;
}
tfoot td{
border:none;
}
.lsidebar  li,
.rsidebar li{
border:none! important;
}
td.month-date,td.month-name,td.time{
%c4%
}
.datetable td li{
}
address{margin:10px auto;}
.wp-caption {
}
li.byuser,
li.bypostauthor {
%c5%
}
.comment-meta a,
cite.fn{
}
.datetable td li{
}
.fail-search,
#not-found {
%c3%
border:3px double;
}
.rd-page-navigation li{
border-left:solid 1px %c_border%;
%c5%
}
.rd-page-navigation a{
%c5%
}
.rd-page-navigation .current_page_item{
%c4%
}
.raindrops-tab-content,
.raindrops-tab-list li{
border:1px solid %c_border%;
}
/*comment bubble*/
a.raindrops-comment-link {
}
.raindrops-comment-link em {
%c4%
position: relative;
}
.raindrops-comment-link .point {
border-left: 0.45em solid %c_border%;
border-bottom: 0.45em solid #FFF; /* IE fix */
border-bottom: 0.45em solid %c_border%;
overflow: hidden; /* IE fix */
}
a.raindrops-comment-link:hover {
}
a.raindrops-comment-link:hover em {
%c5%
}
a.raindrops-comment-link:hover .point {
border-left:1px solid %c_border%;
}
DOC;
        return $style;
    }
Exemplo n.º 2
0
/**
 * Declaration Calculator
 *
 *
 *
 *
 */
function raindrops_design_output($name = 'dark')
{
    global $raindrops_show_theme_option, $raindrops_automatic_color;
    $uploads = wp_upload_dir();
    $raindrops_header_image = raindrops_warehouse_clone('raindrops_header_image');
    $raindrops_hd_image_path = $uploads['path'] . '/' . $raindrops_header_image;
    if (file_exists($raindrops_hd_image_path)) {
        $raindrops_hd_images_path = $uploads['url'] . '/';
    } else {
        $raindrops_hd_images_path = get_stylesheet_directory_uri() . '/images/';
    }
    if (!file_exists(get_stylesheet_directory() . '/images/')) {
        $raindrops_hd_images_path = get_template_directory_uri() . '/images/';
    }
    $raindrops_hd_image_path = apply_filters('raindrops_hd_image_path', $raindrops_hd_images_path);
    $raindrops_images_path = get_stylesheet_directory_uri() . '/images/';
    if (!file_exists(get_stylesheet_directory() . '/images/')) {
        $raindrops_images_path = get_template_directory_uri() . '/images/';
    }
    $raindrops_images_path = apply_filters('raindrops_images_path', $raindrops_images_path);
    $navigation_title_img = raindrops_warehouse_clone('raindrops_heading_image');
    $raindrops_header_color = raindrops_warehouse_clone('raindrops_default_fonts_color');
    $raindrops_footer_image = raindrops_warehouse_clone('raindrops_footer_image');
    $raindrops_footer_color = raindrops_warehouse_clone('raindrops_footer_color');
    $raindrops_footer_link_color = raindrops_warehouse_clone('raindrops_footer_link_color');
    if (empty($name)) {
        $name = 'dark';
    }
    $c_border = raindrops_colors(0, 'background');
    if ('#' == $c_border) {
        $rgba_border = 'rgba(203,203,203, 0.8)';
    } else {
        $rgba_border = raindrops_hex2rgba($c_border, 0.5);
    }
    if ('light' == $name) {
        if ('#' == $c_border) {
            $rgba_border = 'rgba(203,203,203, 0.4)';
        } else {
            $rgba_border = raindrops_hex2rgba($c_border, 0.2);
        }
    }
    $c1 = raindrops_colors(0);
    $c1 = raindrops_colors(1);
    $c2 = raindrops_colors(2);
    $c3 = raindrops_colors(3);
    $c4 = raindrops_colors(4);
    $c5 = raindrops_colors(5);
    $c_1 = raindrops_colors(-1);
    $c_2 = raindrops_colors(-2);
    $c_3 = raindrops_colors(-3);
    $c_4 = raindrops_colors(-4);
    $c_5 = raindrops_colors(-5);
    $position_y = raindrops_warehouse_clone('raindrops_heading_image_position');
    $y = $position_y * 26;
    $y = '-' . $y . 'px';
    switch ($position_y) {
        case 0:
            $h_position_rsidebar_h2 = "background-position:0 0;";
            break;
        case 1:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 2:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 3:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 4:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 5:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 6:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        case 7:
            $h_position_rsidebar_h2 = "background-position:0 {$y};";
            break;
        default:
            $h_position_rsidebar_h2 = "background-position:0 208px;";
            break;
    }
    if ($raindrops_show_theme_option == true) {
        if (file_exists(get_template_directory() . '/images/' . $navigation_title_img) || file_exists(get_stylesheet_directory() . '/images/' . $navigation_title_img)) {
            $image_exists = true;
        } else {
            $image_exists = false;
        }
        $h2_w3standard_background = "background:" . raindrops_colors(5, 'background') . ' ';
        if (true == $image_exists) {
            $h2_w3standard_background .= "url({$raindrops_images_path}{$navigation_title_img});";
        } else {
            $h2_w3standard_background .= ";";
        }
        $h2_w3standard_background .= "color:" . raindrops_colors(4, 'color') . ';';
        $h2_dark_background = "background:" . raindrops_colors(-3, 'background') . ' ';
        if (true == $image_exists) {
            $h2_dark_background .= "url({$raindrops_images_path}{$navigation_title_img});";
        } else {
            $h2_dark_background .= ";";
        }
        $h2_dark_background .= "color:" . raindrops_colors(-3, 'color') . ';';
        $h2_light_background = "background:" . raindrops_colors(5, 'background') . ' ';
        if (true == $image_exists) {
            $h2_light_background .= "url({$raindrops_images_path}{$navigation_title_img});";
        } else {
            $h2_light_background .= ";";
        }
        $h2_light_background .= "color:" . raindrops_colors(4, 'color') . ';';
    }
    $raindrops_has_indivisual_notation = raindrops_has_indivisual_notation();
    // else color is only notation default
    switch ($name) {
        case "w3standard":
            $custom_dark_bg = raindrops_colors(3, 'background');
            $custom_light_bg = raindrops_colors(1, 'background');
            $custom_color = raindrops_colors('1', 'color');
            if (!empty($raindrops_footer_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_color = $raindrops_footer_color;
            } else {
                $raindrops_footer_color = '#000';
            }
            if (!empty($raindrops_footer_link_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_link_color = $raindrops_footer_link_color;
            } else {
                $raindrops_footer_link_color = '#555';
            }
            if (!empty($raindrops_header_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_header_color = $raindrops_header_color;
            } else {
                $raindrops_header_color = '#000';
            }
            $gradient = raindrops_gradient_clone();
            break;
        case "dark":
            /**
             * dark
             */
            $custom_dark_bg = apply_filters('raindrops_dark_dark_bg', -1);
            $custom_dark_bg = raindrops_colors($custom_dark_bg, 'background');
            $custom_light_bg = apply_filters('raindrops_dark_light_bg', -4);
            $custom_light_bg = raindrops_colors($custom_light_bg, 'background');
            $custom_color = apply_filters('raindrops_dark_color', -3);
            $custom_color = raindrops_colors($custom_color, 'color');
            if (!empty($raindrops_footer_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_color = $raindrops_footer_color;
            } else {
                $raindrops_footer_color = '#fff';
            }
            if (!empty($raindrops_footer_link_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_link_color = $raindrops_footer_link_color;
            } else {
                $raindrops_footer_link_color = '#fff';
            }
            if (!empty($raindrops_header_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_header_color = $raindrops_header_color;
            } else {
                $raindrops_header_color = '#fff';
            }
            $gradient = raindrops_gradient_clone();
            break;
        case "light":
            /**
             * light
             */
            $custom_dark_bg = apply_filters('raindrops_light_dark_bg', 5);
            $custom_dark_bg = raindrops_colors($custom_dark_bg, 'background');
            $custom_light_bg = apply_filters('raindrops_light_light_bg', 4);
            $custom_light_bg = raindrops_colors($custom_light_bg, 'background');
            $custom_color = apply_filters('raindrops_light_color', 3);
            $custom_color = raindrops_colors($custom_color, 'color');
            $base_gradient = raindrops_gradient_single_clone(3, "asc");
            if (!empty($raindrops_footer_color)) {
                $raindrops_footer_color = $raindrops_footer_color;
            } else {
                $raindrops_footer_color = '#333';
            }
            if (!empty($raindrops_footer_link_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_link_color = $raindrops_footer_link_color;
            } else {
                $raindrops_footer_link_color = '#fff';
            }
            if (!empty($raindrops_header_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_header_color = $raindrops_header_color;
            } else {
                $raindrops_header_color = '#333';
            }
            $gradient = raindrops_gradient_clone();
            break;
        default:
            $custom_dark_bg = apply_filters('raindrops_default_dark_bg', 3);
            $custom_dark_bg = raindrops_colors($custom_dark_bg, 'background');
            $custom_light_bg = apply_filters('raindrops_default_light_bg', 1);
            $custom_light_bg = raindrops_colors($custom_light_bg, 'background');
            $custom_color = apply_filters('raindrops_default_color', 1);
            $custom_color = raindrops_colors($custom_color, 'color');
            if (!empty($raindrops_footer_color)) {
                $raindrops_footer_color = $raindrops_footer_color;
            } else {
                $raindrops_footer_color = '#000';
            }
            if (!empty($raindrops_footer_link_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_footer_link_color = $raindrops_footer_link_color;
            } else {
                $raindrops_footer_link_color = '#555';
            }
            if (!empty($raindrops_header_color) && false == $raindrops_has_indivisual_notation && false == $raindrops_automatic_color) {
                $raindrops_header_color = $raindrops_header_color;
            } else {
                $raindrops_header_color = '#000';
            }
            $gradient = raindrops_gradient_clone();
            break;
    }
    $function_name = 'raindrops_indv_css_' . $name;
    if (function_exists($function_name)) {
        $content = $function_name();
        foreach (explode(' ', $content, -1) as $line) {
            preg_match_all('|%([a-z0-9_-]+)?%|si', $line, $regs, PREG_SET_ORDER);
            foreach ($regs as $reg) {
                if (isset(${$reg}[1])) {
                    $content = str_replace($reg[0], ${$reg}[1], $content);
                } else {
                    $content = str_replace($reg[0], '/*cannot bind data [%' . $reg[1] . '%]*/', $content);
                }
            }
        }
    }
    if (isset($content)) {
        return $content;
    } else {
        return false;
    }
}