Skip to content

Commit

Permalink
Switched to coffeescript, fixed RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
dcneiner committed Mar 11, 2012
1 parent 3cfc102 commit 571b4ce
Show file tree
Hide file tree
Showing 10 changed files with 239 additions and 239 deletions.
298 changes: 150 additions & 148 deletions out/atom.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions out/coding/index.html
Expand Up @@ -76,6 +76,8 @@ <h1>Coding</h1>





<li typeof="sioc:Page" about="/coding/using-css-classes-for-states.html" class="post-type-article" >

<p><a href="/coding/using-css-classes-for-states.html" class="primary-link" property="dc:title">
Expand Down
52 changes: 23 additions & 29 deletions out/js/script.js
@@ -1,31 +1,25 @@
(function () {
(function() {

var className = document.body.className,
index = /^page-(coding|learning)-index/.test( className ),
comments_enabled = !index && /^page-(coding|learning)/.test( className ),
comment_container;
(function() {
var className, comment_container, comments_enabled, dsqLoad, index;
className = document.body.className;
index = /^page-(coding|learning)-index/.test(className);
comments_enabled = !index && /^page-(coding|learning)/.test(className);
window.disqus_developer = 0;
window.disqus_shortname = 'dougneiner';
if (!index) {
comment_container = document.getElementById("disqus_thread");
if (!comment_container) return;
dsqLoad = function() {
var dsq;
dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = "http://" + window.disqus_shortname + ".disqus.com/embed.js";
return (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
};
return dsqLoad();
}
})();

// Set global config for Disqus
window.disqus_developer = 0;
window.disqus_shortname = 'dougneiner';

if ( index ) {
// Show comment count
} else {
// Enable comments
comment_container = document.getElementById( "disqus_thread" );

if ( !comment_container ) {
return;
}

// Load Disqus
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + window.disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
}


}());
}).call(this);
2 changes: 2 additions & 0 deletions out/learning/index.html
Expand Up @@ -84,6 +84,8 @@ <h1>Learning</h1>





<li typeof="sioc:Page" about="/learning/essential-javascript-design-patterns.html" class="post-type-link" >

<p><a href="http://addyosmani.com/resources/essentialjsdesignpatterns/book/" class="primary-link" property="dc:title">
Expand Down
1 change: 0 additions & 1 deletion plugins/dnpygments/dnpygments.plugin.coffee
Expand Up @@ -44,7 +44,6 @@ module.exports = (BasePlugin) ->

finalize = () ->
document.body = document.body.replace rFormatBlocks, (a, b, lang, html) ->
console.log( processed[ 0 ] )
processed.shift()
next()

Expand Down
6 changes: 5 additions & 1 deletion src/.htaccess
Expand Up @@ -10,4 +10,8 @@ AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/j
ExpiresDefault "access plus 10 years"
Header unset cache-control:
Header append cache-control: "max-age=315360000"
</FilesMatch>
</FilesMatch>

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^atom\.xml$ http://feeds.feedburner.com/dougneiner/code [R,L]
6 changes: 3 additions & 3 deletions src/documents/atom.xml.eco
Expand Up @@ -4,7 +4,7 @@
<link href="http://code.dougneiner.com/atom.xml" rel="self"/>
<link href="http://code.dougneiner.com"/>
<updated><%= @site.date.toIsoDateString() %></updated>
<id>http://code.dougneiner.com</id>
<id>http://code.dougneiner.com/</id>
<author>
<name>Doug Neiner</name>
<email>doug@dougneiner.com</email>
Expand All @@ -21,9 +21,9 @@
<% end %>
<updated><%= document.date.toIsoDateString() %></updated>
<id>http://code.dougneiner.com<%= document.url %></id>
<content type="html"><%- (document.contentRenderedWithoutLayouts || "").replace( /<div class='code-lines'[\s\S]+?<\/div>/g, '') %>
<content type="html"><%= (document.contentRenderedWithoutLayouts || "").replace( /<div class='code-lines'[\s\S]+?<\/div>/g, '') %>
<% if document.link: %>
<p><a href="<%= document.link %>">View Link &#8594;</a></p>
&lt;p&gt;&lt;a href="<%= document.link %>"&gt;View Link &#8594;&lt;/a&gt;&lt;/p&gt;
<% end %>
</content>
</entry>
Expand Down
24 changes: 24 additions & 0 deletions src/documents/js/script.js.coffee
@@ -0,0 +1,24 @@
(() ->
className = document.body.className
index = /^page-(coding|learning)-index/.test className
comments_enabled = !index and /^page-(coding|learning)/.test className

# Set global config for Disqus
window.disqus_developer = 0
window.disqus_shortname = 'dougneiner'

unless index
# Enable comments
comment_container = document.getElementById( "disqus_thread" )
return unless comment_container

# Load Disqus
dsqLoad = () ->
dsq = document.createElement('script')
dsq.type = 'text/javascript'
dsq.async = true
dsq.src = "http://#{window.disqus_shortname}.disqus.com/embed.js"
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq)

dsqLoad()
)()
56 changes: 30 additions & 26 deletions src/documents/styles/style.css.stylus
Expand Up @@ -28,6 +28,36 @@ $l_purple = #8959a8

$main = $l_blue

box-shadow() {
-webkit-box-shadow: arguments;
-moz-box-shadow: arguments;
box-shadow: arguments;
}

round( size ) {
-webkit-border-radius: size
-moz-border-radius: size
border-radius: size
}

round-top( size ) {
-webkit-border-top-left-radius: size
-webkit-border-top-right-radius: size
-moz-border-radius-topleft: size
-moz-border-radius-topright: size
border-top-left-radius: size
border-top-right-radius: size
}

round-bottom( size ) {
-webkit-border-bottom-left-radius: size
-webkit-border-bottom-right-radius: size
-moz-border-radius-bottomleft: size
-moz-border-radius-bottomright: size
border-bottom-left-radius: size
border-bottom-right-radius: size
}

pre {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -218,32 +248,6 @@ body.sub-page > header:not(:hover) > a h1 {
background-image: linear-gradient(to right, rgba(0,0,0,0.05), rgba(0,0,0,0.05)), url("../img/bg-noise.png");
}

box-shadow()
-webkit-box-shadow: arguments;
-moz-box-shadow: arguments;
box-shadow: arguments;

round( size )
-webkit-border-radius: size
-moz-border-radius: size
border-radius: size

round-top( size )
-webkit-border-top-left-radius: size
-webkit-border-top-right-radius: size
-moz-border-radius-topleft: size
-moz-border-radius-topright: size
border-top-left-radius: size
border-top-right-radius: size

round-bottom( size )
-webkit-border-bottom-left-radius: size
-webkit-border-bottom-right-radius: size
-moz-border-radius-bottomleft: size
-moz-border-radius-bottomright: size
border-bottom-left-radius: size
border-bottom-right-radius: size

.nameplate {
width: 202px;
margin: 35px auto 25px auto;
Expand Down
31 changes: 0 additions & 31 deletions src/public/js/script.js

This file was deleted.

0 comments on commit 571b4ce

Please sign in to comment.