windhamdavid 5 years ago
parent
commit
c917c02037
9 changed files with 278 additions and 224 deletions
  1. 1 1
      archive.php
  2. 14 3
      footer.php
  3. 7 4
      functions.php
  4. 28 5
      header.php
  5. 7 0
      inc/tweaks.php
  6. 27 1
      index.php
  7. 1 2
      page-notebook.php
  8. 183 161
      style.css
  9. 10 47
      underscore.php

+ 1 - 1
archive.php

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

+ 14 - 3
footer.php

@@ -1,7 +1,18 @@
-	<div id="footer" role="contentinfo">
-		
+<div class="container-full footer dark">
+	<div class="container">
+		<div class"row">
+			<!--some fun footer stuff -->	
+			<div class="col-md-4">
+				<p class="dim">.col-md-4<p>
+			</div>
+			<div class="col-md-4">.col-md-4</div>
+			<div class="col-md-4">
+				<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</p>
+			</div>
+		</div>
 	</div>
-	
+</div>
 </div>
 <?php wp_footer(); ?>
 <!--[if lt IE 9]>

+ 7 - 4
functions.php

@@ -22,6 +22,7 @@ function dw_scripts() {
 	//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_deregister_script('jquery');
 	wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
@@ -29,13 +30,15 @@ function dw_scripts() {
 	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( 'init', get_template_directory_uri() . '/js/init.js', 'jquery', '', true );
-	//wp_enqueue_script( 'api', get_template_directory_uri() . '/js/wp-api.js', 'jquery', '', true );
-	
-	//wp_register_script( 'wp-api', get_template_directory_uri() . '/js/wp-api.js', array( 'jquery', 'backbone', 'underscore' ), '1.1', true );
 
 	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
 		wp_enqueue_script( 'comment-reply' );
-	} elseif ( is_page('notebook') || is_front_page() || is_archive() || is_search() ) {
+	} 
+	
+	if ( is_front_page() || is_home() ) {
+		wp_enqueue_script( 'skroll', get_template_directory_uri() . '/js/skrollr.min.js', 'jquery', '', true );
+		
+	} elseif ( is_page('notebook') || is_archive() || is_search() ) {
 		
 		global $wp_rewrite;
 

+ 28 - 5
header.php

@@ -16,7 +16,7 @@
 </head>
 <body>
 <header id="header">
-	<div class="navbar navbar-fixed-top" role="navigation">
+	<div class="navbar navbar-fixed-top">
 		<div class="container">
 		<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>
@@ -26,10 +26,33 @@
 		<a href="#" class="nav-toggle navbar-right" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body"><span></span></a>
 	</div>
 </header>
-<nav class="navmenu navmenu-default navmenu-fixed-right offcanvas" role="complementary">
-	<?php wp_nav_menu( array( 'menu' => 'main','sort_column' => 'menu_order', 'container_class' => 'nav-stacked', 'menu_class' => 'nav nav-stacked' ) ); ?>
-	<a href="#archives" class="list-group-item list-group-item-success" data-toggle="collapse" data-parent=".navmenu">Archives</a>
+<nav class="navmenu navmenu-default navmenu-fixed-right offcanvas" role="navigation">
+	<ul class="nav nav-stacked">
+		<li><a href="<?php echo home_url( '/' ); ?>bio" class="list-group-item"><span class="fa fa-file-text-o fa-fw"></span> About</a></li>
+		<li><a href="<?php echo home_url( '/' ); ?>notebook" class="list-group-item"><span class="fa fa-pencil-square-o fa-fw"></span> Notebook</a></li>
+		<li><a href="<?php echo home_url( '/' ); ?>studio" class="list-group-item"><span class="fa fa-flask fa-fw"></span> Studio</a></li>
+		<li><a href="<?php echo home_url( '/' ); ?>contact" class="list-group-item"><span class="fa fa-envelope-o fa-fw"></span> Contact</a></li>
+		<li><a href="#archives" class="list-group-item" data-toggle="collapse" data-parent=".navmenu"><span class="fa fa-folder-open-o fa-fw"></span> Archives</a>
+	</ul>
 	<div class="collapse" id="archives">
-	<?php wp_get_archives( array( 'type' => 'yearly', 'limit' => 40 ) ); ?>
+	<?php wp_get_archives( array( 'type' => 'yearly') ); ?>
 	</div>
+	<div class="clear">
+	<a href="#social" class="list-group-item" data-toggle="collapse" data-parent=".navmenu"><span class="fa fa-external-link fa-fw"></span> Connect</a>
+	<div class="collapse" id="social">
+		<ul class="social">
+			<li><a href="https://davidawindham.com/feed" class="" rel="me"><span class="fa fa-2x fa-rss-square"></span></a></li>
+			<li><a href="https://twitter.com/windhamdavid" class="" rel="me"><span class="fa fa-2x fa-twitter-square"></span></a></li>
+			<li><a href="https://www.facebook.com/windhamdavid" class=""><span class="fa fa-2x fa-facebook-square"></span></a></li>
+			<li><a href="https://plus.google.com/+DavidWindham1" class="" rel="me"><span class="fa fa-2x fa-google-plus-square"></span></a></li>
+			<li><a href="https://github.com/windhamdavid" class="" rel="me"><span class="fa fa-2x fa-github-square"></span></a></li>
+			<li><a href="http://www.last.fm/user/windhamdavid" class=""><span class="fa fa-2x fa-lastfm-square"></span></a></li>
+			<li><a href="http://vimeo.com/windhamdavid" class=""><span class="fa fa-2x fa-vimeo-square"></span></a></li>
+			<li><a href="http://windhamdavid.tumblr.com/" class=""><span class="fa fa-2x fa-tumblr-square"></span></a></li>
+			<li><a href="https://keybase.io/windhamdavid" class=""><span class="fa fa-15x fa-key"></span></a></li>
+			<li><a href="https://www.coinbase.com/windhamdavid" class=""><span class="fa fa-15x fa-bitcoin"></span></a></li>
+			<li><a href="http://en.wikipedia.org/wiki/User:Windhamdavid" class=""><span class="fa fa-15x fa-globe"></span></a></li>
+		<ul>
+	</div>
+		
 </nav>

+ 7 - 0
inc/tweaks.php

@@ -34,4 +34,11 @@ function dw_hide() {
 <?php }
 add_action( 'admin_head', 'dw_hide' );
 
+
+function dw_oembed_filter($html, $url, $attr, $post_ID) {
+    $return = '<div class="video-container">'.$html.'</div>';
+    return $return;
+}
+add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ;
+
 ?>

+ 27 - 1
index.php

@@ -1,8 +1,34 @@
-<?php get_header(); ?>
+<!--perhaps an altenate header -->
+<?php get_header('home'); ?>
+	<div class="container-full leader dark">
+		<!-- Not sure what I'm going to have on my main page just yet maybe the card again -->
+		<div class="container">
+			<h1 class="light">Some Static Content</h1>
+			<h2 class="light">Some Static Content</h2>
+			<h3 class="light">Some Static Content</h3>
+			<h4 class="light">Some Static Content</h4>
+			<h5 class="light">Some Static Content</h5>
+			<h6 class="light">Some Static Content</h6>
+		</div>
+	</div>
 	<div class="container">
 		<div id="content" role="main">
 			<main id="main" class="site-main" role="main">
 				<!-- Not sure what I'm going to have on my main page just yet -->
+				<?php query_posts('showposts=2'); ?>
+				<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+					<div class="entry-content">
+						<div class="date">
+							<?php the_date('n/j/Y'); ?>		
+						</div>
+						<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+						<?php the_content(); ?>
+						<?php comments_template( '', true ); ?>
+						<div class="clear">&nbsp;</div>
+					</div>
+				</div>
+				<?php endwhile; ?>
 			</div>
 		</div>
 	</div>

+ 1 - 2
page-notebook.php

@@ -13,11 +13,10 @@ get_header(); ?>
 			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
 				<div class="entry-content">
 					<div class="date">
-						<?php the_date('M j, Y'); ?>		
+						<?php the_date('n/j/Y'); ?>		
 					</div>
 					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
 					<?php the_content(); ?>
-					<?php comments_template( '', true ); ?>
 					<div class="clear">&nbsp;</div>
 				</div>
 			</div>

File diff suppressed because it is too large
+ 183 - 161
style.css


+ 10 - 47
underscore.php

@@ -1,62 +1,25 @@
 <script type="text/html" id="content-template">
 	<article id="post-<%= post.ID %>" class="post">
+		<div class="entry-content">
 		<header class="entry-header">
-			<h1 class="entry-title"><a href="<%= post.link %>" rel="bookmark"><%= post.title %></a></h1>
-
-			<% if ( 'post' === post.type ) { %>
 			<div class="entry-meta">
 				<% postDate = new Date( post.date ); %>
-				<span class="posted-on">
-					<?php esc_html_e( 'Posted on', '_s_backbone' ); ?>
-
-					<time class="entry-date published">
+					<time class="date">
 						<% print( ( postDate.getMonth() + 1 ) + '/' + postDate.getDate() + '/' + postDate.getFullYear() ); %>
 					</time>
-				</span>
-				<span class="byline">
-					<?php esc_html_e( 'by', '_s_backbone' ); ?>
-
-					<span class="author vcard">
-						<a class="url fn n" href="<%= settings.pathInfo['author_permastruct'].replace( '%author%', post.author.get( 'username' ) ) %>">
-							<%= post.author.get( 'nickname' ) %>
-						</a>
-					</span>
-				</span>
-			</div><!-- .entry-meta -->
-			<% } %>
-		</header><!-- .entry-header -->
-
-		<div class="entry-content">
-			<%= post.content %>
-		</div><!-- .entry-content -->
-
-		<footer class="entry-footer">
+			</div>
+			<h1 class="entry-title"><a href="<%= post.link %>" rel="bookmark"><%= post.title %></a></h1>
 			<% if ( 'post' === post.type ) { %>
-				<% if ( post.terms.category ) { %>
-					<span class="cat-links">
-						<?php esc_html_e( 'Posted in', '_s_backbone' ); ?>
-						<% _.each( post.terms.category, function( category ) { %>
-							<a href="<%= category.link %>"><%= category.name %></a>
-						<% } ); %>
-					</span>
-				<% } %>
 
-				<% if ( post.terms.tag ) { %>
-					<span class="tags-links">
-						<% _.each( post.terms.tag, function( tag ) { %>
-							<a href="<%= tag.link %>"><%= tag.name %></a>
-						<% } ); %>
-					</span>
-				<% } %>
 			<% } %>
-		</footer><!-- .entry-footer -->
-	</article><!-- #post-<%= post.ID %> -->
+		</header>
+			<%= post.content %>
+		<div class="clear">&nbsp;</div>
+		</div>
+	</article>
 </script>
-
 <script type="text/html" id="more-button-template">
 	<div class="more-posts">
-
-		<a class="more-button button btn-lg btn btn-danger" href="#"><?php esc_html_e( 'More', '_s_backbone' ); ?></a>
-
+		<a class="more-button button btn-lg btn btn-danger" href="#"><?php esc_html_e( 'More', 'dw' ); ?></a>
 	</div>
 </script>