From 02f8de196ac8eb27a513faaa823ec019787d04d0 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Tue, 12 Aug 2014 13:26:36 -0400 Subject: [PATCH] Cleaning House fixed rogue closing div. commenting out unused color options. updating sticky footer so it doesn't throw errors in dashboard. Some of josh changes. --- footer.php | 4 +- header.php | 109 ++++++++++++++++---------------------- inc/custom-header.php | 0 inc/extras.php | 0 inc/reg-sidebars.php | 2 +- inc/template-tags.php | 0 js/admin-style.js | 18 +++++-- js/cs.js | 21 ++++---- js/min/admin-style.min.js | 1 + js/min/cs.min.js | 2 +- page-home.php | 45 ++++++++-------- 11 files changed, 99 insertions(+), 103 deletions(-) mode change 100755 => 100644 inc/custom-header.php mode change 100755 => 100644 inc/extras.php mode change 100755 => 100644 inc/template-tags.php create mode 100644 js/min/admin-style.min.js diff --git a/footer.php b/footer.php index 89dda13..dd2c600 100644 --- a/footer.php +++ b/footer.php @@ -7,7 +7,7 @@ * @package cornerstone */ ?> - +
@@ -71,7 +71,7 @@
- + diff --git a/header.php b/header.php index 8310946..fc847c4 100644 --- a/header.php +++ b/header.php @@ -6,10 +6,10 @@ * */ -$secondary = get_option( 'parentSiteTitle',''); -$secondarylink = get_option( 'parentSiteLink',''); -$headingColor = get_theme_mod( 'headingColor'); -$parentColor = get_theme_mod( 'parentColor'); +//$secondary = get_option( 'parentSiteTitle',''); +//$secondarylink = get_option( 'parentSiteLink',''); +//$headingColor = get_theme_mod( 'headingColor'); +//$parentColor = get_theme_mod( 'parentColor'); //$nav1 = get_theme_mod( 'navoption1','textnav'); //$nav2 = get_theme_mod( 'navoption2','with-drop'); @@ -24,30 +24,20 @@ > - - - -<?php wp_title( '|', true, 'right' ); ?> + +<?php wp_title( '|', true, 'right' ); ?> + - - - > - - +
0 && strlen($secondarylink) > 0){ - if(substr($secondarylink,0,4) != 'http'){ - $secondarylink = 'http://'.$secondarylink; + if(strlen($secondary) > 0 && strlen($secondarylink) > 0){ + if(substr($secondarylink,0,4) != 'http'){ + $secondarylink = 'http://'.$secondarylink; + } + echo '

'.$secondary.'

'; } - echo '

'.$secondary.'

'; - } - ?> -

+ ?> +

+ +

@@ -87,47 +79,40 @@ - +
\ No newline at end of file diff --git a/inc/custom-header.php b/inc/custom-header.php old mode 100755 new mode 100644 diff --git a/inc/extras.php b/inc/extras.php old mode 100755 new mode 100644 diff --git a/inc/reg-sidebars.php b/inc/reg-sidebars.php index 03cb911..c74c16f 100644 --- a/inc/reg-sidebars.php +++ b/inc/reg-sidebars.php @@ -148,7 +148,7 @@ function custom_searchform($form){ } $search_counter++; - $form = '
'; + $form = '
Search this Site'; $form .= ''; $form .= ''; $form .= ''; diff --git a/inc/template-tags.php b/inc/template-tags.php old mode 100755 new mode 100644 diff --git a/js/admin-style.js b/js/admin-style.js index ecca6bb..edb996c 100644 --- a/js/admin-style.js +++ b/js/admin-style.js @@ -1,5 +1,15 @@ -jQuery(document).ready(function($) { - $('#accordion-section-layout_builder .ui-slider-handle').each(function(){ - $(this).addClass('button button-primary'); - }); +jQuery(document).ready(function($) { + $('#accordion-section-layout_builder .ui-slider-handle').each(function(){ + $(this).addClass('button button-primary'); + }); + + var path = window.location.pathname; + if( path.split('/').indexOf('widgets.php') != -1 ){ + $('.widgets-holder-wrap.sidebar-sidebar').each(function(i){ + if( !($(this['children'][0]).is(":visible")) ){ + $(this).css('display', 'none'); + } + }); + } + }); \ No newline at end of file diff --git a/js/cs.js b/js/cs.js index e510ebd..c46a558 100644 --- a/js/cs.js +++ b/js/cs.js @@ -215,16 +215,19 @@ jQuery(document).ready(function($) { function stickyFoot(){ /* Andrew's Sticky Footer JS. */ - var wrapperH = document.getElementById('page').clientHeight; - var footerH = document.getElementById('footers').clientHeight - - var comboH = wrapperH + footerH; - var windowH = window.innerHeight; - if(windowH>=comboH){ - $('body').addClass('sticky') - } else { - $('body').removeClass('sticky') + + if (document.getElementById('page')!=null && document.getElementById('footers') !=null){ + var wrapperH = document.getElementById('page').clientHeight; + var footerH = document.getElementById('footers').clientHeight + var windowH = window.innerHeight; + if(windowH>=wrapperH){ + $('body').addClass('sticky') + } else { + $('body').removeClass('sticky') + } } + + } window.onload = function (){ placeholderSupport = ("placeholder" in document.createElement("input")); diff --git a/js/min/admin-style.min.js b/js/min/admin-style.min.js new file mode 100644 index 0000000..f3dd803 --- /dev/null +++ b/js/min/admin-style.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(i){i("#accordion-section-layout_builder .ui-slider-handle").each(function(){i(this).addClass("button button-primary")});var e=window.location.pathname;-1!=e.split("/").indexOf("widgets.php")&&i(".widgets-holder-wrap.sidebar-sidebar").each(function(){i(this.children[0]).is(":visible")||i(this).css("display","none")})}); \ No newline at end of file diff --git a/js/min/cs.min.js b/js/min/cs.min.js index 518f4b1..b06fd2a 100644 --- a/js/min/cs.min.js +++ b/js/min/cs.min.js @@ -1 +1 @@ -jQuery(document).ready(function(a){function t(){var t=a(this).attr("href").toLowerCase(),i=a(this).children("img").length,e=null,n=null,l=null,p=null;if("#"!=t.charAt(0)&&0==i&&"/"!=t.charAt(0)){var o=t.split("/");e=o[2],n=o[o.length-1]||"";var c=n.split(".");if(c[1]&&a.each(d,function(t,i){i==c[1]&&(p=a(''),l=c[1],p.append("."+l))}),null!=p&&a(this).append(p),e!=s&&null!=e){var h='';a(this).addClass("external").append(h)}}}function i(t){var i=a("
");i.addClass("alert alert-danger accessibility-fail-msg"),i.width(t.width+"px");var e=a("");e.addClass("glyphicon glyphicon-ban-circle");var n=a("");n.append(' This image needs a valid Alt tag. '),i.append(e).append(n),a(t).after(i)}function e(){var t=document.getElementById("page").clientHeight,i=document.getElementById("footers").clientHeight,e=t+i,n=window.innerHeight;n>=e?a("body").addClass("sticky"):a("body").removeClass("sticky")}var n=location.href,l=n.split("/"),s=l[2],d=["3g2","3gp","avi","doc","docx","dotx","gif","jpg","jpeg","m4a","mid","midi","mov","mp3","mp4","mpg","odt","ogg","ogv","pdf","png","ppt","pptx","xls","xlsx","wav","wmv","zip","vsd"],p=["#comments","#site-navigation","article.page"];a.each(p,function(i,e){a(e+" a").each(t)}),a(".uup-list .has-image").each(function(){var t=a(this).find(".uup-text"),i=a(this).find("img:first"),e=t.height(),n=i.outerHeight();if(n>e){var l=n-e;t.css("padding-top",l/2)}}),a(".uup-index-table .table-has-image").each(function(){var t=a(this).find(".uup-name"),i=a(this).find(".uup-table-thumbnail"),e=t.height(),n=i.outerHeight();if(n>e){var l=n-e;t.css("cssText","padding-bottom:"+l+"px!important")}}),a("#page img").each(function(){alt=a(this).attr("alt"),alt?(alt=alt.toLowerCase(),(alt.indexOf(".jpg")>=0||alt.indexOf(".png")>=0||alt.indexOf(".gif")>=0)&&(a(this).addClass("accessibility-fail"),i(this))):(a(this).addClass("accessibility-fail"),i(this))}),a("#page table").each(function(){a(this).addClass("table")}),window.onload=function(){if(placeholderSupport="placeholder"in document.createElement("input"),0!=placeholderSupport){var t=a("main");t.addClass("supports-placeholder")}e()},window.onresize=function(){e()}}); \ No newline at end of file +jQuery(document).ready(function(a){function t(){var t=a(this).attr("href").toLowerCase(),i=a(this).children("img").length,e=null,n=null,l=null,p=null;if("#"!=t.charAt(0)&&0==i&&"/"!=t.charAt(0)){var o=t.split("/");e=o[2],n=o[o.length-1]||"";var c=n.split(".");if(c[1]&&a.each(d,function(t,i){i==c[1]&&(p=a(''),l=c[1],p.append("."+l))}),null!=p&&a(this).append(p),e!=s&&null!=e){var h='';a(this).addClass("external").append(h)}}}function i(t){var i=a("
");i.addClass("alert alert-danger accessibility-fail-msg"),i.width(t.width+"px");var e=a("");e.addClass("glyphicon glyphicon-ban-circle");var n=a("");n.append(' This image needs a valid Alt tag. '),i.append(e).append(n),a(t).after(i)}function e(){if(null!=document.getElementById("page")&&null!=document.getElementById("footers")){var t=document.getElementById("page").clientHeight,i=(document.getElementById("footers").clientHeight,window.innerHeight);i>=t?a("body").addClass("sticky"):a("body").removeClass("sticky")}}var n=location.href,l=n.split("/"),s=l[2],d=["3g2","3gp","avi","doc","docx","dotx","gif","jpg","jpeg","m4a","mid","midi","mov","mp3","mp4","mpg","odt","ogg","ogv","pdf","png","ppt","pptx","xls","xlsx","wav","wmv","zip","vsd"],p=["#comments","#site-navigation","article.page"];a.each(p,function(i,e){a(e+" a").each(t)}),a(".uup-list .has-image").each(function(){var t=a(this).find(".uup-text"),i=a(this).find("img:first"),e=t.height(),n=i.outerHeight();if(n>e){var l=n-e;t.css("padding-top",l/2)}}),a(".uup-index-table .table-has-image").each(function(){var t=a(this).find(".uup-name"),i=a(this).find(".uup-table-thumbnail"),e=t.height(),n=i.outerHeight();if(n>e){var l=n-e;t.css("cssText","padding-bottom:"+l+"px!important")}}),a("#page img").each(function(){alt=a(this).attr("alt"),alt?(alt=alt.toLowerCase(),(alt.indexOf(".jpg")>=0||alt.indexOf(".png")>=0||alt.indexOf(".gif")>=0)&&(a(this).addClass("accessibility-fail"),i(this))):(a(this).addClass("accessibility-fail"),i(this))}),a("#page table").each(function(){a(this).addClass("table")}),window.onload=function(){if(placeholderSupport="placeholder"in document.createElement("input"),0!=placeholderSupport){var t=a("main");t.addClass("supports-placeholder")}e()},window.onresize=function(){e()}}); \ No newline at end of file diff --git a/page-home.php b/page-home.php index 2b1d0b2..5fa91a7 100644 --- a/page-home.php +++ b/page-home.php @@ -9,32 +9,29 @@ $rows = get_theme_mod('homepagerows'); $count = 1; get_header(); ?> +
- - -
- - -
-
- - - - - -
-
- - -
- - + +
+ +
+
+ + + + +
+
+ +
+ +