Browse Source

here we go

windhamdavid 5 years ago
parent
commit
6a5da239d4
10 changed files with 7531 additions and 217 deletions
  1. 6204 0
      css/bootstrap.css
  2. 1179 0
      css/styles.css
  3. 2 3
      footer.php
  4. 2 1
      functions.php
  5. 21 13
      gruntfile.js
  6. 20 11
      header.php
  7. 1 1
      index.php
  8. 4 0
      js/jquery-2.1.1.min.js
  9. 37 12
      js/script.js
  10. 61 176
      style.css

File diff suppressed because it is too large
+ 6204 - 0
css/bootstrap.css


File diff suppressed because it is too large
+ 1179 - 0
css/styles.css


File diff suppressed because it is too large
+ 2 - 3
footer.php


+ 2 - 1
functions.php

@@ -17,8 +17,9 @@ add_image_size( 'post-large', 770, 577, true );
 
 function dw_scripts() {
 	global $post;
+	wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
 	wp_deregister_script('jquery');
-	wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js', array(), false, true);
+	wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
 	wp_enqueue_style( 'style', get_stylesheet_uri() );
 	wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/navigation.js', 'jquery', '', true );
 	wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );

+ 21 - 13
gruntfile.js

@@ -1,20 +1,28 @@
 module.exports = function(grunt) {
 	
-grunt.initConfig({
-  pkg: grunt.file.readJSON('package.json'),
+	grunt.initConfig({
+	  pkg: grunt.file.readJSON('package.json'),
 
-	cssmin: {
-	  css: {
-		  src: 'css/grid.css',
-		  dest: 'css/grid.min.css'
-	  }
-	}
+		cssmin: {
+		  css: {
+			  src: 'css/grid.css',
+			  dest: 'css/grid.min.css'
+		  }
+		},
+		cssmin: {
+		  combine: {
+		    files: {
+		      'style.min.css': ['css/styles.css', 'css/bootstrap.min.css']
+		    }
+		  }
+		}
 
-});
+	});
 
-grunt.loadNpmTasks('grunt-contrib-jshint');
-grunt.loadNpmTasks('grunt-contrib-cssmin');
-grunt.registerTask('test', [ 'cssmin' ]);
-grunt.registerTask('default', [ 'cssmin' ]);
+	grunt.loadNpmTasks('grunt-contrib-jshint');
+	grunt.loadNpmTasks('grunt-contrib-cssmin');
+
+	grunt.registerTask('test', [ 'cssmin' ]);
+	grunt.registerTask('default', [ 'cssmin' ]);
 
 };

+ 20 - 11
header.php

@@ -15,17 +15,26 @@
 <?php wp_head(); ?>
 </head>
 <body>
-<div id="wrapper" class="hfeed">
-	<div id="header">
-		<div id="masthead">
-			<div id="branding" role="banner">
-				<div id="site-title">
-				<span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">David A. Windham</a></span>
-				</div> 
+<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
+<div class="container">
+	<header>
+		<nav class="navbar navbar-custom navbar-fixed-top" role="navigation">			
+			<div class="navbar-header page-scroll">
+				<div id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">David A. Windham</a></span></div>
+				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+					<span class="sr-only">Navigation</span>
+					<span class="icon-bar"></span>
+					<span class="icon-bar"></span>
+					<span class="icon-bar"></span>
+				</button>
 			</div>
-			<div id="access" class="navi" role="navigation">
-				 <!--<?php wp_nav_menu( array( 'menu' => 'main','sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>-->
+			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+				<ul class="nav navbar-nav navbar-right">
+					<?php wp_nav_menu( array( 'menu' => 'main','sort_column' => 'menu_order', 'container' => '', 'menu_class' => 'nav navbar-nav navbar-right' ) ); ?>
+					<li><a href="bio">About</a></li>
+					<li><a href="contact.html">Contact</a></li>
+				</ul>
 			</div>
-		</div>
-	</div>
+		</nav>
+	</header>
 	<div id="main">

+ 1 - 1
index.php

@@ -1,5 +1,5 @@
 <?php get_header(); ?>
-	<div id="container" class="one-column">
+	<div class="container">
 		<div id="content" role="main">
 			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
 			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

File diff suppressed because it is too large
+ 4 - 0
js/jquery-2.1.1.min.js


+ 37 - 12
js/script.js

@@ -1,14 +1,39 @@
-jQuery(document).ready(function() {
-  var commentsDiv = $('#comments');
-  if (commentsDiv.length) {
-    $(commentsDiv).hide();
-    $('.toggle-comments').on('click', function(e) {
-      e.preventDefault();
-      $(commentsDiv).toggle('slow', function() {
-        var anchor = $('.toggle-comments');
-        var anchorText = anchor.text() == 'Hide Comments' ? 'Show Comments' : 'Hide Comments';
-        $(anchor).text(anchorText);
-      });
+jQuery(document).ready(function($) {
+
+var wide = 768;
+if ($(window).width() > wide) {
+var headerHeight = $('.navbar').height();
+$(window).on('scroll', {
+    previousTop: 0
+},
+function() {
+    var currentTop = $(window).scrollTop();
+    if (currentTop < this.previousTop) {
+        if (currentTop > 0 && $('.navbar').hasClass('fixed')) {
+            $('.navbar').addClass('visible');
+        } else {
+            $('.navbar').removeClass('visible fixed');
+        }
+    } else {
+        $('.navbar').removeClass('visible');
+        if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
+    }
+    this.previousTop = currentTop;
+});
+}
+
+var commentsDiv = $('#comments');
+if (commentsDiv.length) {
+  $(commentsDiv).hide();
+  $('.toggle-comments').on('click', function(e) {
+    e.preventDefault();
+    $(commentsDiv).toggle('slow', function() {
+      var anchor = $('.toggle-comments');
+      var anchorText = anchor.text() == 'Hide Comments' ? 'Show Comments' : 'Hide Comments';
+      $(anchor).text(anchorText);
     });
-  }
+  });
+}
+
+
 });

File diff suppressed because it is too large
+ 61 - 176
style.css