windhamdavid 8 years ago
parent
commit
ab90b67dc1
6 changed files with 73 additions and 27 deletions
  1. 15 17
      archive.php
  2. 5 1
      inc/template.php
  3. 9 0
      inc/tweaks.php
  4. 1 1
      page-desk.php
  5. 43 8
      style.css
  6. 0 0
      style.min.css

+ 15 - 17
archive.php

@@ -2,7 +2,7 @@
 <?php get_template_part( 'underscore' ); ?>
 	<div class="container">
 		<div id="content" role="main">
-			<div class="entry-content archive">
+			<div class="entry-content archive-page">
 				<div class="row">					
 					<?php if ( have_posts() ) : ?>
 					<header class="page-header">
@@ -10,23 +10,21 @@
 					</header>
 					<?php while ( have_posts() ) : the_post();?>
 					
-					<div class="col-sm-6">
-						<div class="single-card">
-							<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'dw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
-							<div class="entry-meta">
-								<div class="date">
-									<?php the_date(); ?>
-								</div>
-							</div>
-							<div class="single-card-thumbnail">
-								<?php if ( has_post_thumbnail() ) : ?>
-								    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
-								        <?php the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?>
-								    </a>
-								<?php endif; ?>
-							</div>
-							<?php the_excerpt(); ?>
+					<div class="col-sm-6">		
+						<div class="archive-thumbnail">
+							<?php if ( has_post_thumbnail() ) : ?>
+								<?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'medium'); ?>
+								<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="archive-thumb" src="<?php echo $img_url[0];?>" width="100%" alt="<?php the_title(); ?>"/></a>
+							<?php else: ?>
+								<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="archive-thumb" src="<?php echo get_template_directory_uri(); ?>/img/no-image.png" width="100%" alt="<?php the_title(); ?>"/></a>
+							<?php endif; ?>
 						</div>
+						<article class="archive-card">
+							<div class="entry-content">		
+								<h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
+								<?php dw_good_excerpt(210); ?>
+							</div>
+						</article>
 					</div>
 		
 					<?php endwhile;

+ 5 - 1
inc/template.php

@@ -17,9 +17,13 @@ function page_bodyclass() {
 	global $wp_query;
 	$page = '';
 	if (is_front_page() ) {
-    	   $page = 'home';
+		$page = 'home';
 	} elseif (is_page()) {
    	   $page = $wp_query->query_vars["pagename"];
+	} elseif (is_single()) {
+		$page = 'single';
+	} elseif (is_archive()) {
+		$page = 'archive';
 	}
 	if ($page)
 		echo 'class="'. $page. '"';

+ 9 - 0
inc/tweaks.php

@@ -254,5 +254,14 @@ function dw_read_container_template( $template = '' ) {
 }
 add_filter( 'single_template', 'dw_read_container_template' );
 
+function dw_video_embed( $attr, $content='' ) {
+  if ( ! isset( $attr['poster'] ) && has_post_thumbnail() ) {
+	$poster = get_post_meta( get_the_ID(), 'media-poster', true );
+    $attr['poster'] = $poster;
+  } 
+  return wp_video_shortcode( $attr, $content );
+}
+add_shortcode( 'video', 'dw_video_embed' );
+
 
 ?>

+ 1 - 1
page-desk.php

@@ -11,7 +11,7 @@ get_header(); ?>
 				<h1 class="cm-sans wow fadeInLeft">Desk</h1>
 			</div>
 		</div>
-		<div class="row">
+		<div class="row desk">
 			<div class="col-sm-5">
 				<div class="entry-content">
 					<h4 class="georgia spread"><em><span class="firstcharacter">T</span>he internet is awash with nonsense and people that really want to be heard</em>. That's not exactly the case for me and I'm not planning on adding to the nonsense. I've spent too much time working on websites for other folks to really concern myself with my own. However, I've grown really tired of communicating using third party websites and I wanted to use this as a way to archive any notes, ideas, or anything I want to share. Right now, this site is clogged up with lots of old posts about mostly computer related ramblings, but I'll clean that up over time.</h4>

+ 43 - 8
style.css

@@ -44,10 +44,21 @@ a img {border: 0;}
 ==============================================*/
 
 body { 
-	background: rgba(242,242,242,.7) !important;
-	background-color: #f2f2f2 !important;
+	background: rgba(242,242,242,.7);
+	background-color: #f2f2f2;
+}
+body.desk { 
+	background: rgba(242,242,242,.7);
+	background-color: #f2f2f2;
+}
+body.single {
+	background: rgba(242,242,242,.7);
+	background-color: #a19993;
+}
+body.archive {
+	background: rgba(242,242,242,.7);
+	background-color: #a19993;
 }
-
 
 
 /*============================================
@@ -235,13 +246,16 @@ h4.spread {
 }
 @media (max-width: 667px) {
 	body {
-		background: #fff;
+
 	}
-	article.single {
+	.single {
 		padding: 10px 0px;
 		background: none !important;
 		box-shadow: none !important;
 	}
+	.archive {
+		padding: 10px 0px;
+	}
     .super-duper {
     	font-size: 63px;
     }
@@ -282,7 +296,6 @@ h4.spread {
 		width: 970px;
 	}
 	article.single {
-		background: #fff;
 		padding: 70px 80px 140px;
 	}
 }
@@ -291,7 +304,6 @@ h4.spread {
 		width: 1170px;
 	}
 	article.single {
-		background: #fff;
 		padding: 70px 100px 140px;
 	}
 }
@@ -2038,7 +2050,7 @@ body.page .edit-link {
 	border-bottom-left-radius:0;
 }
 
-.archive {
+.archive-page {
 	background:#fff;
 	box-shadow: 0 0 5px rgba(0,0,0,.1);
 	padding: 70px 100px 140px;
@@ -2059,6 +2071,29 @@ body.page .edit-link {
 	border:5px solid #cecece;
 }
 
+article.studio {
+	background: #fff;
+	padding: 0 15px 10px;
+	margin:0 0 20px;
+	box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
+}
+.archive-thumbnail {
+	max-height:180px;
+	overflow:hidden;
+}
+img.archive-thumb {
+	box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
+    -webkit-filter: saturate(1) opacity(1);
+    filter: saturate(1) opacity(1); 
+	-webkit-transition: all 1s;
+	transition: all 1s;
+}
+img.archive-thumb:hover {
+	-webkit-filter: saturate(3) opacity(1) invert(.8);
+	filter: saturate(3) opacity(1) invert(.8);
+}
+
+
 /*============================================
 		Meta 
 ==============================================*/

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


Some files were not shown because too many files changed in this diff