Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
db6d4d3
Remove call to locationHours as a stopgap measure
matt-bernhardt Nov 7, 2014
cbccb4a
Restoring the hours display on Document Services
matt-bernhardt Nov 7, 2014
d371d90
Adding styling for "Give Now" button on giving site
matt-bernhardt Mar 10, 2015
f79091e
Merge pull request #1 from matt-bernhardt/master
matt-bernhardt Mar 10, 2015
e36a461
Remove black background from child-page header
PBruk Jun 3, 2015
038c190
Add styling to .child-page-title
PBruk Jun 3, 2015
b180e2a
Adjust line-heights for sidebars
PBruk Jun 3, 2015
c9a2fb1
Add styling for accordions
PBruk Jun 3, 2015
09336cb
Reassign H1
PBruk Jun 3, 2015
f267b4d
Reassign H2
PBruk Jun 3, 2015
9dddb45
Reassign H2/H1
PBruk Jun 3, 2015
95e61cf
Match HTML of /locations
PBruk Jun 9, 2015
dd37442
Match HTML of /locations
PBruk Jun 9, 2015
9f983de
Match PHP of /locations
PBruk Jun 9, 2015
c4dfcde
Remove unecessary section
PBruk Jun 9, 2015
7ddd1c1
Move images flush right
PBruk Jun 9, 2015
9e4de92
Flush image right
PBruk Jun 9, 2015
c56e079
Adjust font-size of sidebars
PBruk Jun 9, 2015
04fa183
Adjust font-weight of H3
PBruk Jun 9, 2015
7d8fc50
Adjust width of page title on mobile
PBruk Jun 9, 2015
51fbeff
Merge pull request #1 from PBruk/master
matt-bernhardt Jun 24, 2015
0172204
Merge pull request #2 from matt-bernhardt/master
matt-bernhardt Jun 24, 2015
8f59284
Adjusts version string
PBruk Jun 24, 2015
efc3a68
Register new scripts for navigation
PBruk Jul 12, 2015
9f4dc4a
Replace child nav with bootstrap menu
PBruk Jul 12, 2015
e5184be
add scripts/styles for subnav
PBruk Jul 22, 2015
e10cb7c
Remove unnecessary scripts
PBruk Jul 22, 2015
a2bc2d7
Add bootstrap menu
PBruk Jul 22, 2015
15fe7bf
Add font styling
PBruk Jul 22, 2015
21c87d2
Add font styling
PBruk Jul 22, 2015
51e0188
Add menu styling
PBruk Jul 22, 2015
b539943
Delete extra styling
PBruk Jul 22, 2015
554b753
Fix syntax
PBruk Jul 22, 2015
26b02ee
Add styling for mobile nav
PBruk Jul 22, 2015
19081ff
Merge pull request #3 from PBruk/1.1.7-subnav
matt-bernhardt Jul 27, 2015
929b2bc
Remove unnecessary template structure
PBruk Aug 2, 2015
e634bcf
Add H1
PBruk Aug 2, 2015
b38337d
Remove duplicate classes
PBruk Aug 2, 2015
542bff6
Replace deleted class
PBruk Aug 3, 2015
296e902
Merge pull request #4 from mitlibraries-ux/1.1.8-general
matt-bernhardt Aug 5, 2015
57e7890
Consolidate child templates
PBruk Aug 14, 2015
182c71e
Change line-height of HX
PBruk Aug 14, 2015
f8f0ae1
Merge pull request #5 from mitlibraries-ux/1.1.9-general
PBruk Aug 19, 2015
a1d61b3
Adjust spacing of page-title and size of image
PBruk Aug 26, 2015
7d7dc1c
Fixes merge conflict
matt-bernhardt Aug 27, 2015
e3b7ae6
Merge branch '1.1.10-general'
matt-bernhardt Aug 27, 2015
2a64756
Removed
PBruk Aug 27, 2015
70aab25
Version 1.1.11
PBruk Aug 27, 2015
fbb98d0
Deprecated to temporary folder
PBruk Aug 27, 2015
abf74c6
Added
PBruk Aug 27, 2015
b0bac85
Added
PBruk Aug 27, 2015
b4f0338
Version 1.1.11
PBruk Aug 27, 2015
049eadf
Merge pull request #8 from mitlibraries-ux/1.1.11-template-removal
PBruk Aug 27, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added README.md
Empty file.
2 changes: 1 addition & 1 deletion category.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<?php get_template_part('inc/postHead'); ?>

