final, live version

This commit is contained in:
Kenneth Reitz
2010-09-22 13:54:02 -04:00
parent a7b9c44ae4
commit fb143559be
10 changed files with 329 additions and 24 deletions
+49
View File
@@ -0,0 +1,49 @@
<?php
/**
* Template Name: Archive
**/
?>
<!DOCTYPE html>
<!--[if IE 6 ]><html class="ie ielt9 ielt8 ielt7 ie6" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 7 ]><html class="ie ielt9 ielt8 ie7" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 8 ]><html class="ie ielt9 ie8" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="<?php bloginfo('language'); ?>"><!--<![endif]-->
<head>
<?php @include('inc_head.php'); ?>
</head>
<body class="archives">
<div id="screen">
<?php @include('inc_body_header.php'); ?>
<section class="G4 GR" id="content">
<header>
<?php if (is_category()): ?>
<h1><?php single_cat_title(); ?></h1>
<?php query_posts(array('category_name' => single_cat_title('', FALSE), 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => '-1')); ?>
<?php else: ?>
<h1><?php the_title(); ?></h1>
<?php get_search_form(); ?>
<?php query_posts(array('order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => '-1')); ?>
<?php endif; ?>
</header>
<dl class="containsArticles">
<?php while(have_posts()): the_post(); ?>
<dt>
<hgroup>
<a class="title" href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<time class="date" datetime="<?php the_time('c') ?>" pubdate="pubdate"><?php the_date(); ?></time>
</hgroup>
</dt>
<dd>
<?php echo preg_replace('/<p>(.+?)<\/p>/','$1',get_the_excerpt()); ?> <a href="<?php the_permalink() ?>" class="more-link"><?php _e('Read more', 'ia3'); ?><span class="implied"> &ndash; &lsquo;<?php the_title(); ?>&rsquo;</span>.</a>
</dd>
<?php endwhile; ?>
</dl><!-- .containsArticles -->
</section><!-- #content.ia.ia-4.ia-r.ia-s -->
<hr class="implied" />
<?php @include('inc_body_footer.php'); ?>
</div><!-- #screen -->
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

+1 -1
View File
@@ -82,7 +82,7 @@ code {
white-space: pre;
}
* {
-webkit-font-smoothing: antialiased
-webkit-font-smoothing: antialiased;
}
.wp_syntax {
font: 14px/15px 'Inconsolata', 'Consolas', 'Monaco', mono;
+15 -14
View File
@@ -23,34 +23,35 @@
</header><!-- G4 GR -->
<section class="G4 GR">
<img src="<?php echo get_bloginfo('template_directory'); ?>/assets/img/map.png" />
<p><a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Information+Architects,+Inc.&amp;sll=35.674494,139.711289&amp;sspn=0.010389,0.010868&amp;ie=UTF8&amp;hq=Information+Architects,+Inc.&amp;hnear=&amp;ll=35.674494,139.711289&amp;spn=0.010389,0.010868&amp;z=17&amp;iwloc=A"><?php _e('View in Google Maps', 'ia3'); ?></a></p>
<p><a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=209+W+Boscawen+St,+Winchester,+VA+22601&sll=39.18566,-78.163334&sspn=0.115226,0.264187&ie=UTF8&hq=&hnear=209+W+Boscawen+St,+Winchester,+Virginia+22601&t=h&z=17"><?php _e('View in Google Maps', 'ia3'); ?></a></p>
</section><!-- G4 GR -->
<section class="G2 GS">
<dl class="containsAddress">
<dt><?php _e('Mail', 'ia3'); ?>:</dt>
<dd class="email"><a href="mailto:contact@informationarchitects.jp">contact@informationarchitects.jp</a></dd>
<dd class="email"><a href="mailto:ping@kennethreitz.com">ping@kennethreitz.com</a></dd>
<dt><?php _e('Phone', 'ia3'); ?>:</dt>
<dd class="tel">+81-3-5913-9841</dd>
<dd class="tel">+1.540.200.8536</dd>
<dt><?php _e('Twitter', 'ia3'); ?>:</dt>
<dd class="twitter"><a class="twooser" href="http://twitter.com/ia">@ia</a></dd>
<dd class="twitter"><a class="twooser" href="http://twitter.com/kennethreitz">@kennethreitz</a></dd>
<dt><?php _e('LinkedIn', 'ia3'); ?>:</dt>
<dd class="linkedin"><a href="http://www.linkedin.com/in/informationarchitect">Oliver Reichenstein</a></dd>
<dt class="url"><a href="http://informationarchitects.jp/" class="org">Information Architects, Inc.</a></dt>
<dd class="linkedin"><a href="http://www.linkedin.com/in/kennethreitz">Kenneth Reitz</a></dd>
<dt class="url"><a href="http://kennethreitz.com/" class="org">Kenneth Reitz</a></dt>
<dd class="address">
<address>
Murayama Building 2F<br />
2-20-13
Jingu-mae,<br /> Shibuya-ku,
Tokyo
150-0001<br />
Japan
209 West Boscawen Street<br />
Suite 300<br />
Winchester, Virginia<br />
22601-4141<br />
USA
</address>
</dd>
</dl>
<form action="" method="">
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=kennethreitz', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<fieldset>
<label class="HSC" for="darth-vader"><?php _e('Newsletter', 'ia3'); ?>:</label>
<input id="darth-vader" name="" type="text" value="" />
<input type="hidden" value="kennethreitz" name="uri"><input type="hidden" name="loc" value="en_US">
<input id="darth-vader" name="email" type="text" />
<input type="submit" value="<?php _e('Subscribe', 'ia3'); ?>" />
</fieldset>
</form>
+38
View File
@@ -312,4 +312,42 @@
if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
}
header('Server: Muffins', true);
header('X-Consulting: Semantics are everything. me@kennethreitz.com for more info.');
header('X-Powered-By: The Interwebz');
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
header("X-runtime:".$totaltime);
add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';
elseif($is_IE) $classes[] = 'ie';
else $classes[] = 'unknown';
if($is_iphone) $classes[] = 'iphone';
return $classes;
}
add_filter( 'the_generator', create_function('$a', "return null;") );
function showBrief($str, $length) {
$str = strip_tags($str);
$str = explode(" ", $str);
return implode(" " , array_slice($str, 0, $length));
}
?>
+1 -1
View File
@@ -29,7 +29,7 @@ $featured_id = 0;
<?php if (has_post_thumbnail()): ?>
<img alt="<?php the_title(); ?>" src="<?php $f = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); echo isset($f[0])? $f[0]: 'http://www.placeholder-image.com/image/942x504';?>" />
<?php else: ?>
<img alt="<?php the_title(); ?>" src="<?php $f = get_post_custom_values('featured_image'); echo isset($f[0])? $f[0]: 'http://www.placeholder-image.com/image/942x504';?>" />
<!-- <img alt="<?php the_title(); ?>" src="<?php $f = get_post_custom_values('featured_image'); echo isset($f[0])? $f[0]: 'http://www.placeholder-image.com/image/942x504';?>" /> -->
<?php endif; ?>
</a>
<hgroup>
+55
View File
@@ -0,0 +1,55 @@
<?php
/**
* Template Name: Home
**/
?>
<!DOCTYPE html>
<!--[if IE 6 ]><html class="ie ielt9 ielt8 ielt7 ie6" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 7 ]><html class="ie ielt9 ielt8 ie7" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 8 ]><html class="ie ielt9 ie8" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="<?php bloginfo('language'); ?>"><!--<![endif]-->
<head>
<?php @include('inc_head.php'); ?>
</head>
<body class="page">
<div id="screen">
<?php @include('inc_body_header.php'); ?>
<article class="G4 GR GS" id="content">
<?php while (have_posts()): the_post(); ?>
<header>
<h1><?php the_title(); ?></h1>
</header>
<div class="formatted">
<?php the_content(); ?>
<nav class="similarEntries" style="margin-top: 3em;">
<h1 style="padding-top:1.5em; margin-bottom: 0.65em;">Latest Articles:</h1>
<?php $posts = get_posts('numberposts=3&order=DEC'); ?>
<?php foreach ($posts as $post): ?>
<dl class="entryList small"><dt><span style="font-size: 1.2em; margin-top: 4em;"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark"><?php echo $post->post_title ?></a></dt></span>
<dd>
<?php echo showBrief(strip_tags($post->post_content), 40) ?>&nbsp;<span class="grey">[<a class="black" href="<?php echo get_permalink($post->ID) ?>">...</a>]</span>
</dd>
<div style="height: 1em;"></div>
<?php endforeach ?>
</nav>
<p><a href="/blog/">More Articles</a></p>
</div><!-- .formatted -->
<?php endwhile; ?>
</article><!-- #content.G4.GR.GS -->
<hr class="implied" />
<?php @include('inc_body_footer.php'); ?>
</div><!-- #screen -->
</body>
</html>
+73
View File
@@ -0,0 +1,73 @@
<?php
/**
* Template Name: Project Archive
**/
?>
<!DOCTYPE html>
<!--[if IE 6 ]><html class="ie ielt9 ielt8 ielt7 ie6" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 7 ]><html class="ie ielt9 ielt8 ie7" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 8 ]><html class="ie ielt9 ie8" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="<?php bloginfo('language'); ?>"><!--<![endif]-->
<head>
<?php @include('inc_head.php'); ?>
</head>
<body class="page">
<div id="screen">
<?php @include('inc_body_header.php'); ?>
<article class="G4 GR GS" id="content">
<?php while (have_posts()): the_post(); ?>
<header>
<h1><?php the_title(); ?></h1>
</header>
<div class="formatted">
<?php the_content(); ?>
<?php
function cmp($a, $b) {
if ($a->watchers == $b->watchers) { return 0; }
return ($a->watchers < $b->watchers) ? -1 : 1;
} ?>
<div id="projects">
<?php $api = new clAPI('http://github.com/api/v1/xml/kennethreitz') ?>
<?php if ($api->parse('1 hour')): ?>
<?php foreach(array_reverse($api->xpath('//repository')) as $repo): ?>
<div>
<h2 style="margin: 1em 0 0.3em -0.8em;">
&raquo; <a href="<?php echo $repo->url ?>" class="black">
<?php echo $repo->name ?>
<?php if ($repo->fork == 'true'): ?>
<span class="grey">&nbsp;#fork</span>
<?php endif?>
</a>
</h2>
<p>
<?php echo $repo->description ?> <br />
<span class="grey">
<a href="http://github.com/kennethreitz/<?php echo $repo->name ?>/zipball/HEAD" class="file zip grey"><span class="fileType">ZIP</span></a>
<a href="http://github.com/kennethreitz/<?php echo $repo->name ?>/tarball/HEAD" class="file tar grey"><span class="fileType">TAR</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
Watchers: <?php echo $repo->watchers ?> &nbsp;&nbsp;&nbsp;&nbsp;
Issues: <a class="test" href="#"><?php echo $repo->open-issues ?></a>
<span>
</p>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div><!-- .formatted -->
<?php endwhile; ?>
</article><!-- #content.G4.GR.GS -->
<hr class="implied" />
<?php @include('inc_body_footer.php'); ?>
</div><!-- #screen -->
</body>
</html>
+66
View File
@@ -0,0 +1,66 @@
<?php
/**
* Template Name: Tutorials
**/
?>
<!DOCTYPE html>
<!--[if IE 6 ]><html class="ie ielt9 ielt8 ielt7 ie6" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 7 ]><html class="ie ielt9 ielt8 ie7" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 8 ]><html class="ie ielt9 ie8" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="<?php bloginfo('language'); ?>"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="<?php bloginfo('language'); ?>"><!--<![endif]-->
<head>
<?php @include('inc_head.php'); ?>
</head>
<body class="page">
<div id="screen">
<?php @include('inc_body_header.php'); ?>
<article class="G4 GR GS" id="content">
<?php while (have_posts()): the_post(); ?>
<header>
<h1><?php the_title(); ?></h1>
</header>
<div class="formatted">
<?php the_content(); ?>
<?php
$tags = array();
$tagnames = array();
$posts = get_posts('cat=160&numberposts=-1&order=DEC'); //get all posts in category
foreach ($posts as $post){
$posttags = get_the_tags($post->ID); //check for tags
if ($posttags){
foreach ($posttags as $posttag){
$tags[$posttag->term_id] = $posttag; // add to array of tag ids => names
// $tagnames[$posttag->term_id] = $posttag->name;
}
}
}
?>
<?php foreach ($tags as $tag): ?>
<h2 style="font-size: 130%;"><?php echo $tag->name ?></h2>
<?php wp_reset_query(); ?>
<?php $posts = get_posts('cat=160&tag='.$tag->slug); ?>
<ol>
<?php foreach ($posts as $post): ?>
<li style="font-style: normal;"><a href="<?php echo get_permalink($post->ID) ?>"><?php echo $post->post_title ?></a></li>
<?php endforeach ?>
</ol>
<?php endforeach ?>
</div><!-- .formatted -->
<?php endwhile; ?>
</article><!-- #content.G4.GR.GS -->
<hr class="implied" />
<?php @include('inc_body_footer.php'); ?>
</div><!-- #screen -->
</body>
</html>
+31 -8
View File
@@ -23,6 +23,22 @@ body {
article,aside,details,figcaption,figure,footer,header,hgroup,img,menu,nav,section,svg {
display: block
}
.wp_syntax {
font: 12px/14px 'Inconsolata', 'Consolas', 'Monaco', mono;
font-family: 'Inconsolata', 'Consolas', 'Monaco', mono !important;
}
.wp_syntax table {
border-spacing: 0px 0px;
border-collapse: collapse;
empty-cells: show;
font-size: 100%;
margin-bottom: -16px;
}
.line_numbers {
width: 20px;
color: lightgrey;
}
.ie img {
-ms-interpolation-mode: bicubic
@@ -97,7 +113,7 @@ input,select {
top: -999px;
width: 1px
}
address,blockquote,caption,cite,code,dl,figcaption,h1,h2,h3,h4,h5,h6,label,legend,ol,p,pre,ul,table {
address,blockquote,caption,cite,dl,figcaption,h1,h2,h3,h4,h5,h6,label,legend,ol,p,pre,ul,table {
display: block;
font: normal normal 400 1em/1.5em 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
list-style: none;
@@ -540,7 +556,7 @@ label.HSC {
padding-bottom: 3em
}
#content h1{
font-size: 200%;
font-size: 160%;
line-height: 1.3334em;
margin-bottom: 0px;
}
@@ -558,11 +574,7 @@ label.HSC {
margin-bottom: 2em;
position: relative
}
#content header h1 {
font-size: 200%;
line-height: 1.3334em;
margin-bottom: 0
}
#content header h2 {
font-size: 87.5%;
font-style: italic;
@@ -1166,14 +1178,25 @@ white-space: pre;
-webkit-font-smoothing: antialiased
}
.wp_syntax {
font: 14px/15px 'Inconsolata', 'Consolas', 'Monaco', mono;
font: 12px/14px 'Inconsolata', 'Consolas', 'Monaco', mono;
font-family: 'Inconsolata', 'Consolas', 'Monaco', mono !important;
}
.line_numbers {
width: 18px;
}
#content object {
display: none;
}
.wp_syntax table {
border-spacing: 0px 0px;
border-collapse: collapse;
empty-cells: show;
font-size: 100%;
margin-bottom: 20px;
}
#comments h1 {
font-size: 20px;
}
}