} .btn-primary, input[type="submit"], button[type="submit"], .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt { color: #fff; position: relative; border-color: <?php echo $btn; ?> ; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary, input[type="submit"]:hover, button[type="submit"]:hover, input[type="submit"]:focus, button[type="submit"]:focus, form input[type="submit"]:hover, form input[type="submit"]:focus, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus, .woocommerce #respond input#submit.alt:active, .woocommerce a.button.alt:active, .woocommerce button.button.alt:active, .woocommerce input.button.alt:active { background-color: <?php echo $btn; ?> ; border-color: <?php echo $btn; ?> ; } .btn-primary:active, .btn-primary.active, .sidebar input[type="submit"]:active, .woocommerce #respond input#submit.alt:active, .woocommerce a.button.alt:active, .woocommerce button.button.alt:active, .woocommerce input.button.alt:active { background-color: <?php echo ciAdjustBrightness($btn, -30); ?> ; border-color: <?php echo ciAdjustBrightness($btn, -30); ?> ; }
function ciPrintCustomColorStyling() { /** * Gets the customized color for a particular use. * @param string $colorIdentifier The name of the color, as registered with the WordPress theme customizer * @return string The color, in the form "#xxxxxxx" */ function ciGetNormalizedColor($colorIdentifier) { $defaultColors = ciGetColorTheme(); $clr = get_option($colorIdentifier); if (($clr == "" || $clr == "#") && array_key_exists($colorIdentifier, $defaultColors)) { $clr = $defaultColors[$colorIdentifier]; } // Hack to keep this from being in the Customize options if ($colorIdentifier == 'heading_on_secondary_background' && !$clr) { $clr = $defaultColors[$colorIdentifier]; } if ($clr[0] !== "#") { $clr = "#" . $clr; } return $clr; } // Body colors $splash = ciGetNormalizedColor('splash_color'); $firm_name = ciGetNormalizedColor('firm_name_color'); $background = ciGetNormalizedColor('background_color'); $secondaryBG = ciGetNormalizedColor('secondary_background_color'); $h1 = ciGetNormalizedColor('page_title_color'); $h2 = ciGetNormalizedColor('heading_color'); $h2OnSecondary = ciGetNormalizedColor('heading_on_secondary_background'); $btn = ciGetNormalizedColor('button_color'); $copyright_text_color = ciGetNormalizedColor('copyright_text_color'); // Fancy landing pages $fancy_landing_splash = ciGetNormalizedColor('fancy_landing_splash_color'); $fancy_landing_text = ciGetNormalizedColor('fancy_landing_text_color'); $fancy_landing_h1 = ciGetNormalizedColor('fancy_landing_page_title_color'); $fancy_landing_h2 = ciGetNormalizedColor('fancy_landing_heading_color'); // Header stuff $header_text_color = ciGetNormalizedColor('header_text_color'); $header_highlight_color = ciGetNormalizedColor('header_highlight_color'); $header_link_bg_is_solid = get_option('header_link_bg_is_solid'); $header_link_size = get_option('header_link_size'); $header_link_bg_color = ciGetNormalizedColor('header_link_bg_color'); $header_bg_color = ciGetNormalizedColor('header_bg_color'); $header_hover_color = ciGetNormalizedColor('header_hover_color'); $logo_top_padding = get_option('logo_top_padding'); // Image background $backgroundImg = get_option("full_screen_image_bg"); $backgroundPattern = get_option("pattern_bg"); $menuBackgroundPattern = get_option("menu_pattern_bg"); $patternPath = get_template_directory_uri() . '/assets/img/patterns/'; ?> <!-- From customization.php --> <style> body { background: <?php echo $background; ?> ; <?php if ($backgroundImg) { ?> background: url(<?php echo $backgroundImg; ?> ) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; <?php } else { if ($backgroundPattern && $backgroundPattern != 'none') { ?> background-image: url('<?php echo $patternPath, $backgroundPattern; ?> .png'); background-repeat: repeat; background-position: center center;<?php } } ?> } .navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus, .dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus { background: <?php echo $splash; ?> ; color: #fff; } .navbar { <?php if ($menuBackgroundPattern && $menuBackgroundPattern != 'none') { ?> background: url('<?php echo $patternPath, $menuBackgroundPattern; ?> .png') repeat center center; <?php } ?> } .fancy-landing main > p, .fancy-landing main > div, .fancy-landing main > span { color: <?php echo $fancy_landing_text; ?> ; } h1 { color: <?php echo $h1; ?> ; } h2 { color: <?php echo $h2; ?> ; } .fancy-landing h1 { color: <?php echo $fancy_landing_h1; ?> ; } .fancy-landing h2, .fancy-landing h3, .fancy-landing h4 { color: <?php echo $fancy_landing_h2; ?> ; } .colored-bg { background: <?php echo $secondaryBG; ?> ; } .carousel-caption h2 { color: #fff; } .inverted h2 { color: <?php echo $h2OnSecondary; ?> ; } a, .individual-post .meta a:hover, .nav-search form button.header-search-icon:hover { color: <?php echo $splash; ?> ; } a:hover, a:focus, .employees h3 a { color: <?php echo ciAdjustBrightness($splash, -30); ?> ; background: <?php echo ciHexToRGBA($splash, 0.05); ?> ; } a:active { color: <?php echo ciAdjustBrightness($splash, -80); ?> ; } .practice-area h3 a, .employees h3 a { background: transparent; } .practice-area h3 a:after, .employees h3 a:before { background: <?php echo ciAdjustBrightness($splash, -30); ?> ; } .nav-search form input[type="text"]:focus { outline-color: <?php echo $splash; ?> ; } .navbar-default .navbar-brand { color: <?php echo $firm_name; ?> ; padding-top: <?php echo $logo_top_padding; ?> px; } .navbar-default .navbar-brand:hover { color: <?php echo $header_highlight_color; ?> } .navbar-default .navbar-nav>li>a, .navbar-default .navbar-nav>.active.open>a { color: <?php echo $header_text_color; ?> ; } .header-container { background: <?php echo $header_bg_color; ?> ; } .post-nav a, .nav-search form input:focus { color: <?php echo $header_text_color; ?> ; } .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus { background: <?php echo $header_link_bg_is_solid ? $header_hover_color : 'transparent'; ?> ; color: <?php echo $header_highlight_color; ?> ; } .dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus { color: #fff; background-color: <?php echo $header_highlight_color; ?> ; } .post-nav a:hover, .post-nav a:focus { color: <?php echo $header_link_bg_is_solid ? ciAdjustBrightness($header_text_color, -130) : $header_hover_color; ?> ; text-decoration: none; } .navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:hover, .navbar-default .navbar-nav>.open>a:focus { color: <?php echo ciAdjustBrightness($header_text_color, -130); ?> ; } .navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus { background: <?php echo $header_link_bg_is_solid ? $header_highlight_color : 'transparent'; ?> ; color: <?php echo $header_link_bg_is_solid ? "#fff" : $header_highlight_color; ?> ; } .dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus { background: <?php echo $header_highlight_color; ?> ;; color: #fff; } .navbar-nav > li > a { font-size: <?php echo $header_link_size; ?> %; } <?php if ($header_link_size > 110) { ?> .navbar-nav>li>a { padding-top: 20px; padding-bottom: 20px; } .post-nav { padding-top: 15px; } <?php } ?> .nsu_widget, footer, .inverted, .carousel-caption.left, .carousel-caption.right { background: <?php echo $secondaryBG; ?> ; color: #fff; } .btn-primary, input[type="submit"], form input[type="submit"], button[type="submit"], .btn, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt { color: <?php echo $btn; ?> ; position: relative; border-color: <?php echo $btn; ?> ; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary, input[type="submit"]:hover, button[type="submit"]:hover, input[type="submit"]:focus, button[type="submit"]:focus, form input[type="submit"]:hover, form input[type="submit"]:focus, .btn:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus, .woocommerce #respond input#submit.alt:active, .woocommerce a.button.alt:active, .woocommerce button.button.alt:active, .woocommerce input.button.alt:active { color: #fff; background-color: <?php echo $btn; ?> ; border-color: <?php echo $btn; ?> ; } .btn-primary:active, .btn-primary.active, .sidebar input[type="submit"]:active, .btn:active, .woocommerce #respond input#submit.alt:active, .woocommerce a.button.alt:active, .woocommerce button.button.alt:active, .woocommerce input.button.alt:active { color: #fff; background-color: <?php echo ciAdjustBrightness($btn, -30); ?> ; border-color: <?php echo ciAdjustBrightness($btn, -30); ?> ; } button[type="submit"].search-submit:hover { background-color: <?php echo ciAdjustBrightness($btn, -30); ?> ; } button[type="submit"].search-submit:active { background-color: <?php echo ciAdjustBrightness($btn, -50); ?> ; } ul.social-list li a, .individual-post .meta a { color: <?php echo $secondaryBG; ?> ; } .content-info, .content-info a { color: <?php echo $copyright_text_color; ?> ; } .ci-style-clean .widget h3:after { background: <?php echo $btn; ?> ; } @media (max-width: 768px) { .carousel-caption.left, .carousel-caption.right { background: transparent; } } </style> <?php }
a:hover, a:focus { color: <?php echo ciAdjustBrightness($splash, -30); ?> ; } .btn-primary, input[type="submit"], button[type="submit"] { color: #fff; background-color: <?php echo $splash; ?> ; border-color: <?php echo ciAdjustBrightness($splash, -20); ?> ; /* slightly darker */ } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary, input[type="submit"]:hover, button[type="submit"]:hover, input[type="submit"]:focus, button[type="submit"]:focus, form input[type="submit"]:hover, form input[type="submit"]:focus { background-color: <?php echo ciAdjustBrightness($splash, -18); ?> ; border-color: <?php echo ciAdjustBrightness($splash, -35); ?> ; color: #fff; }