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 Nov 25, 2014
2 parents 60435d5 + 5986349 commit 0fa172a
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 45 deletions.
3 changes: 3 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<li>
<a href="http://www.uchc.edu/directions/index.html" >Maps &amp; Directions</a>
</li>
<!-- <li>
<a href="http://www.uchc.edu/contact/index.html">Contact Us</a>
</li> -->
<li>
&copy; University of Connecticut Health Center
</li>
Expand Down
74 changes: 38 additions & 36 deletions inc/submenu-check.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
<?php
$has_sub_menu = false;
$menu_name = 'primary';
$current_id = 0;
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
$level = 0;
$stack = array('0');
foreach($menu_items as $key => $menu_item) {
if($menu_item->object_id == get_the_ID()) $current_id = $menu_item->ID;
}
foreach($menu_items as $key => $menu_item) {
while($menu_item->menu_item_parent != array_pop($stack)) {
$level--;
}
$level++;
$stack[] = $menu_item->menu_item_parent;
$stack[] = $menu_item->ID;
$menu_items[$key]->level = $level;
if($menu_item->menu_item_parent == $current_id && $level > 2 || $menu_item->ID == $current_id && $level > 2){
$has_sub_menu = true;
}
}
//print_r($menu_items);
}
if($has_sub_menu){
?>

<div class="row">
<div class="col-sm-3">
<nav id="nav-secondary">
<?php include('sidemenu-walker.php')?>
</nav>
</div>
<div class="col-sm-8 col-sm-offset-1">
<?php
$has_sub_menu = false;
$menu_name = 'primary';
$current_id = 0;
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
$level = 0;
$stack = array('0');
if(is_array($menu_items)){
foreach($menu_items as $key => $menu_item) {
if($menu_item->object_id == get_the_ID()) $current_id = $menu_item->ID;
}
foreach($menu_items as $key => $menu_item) {
while($menu_item->menu_item_parent != array_pop($stack)) {
$level--;
}
$level++;
$stack[] = $menu_item->menu_item_parent;
$stack[] = $menu_item->ID;
$menu_items[$key]->level = $level;
if($menu_item->menu_item_parent == $current_id && $level > 2 || $menu_item->ID == $current_id && $level > 2){
$has_sub_menu = true;
}
}
}
//print_r($menu_items);
}
if($has_sub_menu){
?>

<div class="row">
<div class="col-sm-3">
<nav id="nav-secondary">
<?php include('sidemenu-walker.php')?>
</nav>
</div>
<div class="col-sm-8 col-sm-offset-1">
<?php } /* end checkMenu */?>
4 changes: 3 additions & 1 deletion sass/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ $nav-secondary-pills-link-hover: #eee !default;
$nav-secondary-pills-active-link-hover-bg: $component-active-bg !default;
$nav-secondary-pills-active-link-hover-color: $component-active-color !default;



#nav-secondary {

padding: $nav-secondary-padding;
padding: $nav-secondary-padding;
border: 1px solid transparent;
border-color: $nav-secondary-border-color;
border-radius: $nav-secondary-border-radius;
Expand Down
83 changes: 75 additions & 8 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ th {
src: url("../../global/bootstrap-sass-master/assets/fonts/bootstrap/glyphicons-halflings-regular.eot");
src: url("../../global/bootstrap-sass-master/assets/fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../../global/bootstrap-sass-master/assets/fonts/bootstrap/glyphicons-halflings-regular.woff") format("woff"), url("../../global/bootstrap-sass-master/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf") format("truetype"), url("../../global/bootstrap-sass-master/assets/fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");
}

.glyphicon {
position: relative;
top: 1px;
Expand Down Expand Up @@ -1146,7 +1145,7 @@ th {

html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
}

body {
Expand Down Expand Up @@ -5136,7 +5135,6 @@ a.thumbnail.active {
background-position: 0 0;
}
}

@keyframes progress-bar-stripes {
from {
background-position: 40px 0;
Expand All @@ -5146,7 +5144,6 @@ a.thumbnail.active {
background-position: 0 0;
}
}

.progress {
overflow: hidden;
height: 20px;
Expand Down Expand Up @@ -6356,7 +6353,7 @@ button.close {
border-radius: 10px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
background-color: transparent;
}
.carousel-indicators .active {
margin: 0;
Expand Down Expand Up @@ -6466,7 +6463,6 @@ button.close {
@-ms-viewport {
width: device-width;
}

.visible-xs, .visible-sm, .visible-md, .visible-lg {
display: none !important;
}
Expand Down Expand Up @@ -6724,15 +6720,13 @@ button.close {
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'Proxima Nova';
src: url("../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.eot");
src: url("../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.eot?#iefix") format("embedded-opentype"), url("../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.svg#proxima_nova_ltsemibold") format("svg"), url("../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.woff") format("woff"), url("../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.ttf") format("truetype");
font-weight: 500;
font-style: normal;
}

/* - - - - - - - - - - - - - - - - - - -
== Titlebar
- - - - - - - - - - - - - - - - - - - */
Expand Down Expand Up @@ -6859,6 +6853,63 @@ button.close {
display: none;
}

/*
// Support for mulitple-level dropdown menus.
.dropdown-submenu{
position:relative;
}
.dropdown-submenu > .dropdown-menu {
top:0;
left:100%;
padding:0;
}
.dropdown-submenu:hover > .dropdown-menu{
display:block;
}
.dropdown-submenu:hover > a {
color: $navbar-default-link-hover-color;
background-color: $navbar-default-link-hover-bg;
}
.dropdown-submenu > a:after{
display:block;
content:" ";
float:right;
width:0;
height:0;
border-color:transparent;
border-style:solid;
border-width:5px 0 5px 5px;
border-left-color:$navbar-default-link-color;
margin-top:5px;
margin-right:-10px;
}
.dropdown-submenu:hover > a:after{
border-left-color:$navbar-default-link-hover-color;
}
.dropdown-submenu .pull-left{
float:none;
}
.dropdown-submenu.pull-left > .dropdown-menu{
left:-100%;
margin-left:10px;
}
.dropdown-menu {
.dropdown-menu {
margin:0;
top:-1px;
}
}
/**/
.navbar-collapse {
max-height: none;
}
Expand Down Expand Up @@ -7845,3 +7896,19 @@ body.sticky #footers {
#footer .glyphicon {
display: none;
}

/* Nav Changes */
#primary-nav a.external {
max-height: 50px;
}

/* Footer Changes */
#footer li a {
padding: 15px 0px;
}

/* UUP */
.uup-list .uup-name, .uup-list .uup-title, .uup-list .uup-phones, .uup-list .uup-email, .uup-list .uup-courses, .uup-list .uup-office-location, .uup-list .uup-office-hours, .uup-list .uup-courses, .uup-list .uup-fax {
display: block !important;
word-wrap: break-word;
}
30 changes: 30 additions & 0 deletions style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,33 @@ $icon-font-path: "../../global/bootstrap-sass-master/assets/fonts/bootstrap/" !d
@import "sass/cal.scss";
@import "sass/in-page-menus.scss";
@import "sass/footer.scss";



/* Nav Changes */
#primary-nav {
a.external {
max-height:50px;
}
}

/* Footer Changes */

#footer {
li {
a {
padding:15px 0px;
}
}
}

/* UUP */

.uup-list {
.uup-name, .uup-title, .uup-phones, .uup-email, .uup-courses, .uup-office-location, .uup-office-hours, .uup-courses, .uup-fax{
display:block !important;
word-wrap: break-word;
}
}


0 comments on commit 0fa172a

Please sign in to comment.