Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
szk11001 committed Aug 20, 2014
1 parent 60004f9 commit fa18fe4
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 44 deletions.
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @package cornerstone
*/
?>
</div><!-- #page -->

</div><!-- .container-->
</div><!-- #content -->
<div id="footers">
Expand Down Expand Up @@ -71,7 +71,7 @@
</ul>
</div>
</footer>
</div>
</div><!-- #footers -->
</div><!-- #page -->

<?php wp_footer(); ?>
Expand Down
1 change: 1 addition & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php
/**
* cornerstone functions and definitions
Expand Down
2 changes: 1 addition & 1 deletion inc/reg-sidebars.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function custom_searchform($form){
}
$search_counter++;

$form = '<div class="searchform"><form action="'.home_url( '/' ).'" method="get" class="form-inline" role="form"><div class="form-group"><fieldset>';
$form = '<div class="searchform"><form action="'.home_url( '/' ).'" method="get" class="form-inline" role="form"><div class="form-group"><fieldset><legend class="sr-only">Search this Site</legend>';
$form .= '<label for="searchfield-'.$search_counter.'" class="sr-only">Search in '.home_url( '/' ).'></label>';
$form .= '<input type="text" name="s" id="searchfield-'.$search_counter.'" value="'.get_search_query().'" class="form-control search" placeholder="Search '.get_bloginfo("name").'... " />';
$form .= '<button type="submit" class="btn btn-default" title="Search"><i class="glyphicon glyphicon-search"></i><span class="sr-only">Search</span></button>';
Expand Down
2 changes: 1 addition & 1 deletion inc/submenu-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
<?php include('sidemenu-walker.php')?>
</nav>
</div>
<div class="col-sm-9">
<div class="col-sm-8 col-sm-offset-1">
<?php } /* end checkMenu */?>
4 changes: 1 addition & 3 deletions js/admin-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ jQuery(document).ready(function($) {
$(this).css('display', 'none');
}
});
}

});
}
21 changes: 12 additions & 9 deletions js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
1 change: 1 addition & 0 deletions js/min/admin-style.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/min/cs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/min/navigation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion js/navigation.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
/**
* navigation.js
*
*/

jQuery(document).ready(function($) {

function replaceAnchors(selector) {
$(selector).each(function(){
var atag = $(this).children('a');
var newhref = getFirstLink(this);
atag.attr('href',newhref);
});
}
function getFirstLink(element){
var href = $(element).children('a').attr('href');
if(href == '#'){
var firstChild = $(element).children('ul').children('li').first();
if(firstChild.length == 0){
return href;
}
else {
return getFirstLink(firstChild);
}
}
else {
return href;
}
}

replaceAnchors('.menu-item-has-children');

});

/*
* Handles toggling the navigation menu for small screens.
*/
*
( function() {
var container, button, menu;
Expand Down Expand Up @@ -32,3 +64,4 @@
container.className += ' toggled';
};
} )();
*/
45 changes: 21 additions & 24 deletions page-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,29 @@
$rows = get_theme_mod('homepagerows');
$count = 1;
get_header(); ?>

<div id="page-home">
<?php while ( have_posts() ) : the_post(); ?>

<?php for($i=0; $i<$rows; $i++){ /* Begin Homepage Builder... */?>
<div class="row">

<?php
$widths = get_theme_mod('homepage_'.$i);
$widths = explode(',',$widths);
foreach($widths as $width){
if($width == 0) break;
?>
<div class="col-sm-<?php echo $width; ?>">
<div class="home-section" id="home-section-<?php echo $count; ?>">
<?php if ( is_active_sidebar( 'home'.$count ) ) { ?>
<?php dynamic_sidebar( 'home'.$count ); ?>
<?php } else { ?>

<?php }; ?>
</div>
</div>
<?php $count ++; } ?>

</div><!-- /row-->
<?php } /* ... end Homepage Builder */?>

<?php for($i=0; $i<$rows; $i++){ /* Begin Homepage Builder... */?>
<div class="row">
<?php
$widths = get_theme_mod('homepage_'.$i);
$widths = explode(',',$widths);
foreach($widths as $width){
if($width == 0) break;
?>
<div class="col-sm-<?php echo $width; ?>">
<div class="home-section" id="home-section-<?php echo $count; ?>">
<?php if ( is_active_sidebar( 'home'.$count ) ) { ?>
<?php dynamic_sidebar( 'home'.$count ); ?>
<?php } else { ?>
<?php }; ?>
</div>
</div>
<?php $count ++; } ?>
</div>
<!-- /row-->
<?php } /* ... end Homepage Builder */?>
<?php endwhile; // end of the loop. ?>
</div>
<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?php include('inc/sidebar-check.php')?>
<div id="page-page">
<?php while ( have_posts() ) : the_post(); ?>
<?php include('inc/submenu-check.php')?>
<?php include('inc/submenu-check.php') ?>
<div class="row">
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>">
<div id="primary" class="content-area">
Expand Down

0 comments on commit fa18fe4

Please sign in to comment.