Browse Source

revert to 93d85f0

windhamdavid 5 years ago
parent
commit
173fe3f054
5 changed files with 73 additions and 29 deletions
  1. 2 0
      css/jasny-bootstrap.css
  2. 4 4
      functions.php
  3. 15 18
      header.php
  4. 4 4
      js/init.js
  5. 48 3
      style.css

+ 2 - 0
css/jasny-bootstrap.css

@@ -1,3 +1,5 @@
+/* @override http://macs.local/david/wp-content/themes/dw/css/jasny-bootstrap.css */
+
 /*!
  * Jasny Bootstrap v3.1.0 (http://jasny.github.com/bootstrap)
  * Copyright 2011-2014 Arnold Daniels.

+ 4 - 4
functions.php

@@ -17,10 +17,10 @@ add_image_size( 'post-large', 770, 577, true );
 
 function dw_scripts() {
 	global $post;
-	//wp_enqueue_style( 'style', get_stylesheet_uri() );
-	wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.min.css');
-	//wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
-	//wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
+	wp_enqueue_style( 'style', get_stylesheet_uri() );
+	//wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.min.css');
+	wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
+	wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
 	wp_deregister_script('jquery');
 	wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
 	wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );

+ 15 - 18
header.php

@@ -15,28 +15,24 @@
 <?php wp_head(); ?>
 </head>
 <body>
-<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
-<div class="container">
 	<header id="header">	
 		<nav class="navbar navbar-fixed-top" role="navigation">
-			<a href="http://davidawindham.com" title="David Windham"><img class="dw" title="David Windham" src="<?php echo get_bloginfo('template_directory');?>/img/dw.png" width="17"/></a>
-			<div class="site-title navbar-right"><a href="<?php echo home_url( '/' ); ?>" class="navbar-brand navbar-right" title="David A. Windham" rel="home">David A. Windham</a></div>		
-			<div class="navbar-header page-scroll">
-				<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 class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
-				<ul class="nav navbar-nav navbar-right">
-					<li><a href="#" class="" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body"><i class="glyphicon glyphicon-chevron-left"></i></li>
-				</ul>	
-			</div>
+			<div class="container">
+				<div class="navbar-header">
+		            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
+		              <span class="sr-only">Toggle navigation</span>
+		              <span class="icon-bar"></span>
+		              <span class="icon-bar"></span>
+		              <span class="icon-bar"></span>
+		            </button>
+				<div class="site-title">
+					<a href="http://davidawindham.com" title="David Windham"><img class="dw" title="David Windham" src="<?php echo get_bloginfo('template_directory');?>/img/dw.png" width="17"/></a>
+					<a href="<?php echo home_url( '/' ); ?>" class="navbar-brand navbar-right" title="David A. Windham" rel="home">David A. Windham</a>			
+				</div>
+				<a href="#" class="nav-toggle navbar-right" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body"><span></span></a>
+			</div>		
 		</nav>
 	</header>
-	<div id="main" role="main">
 		<aside class="navmenu navmenu-default navmenu-fixed-right offcanvas" role="complementary">
 			<ul class="nav bs-docs-sidenav">
 				<li><a href="bio">bio</a></li>
@@ -44,3 +40,4 @@
 				<li><a href="contact">contact</a></li>
 			</ul>
 		</aside>
+	<div class="container">

+ 4 - 4
js/init.js

@@ -1,7 +1,9 @@
 jQuery(document).ready(function($) {
 
-var wide = 768;
-if ($(window).width() > wide) {
+$( ".nav-toggle" ).on( "click", function() {
+	$( this ).toggleClass( "active" );
+});
+	
 var headerHeight = $('.navbar').height();
 $(window).on('scroll', {
     previousTop: 0
@@ -20,7 +22,6 @@ function() {
     }
     this.previousTop = currentTop;
 });
-}
 
 var commentsDiv = $('#comments');
 if (commentsDiv.length) {
@@ -35,5 +36,4 @@ if (commentsDiv.length) {
   });
 }
 
-
 });

+ 48 - 3
style.css

@@ -238,7 +238,7 @@ img.dw {
 
 .navmenu,
 .navbar-offcanvas {
-  width: 300px;
+  width: 200px;
   height: auto;
   border-style: solid;
   border-width: 1px;
@@ -262,11 +262,56 @@ img.dw {
 }
 .navmenu-fixed-right,
 .navbar-offcanvas {
-  right: 0;
-  left: auto;
+  left: 0;
+  right: auto;
   border-width: 0 0 0 1px;
 }
 
+.nav-toggle { 
+	padding: 15px 0;
+	padding: 10px 35px 16px 0px; 
+	float: right;
+	left: 10px;
+	top: 20px;
+	cursor: pointer;
+	position: absolute; 
+}
+.nav-toggle span, .nav-toggle span:before, .nav-toggle span:after {
+  cursor: pointer;
+  border-radius: 1px;
+  height: 5px;
+  width: 35px;
+  background: #333E52;
+  position: absolute;
+  display: block;
+  content: '';
+}
+.nav-toggle span:before {
+  top: -10px; 
+}
+.nav-toggle span:after {
+  bottom: -10px;
+}
+.nav-toggle span, .nav-toggle span:before, .nav-toggle span:after {
+  transition: all 500ms ease-in-out;
+}
+.nav-toggle.active span {
+  background-color: transparent;
+}
+.nav-toggle.active span:before, .nav-toggle.active span:after {
+  top: 0;
+}
+.nav-toggle.active span:before {
+  transform: rotate(45deg);
+  -webkit-transform: rotate(45deg);
+	-o-transform: rotate(45deg);
+}
+.nav-toggle.active span:after {
+  transform: rotate(-45deg);
+  -webkit-transform: rotate(-45deg);
+  -o-transform: rotate(-45deg);
+}
+
 
 /*===== Content =====*/