diff --git a/.gitignore b/.gitignore index 5573e21..2b321c9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ prepros.cfg sass/_notes/dwsync.xml css/_notes/dwsync.xml + +js/_notes/dwsync.xml diff --git a/header.php b/header.php index b56d96b..9cfbc08 100644 --- a/header.php +++ b/header.php @@ -1,95 +1,97 @@ - section and everything up till
- * - */ -if ( apply_filters( 'load_custom_header', false ) ) { - $custom_header = apply_filters( 'get_custom_header', '' ); - - if ( '' != $custom_header ) { - // Get the header that we just received - // and call the native 'get_header' function - // as usual - load_template( $custom_header ); - - // By calling 'return' we are skipping - // parsing this template any further - return; - } -} - include 'inc/vars.php'; -?> - -> - - - - - -<?php wp_title( '|', true, 'right' ); ?> - - - - - -> - - - - - - -
- - -
+ section and everything up till
+ * + */ +if ( apply_filters( 'load_custom_header', false ) ) { + $custom_header = apply_filters( 'get_custom_header', '' ); + + if ( '' != $custom_header ) { + // Get the header that we just received + // and call the native 'get_header' function + // as usual + load_template( $custom_header ); + + // By calling 'return' we are skipping + // parsing this template any further + return; + } +} + include 'inc/vars.php'; +?> + +> + + + + + +<?php wp_title( '|', true, 'right' ); ?> + + + + + +> + + + + + + +
+ + +
\ No newline at end of file diff --git a/inc/reg-sidebars.php b/inc/reg-sidebars.php index 2ceef09..00217e7 100644 --- a/inc/reg-sidebars.php +++ b/inc/reg-sidebars.php @@ -43,11 +43,12 @@ if ( function_exists('register_sidebar') ) { $sidebars['sidebar']['id'] = 'sidebar'; register_sidebar($sidebars['sidebar']); } + - /*register_sidebar(array( - 'name' => __( 'Sidebar', 'theme_text_domain' ), - 'id' => 'sidebar', - 'description' => 'Appears with Archives, Search Results, the Blog page template, and when viewing single posts.', + register_sidebar(array( + 'name' => __( 'Header Content', 'theme_text_domain' ), + 'id' => 'header-widget-area', + 'description' => 'Widget area for header. Limited to 2 widgets.', 'class' => 'sidebar', 'before_widget' => '', @@ -55,7 +56,7 @@ if ( function_exists('register_sidebar') ) { 'after_title' => '
' )); - register_sidebar( array( + /*register_sidebar( array( 'name' => __( 'Mega Footer' ), 'id' => 'mega-footer', 'description' => 'Limited to 6 widgets. Will appear at the bottom of every page in the site.', diff --git a/inc/scripts-and-styles.php b/inc/scripts-and-styles.php index 4d80c79..9e1d546 100644 --- a/inc/scripts-and-styles.php +++ b/inc/scripts-and-styles.php @@ -1,52 +1,53 @@ - \ No newline at end of file diff --git a/js/_notes/dwsync.xml b/js/_notes/dwsync.xml deleted file mode 100644 index 54a97c0..0000000 --- a/js/_notes/dwsync.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/js/header-widgets.js b/js/header-widgets.js new file mode 100644 index 0000000..150d445 --- /dev/null +++ b/js/header-widgets.js @@ -0,0 +1,20 @@ +jQuery(document).ready(function( $ ) { + if ($("#masthead .col-sm-4 .widget")[0]){ //if a widget exists in the header area + $("#masthead .col-sm-4 .searchform").hide(); // hide default search + $("#masthead .col-sm-4").removeClass( "col-sm-4" ).addClass( "col-sm-6" ); // make old search wrapper larger + $("#masthead .col-sm-8").removeClass( "col-sm-8" ).addClass( "col-sm-6" ); //change site title area since search area is now larger + $("#masthead .col-sm-6 .widget .searchform").show(); // allow search widget to be showed when added to search area + + var $widget = $('#masthead .col-sm-6 .widget'); + $widget.css('width',(100/$widget.length).toString()+'%'); + //$widget.css('width', '50%'); + + var $widgetMenuHeight = $('#masthead .col-sm-6 .widget .menu'); //Center menu widget + $widgetMenuHeight.css('margin-top', ($('#uc-site-header').outerHeight() - $('#masthead .col-sm-6 .widget .menu li a').outerHeight())/2); + + } else { //if no widget exists + $("#masthead .col-sm-4.widget").removeClass("col-sm-4").hide(); + } + + +}); \ No newline at end of file diff --git a/sass/_widgets.scss b/sass/_widgets.scss index 1ff6751..23949bb 100644 --- a/sass/_widgets.scss +++ b/sass/_widgets.scss @@ -839,6 +839,84 @@ } } +/* Header widget area */ + +#masthead { + #site-title { + .header-widget-area { + max-height: 90px; + overflow: hidden; + + .widget { + float:right; + + &.simple-social-icons { + margin-top:27px; + + li:before { + display:none; //getting rid of non-functional characters + } + } + + &.widget_sp_image { //image widget + .widget-head, widget_sp_image-description { + display:none; + } + img { + margin-top:14px; + } + } + + &.widget_search { + .searchform { + margin-left: 10px; + + .form-group { + .form-control { + + @media (max-width:991px) { + width:124px; + } + } + } + } + } + + &.widget_black_studio_tinymce { + color:white !important; + margin-top:10px; + + h2.widget-title { + color:white !important; + margin-bottom:5px; + } + } + + &:nth-child(n+4) { //Hide 3 or more items from header widget area + display:none; + } + + &.widget_nav_menu { + .menu { + list-style-type: none; + margin-top:37px; + float:right; + + li { + float:left; + margin-right:22px; + + a { + line-height:1.5em; + } + } + } + } + } + } + } +} + diff --git a/style.css b/style.css index d9299a1..a9dfdcc 100644 --- a/style.css +++ b/style.css @@ -7871,6 +7871,71 @@ button.close { margin-top: 0.75em; } +/* Header widget area */ +#masthead #site-title .header-widget-area { + max-height: 90px; + overflow: hidden; +} + +#masthead #site-title .header-widget-area .widget { + float: right; +} + +#masthead #site-title .header-widget-area .widget.simple-social-icons { + margin-top: 27px; +} + +#masthead #site-title .header-widget-area .widget.simple-social-icons li:before { + display: none; +} + +#masthead #site-title .header-widget-area .widget.widget_sp_image .widget-head, #masthead #site-title .header-widget-area .widget.widget_sp_image widget_sp_image-description { + display: none; +} + +#masthead #site-title .header-widget-area .widget.widget_sp_image img { + margin-top: 14px; +} + +#masthead #site-title .header-widget-area .widget.widget_search .searchform { + margin-left: 10px; +} + +@media (max-width: 991px) { + #masthead #site-title .header-widget-area .widget.widget_search .searchform .form-group .form-control { + width: 124px; + } +} + +#masthead #site-title .header-widget-area .widget.widget_black_studio_tinymce { + color: white !important; + margin-top: 10px; +} + +#masthead #site-title .header-widget-area .widget.widget_black_studio_tinymce h2.widget-title { + color: white !important; + margin-bottom: 5px; +} + +#masthead #site-title .header-widget-area .widget:nth-child(n+4) { + display: none; +} + +#masthead #site-title .header-widget-area .widget.widget_nav_menu .menu { + list-style-type: none; + margin-top: 37px; + float: right; +} + +#masthead #site-title .header-widget-area .widget.widget_nav_menu .menu li { + float: left; + margin-right: 22px; +} + +#masthead #site-title .header-widget-area .widget.widget_nav_menu .menu li a { + line-height: 1.5em; +} + /* - - - - - - - - - - - - - - - - - - - == Content - - - - - - - - - - - - - - - - - - - */