<div id="content" class="allContent hasSidebar group">
<div id="content" class="allContent hasSidebar group ">

<div class="mainContent group">

Expand Down
26 changes: 24 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ function remove_child_theme_support() {
remove_theme_support('custom-background');
}

function enqueue_my_scripts() {
wp_enqueue_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array('jquery'), '1.9.1', true); // we need the jquery library
wp_enqueue_script( 'bootstrap-js', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js', array('jquery'), true); // all the bootstrap javascript goodness
}
add_action('wp_enqueue_scripts', 'enqueue_my_scripts');
function enqueue_my_styles() {
wp_enqueue_style( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css' );
wp_enqueue_style( 'roger', get_template_directory_uri() . '/style.css');
}
add_action('wp_enqueue_scripts', 'enqueue_my_styles');




function betterChildBreadcrumbs() {

global $post;
Expand Down Expand Up @@ -50,7 +64,8 @@ function customHeader() {

}

// add_theme_support( 'custom-header' );



// Register Child Nav
if(!function_exists('register_child_nav')) {
Expand All @@ -60,6 +75,10 @@ function register_child_nav() {
add_action( 'init', 'register_child_nav' );
}





if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); }

add_image_size('headerImage', 480, 200, true);
Expand All @@ -75,4 +94,7 @@ function my_mce_buttons_2($buttons) {
}

add_filter('mce_buttons_2', 'my_mce_buttons_2');
endif;
endif;



2 changes: 1 addition & 1 deletion inc/content-nav-full.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<div class="entry-content">
<?php if (!$isRoot): ?>
<h2><?php the_title(); ?></h2>
<h1><?php the_title(); ?></h1>
<?php endif; ?>

<?php the_content(); ?>
Expand Down
36 changes: 2 additions & 34 deletions inc/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,14 @@
$pageRoot = getRoot($post);
$section = get_post($pageRoot);

$menuName = $section->post_name;
$sideMenu = wp_get_nav_menu_items($menuName);

$showSideNav = get_field("show_left_nav");

$sideNavExists = $sideMenu && $showSideNav == true || is_child_page() && $showSideNav == true;

if ($sideNavExists):

?>

<div class="leftNav">

<ul>

<?php

$args = array(
"child_of" => $pageRoot,
"title_li" => "",
);

if ($menu) {
wp_nav_menu( array( 'menu' => $menuName, 'menu_class' => 'nav-menu' ) );
} else {
wp_list_pages( $args );
}
?>

</ul>

</div>

<?php endif; ?>

<div class="mainContent group <?php if($sideNavExists) { echo 'hasLeftNav'; } ?>">
<div class="mainContent group content-main">

<div class="entry-content">
<?php $title = get_the_title(); if ($title != ""): ?>
<?php if(!is_front_page()) { echo "<h2>".$title."</h2>"; } ?>
<?php if(!is_front_page()) { echo "<h1>".$title."</h1>"; } ?>
<?php endif; ?>

<?php the_content(); ?>
Expand Down
13 changes: 7 additions & 6 deletions inc/locationHours.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

/*
global $blog_id;
$current_blog_id = $blog_id;

Expand All @@ -12,12 +12,13 @@

$hasHours = hasHours($locationId, date("Y-m-d"));
$hoursToday = getHoursToday($locationId);
*/
?>

<div class="todayHours">
<span>Today's Hours:</span>
<span data-location-hours="Document Services"></span>
<span><a href="/hours">See all hours</a></span>
<div class="hours-today">
<span>Today's Hours: <strong data-location-hours="Document Services"></strong></span>
<br>
<a href="/hours" class="link-hours-all">See all hours <i class="icon-arrow-right"></i></a>
</div>

<?php switch_to_blog($current_blog_id); ?>
<?php // switch_to_blog($current_blog_id); ?>
13 changes: 9 additions & 4 deletions inc/locationInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

$docsServices = get_post(1028);
$docsPhone = get_post_meta(1028, 'phone', true);
$docsEmail = get_post_meta(1028, 'email', true);
$docsBuilding = get_post_meta(1028, 'building', true);
$docsSlug = $docsServices->post_name;

$mapPage = "/locations/#!";

?>

<div class="locationInfo">
<span><?php echo $docsPhone; ?></span>
<span>show on map: <a href="<?php echo $mapPage.$docsSlug; ?>"><?php echo $docsBuilding ?></a></span>
</div>

<div class="info-more">
<a href="tel:<?php echo $docsPhone; ?>" class="phone"><?php echo $docsPhone ?></a> |
<?php if($docsEmail): ?>
<a href="mailto:<?php echo $docsEmail; ?>" class="email"><?php echo $docsEmail ?></a> |
<?php endif; ?>
<a href="<?php echo $mapPage.$docsSlug; ?>">Room: <?php echo $docsBuilding ?> <i class="icon-arrow-right"></i></a>
</div>
71 changes: 49 additions & 22 deletions inc/nav-child.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,56 @@

<?php
$siteName = get_bloginfo('name');
// if ($siteName != 'MIT Libraries News') {
$noChildNav = array("MIT Libraries News", "Document Services");
$countPosts = wp_count_posts('page')->publish;
if (!in_array($siteName, $noChildNav) && $countPosts > 1) {
?>
<h3 id="menu--toggle" class="menu--toggle">View Menu</h3>
<nav id="child-navigation" class="nav-secondary" role="navigation">
<?php
if(has_nav_menu('child-nav')){
wp_nav_menu(
array(
'theme_location' => 'child-nav',
'menu' => 'Sub Nav',
'container_class' => 'menu'
)
);
}
else {
wp_page_menu(
array(
'depth' => 2
)
);
}
?>
</nav><!-- #site-navigation -->
<?php } ?>


<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand mobile-display">
<?php _e( 'View Menu' ); ?>
</a>
</div>

<?php
wp_nav_menu( array(
'menu' => 'Sub Nav',
'theme_location' => 'child-nav',
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'nav navbar-nav nav-second',
'fallback_cb' => 'navwalker::fallback',
'walker' => new navwalker())
);



?>


</div>
</nav>
<script>
$('.dropdown-toggle').click(function() {
var location = $(this).attr('href');
window.location.href = location;
return false;
});
</script>

<!-- #site-navigation -->

<?php } ?>

22 changes: 10 additions & 12 deletions inc/postHead.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="box1">

<?php if(is_front_page()): ?>
<h1><?php bloginfo(); ?></h1>
<h1 class="child-page-title"><?php bloginfo(); ?></h1>
<?php else: ?>
<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
<div class="child-page-title"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></div>
<?php endif; ?>

<?php
Expand All @@ -22,6 +22,14 @@
}

?>

<?php
// If doc. services, switch out to main site to get location ids
if ($siteName == 'Document Services' && is_front_page()):
get_template_part('inc/locationHours');
endif;

?>

</div>

Expand All @@ -41,17 +49,7 @@

</div>

<div class="box3">

<?php
// If doc. services, switch out to main site to get location ids
if ($siteName == 'Document Services' && is_front_page()):
get_template_part('inc/locationHours');
endif;

?>

</div>
</div>

<?php get_template_part("inc/nav", "child"); ?>
Loading