Browse Source

non-fancy pages

windhamdavid 5 years ago
parent
commit
d829ed90e6
12 changed files with 2339 additions and 1093 deletions
  1. 2 7
      css/font-awesome.css
  2. 1 3
      css/jasny-bootstrap.css
  3. 1875 0
      css/style-o.css
  4. 16 0
      css/style-o.min.css
  5. 0 1061
      css/styles.css
  6. 0 4
      footer.php
  7. 28 15
      functions.php
  8. 10 3
      gruntfile.js
  9. 71 0
      js/init-o.js
  10. 1 0
      js/init-o.min.js
  11. 330 0
      js/script-o.js
  12. 5 0
      js/script-o.min.js

+ 2 - 7
css/font-awesome.css

@@ -1,11 +1,6 @@
-/* @override http://macs.local/david/wp-content/themes/dw/css/font-awesome.css */
+/* Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+*/
 
-/*
- *  Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */
-/* FONT PATH
- * -------------------------- */
 @font-face {
   font-family: 'FontAwesome';
   src: url('../fonts/fontawesome-webfont.eot?v=4.2.0');

+ 1 - 3
css/jasny-bootstrap.css

@@ -1,6 +1,4 @@
-/* @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.
  * Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)

File diff suppressed because it is too large
+ 1875 - 0
css/style-o.css


File diff suppressed because it is too large
+ 16 - 0
css/style-o.min.css


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


+ 0 - 4
footer.php

@@ -7,7 +7,6 @@
 				<p class="dim"><p>
 			</div>
 			<div class="col-md-4">
-				<!--<span class="right"><img src="<?php echo get_bloginfo('template_directory');?>/img/dog.png" class="avatar" alt="David Windham"/></span>-->
 				<p class="dim right"><a href="https://github.com/windhamdavid/dw"><span class="fa fa-15x fa-code-fork"></span> </a></p>
 				<p class="small dim right">&copy; 2005-2015<br />David A. Windham</p>
 			</div>
@@ -15,8 +14,5 @@
 	</div>
 </div>
 <?php wp_footer(); ?>
-<!--[if lt IE 9]>
-	<script src="<?php echo get_template_directory_uri(); ?>/js/html5shiv.min.js"></script>
-<![endif]-->
 </body>
 </html>

+ 28 - 15
functions.php

@@ -21,7 +21,9 @@ add_image_size( 'post-large', 770, 577, true );
 function dw_scripts() {
 	global $post;
 	wp_enqueue_style( 'style', get_stylesheet_uri() );
-	//wp_enqueue_style( 'style-min', get_template_directory_uri() . '/css/style.min.css');
+	//wp_enqueue_style( 'style-o-min', get_template_directory_uri() . '/css/style-o.min.css');
+	//wp_enqueue_style( 'style-o', get_template_directory_uri() . '/css/style-o.css');
+	//wp_enqueue_style( 'style-o', get_template_directory_uri() . '/css/style-o.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( 'font', get_template_directory_uri() . '/css/font-awesome.css');
@@ -30,28 +32,39 @@ function dw_scripts() {
 	
 	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( 'modern', get_template_directory_uri() . '/js/modernizr.js', 'jquery', '', true );
-	wp_enqueue_script( 'boostrap', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery', '', true );
-	wp_enqueue_script( 'offcanvas', get_template_directory_uri() . '/js/jasny-bootstrap.js', 'jquery', '', true );
-	wp_enqueue_script( 'time', get_template_directory_uri() . '/js/moment.min.js', 'jquery', '', true );
-	wp_enqueue_script( 'cal', get_template_directory_uri() . '/js/fullcalendar.min.js', 'jquery', '', true );
-	//wp_enqueue_script( 'holder', get_template_directory_uri() . '/js/holder.js', 'jquery', '', true );
-	wp_enqueue_script( 'valid', get_template_directory_uri() . '/js/validate.min.js', 'jquery', '', true );
-	wp_enqueue_script( 'smooth', get_template_directory_uri() . '/js/smooth.js', 'jquery', '', true );
-	wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', 'jquery', '', true );
-	//wp_enqueue_script( 'scriptmin', get_template_directory_uri() . '/js/script.min.js', 'jquery', '', true );
-	//wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );
 
 	if ( is_front_page() || is_home() ) {
-		//wp_enqueue_script( 'skroll', get_template_directory_uri() . '/js/skrollr.min.js', 'jquery', '', true );	
+		//wp_enqueue_style( 'style-min', 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( 'font', get_template_directory_uri() . '/css/font-awesome.css');
+		wp_enqueue_style( 'cal', get_template_directory_uri() . '/css/fullcalendar.css');
+		wp_enqueue_style( 'ani', get_template_directory_uri() . '/css/animate.css');
+		
+		wp_enqueue_script( 'modern', get_template_directory_uri() . '/js/modernizr.js', 'jquery', '', true );
+		wp_enqueue_script( 'boostrap', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'offcanvas', get_template_directory_uri() . '/js/jasny-bootstrap.js', 'jquery', '', true );
+		wp_enqueue_script( 'time', get_template_directory_uri() . '/js/moment.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'cal', get_template_directory_uri() . '/js/fullcalendar.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'valid', get_template_directory_uri() . '/js/validate.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'smooth', get_template_directory_uri() . '/js/smooth.js', 'jquery', '', true );
+		wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', 'jquery', '', true );
+		//wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );
+		//wp_enqueue_script( 'scriptmin', get_template_directory_uri() . '/js/script.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.js', 'jquery', '', true );
+		//wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.min.js', 'jquery', '', true );
 	} 
+	else {
+		wp_enqueue_script( 'scripts-o', get_template_directory_uri() . '/js/script-o.js', 'jquery', '', true );
+		//wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/script-o.min.js', 'jquery', '', true );
+		wp_enqueue_script( 'init-o', get_template_directory_uri() . '/js/init-o.js', 'jquery', '', true );
+		//wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init-o.min.js', 'jquery', '', true );
+	}
 
 	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
 		wp_enqueue_script( 'comment-reply' );
 	} 
 	
-	wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.js', 'jquery', '', true );
-	//wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.min.js', 'jquery', '', true );
 	
 	
 	if ( is_page('notebook') || is_archive() || is_search() ) {

+ 10 - 3
gruntfile.js

@@ -13,7 +13,8 @@ module.exports = function(grunt) {
 		cssmin: {
 		  combine: {
 		    files: {
-		      'style.min.css': ['style.css', 'css/bootstrap.css', 'css/font-awesome.css', 'css/fullcalendar.css', 'css/animate.css']
+		      'style.min.css': ['style.css', 'css/bootstrap.css', 'css/font-awesome.css', 'css/fullcalendar.css', 'css/animate.css'],
+			  'css/style-o.min.css': ['css/style-o.css', 'css/bootstrap.css']
 		    }
 		  }
 		},
@@ -23,22 +24,28 @@ module.exports = function(grunt) {
 				separator: ';',
 			},
 			dist: {
-				src: ['js/jquery-2.1.1.min.js', 'js/modernizr.js', 'js/bootstrap.min.js', 'js/jasny-bootstrap.js', 'js/moment.min.js', 'js/fullcalendar.min.js', 'js/validate.min.js', 'js/scripts.js', ],
+				src: ['js/jquery-2.1.1.min.js', 'js/modernizr.js', 'js/bootstrap.min.js', 'js/jasny-bootstrap.js', 'js/moment.min.js', 'js/fullcalendar.min.js', 'js/validate.min.js', 'js/scripts.js'],
 				dest: 'js/script.js',
 			},
+			disto: {
+				src: ['js/jquery-2.1.1.min.js', 'js/modernizr.js', 'js/bootstrap.min.js', 'js/jasny-bootstrap.js', 'js/scripts-o.js'],
+				dest: 'js/script-o.js',
+			},
 		},
 		
 	    jshint: {
 	        options: {
 	          jshintrc: 'js/.jshintrc'
 	        },
-			all: ['js/init.js'],
+			all: ['js/init.js']
 	    },
 		
 		uglify: {
 		    my_target: {
 		      files: {
 		        'js/script.min.js': ['js/script.js'],
+				'js/script-o.min.js': ['js/script-o.js'],
+				'js/init-o.min.js': ['js/init-o.js'],
 				'js/init.min.js': ['js/init.js']
 		      }
 		    }

+ 71 - 0
js/init-o.js

@@ -0,0 +1,71 @@
+/*============================================
+		     Navigation 
+==============================================*/
+
+$('.nav-toggle').on('touchstart click', function(e) {
+	e.preventDefault();
+	$( this ).toggleClass( 'active' );
+});
+
+$(function dw_hidenav() {
+	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;
+		}  
+	);
+});
+
+
+/*============================================
+		      Comments
+==============================================*/
+
+$('#comments').hide();
+
+$('.toggle-comments').on('touchstart click', function(e) {
+	e.preventDefault();
+	$('#comments').toggle('slow', function() {
+		var anchor = $('.toggle-comments');
+		var anchorText = anchor.text() === 'Hide Comments' ? 'Show Comments' : 'Hide Comments';
+		$(anchor).text(anchorText);
+	});
+});
+
+$('#commentform').validate({
+	rules: {
+		author: {
+			required: true,
+			minlength: 2
+		},
+		email: {
+			required: true,
+			email: true
+		},
+		comment: {
+			required: true,
+			minlength: 20
+		}
+	},
+	messages: {
+		author: 'Please enter in your name.',
+		email: 'Please enter a valid email address.',
+		comment: 'Nothing to Say?'
+	},
+	errorElement: 'div',
+	errorPlacement: function(error, element) {
+		element.before(error);
+	} 
+});

File diff suppressed because it is too large
+ 1 - 0
js/init-o.min.js


File diff suppressed because it is too large
+ 330 - 0
js/script-o.js


File diff suppressed because it is too large
+ 5 - 0
js/script-o.min.js