Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'banana'

  • Loading branch information...
commit 529342010fd044ebdf44be9eb0d0343676a49530 2 parents ad26735 + 7e8423f
@redoPop redoPop authored
View
5 _config.yml
@@ -1,4 +1,3 @@
----
-paginate: 1
+paginate: 5
permalink: pretty
-pygments: true
+pygments: true
View
13 _drafts/cakephp-json-stringkeys.textile
@@ -1,13 +0,0 @@
-How Not to use stringKeys in CakePHP's JavaScript Helper
-
-Lesson learned: don't rely on stringKeys
-
-$javascript->useNative = false;
-e($javascript->object($planets, array(
- 'stringKeys' => array('id', 'order'),
- 'quoteKeys' => false,
-)));
-
-if for some reason
-
-,"order":}},{
View
63 _drafts/cakephp-security.textile
@@ -1,63 +0,0 @@
----
-layout: post
-title: Securing your CakePHP Apps
----
-
-This post is about securing your CakePHP apps from CSRF attacks, field planting, and record hijacking.
-
-CSRF attacks occur when ... To help you protect against such attacks, CakePHP provides a Security Component, which adds a nonce to every form. The form won't be processed unless the nonce is matched on receipt. This isn't a perfect solution--the user could have a malicious browser plugin which reads the nonce
-
----things to be aware of about security compontent: no debug info, etc.---
-
-I recommend including the Security component from your app_controller so you don't forget it inside any individual controller.
-
-Security Component has another feature: tokenizing the fields included in your form to make sure the user isn't tampering with it by adding fields you don't want. For example:
-
-...
-
->>>You'll have to forgive my opening and closing PHP tags, it's how RedCloth knows to add syntax highlighting. In reality, you wouldn't have those around your code.
-
-This could be a problem if you have a field like "User.account_expires", which the user could plant in their profile edit form. By tokenizing the form fields, Security Component prevents such field planting from happening.
-
-This feature of Security Component can create problems if you add extra fields to your form using JavaScript; for example, to allow a user to add several records from one page without refreshing.
-
-The Model::save and ::saveAll methods both accept a fieldList: a whitelist of fields you want the user to save.
-
-...
-
-Just don't forget to include generated fields in the whitelist (e.g., "created", "modified", "slug").
-
-If you want to turn tokenizing off ...
-
-...
-
-Whitelists don't prevent record hijacking, a variation of field planting in which a field isn't actually planted but merely altered.
-
-Record hijacking usually occurs on a record editing screen, where the user can manipulate the hidden "id" field included to tell Cake which record to save. If user A changes the value of the "id" field to one of user B's record ID's, user A will hijack that record from user B on saving it, unless you have protection in place. You may already be protecting against this using a custom validation function. SecurityComponent itself won't allow you to manipulate ---any?--- hidden field,
-
-...
-
-A variation of record hijacking I call record planting, where instead of manipulating an existing record's foreign key or id, the user creates a record and manipulates a hidden field containing a foreign key like user_id, denoting that the record belongs to a user. Here, instead of hijacking an existing record belonging to user B, user A can plant a record on user B--probably to frame a murder confession--by manipulating the user_id field to match user B's.
-
-When a record is created, you'll definitely want to save the user_id, so you can't get around this simply by eliminating that field from your fields whitelist. You can, however, eliminate the field from your form and rely on Session data to provide the user_id within the action:
-
-<?php
-...
-function edit($id = null) {
- if (!empty($this->data)) {
- $this->data['Record']['user_id'] = $this->Session->read('Auth.User.id');
- if ($this->Record->save($this->data)) {
- ....
-?>
-
-...
-
-This problem is a little trickier for foreign keys when ownership of a record is abstracted, for example: if a Record belongs directly to a Portfolio which belongs to a User. With that sort of abstracted ownership, record planting can also occur from edit screens, where the user can change the Portfolio a Record belongs to (and therefore user A can assign the Record to a Portfolio he doesn't own). You may not have a list of all the current user's portfolios in the Session, so to protect against this form of record planting, you'll have to use a custom validation rule, much like the I recommended for preventing record hijacking.
-
-...
-
-One last note: the delete method that comes with baked controllers is an abomination. Avoid it. At the beginning of this post, I mentioned CSRF attacks as something you want to protect against. If a malicious site knows the ID of a record on your app it wants deleted, said malicious site need only trick the owner of that record into visiting the malicious site, and it can delete the record by making a straightforward GET request to the delete method (a CSRF attack). And that's not the only reason to avoid the controllers' baked delete method: it actually breaks the guidelines for an HTTP GET transaction because it permanently alters data in such a way that the request isn't repeatable.
-
-Both these problems can be avoided in most cases by using SecureComponent and setting up a simple delete view that contains a form with a hidden record "id" field and a button to confirm the user wants to delete the record in question, then modifying the delete action to use the form value in $this->data instead of the action's parameter, just as you would for an edit action. Just don't forget to verify that the user owns the record they're about to delete; deletion too is susceptible to record hijacking!
-
-This post isn't the be-all and end-all of building CakePHP apps with security in mind; it just covers some of the basic things I think get overlooked too frequently.
View
80 _drafts/finding-nearby-places-with-mysql.textile
@@ -1,80 +0,0 @@
----
-layout: post
-title: Finding Nearby Places with MySQL
----
-
-I'm ashamed to admit I barely grasp non-Euclidean geometry. "This guy":http://www.movable-type.co.uk/scripts/latlong-db.html does, but in case his site goes down, I here impart the magic he teaches.
-
-This post is relevant to your interests if:
-# You have a table of coordinates (latitudes and longitudes) of some places, and
-# You want to know which places are near a specific coordinate (which I'll call your "origin")
-
-I assume the latitudes and longitudes of your coordinates are represented in degrees as signed decimal numbers (e.g., lat @51.501978@, lon @-0.141932@ for Buckingham Palace). Before you dip into any magical MySQL math, convert the latitude and longitude of your origin coordinate to radians (e.g., lat @0.898879087389684@, lon @-0.00247718071394059@). In PHP, you can use @deg2rad@ to do this.
-
-Here's a query to find the distance in kilometers of each place from your origin:
-
-<pre><code>SELECT
- ACOS(
- SIN(0.898879087389684) * # lat in rads
- SIN(RADIANS(places.lat)) +
- COS(0.898879087389684) * # lat in rads
- COS(RADIANS(places.lat)) *
- COS(RADIANS(places.lon) - -0.00247718071394059) # lon in rads
- ) * 6371 AS distance_in_km
-FROM places</code></pre>
-
-6371 is the radius of earth in kilometers. Don't speak metric? Replace that number with 3959 and the same query works in miles.
-
-Theoretically, you could modify that query to return only places whose distance_in_km is less than some number, but that's hecka math to throw at any big table. A simpler, slightly sketchier method is to calculate the maximum and minimum latitudes and longitudes acceptable--a square boundary for our results:
-
-<pre><code><?php
-$within = 100; # a radius of 100 km
-$lat = 51.501978; # latitude of origin in degrees
-$lon = -0.141932; # longitude of origin in degrees
-
-$minLat = $lat - rad2deg($within/6371);
-$maxLat = $lat + rad2deg($within/6371);
-$minLon = $lon - rad2deg($within/6371/cos(deg2rad($lat)));
-$maxLon = $lon + rad2deg($within/6371/cos(deg2rad($lat)));
-?></code></pre>
-
-That code calculates the positions of the 4 sides of a square that would bind a giant circle drawn around our point of origin; the radius of the circle being 100 kilometers. (Again, switch 3959 for 6371 and that becomes 100 __miles__.) Here's what it calculates for my example origin coordinate:
-
-<pre><code>$minLat : 50.6026563941
-$maxLat : 52.4012996059
-$minLon : -1.5866540781
-$maxLon : 1.3027900781</code></pre>
-
-The SQL to select places within that bounding box should be pretty obvious:
-
-<pre><code>SELECT *
-FROM places
-WHERE
- places.lat BETWEEN 50.6026563941 # $minLat
- AND 52.4012996059 # $maxLat
- AND places.lon BETWEEN -1.5866540781 # $minLon
- AND 1.3027900781 # $maxLon</code></pre>
-
-If you aren't too concerned that your results will include a few places in the corner of the bounding square--technically just outside the 100 km radius we're searching within--the above query is all you need. Otherwise, this query combines the two methods I've described here, first limiting results within a bounding box, then refining them using the more accurate distance calculation method:
-
-<pre><code>SELECT *,
- ACOS(
- SIN(0.898879087389684) * # lat in rads
- SIN(RADIANS(places.lat)) +
- COS(0.898879087389684) * # lat in rads
- COS(RADIANS(places.lat)) *
- COS(RADIANS(places.lon) - -0.00247718071394059) # lon in rads
- ) * 6371 AS distance_in_km
-FROM places
-WHERE
- places.lat BETWEEN 50.6026563941 # $minLat
- AND 52.4012996059 # $maxLat
- AND places.lon BETWEEN -1.5866540781 # $minLon
- AND 1.3027900781 # $maxLon
-GROUP BY places.id
- HAVING distance_in_km < 100
-ORDER BY distance_in_km ASC
-LIMIT 10
-</code></pre>
-
-I put the hard math in the SELECT part of the query and use GROUP BY..HAVING to make sure it's only done on results within the bounding box. Here I've also used ORDER BY and LIMIT to reduce my results to the 10 nearest places.
View
6 _drafts/google-ajax-libraries-dev-switch.textile
@@ -1,6 +0,0 @@
----
-layout: post
-title: Google Ajax Libraries Dev Switch
----
-
-http://snipplr.com/view/15538/google-ajax-libraries-api-handler-for-cakephp/
View
18 _includes/about.html
@@ -1,18 +0,0 @@
-<footer class="footer">
- <section class="footer-section">
- <address class="author vcard">
- <a class="fn url" href="http://jdbartlett.com/">joe bartlett</a> |
- <a class="email" href="mailto:xo@jdbartlett.com">xo@jdbartlett.com</a> |
- <span class="tel">+1.605.610.9433</span>
- </address>
-
- <nav class="elsewhere">
- <ul>
- <li><a class="twitter" href="http://twitter.com/jdbartlett">twitter</a></li>
- <li><a class="tumblr" href="http://jdbartlett.tumblr.com">tumblr</a></li>
- <li><a class="lastfm" href="http://last.fm/user/jdbartlett">last.fm</a></li>
- <li><a class="github" href="http://github.com/jdbartlett">github</a></li>
- </ul>
- </nav>
- </section>
-</footer>
View
6 _includes/archive-aside.html
@@ -0,0 +1,6 @@
+<aside class="archive">
+ <nav class="banner" role="navigation">
+ <h2 class="h2">Archive</h2>
+ {% include archive-list.html %}
+ </nav>
+</aside>
View
8 _includes/archive-list.html
@@ -0,0 +1,8 @@
+<ol>
+{% for post in site.posts %}
+ <li>
+ <span>{{ post.date | date_to_string }}</span>
+ <a href="{{ post.url }}">{{ post.title }}</a>
+ </li>
+{% endfor %}
+</ol>
View
16 _includes/archive.html
@@ -1,16 +0,0 @@
-<aside class="footer foam">
-
- <nav class="footer-section archive">
- <h2>archive</h2>
-
- <ol>
- {% for post in site.posts %}
- <li>
- <span>{{ post.date | date_to_string }}</span>
- <a href="{{ post.url }}">{{ post.title }}</a>
- </li>
- {% endfor %}
- </ol>
- </nav>
-
-</aside>
View
13 _includes/head.html
@@ -0,0 +1,13 @@
+<head>
+ <meta charset="utf-8">
+
+ <title>{{ page.title }}</title>
+ <meta name="description" content="Joe Bartlett is a web developer near Minneapolis, MN.">
+
+ <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1">
+
+ <link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/jdbartlett">
+
+ <link rel="stylesheet" href="/css/style.css">
+ <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
+</head>
View
4 _includes/header.html
@@ -0,0 +1,4 @@
+<header class="banner title" role="banner">
+ <h2 class="h1"><a href="/" rel="author">Joe Bartlett</a></h2>
+ <h3 class="h3">Developer! World Wide Web-slinger!</h3>
+</header>
View
32 _includes/post.html
@@ -1,12 +1,22 @@
-<article class="content hentry">
- <header class="content-header">
- <abbr class="info published" title="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</abbr>
- <h2 class="entry-title"><a href="{{ post.url }}" rel="bookmark" title="Permalink to {{ post.title }}">{{ post.title }}</a></h2>
+<article class="article" itemscope itemtype="http://schema.org/BlogPosting">
+ <header class="header container">
+ <time class="info" itemprop="datePublished" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time>
+ <h1 class="h2" itemprop="headline"><a href="{{ post.url }}" rel="bookmark" title="Permalink to {{ post.title }}">{{ post.title }}</a></h1>
+ <link itemprop="url" href="{{ post.url }}">
</header>
-
- <div class="entry-content">{{ content }}</div>
-
- <footer class="content-footer">
- <a href="http://twitter.com/?status=@jdbartlett+">tweet me</a>
- </footer>
-</article>
+
+ <section class="body container copy">{{ content }}</section>
+
+ <section class="comments container">
+ <div id="disqus_thread"></div>
+ <script>
+ var disqus_shortname = 'jdbartlett';
+
+ (function() {
+ var dsq = document.createElement('script');
+ dsq.src = 'http://jdbartlett.disqus.com/embed.js';
+ document.getElementsByTagName('head')[0].appendChild(dsq);
+ })();
+ </script>
+ </section>
+</article>
View
7 _layouts/archive.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<html lang="en">
+{% include head.html %}
+<body class="archives">
+{{ content }}
+</body>
+</html>
View
37 _layouts/default.html
@@ -1,34 +1,7 @@
-<!doctype html public "joe.reduce(function(p,c){return p+c})/joe.length">
-<!--[if lt IE 8 ]> <html lang="en" class="oldie"> <![endif]-->
-<!--[if (gt IE 7)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
-<head>
- <meta charset="UTF-8" />
- <title>{{ page.title }} | jdbartlett</title>
- <meta name="description" content="Developer! World Wide Web-slinger!">
- <meta name="author" content="jdbartlett.com">
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/jdbartlett">
-
- <link href="http://fonts.googleapis.com/css?family=IM+Fell+DW+Pica" rel="stylesheet" type="text/css">
- <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen">
- <link rel="stylesheet" type="text/css" href="/css/print.css" media="print">
-
- <!--[if IE]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
-</head>
-
+<!doctype html>
+<html lang="en">
+{% include head.html %}
<body>
- <header class="tag">
- <div class="stitched">
- <h1><a href="/">joe bartlett</a></h1>
- <p class="stitched-sub">web developer | 100% cotton</p>
- </div>
- </header>
-
- {{ content }}
-
- {% include archive.html %}
- {% include about.html %}
+{{ content }}
</body>
-</html>
+</html>
View
7 _layouts/front.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<html lang="en">
+{% include head.html %}
+<body class="front">
+{{ content }}
+</body>
+</html>
View
3  _layouts/post.html
@@ -1,6 +1,7 @@
---
layout: default
---
-
{% assign post = page %}
+{% include header.html %}
{% include post.html %}
+{% include archive-aside.html %}
View
14 archive.html
@@ -0,0 +1,14 @@
+---
+layout: archive
+title: Articles by Joe Bartlett
+---
+<div class="title-wrap">
+ {% include header.html %}
+</div>
+
+<section class="archive">
+ <nav class="banner" role="navigation">
+ <h1 class="h2">Blog Archive</h1>
+ {% include archive-list.html %}
+ </nav>
+</section>
View
32 atom.xml
@@ -3,25 +3,21 @@ layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>jdbartlett | mediumtext</title>
- <link href="http://jdbartlett.github.com/atom.xml" rel="self" />
- <link href="http://jdbartlett.github.com/" />
- <id>http://jdbartlett.github.com/</id>
+ <title>Joe Bartlett</title>
+ <link href="http://jdbartlett.com/atom.xml" rel="self" />
+ <link href="http://jdbartlett.com/" />
+ <id>http://jdbartlett.com/</id>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<author>
- <name>joe bartlett</name>
- <email>blog@jdbartlett.com</email>
+ <name>Joe Bartlett</name>
+ <email>xo@jdbartlett.com</email>
</author>
-
{% for post in site.posts %}
- <entry>
- <title>{{ post.title | xml_escape }}</title>
- <link href="http://jdbartlett.github.com{{ post.url | xml_escape }}" />
- <id>http://jdbartlett.github.com{{ post.url }}</id>
- <updated>{{ post.date | date_to_xmlschema }}</updated>
- <content type="html">{{ post.content | xml_escape }}</content>
- </entry>
- {% endfor %}
-
-</feed>
+ <entry>
+ <title>{{ post.title | xml_escape }}</title>
+ <link href="http://jdbartlett.com{{ post.url | xml_escape }}" />
+ <id>http://jdbartlett.com{{ post.url }}</id>
+ <updated>{{ post.date | date_to_xmlschema }}</updated>
+ <content type="html">{{ post.content | xml_escape }}</content>
+ </entry>{% endfor %}
+</feed>
View
11 css/print.css
@@ -1,11 +0,0 @@
-body {
- font: 1em georgia, times new roman, serif;
-}
-
-.entry-content a:after {
- content: " <" attr(href) ">";
-}
-
-footer {
- display:none;
-}
View
407 css/style.css
@@ -1,16 +1,10 @@
-/*
-Pal:
-Lgt Yell: FCFF9E
-Dk Yell: FFD000
-Blu: 7DCAFF
-Pink: FFC2F3
-Mauv: C679C7
-*/
+/* Fonts */
+@import url(http://fonts.googleapis.com/css?family=Lato);
-/* Yahoo! CSS reset */
-body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
+/* Tailored YUI3 Reset */
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,html,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}
-/* Teach HTML5 to be blocky */
+/* HTML5 Blocks */
article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block;}
/* Syntax highlighting rules */
@@ -75,242 +69,313 @@ article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,sec
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
-/* Elements */
-html {
+/* Tag Styles */
+a { color:#0C7ADF; }
+a:visited { color:#B669B7; }
+body {
+ color:#222;
+ font:1em/1.6 "Lucida Sans Unicode","Lucida Grande","Lucida Sans",Verdana,Arial,sans-serif;
+}
+body, .title-wrap {
background:#deedfe;
-
+
background-image:-moz-linear-gradient(left, #deedfe, #7dcaff, #deedfe); /* FF3.6 */
background-image:-webkit-gradient(linear,left top,right top,color-stop(0, #deedfe),color-stop(0.5, #7dcaff),color-stop(1, #deedfe)); /* Saf4+, Chrome */
filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#7dcaff', EndColorStr='#deedfe'); /* IE6,IE7 */
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#7dcaff', EndColorStr='#deedfe')"; /* IE8 */
}
-body {
- background:transparent url(/img/houndstooth.png) center -20px;
- color:#222;
- font:0.9em "Lucida Sans Unicode","Lucida Grande","Lucida Sans",Verdana,Arial,sans-serif;
- padding:2em 0 0 0;
- line-height:1.6em;
-}
-
-a { color:#0c7adf; }
-a:visited { color:#b669b7; }
em { font-style:italic; }
-h1, h2, h3, h4, h5, h6 { line-height:1.2em; }
-h1 a, h1 a:visited, h2 a, h2 a:visited, h3 a, h3 a:visited, h4 a, h4 a:visited, h5 a, h5 a:visited, h6 a, h6 a:visited { color:#222; text-decoration:none; }
-h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { text-decoration:underline; }
-h2, h4, h5, h6 { font-family:Lucida Sans,Lucida Grande,Lucida Sans Unicode,sans-serif; }
-h1 { font:3.4em 'IM Fell DW Pica',Garamond,Hoefler Text,Palatino,Palatino Linotype,serif; line-height:1; }
-h2 { font-size:2em; }
-h3 { font:1.6em GillSans,Trebuchet,Calibri,sans-serif; }
-h4 { font-size:1.6em; }
-h5 { font-size:1.2em; }
img { max-width:100%; }
ins { background:#fcff9e; border:0.3em solid #fcff9e; border-left:none; border-right:none; text-decoration:none; }
strong { font-weight:bold; }
-/* Header tag */
-.tag {
- background:#fff;
- border-bottom:1px solid #7dcaff;
- border-top:1px solid #7dcaff;
+/* General Classes */
+.h1, .h2, .h3 {
+ font-family:"Lato";
+ line-height:1.2;
+ text-transform:lowercase;
+}
+.h1 { font-size:3.4em; }
+.h2 { font-size:2em; }
+.h3 { font-size:1.6em; }
+
+/* Container element */
+.banner, .container {
margin:0 auto;
- padding:1ex;
- max-width:24em;
- text-align:center;
-
- background-image:-moz-linear-gradient(left, #f9f9f9, #ffffff); /* FF3.6 */
- background-image:-webkit-gradient(linear,left top,right top,color-stop(0, #f9f9f9),color-stop(1, #ffffff)); /* Saf4+, Chrome */
- filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorStr='#f9f9f9', EndColorStr='#ffffff'); /* IE6,IE7 */
- -ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorStr='#f9f9f9', EndColorStr='#ffffff')"; /* IE8 */
-
- -moz-transform:rotate(2.5deg); /* FF3.5+ */
- -o-transform:rotate(2.5deg); /* Opera 10.5 */
- -webkit-transform:rotate(2.5deg); /* Saf3.1+, Chrome */
- -ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.9990482215818578, M12=-0.043619387365336, M21=0.043619387365336, M22=0.9990482215818578)"; /* IE8 */
- zoom:1;
+ overflow:hidden;
+}
+.banner {
+ max-width:800px;
+}
+.container {
+ max-width:720px;
+ padding:0 40px;
}
- .stitched {
- border:2px dashed #0C9AFF;
- padding:1ex 0;
-
- -moz-border-radius: 3px; /* FF1+ */
- -webkit-border-radius: 3px; /* Saf3+, Chrome */
- border-radius: 3px; /* Opera 10.5, IE 9 */
- }
- .stitched-sub {
- font-size:0.9em;
- margin:-0.4em 0 0 0;
- }
-/* Content sections */
-.content {
- background:#fff;
- border-bottom:1.2ex solid #FFC2F3;
- margin:2.5em auto;
- padding:3em;
- max-width:48em;
+/* Copy styles */
+.copy {
+ font-size:0.9em;
}
- .content blockquote, .content dl, .content fieldset, .content ol, .content p, .content pre, .content table, .content ul { margin:1.2em 0; }
- .content h3 { margin:1.2em 0 -0.6em; }
-
- .content-header {
- background:#FFC2F3;
- border-bottom:2px solid #C679C7;
- margin:-3em -3em 2em -3em;
- padding:1em 3em 0.8em;
+ .copy blockquote, .copy dl, .copy fieldset, .copy ol, .copy p, .copy pre, .copy table, .copy ul { margin:1.2em 0; }
+ .copy h1 a, .copy h2 a, .copy h3 a {
+ color:#222;
+ text-decoration:none;
}
- .content-header .info {
- color:#443344;
- float:right;
- }
-
- .content code,
- .content pre {
+ .copy h1 a:hover, .copy h2 a:hover, .copy h3 a:hover {
+ text-decoration:underline;
+ }
+ .copy h1, .copy h2, .copy h3 {
+ font-family:GillSans, Trebuchet, Calibri, sans-serif;
+ margin:1.2em 0 -0.6em;
+ }
+ .copy h1 { font-size:3.4em; }
+ .copy h2 { font-size:2em; }
+ .copy h3 { font-size:1.6em; }
+ .copy h4 { font-size:1.6em; }
+ .copy h5 { font-size:1.2em; }
+ .copy code,
+ .copy pre {
background:#FCFF9E;
font:0.9em "Monaco","lucida console","bitstream vera sans mono",monospace;
}
- .content code {
+ .copy code {
border:0.4ex solid #FCFF9E;
padding:0 0.2ex;
vertical-align:middle;
}
- .content pre {
+ .copy pre {
background:#FCFF9E;
max-width:100%;
overflow-x:auto;
padding:0 2ex;
}
- .content pre code {
+ .copy pre code {
background:transparent;
border:none;
font-size:100%;
padding:0;
}
-
- .content ol li {
+ .copy ol li {
list-style-type:decimal;
margin:1.2em 0 1.2em 3em;
}
- .content ol li ol li,
- .content ol li ul li,
- .content ul li ol li,
- .content ul li ul li {
+ .copy ol li ol li,
+ .copy ol li ul li,
+ .copy ul li ol li,
+ .copy ul li ul li {
margin:0 1em;
}
- .content ul li {
+ .copy ul li {
list-style-type:disc;
margin-left:2em;
}
- .content ul li ul {
+ .copy ul li ul {
margin:0.3ex 0 0.3ex 1em;
}
- .content ul li ul li {
+ .copy ul li ul li {
list-style-type:circle;
}
- .content ul li ul li ul li {
+ .copy ul li ul li ul li {
list-style-type:square;
}
-
- .content table {
+ .copy table {
border-bottom:2px solid #FFD000;
border-top:2px solid #FFD000;
width:100%;
}
- .content td {
+ .copy td {
padding:0.2ex 0.4ex;
}
- .content tr:nth-child(even) {
+ .copy tr:nth-child(even) {
background:#FFE2F3;
}
-
- .content-footer {
- margin:0;
+
+/* Front Page */
+.front {
+ background:#FFF;
+}
+.card {
+ line-height:2;
+ padding-bottom:20px;
+ text-transform:lowercase;
+}
+ .card header {
+ background-color: #7dcaff;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(125, 202, 255)), to(rgb(12, 122, 223)));
+ background-image: -webkit-linear-gradient(top, rgb(125, 202, 255), rgb(12, 122, 223));
+ background-image: -moz-linear-gradient(top, rgb(125, 202, 255), rgb(12, 122, 223));
+ background-image: -o-linear-gradient(top, rgb(125, 202, 255), rgb(12, 122, 223));
+ background-image: -ms-linear-gradient(top, rgb(125, 202, 255), rgb(12, 122, 223));
+ background-image: linear-gradient(top, rgb(125, 202, 255), rgb(12, 122, 223));
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#7dcaff', EndColorStr='#0c7adf');
+
+ color:#FFF;
+ overflow:hidden;
+ margin-bottom:20px;
+ padding:10% 0 10px;
+ text-shadow: 1px 1px 2px #053A6F;
+ width:100%;
+ }
+ .card h1, .card dl {
+ float:left;
+ margin-right:40px;
text-align:right;
+ width:48%;
+ }
+ .card nav {
+ overflow:hidden;
+ }
+ .card dt {
+ display:none;
+ }
+ .card .h3 {
+ margin-bottom:10px;
}
-/* Footer parts */
-.footer {
+/* Title */
+.title {
+ padding-bottom:20px;
+ padding-top:5px;
+}
+ .title a, .title .h1, .title .h3 {
+ color:#FFF;
+ text-decoration:none;
+ }
+ .title a:hover:before {
+ content: '[ ';
+ }
+ .title a:hover:after {
+ content: ' ]';
+ }
+ .title .h1, .title .h3 {
+ display:inline-block;
+ margin-right:15px;
+ text-shadow: 1px 1px 2px #053A6F;
+ }
+
+/* Article */
+.article { }
+ .article .header {
+ background:#FFC2F3;
+ border-bottom:2px solid #C679C7;
+ padding-bottom:15px;
+ padding-top:15px;
+ }
+ .article .header .h2 {
+ text-transform:none;
+ }
+ .article .header a {
+ color:#222;
+ text-decoration:none;
+ }
+ .article .header a:hover {
+ text-decoration:underline;
+ }
+ .article .header .info {
+ color:#443344;
+ float:right;
+ font-size:0.9em;
+ line-height:2.7em;
+ }
+ .article .body,
+ .article .comments {
+ background:#FFF;
+ border-bottom:7px solid #FFC2F3;
+ padding-bottom:10px;
+ padding-top:10px;
+ }
+ .article .comments {
+ background:rgba(255, 255, 255, 0.95);
+ color:#333;
+ font-size:0.9em;
+ margin-bottom:60px;
+ padding-top:20px;
+ }
+
+/* Archive section */
+.archives {
background:#FCFF9E;
+}
+.archive {
+ background:#FCFF9E;
+ border-top:4px solid #FFD000;
color:#331;
line-height:1.8em;
- width:100%;
+ padding:20px 0;
}
- .footer a {
+ .archive li {
+ margin:4px 0;
+ }
+ .archive span {
+ color:#555533;
+ display:inline-block;
+ float:left;
+ font-size:0.9em;
+ line-height:2em;
+ min-width:7em;
+ padding:1px 0;
+ }
+ .archive a {
background:#FFF;
- border:0.4ex solid #FFF;
color:#C679C7;
- padding:0 0.2ex;
+ display:inline-block;
+ padding:1px 6px;
text-decoration:none;
- vertical-align:middle;
}
- .footer a:hover {
+ .archive a:hover {
background:#C679C7;
- border-color:#C679C7;
color:#FFF;
}
-.foam {
- border-top:4px solid #FFD000;
- margin:2.5em 0 0 0;
- padding-top:2em;
-}
-.footer-section {
- margin:0 auto;
- max-width:54em;
- overflow:hidden;
-}
-.archive ol {
- font-size:1.2em;
-}
-.archive li {
- margin:0.1em 0;
-}
-.archive span {
- color:#555533;
- font-size:0.8em;
- float:left;
- line-height:2em;
- min-width:7em;
-}
-.author, .elsewhere {
- float:left;
- margin:1.6em 0 0.8em;
- width:50%;
+
+/* Screens narrower than .container max-width + padding */
+@media screen and (max-width: 800px) {
+ /* Banners behave same as containers */
+ .banner {
+ max-width:720px;
+ padding-left:40px;
+ padding-right:40px;
+ }
+
+ /* Article */
+ .article .comments {
+ border-bottom:none;
+ margin-bottom:0;
+ }
}
- .elsewhere li {
- float:right;
- margin-right:1.4em;
+
+/* iPhones etc. */
+@media screen and (max-width: 480px) {
+ /* Banners and containers need less padding */
+ .banner, .container {
+ max-width:740px;
+ padding-left:20px;
+ padding-right:20px;
}
-/* iPhone (P), Android Browser (P): */
-@media screen and (max-width: 480px) and (orientation: portrait) {
- h2 {
- font-size:1.6em;
+ /* Title */
+ .title,
+ .article .header {
+ font-size:60%;
}
- .content {
- padding:1em;
+ .title {
+ padding-bottom:10px;
}
- .content-header {
- margin:-1em -1em 2em -1em;
- padding:1em 1em 0.8em;
- }
- .archive span {
+
+ /* Card Page */
+ .card br {
display:none;
}
- .author, .elsewhere, .elsewhere li {
+ .card header {
+ padding:5px 0 10px;
+ }
+ .card nav, .card h1, .card dl {
float:none;
+ margin:0;
+ padding:0 20px;
+ text-align:left;
+ width:auto;
+ }
+ .card nav {
+ margin:15px 0 0;
}
}
-
-/* Old IE */
-.oldie .tag {
- width:24em;
-}
-.oldie .content {
- width:48em;
-}
-.oldie .footer-section {
- width:54em;
-}
-.oldie .archive span {
- width:7em;
-}
View
BIN  img/houndstooth.png
Deleted file not rendered
View
35 index.html
@@ -1,9 +1,32 @@
---
-layout: default
-title: joe bartlett
+layout: front
+title: Joe Bartlett
---
+<section class="card" itemscope itemtype="http://schema.org/Person">
+ <header role="banner">
+ <h1 class="h1" itemprop="name">Joe<br> Bartlett</h1>
+ </header>
-{% for post in paginator.posts %}
- {% assign content = post.content %}
- {% include post.html %}
-{% endfor %}
+ <dl>
+ <dt id="job-title">Job</dt>
+ <dd class="h3" itemprop="jobTitle" aria-labelledby="job-title">Web Developer</dd>
+
+ <dt id="url">URL</dt>
+ <dd><a href="http://jdbartlett.com/" itemprop="url" aria-labelledby="url" rel="bookmark">jdbartlett.com</a></dd>
+
+ <dt id="email">Email</dt>
+ <dd><a href="mailto:xo@jdbartlett.com" itemprop="email" aria-labelledby="email">xo@jdbartlett.com</a></dd>
+
+ <dt id="phone">Phone</dt>
+ <dd itemprop="telephone" aria-labelledby="phone">+1 (605) 610-9433</dd>
+ </dl>
+
+ <nav role="navigation">
+ <h3 class="h3">As seen on:</h3>
+ <u2>
+ <li><a href="http://github.com/jdbartlett" rel="me external" target="_blank">GitHub</a></li>
+ <li><a href="http://twitter.com/jdbartlett" rel="me external" target="_blank">Twitter</a></li>
+ <li><a href="/archive" rel="archives">My Blog</a></li>
+ </ul>
+ </nav>
+</section>
View
2  robots.txt
@@ -1 +1,3 @@
+User-agent: *
+Allow: /
Sitemap: http://jdbartlett.github.com/sitemap.xml
View
198 screen.css
@@ -1,198 +0,0 @@
-@import url(reset.css);
-@import url(syntax.css);
-
-html {
- background:#6945b6 url(http://static.tumblr.com/rensj7n/7i9kj5idv/pattern.png);
-}
-body {
- color:#000;
- font-family:Georgia,Palatino,Palatino Linotype,Times,Times New Roman,serif;
- font-size:90%;
- line-height:1.4;
- margin:0 auto;
- max-width:700px;
-}
-
-a {
- color:inherit;
-}
- a:hover {
- text-decoration:none;
- }
-
-a.prev, a.next, div.hentry abbr.published, div.header, h1, h2, h3, h4, .vcard .fn {
- font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
- line-height:1;
-}
-h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
- text-decoration:none;
-}
-h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
- background:#ffc61f;
- color:#111;
-}
-h1 {
- font-size:4ex;
-}
-h2, h3, h4, h5, h6 {
- font-size:3.2ex;
-}
-
-div.article,
-div.footer {
- background:#fff;
- margin:40px 0;
- max-width:36em;
- overflow:auto;
- padding:20px;
-}
- div.footer a.prev {
- font-size:3ex;
- float:left;
- text-transform:uppercase;
- }
- div.footer a.next {
- font-size:3ex;
- float:right;
- text-transform:uppercase;
- }
-
-div.hentry { }
- div.hentry abbr.published {
- color:#777;
- float:right;
- font-size:2ex;
- }
- div.hentry div.entry-content { }
- /* margin for block elements */
- div.hentry div.entry-content blockquote,
- div.hentry div.entry-content dl,
- div.hentry div.entry-content fieldset,
- div.hentry div.entry-content ol,
- div.hentry div.entry-content p,
- div.hentry div.entry-content pre,
- div.hentry div.entry-content table,
- div.hentry div.entry-content ul {
- margin:1.6ex 0;
- }
-
- /* code colors */
- div.hentry div.entry-content code,
- div.hentry div.entry-content pre {
- background:#eee;
- border:1px solid #ccc;
- }
- div.hentry div.entry-content code {
- padding:0 0.1ex;
- }
- div.hentry div.entry-content pre {
- background:#eee;
- border:1px solid #ccc;
- max-width:100%;
- overflow-x:auto;
- padding:2px;
- }
- div.hentry div.entry-content pre code {
- background:transparent;
- border:none;
- padding:0;
- }
-
- div.hentry div.entry-content img {
- max-width:100%;
- }
-
- div.hentry div.entry-content ol {
- list-style-position:inside;
- list-style-type:decimal;
- margin-left:1em;
- }
- div.hentry div.entry-content ol li ol,
- div.hentry div.entry-content ol li ul,
- div.hentry div.entry-content ul li ol,
- div.hentry div.entry-content ul li ul {
- margin:0 1em;
- }
- div.hentry div.entry-content ul {
- list-style-type:disc;
- margin-left:1em;
- }
- div.hentry div.entry-content ul li { }
- div.hentry div.entry-content ul li ul {
- list-style-type:circle;
- }
- div.hentry div.entry-content ul li ul li { }
- div.hentry div.entry-content ul li ul li ul {
- list-style-type:square;
- }
-
- div.hentry div.entry-content table {
- width:100%;
- }
-
- div.hentry div.footer {
- font-size:1.6ex;
- margin:0;
- max-width:100%;
- padding:0;
- text-align:right;
- width:100%;
- }
-
-div.header {
- background:#fff;
- border-right:20px solid #ffc61f;
- float:left;
- margin-bottom:20px;
- text-align:right;
- text-transform:uppercase;
-}
-
-div.nav {
- clear:both;
- width:100%;
-}
- div.nav ul {
- overflow:auto;
- }
- div.nav ul li {
- float:left;
- margin-right:20px;
- }
- div.nav ul li a {
- background:#fff;
- border-left:10px solid #ffc61f;
- font-size:3ex;
- padding:0 2px;
- }
- div.nav ul li a:hover {
- background:#ffc61f;
- }
-
-div.about {
- margin-bottom:0;
- padding-bottom:5px;
-}
- div.about address {
- font-size:1.6ex;
- margin-bottom:5px;
- overflow:auto;
- text-align:right;
- }
- div.about address img {
- float:left;
- }
-
- div.about ul.elsewhere {
- float:left;
- font-size:1.6ex;
- }
- div.about ul.elsewhere li {
- float:left;
- margin-right:10px;
- }
-
- div.about p.attribution {
- float:right;
- font-size:1.6ex;
- }
View
22 sitemap.xml
@@ -4,24 +4,18 @@ layout: nil
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
- <loc>http://jdbartlett.github.com/</loc>
+ <loc>http://jdbartlett.com/</loc>
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
- <changefreq>weekly</changefreq>
+ <changefreq>monthly</changefreq>
</url>
<url>
- <loc>http://jdbartlett.github.com/archive/</loc>
+ <loc>http://jdbartlett.com/archive/</loc>
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
<changefreq>weekly</changefreq>
</url>
- <url>
- <loc>http://jdbartlett.github.com/about/</loc>
- <lastmod>2009-08-25</lastmod>
- </url>
-
{% for post in site.posts %}
- <url>
- <loc>http://jdbartlett.github.com{{ post.id }}</loc>
- <lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
- </url>
- {% endfor %}
-</urlset>
+ <url>
+ <loc>http://jdbartlett.com{{ post.id }}</loc>
+ <lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
+ </url>{% endfor %}
+</urlset>
Please sign in to comment.
Something went wrong with that request. Please try again.