Skip to content

Commit

Permalink
UUP, Local Files, new Header
Browse files Browse the repository at this point in the history
header changed to be chock full of includes, for easier child theming.
  • Loading branch information
andrewmbacon committed Aug 25, 2014
1 parent ec85d80 commit 75d1790
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 6,287 deletions.
6,203 changes: 0 additions & 6,203 deletions css/bootstrap.css

This file was deleted.

13 changes: 13 additions & 0 deletions css/uup.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@
.uup-index-table .uup-table-name .uup-last:before {
content: ' ';
}

/*
Profile Page
*/
.uup-user > span {
display: block;
}
.uup-user .uup-name {
font-weight: bold;
}
.uup-user .uup-name .uup-first:after {
content: ' ';
}
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function cs_scripts() {

wp_enqueue_style( 'cs-style', get_stylesheet_uri());

wp_enqueue_script( 'cs-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ));
wp_enqueue_script( 'cs-bootstrap-js', network_home_url().'wp-content/global/bootstrap-3.2.0-dist/js/bootstrap.min.js', array( 'jquery' ));
wp_enqueue_script( 'cs-modernizr', get_template_directory_uri() . '/js/cs-modernizr.js', array( 'jquery' ));
wp_enqueue_script( 'cs', get_template_directory_uri() . '/js/cs.js', array( 'jquery' ));
wp_enqueue_script( 'cs-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'cs-bootstrap-js'), '20120206', true );
Expand Down
80 changes: 5 additions & 75 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
* Displays all of the <head> section and everything up till <div id="content">
*
*/

$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');
include 'inc/vars.php';

?>
<!DOCTYPE html>
Expand All @@ -23,10 +16,6 @@
<!--[if gt IE 9]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->




<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -36,8 +25,6 @@
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php wp_head(); ?>


</head>

<body <?php body_class(); ?> >
Expand All @@ -46,85 +33,28 @@
<a href="#site-navigation">Skip to Navigation</a>
<a href="#uc-search">Skip to UConn Search</a>
<a href="#content">Skip to Content</a>

</nav>
<?php if(function_exists('uconn_banner_hook')){uconn_banner_hook();}?>
<div id="page" class="hfeed site">
<?php
$headerImg = get_header_image();
?>
<header id="masthead" class="site-header <?php if ($headerImg != ''){echo 'header-image';} ?>" role="banner">
<div id="site-title" class="hidden-xs">
<div class="container">
<?php if ($headerImg != ''){ echo '<div id="header-image-wrap"><img src="' . get_header_image() . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" id="header-image" alt="Decorative header image of '. get_bloginfo('name') .'" /></div> ';}?>
<?php include 'inc/header-img.php'; ?>
<div class="row">
<div class="col-sm-8">
<div class="site-branding" id="uc-site-header">
<?php
if(strlen($secondary) > 0 && strlen($secondarylink) > 0){
if(substr($secondarylink,0,4) != 'http'){
$secondarylink = 'http://'.$secondarylink;
}
echo '<p id="uc-site-parent" class="'.$parentColor.'"><a href="'.$secondarylink.'">'.$secondary.'</a></p>';
}
?>
<h1 id="uc-site-title" class="<?php echo $headingColor; ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php include 'inc/site-title.php'; ?>
</div>
</div>
<div class="col-sm-4 <?php
if(strlen($secondary) > 0 && strlen($secondarylink) > 0){
if(substr($secondarylink,0,4) != 'http'){
$secondarylink = 'http://'.$secondarylink;
}
echo 'parent-spacing';
}
?>">
<div class="col-sm-4">
<?php get_search_form(); ?>
</div>
</div>
</div>
</div>
<div id="nav-wrapper">
<div class="container">
<nav id="site-navigation" class="navbar navbar-default" role="navigation">

<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav">
<span class="sr-only">Toggle navigation</span>
<span class="menu-icon">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</span>
<span class="menu-label">Menu</span>
</button>
<a class="navbar-brand visible-xs" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
</div>
<a class="skip-link screen-reader-text sr-only" href="#content">
<?php _e( 'Skip to content', 'cs' ); ?></a>
<div class="collapse navbar-collapse" id="primary-nav">
<?php
wp_nav_menu(
array(
'menu' => 'primary', /* menu name */
'menu_class' => 'nav navbar-nav'.$nav1.' '.$nav2,
'theme_location' => 'primary', /* where in the theme it's assigned */
'container' => false, /* container class */
'fallback_cb' => 'hale_main_nav_fallback',
'items_wrap' => '<ul id="%1$s" class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>',
'walker' => new Bootstrap_Nav_Walker()/*,
'with_search' => true*/
)
);
?>
<div class="visible-xs-block">
<div class="navbar-form navbar-right">
<?php get_search_form(); ?>
</div>
</div>
</div>
</nav>
<!-- #site-navigation -->
<?php include 'inc/nav.php'; ?>
</div>
</div>
</header>
Expand Down
1 change: 1 addition & 0 deletions inc/header-img.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php if ($headerImg != ''){ echo '<div id="header-image-wrap"><img src="' . get_header_image() . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" id="header-image" alt="Decorative header image of '. get_bloginfo('name') .'" /></div> ';}?>
38 changes: 38 additions & 0 deletions inc/nav.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<nav id="site-navigation" class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav">
<span class="sr-only">Toggle navigation</span>
<span class="menu-icon">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</span>
<span class="menu-label">Menu</span>
</button>
<a class="navbar-brand visible-xs" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
</div>
<a class="skip-link screen-reader-text sr-only" href="#content">
<?php _e( 'Skip to content', 'cs' ); ?></a>
<div class="collapse navbar-collapse" id="primary-nav">
<?php
wp_nav_menu(
array(
'menu' => 'primary', /* menu name */
'menu_class' => 'nav navbar-nav'.$nav1.' '.$nav2,
'theme_location' => 'primary', /* where in the theme it's assigned */
'container' => false, /* container class */
'fallback_cb' => 'hale_main_nav_fallback',
'items_wrap' => '<ul id="%1$s" class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>',
'walker' => new Bootstrap_Nav_Walker()/*,
'with_search' => true*/
)
);
?>
<div class="visible-xs-block">
<div class="navbar-form navbar-right">
<?php get_search_form(); ?>
</div>
</div>
</div>
</nav>
<!-- #site-navigation -->
9 changes: 9 additions & 0 deletions inc/site-title.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
if(strlen($secondary) > 0 && strlen($secondarylink) > 0){
if(substr($secondarylink,0,4) != 'http'){
$secondarylink = 'http://'.$secondarylink;
}
echo '<p id="uc-site-parent" class="'.$parentColor.'"><a href="'.$secondarylink.'">'.$secondary.'</a></p>';
}
?>
<h1 id="uc-site-title" class="<?php echo $headingColor; ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
5 changes: 5 additions & 0 deletions inc/vars.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$secondary = get_option( 'parentSiteTitle','');
$secondarylink = get_option( 'parentSiteLink','');
$headerImg = get_header_image();
?>
6 changes: 0 additions & 6 deletions js/bootstrap.min.js

This file was deleted.

43 changes: 41 additions & 2 deletions sass/uup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
}//list

.uup-index-table {



.uup-table-name {

&.table-has-image {
Expand Down Expand Up @@ -92,4 +93,42 @@

}

}
}


/*
Profile Page
*/
.uup-user {
& > span {
display:block;
}

.uup-name {
font-weight:bold;

.uup-first {
&:after {
content:' ';
}
}
.uup-last {}
}
.uup-title {
}
.uup-phones {
.uup-phone1 {}
.uup-phone2 {}
}
.uup-email {
}
.uup-fax {
}
.uup-office-location {
}
.uup-office-hours {
}
.uup-mailing-address {
}
}

13 changes: 13 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7686,6 +7686,19 @@ q:before, table q:after {
content: ' ';
}

/*
Profile Page
*/
.uup-user > span {
display: block;
}
.uup-user .uup-name {
font-weight: bold;
}
.uup-user .uup-name .uup-first:after {
content: ' ';
}

/* - - - - - - - - - - - - - - - - - - -
== Calendar
- - - - - - - - - - - - - - - - - - - */
Expand Down

0 comments on commit 75d1790

Please sign in to comment.