瀏覽代碼

- added custom post type and taxonomies file
- created custom post type template
- added readme.txt file (really for no reason at all)
- fixed the margin on the comments title
- removed duplicate text-align calls in css /* Thanks Dom */
- added add_theme_support( 'automatic-feed-links' ) replacing
the deprecated automatic_feed_links();
- added the language_attributes(); to the html tag
- replaced attribute_escape with esc_attr() in search.php
- bloginfo('url') in header replaced with echo home_url()
- using get_template_directory_uri() instead of bloginfo('template_directory')
- using get_the_author_meta('display_name') instead of deprecated function
- fixed error in bones.php for menu fallback /* thanks Mark */
- creating thumbnail fallback functions
- added header.js and moved modernizr & imgsizer in that file
- added lazy load jquery plugin
- moved dd_belatedpng.js inside the ie folder in the libs folder
- changed class of main menu to .menu from .nav
- added more css for menu
- added additional selectors to the style.css in the root
- removed the top margin of the footer menu

Eddie Machado 15 年之前
父節點
當前提交
46f4d7010b

+ 4 - 1
archive.php

@@ -9,7 +9,7 @@
 					<?php } elseif (is_tag()) { ?> 
 						<h1 class="archive_title h2"><span>Posts Tagged:</span> <?php single_tag_title(); ?></h1>
 					<?php } elseif (is_author()) { ?>
-						<h1 class="archive_title h2"><span>Posts By:</span> <?php echo get_author_name(get_query_var('author')); ?></h1>
+						<h1 class="archive_title h2"><span>Posts By:</span> <?php get_the_author_meta('display_name'); ?></h1>
 					<?php } elseif (is_day()) { ?>
 						<h1 class="archive_title h2"><span>Daily Archives:</span> <?php the_time('l, F j, Y'); ?></h1>
 					<?php } elseif (is_month()) { ?>
@@ -31,6 +31,9 @@
 						</header> <!-- end article header -->
 					
 						<section class="post_content">
+						
+							<?php the_post_thumbnail( 'bones-thumb-300' ); ?>
+						
 							<?php the_excerpt('<span class="read-more">Read more on "'.the_title('', '', false).'" &raquo;</span>'); ?>
 					
 						</section> <!-- end article section -->

+ 2 - 2
footer.php

@@ -17,10 +17,10 @@
 		<?php wp_footer(); // js scripts are inserted using this function ?>
 
 		<!-- custom scripts -->
-		<script src="<?php bloginfo('template_directory'); ?>/library/js/scripts.js"></script>
+		<script src="<?php echo get_template_directory_uri(); ?>/library/js/scripts.js"></script>
 		
 		<!--[if lt IE 7 ]>
-    		<script src="<?php bloginfo('template_directory'); ?>/library/js/libs/dd_belatedpng.js"></script>
+    		<script src="<?php echo get_template_directory_uri(); ?>/library/js/libs/ie/dd_belatedpng.js"></script>
     		<script> DD_belatedPNG.fix('img, .png_bg'); </script>
 		<![endif]-->		
 		

+ 5 - 4
functions.php

@@ -6,14 +6,11 @@ URL: htp://themble.com/bones/
 
 This is the Bones Core file. It powers everything.
 YOU DON'T WANT TO MESS W/ THIS FILE UNLESS YOU KNOW WHAT YOU'RE DOING.
-
 At most, the only thing you should edit is adding or removing the
 expirimental features.
 */
-
 // Get Bones Core Up & Running!
 include_once('library/bones.php');
-
 /*
 Inside the bones.php file:
 
@@ -45,12 +42,16 @@ When disabled, it would look like this:
 // Expirimental Features
 include_once('library/plugins.php');
 
+// Adding Custom Post Type
+include_once('library/custom-post-type.php');
+
 
 /* BONES FUNCTIONS (DO NOT EDIT) */
 
 // Thumbnail sizes
 add_image_size( 'bones-thumb-600', 600, 150, true );
-add_image_size( 'bones-thumb-100', 300, 100, true );
+add_image_size( 'bones-thumb-300', 300, 100, true );
+
 /* 
 to add more sizes, simply copy a line from above 
 and change the dimensions & name. As long as you

+ 15 - 16
header.php

@@ -1,10 +1,10 @@
 <!doctype html>  
 
-<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
-<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
-<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
-<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
-<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
+<!--[if lt IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
+<!--[if IE 7 ]>    <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
+<!--[if IE 8 ]>    <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
+<!--[if IE 9 ]>    <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
+<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
 	
 	<head>
 		
@@ -17,27 +17,26 @@
 		
 		<meta name="viewport" content="width=device-width, initial-scale=1.0">
 		
-		<!-- icons & facivons -->
-		<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico">
-		<link rel="apple-touch-icon" href="<?php bloginfo('template_directory'); ?>/library/images/apple-touch-icon.png">
+		<!-- icons & favicons -->
+		<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
+		<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/library/images/apple-touch-icon.png">
 		
 		<!-- stylesheets -->
-		<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/library/css/style.css">
+		<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/library/css/style.css">
 		
 		<!-- scripts -->
 		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
-		<script>!window.jQuery && document.write(unescape('%3Cscript src="<?php bloginfo('template_directory'); ?>/library/js/libs/jquery-1.4.2.min.js"%3E%3C/script%3E'))</script>
+		<script>!window.jQuery && document.write(unescape('%3Cscript src="<?php echo get_template_directory_uri(); ?>/library/js/libs/jquery-1.4.2.min.js"%3E%3C/script%3E'))</script>
 		
-		<script src="<?php bloginfo('template_directory'); ?>/library/js/libs/modernizr-1.6.min.js"></script>
-		<script src="<?php bloginfo('template_directory'); ?>/library/js/libs/imgsizer.js"></script>
+		<script src="<?php echo get_template_directory_uri(); ?>/library/js/header.js"></script>
 		
 		<!--[if lt IE 9]>
-			<script src="<?php bloginfo('template_directory'); ?>/library/js/libs/ie/DOMAssistant-2.0.min.js"></script>
-			<script src="<?php bloginfo('template_directory'); ?>/library/js/libs/ie/selectivizr.js"></script>
+			<script src="<?php echo get_template_directory_uri(); ?>/library/js/libs/ie/DOMAssistant-2.0.min.js"></script>
+			<script src="<?php echo get_template_directory_uri(); ?>/library/js/libs/ie/selectivizr.js"></script>
 		<![endif]-->
 		
 		<!-- wordpress head functions -->
-  		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
+  		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
 		
 		<?php wp_head(); ?>
 		
@@ -54,7 +53,7 @@
 			
 				<div id="inner-header">
 				
-					<h1 id="logo"><a href="<?php bloginfo('url'); ?>" rel="nofollow"><?php bloginfo('name'); ?></a></h1>
+					<h1 id="logo"><a href="<?php echo home_url(); ?>" rel="nofollow"><?php bloginfo('name'); ?></a></h1>
 					
 					<nav role="navigation">
 						<?php bones_main_nav(); // Adjust using Menus in Wordpress Admin ?>

+ 4 - 4
library/bones.php

@@ -19,7 +19,7 @@ function removeHeadLinks() {
 }
 	add_action('init', 'removeHeadLinks');
 	// Add RSS links to <head> section
-	automatic_feed_links();
+	add_theme_support('automatic-feed-links');
 	
 // loading jquery reply elements on single pages automatically
 function bones_queue_js(){
@@ -56,10 +56,10 @@ function bones_menus() { register_nav_menus(
  
 function bones_main_nav() { if ( function_exists( 'wp_nav_menu' ) )
 		// display the wp3 menu if available
-        wp_nav_menu( 'menu=main_nav&container_class=nav&fallback_cb=bones_main_nav_fallback' );
+        wp_nav_menu( 'menu=main_nav&container_class=menu&fallback_cb=bones_main_nav_fallback' );
     else
     	// else fallback if not supported
-        mytheme_nav_fallback();
+        bones_main_nav_fallback();
 }
 
 function bones_footer_links() { if ( function_exists( 'wp_nav_menu' ) )
@@ -71,7 +71,7 @@ function bones_footer_links() { if ( function_exists( 'wp_nav_menu' ) )
 }
  
 function bones_main_nav_fallback() { wp_page_menu( 'show_home=Start&menu_class=menu' ); }
-function bones_footer_links_fallback() { echo 'Bones'; }
+function bones_footer_links_fallback() { echo '<ul class="footer-links"><li>Bones<li></ul>'; }
 	
 // Related Posts Function (call using bones_related_posts(); )
 function bones_related_posts() {

+ 22 - 19
library/css/style.css

@@ -57,9 +57,6 @@ body, select, input, textarea {   color: #444; }
 small, .small { font-size:0.75em; letter-spacing:.05em; font-style:italic; line-height:1.75em; }
 strong, th, .strong { font-weight: bold; }
 em, .em { font-style: italic; }
-.text-left {text-align: left;}
-.text-center {text-align: center;}
-.text-right {text-align: right;}
 ins, .ins { background-color:#ff9; color:#000; text-decoration:none; }
 mark, .mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
 del, .del { text-decoration: line-through; }
@@ -99,7 +96,7 @@ button {  width: auto; overflow: visible; }
 .visuallyhidden { position: absolute !important; clip: rect(1px 1px 1px 1px);  clip: rect(1px, 1px, 1px, 1px); }
 
 /* clearfixes */
-.clear:after, .menu:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
+.clear:after, .menu:after, .menu ul:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
 .clear { display: inline-block; }
 * html .clear { height: 1%; }
 .clear { display: block; }
@@ -167,18 +164,20 @@ header[role=banner] {}
 NAVIGATION STYLES
 ******************************************************************/
 
-.nav { clear: both; margin: 1.1em 0; }
-	.nav ul { background: #215ea3; }
-		.nav ul li { list-style-type: none; float: left; }
-			.nav ul li a { display: block; text-decoration: none; padding: 5px 10px; color: #fff; font-weight: 700; }
-				.nav ul li:last-child a {}
-				.nav ul li a:hover { background: #036; color: #fff; }
-		.nav ul li.current-menu-item a, .nav ul li.current_page_item a {}
-		.nav ul li ul.sub-menu { position: absolute; left: -9999em; z-index: 9999; background: #215ea3; width: 200px; }
-			.nav ul li ul li a { width: 180px; }
-				.nav ul li ul li a:hover { background-color: #036; }
-			.nav ul li ul li:last-child a {}
-			.nav ul li:hover ul { left: auto; }
+.menu { clear: both; margin: 1.1em 0; }
+	.menu ul { background: #215ea3; }
+		.menu ul li { list-style-type: none; float: left; }
+			.menu ul li a { display: block; text-decoration: none; padding: 5px 10px; color: #fff; font-weight: 700; }
+				.menu ul li:last-child a {}
+				.menu ul li a:hover { background: #036; color: #fff; }
+		.menu ul li.current-menu-item a, .menu ul li.current_page_item a {}
+		.menu ul li ul.sub-menu { position: absolute; left: -9999em; z-index: 9999; background: #215ea3; width: 200px; }
+			.menu ul li ul li a { width: 180px; }
+				.menu ul li ul li a:hover { background-color: #036; }
+			.menu ul li ul li:last-child a {}
+			.menu ul li:hover ul { left: auto; }
+				.menu ul li ul li ul.sub-menu { left: -9999em; position: absolute; margin-left: 200px; top: auto; margin-top: -30px; }
+					.menu ul li ul li:hover ul.sub-menu { left: auto; }
 
 /******************************************************************
 POST STYLES
@@ -277,7 +276,7 @@ SIDEBAR STYLES
 COMMENT STYLES
 ******************************************************************/
 
-#comments { margin: 0 20px; } /* h3 comment title */
+#comments { margin: 0 20px 0.33em; } /* h3 comment title */
 	#comments span {} /* number of comments span */
 	
 .comment-nav {}
@@ -363,6 +362,10 @@ COMMENT STYLES
 		/* form validation */
 		#commentform input:invalid, #commentform textarea:invalid { border-color: red; outline: none; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none; background-color: #f6e7eb; }
 		#commentform input:valid {}
+		
+		/* no comments */
+		.nocomments { margin: 0 20px 1.1em; }
+		
 /******************************************************************
 FOOTER STYLES
 ******************************************************************/
@@ -371,11 +374,11 @@ footer[role=contentinfo] { border-top: 2px solid #cecece; padding: 1.1em 0 3.3em
 	.footer-links { float: left; }
 	
 	/* bottom nav links */
-	.footer-links ul { clear: both; }
+	.footer-links ul.menu { margin-top: 0; }
 		.footer-links ul li { list-style-type: none; float: left; font-size: 0.9em; }
 			.footer-links ul li a { margin-right: 10px; text-decoration: underline; }
 				.footer-links ul li:last-child a { margin-right: 0; }
-			.footer-links ul li a:hover, .nav ul li.current-menu-item a, .nav ul li.current_page_item a {}
+			.footer-links ul li a:hover, .footer-links ul li.current-menu-item a, .footer-links ul li.current_page_item a {}
 			.footer-links ul li ul.sub-menu { display: none; } /* you shouldn't have that many links in the footer anyway ;P */
 			
 	.attribution { float: right; color: #999; font-size: 0.9em; }

+ 100 - 0
library/custom-post-type.php

@@ -0,0 +1,100 @@
+<?php
+/* Bones Custom Post Type Example
+This page walks you through creating 
+a custom post type and taxonomies. You
+can edit this one or copy the following code 
+to create another one. 
+
+I put this in a seperate file so as to 
+keep it organized. I find it easier to edit
+and change things if they are concentrated
+in their own file.
+
+Developed by: Eddie Machado
+URL: http://themble.com/bones/
+*/
+
+
+// let's create the function for the custom type
+function custom_post_example() { 
+	// creating (registering) the custom type 
+	register_post_type( 'custom_type', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */
+	 	// let's now add all the options for this post type
+		array('labels' => array(
+			'name' => __('Custom Types', 'post type general name'), /* This is the Title of the Group */
+			'singular_name' => __('Custom Post', 'post type singular name'), /* This is the individual type */
+			'add_new' => __('Add New', 'custom post type item'), /* The add new menu item */
+			'add_new_item' => __('Add New Custom Type'), /* Add New Display Title */
+			'edit' => __( 'Edit' ), /* Edit Dialog */
+			'edit_item' => __('Edit Post Types'), /* Edit Display Title */
+			'new_item' => __('New Post Type'), /* New Display Title */
+			'view_item' => __('View Post Type'), /* View Display Title */
+			'search_items' => __('Search Post Type'), /* Search Custom Type Title */ 
+			'not_found' =>  __('Nothing found in the Database.'), /* This displays if there are no entries yet */ 
+			'not_found_in_trash' => __('Nothing found in Trash'), /* This displays if there is nothing in the trash */
+			'parent_item_colon' => ''
+			), /* end of arrays */
+			'description' => __( 'This is the example custom post type' ), /* Custom Type Description */
+			'public' => true,
+			'publicly_queryable' => true,
+			'exclude_from_search' => false,
+			'show_ui' => true,
+			'query_var' => true,
+			'menu_position' => 8, /* this is what order you want it to appear in on the left hand side menu */ 
+			'menu_icon' => get_stylesheet_directory_uri() . '/library/images/custom-post-icon.png', /* the icon for the custom post type menu */
+			'rewrite' => true,
+			'capability_type' => 'post',
+			'hierarchical' => false,
+			/* the next one is important, it tells what's enabled in the post editor */
+			'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'sticky')
+	 	) /* end of options */
+	); /* end of register post type */
+} 
+
+	// adding the function to the Wordpress init
+	add_action( 'init', 'custom_post_example');
+	
+	// now let's add custom categories (http://codex.wordpress.org/Function_Reference/register_taxonomy)
+    register_taxonomy( 'custom_cat', 
+    	array('custom_type'), /* if you change the name of register_post_type( 'custom_type', then you have to change this */
+    	array('hierarchical' => true,                    
+    		'labels' => array(
+    			'name' => __( 'Custom Categories' ), /* name of the custom taxonomy */
+    			'singular_name' => __( 'Custom Category' ), /* single taxonomy name */
+    			'search_items' =>  __( 'Search Custom Categories' ), /* search title for taxomony */
+    			'all_items' => __( 'All Custom Categories' ), /* all title for taxonomies */
+    			'parent_item' => __( 'Parent Custom Category' ), /* parent title for taxonomy */
+    			'parent_item_colon' => __( 'Parent Custom Category:' ), /* parent taxonomy title */
+    			'edit_item' => __( 'Edit Custom Category' ), /* edit custom taxonomy title */
+    			'update_item' => __( 'Update Custom Category' ), /* update title for taxonomy */
+    			'add_new_item' => __( 'Add New Custom Category' ), /* add new title for taxonomy */
+    			'new_item_name' => __( 'New Custom Category Name' ) /* name title for taxonomy */
+    		),
+    		'show_ui' => true,
+    		'query_var' => true,
+    	)
+    );   
+
+	// now let's add custom tags (http://codex.wordpress.org/Function_Reference/register_taxonomy) they are the same
+    register_taxonomy( 'custom_tags', 
+    	array('custom_type'), /* if you change the name of register_post_type( 'custom_type', then you have to change this */
+    	array('hierarchical' => true,                    
+    		'labels' => array(
+    			'name' => __( 'Custom Tags' ), /* name of the custom taxonomy */
+    			'singular_name' => __( 'Custom Tag' ), /* single taxonomy name */
+    			'search_items' =>  __( 'Search Custom Tags' ), /* search title for taxomony */
+    			'all_items' => __( 'All Custom Tags' ), /* all title for taxonomies */
+    			'parent_item' => __( 'Parent Custom Tag' ), /* parent title for taxonomy */
+    			'parent_item_colon' => __( 'Parent Custom Tag:' ), /* parent taxonomy title */
+    			'edit_item' => __( 'Edit Custom Tag' ), /* edit custom taxonomy title */
+    			'update_item' => __( 'Update Custom Tag' ), /* update title for taxonomy */
+    			'add_new_item' => __( 'Add New Custom Tag' ), /* add new title for taxonomy */
+    			'new_item_name' => __( 'New Custom Tag Name' ) /* name title for taxonomy */
+    		),
+    		'show_ui' => true,
+    		'query_var' => true,
+    	)
+    );
+	
+
+?>

二進制
library/images/custom-post-icon.png


二進制
library/images/nothumb.gif


+ 43 - 12
library/js/libs/modernizr-1.6.min.js → library/js/header.js

@@ -1,15 +1,18 @@
 /*
- * Modernizr v1.6
- * http://www.modernizr.com
- *
- * Developed by: 
- * - Faruk Ates  http://farukat.es/
- * - Paul Irish  http://paulirish.com/
- *
- * Copyright (c) 2009-2010
- * Dual-licensed under the BSD or MIT licenses.
- * http://www.modernizr.com/license/
- */
+Bones Header Scripts File
+Author: Eddie Machado
+
+This file contains key scripts like 
+Modernizr, imgsizer, lazy load, and 
+other scripts. They are minified and
+updated as often as I find an update.
+I do this so that there's only one script
+call in the header as opposed to 3 or 4.
+WIN!
+
+*/
+
+/* Modernizr v1.6 */
 window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
 k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
 var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
@@ -27,4 +30,32 @@ i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try
 /SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
 a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
 "gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
-g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
+g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
+
+
+/* lazy load (jquery delayed image loader plugin) */
+(function($){$.fn.lazyload=function(options){var settings={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(options){$.extend(settings,options);}
+var elements=this;if("scroll"==settings.event){$(settings.container).bind("scroll",function(event){var counter=0;elements.each(function(){if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$(this).trigger("appear");}else{if(counter++>settings.failurelimit){return false;}}});var temp=$.grep(elements,function(element){return!element.loaded;});elements=$(temp);});}
+this.each(function(){var self=this;if(undefined==$(self).attr("original")){$(self).attr("original",$(self).attr("src"));}
+if("scroll"!=settings.event||undefined==$(self).attr("src")||settings.placeholder==$(self).attr("src")||($.abovethetop(self,settings)||$.leftofbegin(self,settings)||$.belowthefold(self,settings)||$.rightoffold(self,settings))){if(settings.placeholder){$(self).attr("src",settings.placeholder);}else{$(self).removeAttr("src");}
+self.loaded=false;}else{self.loaded=true;}
+$(self).one("appear",function(){if(!this.loaded){$("<img />").bind("load",function(){$(self).hide().attr("src",$(self).attr("original"))
+[settings.effect](settings.effectspeed);self.loaded=true;}).attr("src",$(self).attr("original"));};});if("scroll"!=settings.event){$(self).bind(settings.event,function(event){if(!self.loaded){$(self).trigger("appear");}});}});$(settings.container).trigger(settings.event);return this;};$.belowthefold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).height()+$(window).scrollTop();}else{var fold=$(settings.container).offset().top+$(settings.container).height();}
+return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).width()+$(window).scrollLeft();}else{var fold=$(settings.container).offset().left+$(settings.container).width();}
+return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollTop();}else{var fold=$(settings.container).offset().top;}
+return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollLeft();}else{var fold=$(settings.container).offset().left;}
+return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.extend($.expr[':'],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"});})(jQuery);
+
+/* lazy load function ( feel free to change if you like) url - http://www.appelsiini.net/projects/lazyload */
+jQuery(document).ready(function() {     
+	jQuery('img').lazyload({
+		effect      : "fadeIn"
+	});
+});
+
+/* imgsizer (flexible images for fluid sites) */
+var imgSizer={Config:{imgCache:[],spacer:"/path/to/your/spacer.gif"},collate:function(aScope){var isOldIE=(document.all&&!window.opera&&!window.XDomainRequest)?1:0;if(isOldIE&&document.getElementsByTagName){var c=imgSizer;var imgCache=c.Config.imgCache;var images=(aScope&&aScope.length)?aScope:document.getElementsByTagName("img");for(var i=0;i<images.length;i++){images[i].origWidth=images[i].offsetWidth;images[i].origHeight=images[i].offsetHeight;imgCache.push(images[i]);c.ieAlpha(images[i]);images[i].style.width="100%";}
+if(imgCache.length){c.resize(function(){for(var i=0;i<imgCache.length;i++){var ratio=(imgCache[i].offsetWidth/imgCache[i].origWidth);imgCache[i].style.height=(imgCache[i].origHeight*ratio)+"px";}});}}},ieAlpha:function(img){var c=imgSizer;if(img.oldSrc){img.src=img.oldSrc;}
+var src=img.src;img.style.width=img.offsetWidth+"px";img.style.height=img.offsetHeight+"px";img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')"
+img.oldSrc=src;img.src=c.Config.spacer;},resize:function(func){var oldonresize=window.onresize;if(typeof window.onresize!='function'){window.onresize=func;}else{window.onresize=function(){if(oldonresize){oldonresize();}
+func();}}}}

+ 0 - 0
library/js/libs/dd_belatedpng.js → library/js/libs/ie/dd_belatedpng.js


+ 0 - 61
library/js/libs/imgsizer.js

@@ -1,61 +0,0 @@
-var imgSizer = {
-	Config : {
-		imgCache : []
-		,spacer : "/path/to/your/spacer.gif"
-	}
-
-	,collate : function(aScope) {
-		var isOldIE = (document.all && !window.opera && !window.XDomainRequest) ? 1 : 0;
-		if (isOldIE && document.getElementsByTagName) {
-			var c = imgSizer;
-			var imgCache = c.Config.imgCache;
-
-			var images = (aScope && aScope.length) ? aScope : document.getElementsByTagName("img");
-			for (var i = 0; i < images.length; i++) {
-				images[i].origWidth = images[i].offsetWidth;
-				images[i].origHeight = images[i].offsetHeight;
-
-				imgCache.push(images[i]);
-				c.ieAlpha(images[i]);
-				images[i].style.width = "100%";
-			}
-
-			if (imgCache.length) {
-				c.resize(function() {
-					for (var i = 0; i < imgCache.length; i++) {
-						var ratio = (imgCache[i].offsetWidth / imgCache[i].origWidth);
-						imgCache[i].style.height = (imgCache[i].origHeight * ratio) + "px";
-					}
-				});
-			}
-		}
-	}
-
-	,ieAlpha : function(img) {
-		var c = imgSizer;
-		if (img.oldSrc) {
-			img.src = img.oldSrc;
-		}
-		var src = img.src;
-		img.style.width = img.offsetWidth + "px";
-		img.style.height = img.offsetHeight + "px";
-		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
-		img.oldSrc = src;
-		img.src = c.Config.spacer;
-	}
-
-	// Ghettomodified version of Simon Willison's addLoadEvent() -- http://simonwillison.net/2004/May/26/addLoadEvent/
-	,resize : function(func) {
-		var oldonresize = window.onresize;
-		if (typeof window.onresize != 'function') {
-			window.onresize = func;
-		} else {
-			window.onresize = function() {
-				if (oldonresize) {
-					oldonresize();
-				}
-				func();
-			}
-		}
-	}
-}

+ 3 - 8
library/js/scripts.js

@@ -9,17 +9,12 @@ slow the page load.
 
 */
 
-
 // as the page loads, cal these scripts
 $(document).ready(function() {
 
-	// highlight search terms on search page
-	if(typeof(hls_query) != 'undefined'){
-		$(".post_content").highlight(hls_query, 1, "search-term");
-	}
-
-	// the placeholder fallback jquery (adds support for html5 placeholder)
-
+	
+	
+	// add all your scripts here
 
  
 }); /* end of as page load scripts */

+ 24 - 0
library/log.txt

@@ -12,6 +12,30 @@ Author: Eddie Machado
 BONES CHANGE LOG & HISTORY
 ******************************************************************/
 
+/* v1.06 */
+- added custom post type and taxonomies file
+- created custom post type template
+- added readme.txt file (really for no reason at all)
+- fixed the margin on the comments title
+- removed duplicate text-align calls in css /* Thanks Dom */
+- added add_theme_support( 'automatic-feed-links' ) replacing 
+	the deprecated automatic_feed_links();
+- added the language_attributes(); to the html tag
+- replaced attribute_escape with esc_attr() in search.php
+- bloginfo('url') in header replaced with echo home_url()
+- using get_template_directory_uri() instead of bloginfo('template_directory')
+- using get_the_author_meta('display_name') instead of deprecated function
+- fixed error in bones.php for menu fallback /* thanks Mark */
+- creating thumbnail fallback functions
+- added header.js and moved modernizr & imgsizer in that file
+- added lazy load jquery plugin
+- moved dd_belatedpng.js inside the ie folder in the libs folder
+- changed class of main menu to .menu from .nav
+- added more css for menu
+- added additional selectors to the style.css in the root
+- removed the top margin of the footer menu
+
+
 /* v1.05 */
 - fixed typos in style.css file & logs
 - updated selectivizr to latest version

+ 39 - 0
readme.txt

@@ -0,0 +1,39 @@
+/******************************************************************
+Bones 
+A Lightweight Wordpress Development Theme
+
+Bones is designed to make the life of developers easier. It's built
+using HTML5 & has a strong semantic foundation. It was updated recently
+using some of the HTML5 Boilerplate's recommended markup and setup.
+There are also a ton of bonus features such as page navi, breadcrumbs,
+related posts, and html5 video with fallback. It's constantly growing
+so be sure to check back often if you are a frequent user.  
+
+Designed by Eddie Machado
+http://themble.com/bones
+eddie@themble.com
+
+Design Copyright 2010. All Rights Reserved. 
+XHTML/CSS released under a Creative Commons Attribution 2.5 licence.
+
+Special Thanks to:
+Paul Irish & the HTML5 Boilerplate
+Yoast for some WP functions & optimization ideas
+Andrew Rogers for code optimization
+David Dellanave for speed & code optimization
+and several other developers. :)
+
+For support and or questions please head over to these helpful pages:
+
+Documentation:
+http://themble.com/documentation/bones-documentation/
+
+Submit Bugs & or Fixes:
+http://themble.com/bones/dev/
+
+To view Release & Update Notes, read the log.txt file inside 
+the library folder.
+
+This file was added to conform to the recommended
+ Wordpress Theme Guidelines.
+******************************************************************/

+ 1 - 1
search.php

@@ -4,7 +4,7 @@
 			
 				<div id="main" class="col700 clear" role="main">
 				
-					<h1 class="archive_title"><span>Search Results for:</span> <?php echo attribute_escape(get_search_query()); ?></h1>
+					<h1 class="archive_title"><span>Search Results for:</span> <?php echo esc_attr(get_search_query()); ?></h1>
 
 					<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 					

+ 73 - 0
single-custom_type.php

@@ -0,0 +1,73 @@
+<?php
+/*
+This is the custom post type post template.
+If you edit the post type name, you've got
+to change the name of this template to
+reflect that name change.
+
+i.e. if your custom post type is called
+register_post_type( 'bookmarks',
+then your single template should be
+single-bookmarks.php
+
+*/
+?>
+
+<?php get_header(); ?>
+			
+			<div id="content" class="clear">
+			
+				<div id="main" class="col620 clear" role="main">
+
+					<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
+					
+					<article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>>
+						
+						<header>
+							
+							<h1><?php the_title(); ?></h1>
+							
+							<p class="meta">Posted <time><?php the_time('F jS, Y'); ?></time> by <?php the_author(); ?> <span class="amp">&</span> filed under <?php echo get_the_term_list( get_the_ID(), 'custom_cat', "" ) ?>.</p>
+						
+						</header> <!-- end article header -->
+					
+						<section class="post_content clear">
+							
+							<?php the_content(); ?>
+					
+						</section> <!-- end article section -->
+						
+						<footer>
+			
+							<p class="tags"><?php echo get_the_term_list( get_the_ID(), 'custom_tags', '<span class="tags-title">Custom Tags:</span> ', ', ' ) ?></p>
+							
+						</footer> <!-- end article footer -->
+					
+					</article> <!-- end article -->
+					
+					<?php comments_template(); ?>
+					
+					<?php endwhile; ?>			
+					
+					<?php else : ?>
+					
+					<article id="post-not-found">
+					    <header>
+					    	<h1>Not Found</h1>
+					    </header>
+					    <section class="post_content">
+					    	<p>Sorry, but the requested resource was not found on this site.</p>
+					    </section>
+					    <footer>
+					    </footer>
+					</article>
+					
+					<?php endif; ?>
+			
+				</div> <!-- end #main -->
+    
+				<?php get_sidebar(); // sidebar 1 ?>
+    
+			</div> <!-- end #content -->
+
+<?php get_footer(); ?>

+ 11 - 3
style.css

@@ -2,10 +2,14 @@
 Theme Name: Bones
 Theme URI: http://www.themble.com/bones
 Description: An incredibly simple starter theme for developers.
-Version: 1.05
 Author: Eddie Machado
 Author URI: http://www.themble.com/bones/
-Tags: HTML5, Framework, CSS3
+Version: 1.06
+Tags: html5, framework, css3, development
+
+
+License: GPL or whatever
+License URI: ?
 
 All Default Styles are in library/css/style.css
 I reccomend not editing those files and making all
@@ -122,7 +126,11 @@ header[role=banner] {}
 		
 		.nav ul li ul.sub-menu {}
 			.nav ul li ul li a {}
-				.nav ul li ul li a:hover {}
+				.menu ul li ul li a:hover { }
+			.menu ul li ul li:last-child a {}
+			.menu ul li:hover ul { }
+				.menu ul li ul li ul.sub-menu { }
+					.menu ul li ul li:hover ul.sub-menu { }
 
 
 /* Posts & Content */