function lambda_needed_js() { $theme_options = get_option('option_tree'); ?> (function($){ "use strict"; $(document).ready(function() { <?php #----------------------------------------------------------------- # Navigation Hover #----------------------------------------------------------------- ?> /* Navigation Hover ================================================== */ $('#navigation').bind('mouseenter', showBackDrop).bind('mouseleave', hideBackDrop); var backdrop = 'inactive', hoverstate = 'inactive'; function showBackDrop(){ hoverstate = 'active'; if( $(window).scrollTop() > 0 ) { backdrop = 'active'; $(".ut-backdrop").height( $(document).height() ).stop(true,true).fadeIn(); } } function hideBackDrop(){ hoverstate = 'inactive'; $(".ut-backdrop").stop().fadeOut(); } $(window).scroll(function() { if($(this).scrollTop() > 0 && backdrop === 'inactive' && hoverstate === 'active') { showBackDrop(); backdrop = 'active'; } else { backdrop = 'inactive'; hoverstate = 'inactive'; } }); <?php #----------------------------------------------------------------- # PrettyPhoto Extension #----------------------------------------------------------------- ?> <?php if (isset($theme_options['activate_prettyphoto']) && $theme_options['activate_prettyphoto'] == 'on') { ?> /* Prettyphoto ================================================== */ $("a[data-rel^='prettyPhoto']").prettyPhoto({ show_title: false }); <?php } ?> <?php #----------------------------------------------------------------- # Service Template Scroll #----------------------------------------------------------------- ?> <?php if (is_page_template('template-service.php')) { ?> $('#scrollTo').parent().css('height', $('#verticaltabs-content').height() ); $(window).scroll(function() { if( $(this).scrollTop() > 0) { $('#scrollTo').animate({'margin-top': $(this).scrollTop() }); } else { $('#scrollTo').css({'margin-top': 0 }); } }); <?php } ?> <?php #----------------------------------------------------------------- # Image Animation #----------------------------------------------------------------- ?> <?php if (!lambda_detect_ie()) { if (isset($theme_options['animation_area']) && is_array($theme_options['animation_area'])) { ?> <?php foreach ($theme_options['animation_area'] as $singlearea) { if (!empty($singlearea['description']) && !empty($singlearea['effect'])) { $delay = !empty($singlearea['delay']) ? $singlearea['delay'] : '100'; $classes = str_replace(array("\r\n", "\r"), '', $singlearea['description']); if (!empty($singlearea['page']) && is_page($singlearea['page'])) { echo '$("' . $classes . '").waypoint( function() { $(this).delay(' . $delay . ').queue(function(next){ if( !$(this).hasClass("animated") ) { $(this).addClass("animated ' . $singlearea['effect'] . '"); } next(); }); }, { offset: "85%" });'; } elseif (empty($singlearea['page'])) { echo '$("' . $classes . '").waypoint( function() { $(this).delay(' . $delay . ').queue(function(next){ if( !$(this).hasClass("animated") ) { $(this).addClass("animated ' . $singlearea['effect'] . '"); } next(); }); }, { offset: "85%" });'; } } } ?> <?php } ?> <?php } ?> <?php #----------------------------------------------------------------- # fixed header animation #----------------------------------------------------------------- ?> <?php if (isset($theme_options['fixed_header']) && $theme_options['fixed_header'] == 'on') { ?> <?php $fontsizelarge = !empty($theme_options['logo_font']['font-size']) ? $theme_options['logo_font']['font-size'] : 28; $fontsizelarge = preg_replace('/px/', '', $fontsizelarge); ?> <?php if (get_option_tree('textorlogo') == 'Logo') { ?> var large_logo_height = '', header_scrollable = false; <?php } else { ?> var large_logo_height = '', fontsize_large = '<?php echo $fontsizelarge; ?> ', header_scrollable = false; <?php } ?> $(window).load(function(){ <?php if (get_option_tree('textorlogo') == 'Logo') { ?> large_logo_height = $('#logo').find("img").outerHeight(); <?php } else { ?> large_logo_height = $('#logo').find("h1").outerHeight(); fontsize_large = $('#logo').find('h1, h1 a').css('font-size'); <?php } ?> header_scrollable = true; delaware_header_size(); }); $(window).smartresize(function(){ if( header_scrollable ) { delaware_header_size(); } }); function delaware_header_size() { /* animation variables */ var $sitewrap = $('#wrap'), $header = $('#header'), $logowrap = $('#logo'), <?php if (is_admin_bar_showing()) { ?> toolbarheight = $('#wpadminbar').outerHeight(), <?php } else { ?> toolbarheight = 0, <?php } ?> <?php if (isset($theme_options['textorlogo']) && $theme_options['textorlogo'] != 'Logo') { ?> fontsize_small = "16px", new_font_size = fontsize_large, <?php } ?> new_logo_height = large_logo_height, mini_logo_height = large_logo_height / 2, header_height = $header.outerHeight(), runanimation = true, animated = 1, newHP = 0 + toolbarheight, newSWP = header_height, win = $(window), topheader = $('.top-header').outerHeight(), set_header_height = function () { var header_position = win.scrollTop(); if( header_position > 0 && animated === 1 && win.width() > 979 ) { if( $('.top-header').hasClass('th1') ) { topheader = 0; } newHP = ( - topheader + toolbarheight ); newSWP = header_height - topheader - mini_logo_height - toolbarheight; new_logo_height = mini_logo_height; <?php if (isset($theme_options['textorlogo']) && $theme_options['textorlogo'] != 'Logo') { ?> new_font_size = fontsize_small; <?php } ?> runanimation = true; animated++; } else if ( header_position === 0 && animated === 2 ) { newHP = 0 + toolbarheight; newSWP = header_height; new_logo_height = large_logo_height; <?php if (isset($theme_options['textorlogo']) && $theme_options['textorlogo'] != 'Logo') { ?> new_font_size = fontsize_large; <?php } ?> runanimation = true; animated = 1; } if( runanimation ) { /* animate the stuff */ $logowrap.stop().animate({ "height" : new_logo_height } , { duration: 300 , queue: false } ); <?php if (isset($theme_options['textorlogo']) && $theme_options['textorlogo'] != 'Logo') { ?> $logowrap.find('h1, h1 a').stop().animate({ "font-size" : new_font_size } , { duration: 300 , queue: false } ); <?php } ?> $header.stop().animate({ "top" : newHP } , { duration: 300 , queue: false } ); $sitewrap.stop().animate({ "padding-top" : newSWP } , { duration: 300 , queue: false } ); runanimation = false; } }; win.scroll( set_header_height ); set_header_height(); } <?php } ?> <?php if (is_home()) { ?> var header = $('.header-inner').outerHeight(); $('.post').waypoint( function(direction) { $('.pformat span').removeClass('pformat-marker'); $(this).find('.pformat span').addClass('pformat-marker'); }, { offset: header + 80 }); <?php } ?> }); })(jQuery); <?php }
function lambda_custom_css() { global $lambda_meta_data, $slider_meta_data; $theme_path = get_template_directory_uri(); $theme_options = get_option('option_tree'); $finalcss = '<style type="text/css">'; #----------------------------------------------------------------- # needed variables #----------------------------------------------------------------- $color_scheme = !empty($theme_options['themecolor']) ? $theme_options['themecolor'] : '#4CB0DB'; //Get needed meta variables if (is_home()) { $homeid = get_option('page_for_posts'); $pagemetadata = get_post_meta($homeid, $lambda_meta_data->get_the_id(), TRUE); $slidermetadata = get_post_meta($homeid, $slider_meta_data->get_the_id(), TRUE); } else { $pagemetadata = $lambda_meta_data->the_meta(); $slidermetadata = $slider_meta_data->the_meta(); } if (isset($theme_options['sitelayout']) && $theme_options['sitelayout'] == 'boxed') { $finalcss .= '.boxed { max-width:1230px; }'; } #----------------------------------------------------------------- # Sidebar Alignement #----------------------------------------------------------------- $page_settings = !empty($pagemetadata['sidebar_align']) ? $pagemetadata['sidebar_align'] : ''; $sidebar_position = !empty($page_settings) ? $page_settings : $theme_options['sidebar_alignement']; $content_position = $sidebar_position == "right" ? "left" : "right"; $sidebar_padding = $sidebar_position == "right" ? "left" : "right"; $sidebar_second_padding = $sidebar_position == "both" ? "left" : "right"; if (!is_page_template('template-home.php')) { $finalcss .= "\n #wrap #content {float: {$content_position};}\n #wrap #sidebar {float: {$sidebar_position};}\n #wrap #sidebar .sidebar {padding-{$sidebar_padding}: 10px;padding-{$sidebar_position}: 0px;}\n \n /* second sidebar enhancement */\t\n #wrap #sidebar_second {float:{$content_position};}\n #wrap #sidebar_second .sidebar {padding-{$sidebar_second_padding}: 10px;padding-{$content_position}: 0px;}"; } #----------------------------------------------------------------- # Custom Background #----------------------------------------------------------------- if (isset($theme_options['sitelayout']) && $theme_options['sitelayout'] == 'boxed') { if ($theme_options['background_type'] == 'default_backgroundcolor') { $finalcss .= 'body { background: ' . $theme_options['default_backgroundcolor'] . ' !important; }'; } elseif ($theme_options['background_type'] == 'default_backgroundpattern') { $finalcss .= 'body { background: #FFF url(' . $theme_path . '/images/pattern/' . $theme_options['default_backgroundpattern']['background-image'] . ') repeat; }'; } elseif ($theme_options['background_type'] == 'default_backgroundtexture') { $finalcss .= 'body { background: #FFF url(' . $theme_path . '/images/bg-textured/' . $theme_options['default_backgroundtexture']['background-image'] . ') repeat-x; }'; } elseif ($theme_options['background_type'] == 'default_backgroundimage') { $finalcss .= ' body { background: #FFF url(' . $theme_options['default_backgroundimage'] . '); background-attachment: scroll; background-repeat: no-repeat; background-position: center top; }'; } } #----------------------------------------------------------------- # Custom Featured Header #----------------------------------------------------------------- //overwrite default values coming from meta panel if necessary $backgroundtype = !empty($slidermetadata['slider_background_type']) ? $slidermetadata['slider_background_type'] : ''; $backgroundpattern = !empty($slidermetadata['slider_default_backgroundpattern']) ? $slidermetadata['slider_default_backgroundpattern'] : ''; $backgroundimage['background-color'] = !empty($slidermetadata['slider_default_backgroundcolor']) ? $slidermetadata['slider_default_backgroundcolor'] : ''; $backgroundimage['background-image'] = !empty($slidermetadata['slider_default_background_image']) ? $slidermetadata['slider_default_background_image'] : ''; $backgroundimage['background-repeat'] = !empty($slidermetadata['slider_default_background_repeat']) ? $slidermetadata['slider_default_background_repeat'] : ''; $backgroundimage['background-position'] = !empty($slidermetadata['slider_default_background_position']) ? $slidermetadata['slider_default_background_position'] : ''; $backgroundimage['background-attachment'] = !empty($slidermetadata['slider_default_background_attachment']) ? $slidermetadata['slider_default_background_attachment'] : ''; if ($backgroundtype == 'slider_default_backgroundpattern') { $finalcss .= '#lambda-featured-header-wrap { background: url(' . $theme_path . '/images/pattern/' . $backgroundpattern . ') repeat; }'; } elseif ($backgroundtype == 'slider_default_backgroundimage') { $finalcss .= '#lambda-featured-header-wrap { background:' . $backgroundimage['background-color'] . ' url(' . $backgroundimage['background-image'] . ') ' . $backgroundimage['background-repeat'] . ' ' . $backgroundimage['background-position'] . ' ' . $backgroundimage['background-attachment'] . '; }'; } #----------------------------------------------------------------- # Declare CSS Font Stacks for reuse #----------------------------------------------------------------- $websafefonts = array('arial' => 'Arial, Helvetica, sans-serif', 'georgia' => 'Georgia, serif', 'helvetica' => '"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif', 'tahoma' => 'Tahoma, Geneva, sans-serif', 'times' => '"Times New Roman", Times, serif', 'trebuchet' => '"Trebuchet MS", Helvetica, sans-serif', 'verdana' => 'Verdana, Geneva, sans-serif', 'impact' => 'Impact, Charcoal, sans-serif', 'palatino' => '"Palatino Linotype", "Book Antiqua", Palatino, serif', 'century' => 'Century Gothic, sans-serif', 'lucida' => '"Lucida Sans Unicode", "Lucida Grande", sans-serif', 'luciaconsole' => '"Lucida Console", Monaco, monospace', 'arialblack' => '"Arial Black", Gadget, sans-serif', 'arialnarrow' => '"Arial Narrow", sans-serif', 'copperplate' => 'Copperplate / Copperplate Gothic Light, sans-serif', 'gillsans' => 'Gill Sans / Gill Sans MT, sans-serif', 'courier' => '"Courier New", Courier, monospace'); #----------------------------------------------------------------- # Add Custom Font to font stack #----------------------------------------------------------------- if (isset($theme_options['custom_font']) && is_array($theme_options['custom_font'])) { foreach ($theme_options['custom_font'] as $key => $value) { $websafefonts[strtolower($value['title'])] = '"' . $value['title'] . '"'; } } #----------------------------------------------------------------- # Color Helper Functions #----------------------------------------------------------------- function HexToRGB($hex) { $hex = str_replace("#", "", $hex); $color = array(); if (strlen($hex) == 3) { $color['r'] = hexdec(substr($hex, 0, 1) . $r); $color['g'] = hexdec(substr($hex, 1, 1) . $g); $color['b'] = hexdec(substr($hex, 2, 1) . $b); } else { if (strlen($hex) == 6) { $color['r'] = hexdec(substr($hex, 0, 2)); $color['g'] = hexdec(substr($hex, 2, 2)); $color['b'] = hexdec(substr($hex, 4, 2)); } } $color = implode(',', $color); return $color; } function RGBToHex($r, $g, $b) { $hex = "#"; $hex .= str_pad(dechex($r), 2, "0", STR_PAD_LEFT); $hex .= str_pad(dechex($g), 2, "0", STR_PAD_LEFT); $hex .= str_pad(dechex($b), 2, "0", STR_PAD_LEFT); return $hex; } #----------------------------------------------------------------- # Load Cutom Font Face #----------------------------------------------------------------- if (isset($theme_options['custom_font']) && is_array($theme_options['custom_font'])) { foreach ($theme_options['custom_font'] as $key => $value) { $finalcss .= "@font-face {"; if (!empty($value['title'])) { $finalcss .= "\t\t" . "font-family: '" . $value['title'] . "';"; } if (!empty($value['embedded-opentype'])) { $finalcss .= "\t\t" . "src: url('" . $value['embedded-opentype'] . "');"; $finalcss .= "\t\t" . "src: url('" . $value['embedded-opentype'] . "?#iefix') format('embedded-opentype'),"; } if (!empty($value['woff'])) { $finalcss .= "\t\t" . "url('" . $value['woff'] . "') format('woff'),"; } if (!empty($value['truetype'])) { $finalcss .= "\t\t" . "url('" . $value['truetype'] . "') format('truetype'),"; } if (!empty($value['svg'])) { $finalcss .= "\t\t" . "url('" . $value['svg'] . "') format('svg');"; } $finalcss .= "}"; } } #----------------------------------------------------------------- # Body Typography #----------------------------------------------------------------- if (!empty($theme_options['bodyfont'])) { $finalcss .= 'body, .ut-clients blockquote, .author-description {'; $finalcss .= 'color:' . $theme_options['bodyfont']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['bodyfont']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['bodyfont']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['bodyfont']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['bodyfont']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['bodyfont']['font-style'] . ';'; $finalcss .= '}'; } #----------------------------------------------------------------- # Headlines #----------------------------------------------------------------- if (!empty($theme_options['headline_font_face_type']) && $theme_options['headline_font_face_type'] == 'headline_font_face_google') { $fontface = lambda_polish_font_name($theme_options['headline_font_face_google']['font-family']); } elseif (!empty($websafefonts[$theme_options['headline_font_face_websafe']['font-family']])) { $fontface = $websafefonts[$theme_options['headline_font_face_websafe']['font-family']]; } else { $fontface = 'Arial, Helvetica, sans-serif'; } $finalcss .= 'h1 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h1_font_size']['0'] . $theme_options['h1_font_size']['1'] . '; }'; $finalcss .= 'h2 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h2_font_size']['0'] . $theme_options['h2_font_size']['1'] . '; }'; $finalcss .= 'h3 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h3_font_size']['0'] . $theme_options['h3_font_size']['1'] . '; }'; $finalcss .= 'h4 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h4_font_size']['0'] . $theme_options['h4_font_size']['1'] . '; }'; $finalcss .= 'h5 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h5_font_size']['0'] . $theme_options['h5_font_size']['1'] . '; }'; $finalcss .= 'h6 { font-family: ' . $fontface . '; font-size: ' . $theme_options['h6_font_size']['0'] . $theme_options['h6_font_size']['1'] . '; }'; $finalcss .= 'h1, h2, h3, h4, h5, h6 { color: ' . $theme_options['headline_font_color'] . '; }'; if (!empty($theme_options['headline_font_face_type']) && $theme_options['headline_font_face_type'] == 'headline_font_face_websafe') { $finalcss .= ' h1, h2, h3, h4, h5, h6 { font-weight: ' . $theme_options['headline_font_face_websafe']['font-weight'] . '; font-style: ' . $theme_options['headline_font_face_websafe']['font-style'] . '; }'; } $finalcss .= 'span.client-title strong { font-family: ' . $fontface . '; }'; #----------------------------------------------------------------- # Page Title & Teaser #----------------------------------------------------------------- if (!empty($theme_options['page_title'])) { $finalcss .= '#page-title, .featured-header-title {'; $finalcss .= 'color:' . $theme_options['page_title']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['page_title']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['page_title']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['page_title']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['page_title']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['page_title']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['page_title']['font-transform'] . ';'; $finalcss .= '}'; } if (!empty($theme_options['home_title'])) { $finalcss .= '.ut-title, .portfolio-info .ut-title span {'; $finalcss .= 'color:' . $theme_options['home_title']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['home_title']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['home_title']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['home_title']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['home_title']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['home_title']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['home_title']['font-transform'] . ';'; $finalcss .= '}'; } if (!empty($theme_options['page_teaser'])) { $finalcss .= 'p.teaser-text {'; $finalcss .= 'color:' . $theme_options['page_teaser']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['page_teaser']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['page_teaser']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['page_teaser']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['page_teaser']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['page_teaser']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['page_teaser']['font-transform'] . ';'; $finalcss .= '}'; } #----------------------------------------------------------------- # Logo #----------------------------------------------------------------- if (!empty($theme_options['logo_font'])) { $finalcss .= '#logo h1, #logo h1 a {'; $finalcss .= 'color:' . $theme_options['logo_font']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['logo_font']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['logo_font']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['logo_font']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['logo_font']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['logo_font']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['logo_font']['font-transform'] . ';'; $finalcss .= '}'; } #----------------------------------------------------------------- # Widget Titles #----------------------------------------------------------------- if (!empty($theme_options['sidebar_widget_title'])) { $finalcss .= '.widget-title, .home-title, .page-title, .archive-title, .ut-title {'; $finalcss .= 'color:' . $theme_options['sidebar_widget_title']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['sidebar_widget_title']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['sidebar_widget_title']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['sidebar_widget_title']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['sidebar_widget_title']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['sidebar_widget_title']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['sidebar_widget_title']['font-transform'] . ';'; $finalcss .= '}'; $finalcss .= '.widget-title a { '; $finalcss .= 'color:' . $theme_options['sidebar_widget_title']['font-color'] . ';'; $finalcss .= '}'; } if (!empty($theme_options['footer_widget_title'])) { $finalcss .= '#footer .widget-title {'; $finalcss .= 'color:' . $theme_options['footer_widget_title']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['footer_widget_title']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['footer_widget_title']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['footer_widget_title']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['footer_widget_title']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['footer_widget_title']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['footer_widget_title']['font-transform'] . ';'; $finalcss .= '}'; } #----------------------------------------------------------------- # Blog Styling #----------------------------------------------------------------- if (!empty($theme_options['blog_titles'])) { $finalcss .= '.entry-title { '; $finalcss .= 'color:' . $theme_options['blog_titles']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['blog_titles']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['blog_titles']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['blog_titles']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['blog_titles']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['blog_titles']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['blog_titles']['font-transform'] . ';'; $finalcss .= '}'; $finalcss .= '.entry-title a { '; $finalcss .= 'color:' . $theme_options['blog_titles']['font-color'] . ';'; $finalcss .= '}'; } if (!empty($theme_options['blog_titles_home'])) { $finalcss .= '.recent-post .entry-title { '; $finalcss .= 'color:' . $theme_options['blog_titles_home']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['blog_titles_home']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['blog_titles_home']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['blog_titles_home']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['blog_titles_home']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['blog_titles_home']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['blog_titles_home']['font-transform'] . ';'; $finalcss .= '}'; } if (!empty($theme_options['blog_titles'])) { $finalcss .= '.link-post-title { '; $finalcss .= 'font-size:' . $theme_options['blog_titles']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['blog_titles']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['blog_titles']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['blog_titles']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['blog_titles']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['blog_titles']['font-transform'] . ';'; $finalcss .= '}'; $finalcss .= '.link-post-title a { '; $finalcss .= 'color:' . $theme_options['blog_titles']['font-color'] . ';'; $finalcss .= '}'; } #----------------------------------------------------------------- # Revolution Slider Caption #---------------------------------------------------------------- $finalcss .= ' .caption.themecolor_background { background-color: ' . $color_scheme . ' ; } .caption.themecolor_normal { color: ' . $color_scheme . '; } .themecolor-background { background: ' . $color_scheme . '; -moz-border-radius: 2px; border-radius: 2px; padding: 5px 10px; } .themebutton.button { background: ' . $color_scheme . '; color:#FFFFFF; } .themebutton2:hover { background: ' . $color_scheme . '; }'; #----------------------------------------------------------------- # Navigation Customisation #----------------------------------------------------------------- //Navigation Level 1 if (!empty($theme_options['navigation_font'])) { $finalcss .= '#navigation ul li a {'; $finalcss .= 'color:' . $theme_options['navigation_font']['font-color'] . ';'; $finalcss .= 'font-size:' . $theme_options['navigation_font']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['navigation_font']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['navigation_font']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['navigation_font']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['navigation_font']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['navigation_font']['font-transform'] . ';'; $finalcss .= '}'; } //Navigation Level 2 Link Style if (!empty($theme_options['drop_down_font_color'])) { $finalcss .= '#navigation ul.sub-menu li a {'; $finalcss .= 'color:' . $theme_options['drop_down_font_color']['font-color'] . ' !important;'; $finalcss .= 'font-size:' . $theme_options['drop_down_font_color']['font-size'] . ';'; if (!empty($websafefonts[$theme_options['drop_down_font_color']['font-family']])) { // Custom Font $finalcss .= 'font-family:' . $websafefonts[$theme_options['drop_down_font_color']['font-family']] . ';'; } else { // Fallback Font $finalcss .= 'font-family:' . $websafefonts['arial'] . ';'; } $finalcss .= 'font-weight:' . $theme_options['drop_down_font_color']['font-weight'] . ';'; $finalcss .= 'font-style:' . $theme_options['drop_down_font_color']['font-style'] . ';'; $finalcss .= 'text-transform:' . $theme_options['drop_down_font_color']['font-transform'] . ';'; $finalcss .= '}'; } $finalcss .= ' #navigation ul a:hover { color: ' . $color_scheme . ' !important; } #navigation ul li:hover a { color: ' . $color_scheme . '; } #navigation ul li ul li:hover a{ color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; } #navigation ul.sub-menu .current-menu-ancestor a { color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; } #navigation ul.sub-menu .current-menu-ancestor ul a { color: ' . $theme_options['drop_down_font_color']['font-color'] . ' !important; } #navigation ul.sub-menu .current-menu-ancestor ul a:hover { color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; } #navigation ul.sub-menu .current-menu-ancestor ul li.active > a { color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; } #navigation ul li ul li:hover ul li a { color: ' . $theme_options['drop_down_font_color']['font-color'] . ' !important; } #navigation ul.sub-menu a:hover { color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; } #navigation ul > li.active > a { color: ' . $theme_options['navigation_active'] . ' !important; } #navigation ul > li ul li ul li.active > a, #navigation ul > li ul li.active > a { color: ' . $theme_options['drop_down_font_color_hover'] . ' !important; background: #141414; } '; #----------------------------------------------------------------- # Color Variations #----------------------------------------------------------------- $finalcss .= ' ::-moz-selection { color: #FFFFFF !important; background: ' . $color_scheme . '; } ::selection { color: #FFFFFF !important; background:' . $color_scheme . '; } .alignnone img:hover, img.alignnone:hover, .attachment-thumbnail:hover, .attachment-medium:hover, .attachment-large:hover, .attachment-full:hover, #footer .lambda_widget_flickr .flickr_items a:hover, #footer .lambda_widget_flickr .flickr_items a:focus, .flickr_items li a:hover, .flickr_items li a:focus, .size-full:hover, .size-large:hover, .size-medium:hover, .size-thumbnail:hover, .pager img.selected, .pager img:hover { border-color:' . $color_scheme . ' !important; } .ut-cta-shadow { border-left:2px solid ' . $color_scheme . '; } .fbg5, .top-header.th6 { } .archive-title span, .page-title span, .ut-title span, .home-title span, .widget-title span { } #wp-calendar td#today, address { background: ' . $color_scheme . ' !important; } .ut-bar, .tp-caption.delaware_big_sub-title_BG, .mask .mask-inner .hi-icon-effect-1 .hi-icon:hover, .hi-icon-effect-1a .hi-icon:hover, .top-header.th3, .lambda-highlight1, .lambda-pricingtable.featured .lambda-pricingtable-top, .format-link .entry-title a { background: ' . $color_scheme . '; } .ut-btn.theme-btn { border:1px solid ' . $color_scheme . '; color:' . $color_scheme . ' !important; } .theme-btn:after { background:' . $color_scheme . '; } .theme-btn:hover, .theme-btn:active { color: #FFFFFF !important; } .pformat-marker { background:' . $color_scheme . '; border-color:' . $color_scheme . '; color:#FFFFFF; } .ut-portfolio-item h3:hover, .accordion-toggle, .accordion-toggle.collapsed:hover, hr.style-one, .quote-caption a:hover, .more-link, .author-link, .comment-time i, .comment-reply i, .themecolor, #wp-calendar a, .widget_rss .rss-date, .comment-edit-link:hover, .edit-link a:hover { color: ' . $color_scheme . ' !important; } .service h3 i, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, #mobile-menu ul li a, #mobile-menu .sub-menu li a:hover, .tp-caption.delaware_big_sub-title_theme-color, .testimonial-entry p:before, .testimonial-entry p:after, .top-header.th4 ul.lambda-sociallinks li:hover, .nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus, .nav-tabs > li > a:hover, .nav-tabs > li > a:focus, .required, input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover, #footer input[type="submit"]:hover, #footer [type="reset"]:hover, #footer [type="button"]:hover, .nav-wrap ul.ut-default-menu i, .comment-author, .comment-author a, .mm-trigger.active .mm-button:before, .mm-button:hover:before, .mm-trigger:hover .mm-button:before, #toTop:hover:before, #toTop:hover, #footer strong, footer.entry-meta a:hover, footer.entry-meta i, #footer-wrap ul.lambda-sociallinks li:hover, ul.lambda-sociallinks li:hover, a, .entry-title a:hover, .sidebar a:hover, .widget-sidebar a:hover { color: ' . $color_scheme . '; } .hi-icon-effect-1 .hi-icon:after { box-shadow: 0 0 0 4px ' . $color_scheme . '; } hr.style-two { border: 0; height: 1px; background: ' . $color_scheme . '; background-image: -webkit-linear-gradient(left, #DDDDDD, ' . $color_scheme . ', #DDDDDD); background-image: -moz-linear-gradient(left, #DDDDDD, ' . $color_scheme . ', #DDDDDD); background-image: -ms-linear-gradient(left, #DDDDDD, ' . $color_scheme . ', #DDDDDD); background-image: -o-linear-gradient(left, #DDDDDD, ' . $color_scheme . ', #DDDDDD); } .ut-qtprogress { background: ' . $color_scheme . '; }'; #----------------------------------------------------------------- # Image Animation #----------------------------------------------------------------- if (lambda_detect_ie()) { if (isset($theme_options['animation_area']) && is_array($theme_options['animation_area'])) { foreach ($theme_options['animation_area'] as $singlearea) { if (!empty($singlearea['description']) && !empty($singlearea['effect'])) { $classes = str_replace(array("\r\n", "\r"), '', $singlearea['description']); if (!empty($singlearea['page']) && is_page($singlearea['page'])) { $finalcss .= $classes . '{ display: block; }'; } elseif (empty($singlearea['page'])) { $finalcss .= $classes . '{ display: block; }'; } } } } } else { if (isset($theme_options['animation_area']) && is_array($theme_options['animation_area'])) { foreach ($theme_options['animation_area'] as $singlearea) { if (!empty($singlearea['description']) && !empty($singlearea['effect'])) { $classes = str_replace(array("\r\n", "\r"), '', $singlearea['description']); if (!empty($singlearea['page']) && is_page($singlearea['page'])) { $finalcss .= $classes . '{ visibility: hidden; }'; } elseif (empty($singlearea['page'])) { $finalcss .= $classes . '{ visibility: hidden; }'; } } } } } #----------------------------------------------------------------- # PageCreator #----------------------------------------------------------------- $pagecreator = lambda_return_meta('pagecreator'); if (isset($pagecreator['activate_page_creator']) && $pagecreator['activate_page_creator'] == 'on') { $finalcss .= '.type-page.hentry { margin-bottom:20px !important; }'; } #----------------------------------------------------------------- # Custom CSS out of Theme Options Panel #----------------------------------------------------------------- $finalcss .= stripslashes($theme_options['custom_css']); $finalcss .= '</style>'; #----------------------------------------------------------------- # Output minified CSS #----------------------------------------------------------------- echo lambda_regx_removal($finalcss); }