Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bring in posts from summer's blog update with a better understanding of how to use jekyll and Sass option to include specific scripts or styles on a per-page basis
- Loading branch information
Max Jacobson
committed
Nov 7, 2013
1 parent
f63dc66
commit 19ca8a1
Showing
129 changed files
with
5,563 additions
and
775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
layout: default | ||
title: 404 | ||
scripts: | ||
- 404 | ||
--- | ||
|
||
<h2>404</h2> | ||
|
||
<p>Sorry, that page was not found.</p> | ||
<script src="/js/404.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
www.hardscrabble.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'jekyll' | ||
|
||
gem 'kramdown' | ||
|
||
gem 'guard' | ||
gem 'guard-sass' | ||
gem 'guard-coffeescript' | ||
gem 'guard-jekyll-plus' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
guard 'coffeescript', :input => '_coffee', :output => 'js' | ||
guard 'sass', :input => '_scss', :output => 'css' | ||
notification :off | ||
|
||
guard 'coffeescript', :input => '_coffee', :output => 'js', :all_on_start => true | ||
guard 'sass', :input => '_scss', :output => 'css', :all_on_start => true | ||
|
||
guard 'jekyll-plus', :serve => true, :baseurl => '/', :port => '1234' do | ||
watch /.*/ | ||
ignore /^_site/ | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# [maxjacobson.github.io](http://maxjacobson.github.io) | ||
# [hardscrabble.net](http://hardscrabble.net) | ||
|
||
My new homepage? | ||
my personal site. powered by [jekyll](http://jekyllrb.com/) and hosted on [github pages](http://pages.github.com/) | ||
|
||
## working on the site | ||
|
||
* Run `bundle` to get the necessary gems. | ||
* Run `guard` to watch & compile the scss and coffeescript. | ||
* Run `jekyll serve -w` to build and preview the site at <http://localhost:4000> | ||
* Run `bundle exec guard` to watch & compile the scss and coffeescript and preview the site at <http://localhost:1234> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
root = "http://hardscrabble.net" | ||
current_url = document.URL | ||
pattern = /(\d{4})\-\d{2}\-\d{2}\-([a-z\-]+)$/i | ||
if current_url.match pattern | ||
match = current_url.match pattern | ||
window.location.replace "http://maxjacobson.github.io/#{match[1]}/#{match[2]}/" | ||
|
||
beefsteak = /(\d{4})\-\d{2}\-\d{2}\-([a-z\-]+)$/i | ||
if current_url.match beefsteak | ||
alert "please update your bookmarks, the site has moved from maxjacobson.net!!!" | ||
match = current_url.match beefsteak | ||
window.location.replace "#{root}/#{match[1]}/#{match[2]}/" | ||
|
||
octopress = /blog\/(\d{4}\/[a-z\-]+)$/i | ||
if current_url.match octopress | ||
alert "please update your bookmarks, the site has moved from maxjacobson.github.io!!!" | ||
match = current_url.match octopress | ||
window.location.replace "#{root}/#{match[1]}/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,2 @@ | ||
puts = (putter) -> console.log putter | ||
$ -> | ||
# check progress | ||
tasks = | ||
total: 0 | ||
complete: 0 | ||
$("li").each (i) -> | ||
done_frac = /\– (\d+)\/(\d+)$/i | ||
match = $(this).text().match done_frac | ||
if match | ||
numerator = parseInt match[1], 10 | ||
denominator = parseInt match[2], 10 | ||
tasks.total += denominator | ||
tasks.complete += numerator | ||
percentage = "#{Math.floor((numerator/denominator)*100)}%" | ||
$(this).append " – #{percentage}" | ||
# $(this).find("a").addClass "strikeout" if percentage is "100%" | ||
$(this).append($("<br/>")).append($("<div class='progress #{'progress-striped active' if percentage isnt "100%"}'><div class='bar' style='width: #{percentage};'></div></div>")) | ||
if tasks.total isnt 0 | ||
total_percentage = "#{Math.floor((tasks.complete/tasks.total)*100)}%" | ||
$("<p><strong>#{total_percentage} of total prework complete</strong></p>").insertBefore "#post h2:first" | ||
$("<div class='progress #{'progress-striped active' if total_percentage isnt '100%'}'><div class='bar' style='width: #{total_percentage};'></div></div>").insertBefore "#post h2:first" | ||
document.title = "#{total_percentage} - #{document.title}" | ||
$("h1,h2,h3,h4").on "click", -> | ||
clicked_id = $(this).attr "id" | ||
if clicked_id isnt undefined | ||
window.location.replace '#' + clicked_id | ||
else | ||
window.location.replace '' | ||
puts "page ready" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
window.puts = (thing) -> console.log thing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$ -> | ||
# check progress | ||
tasks = | ||
total: 0 | ||
complete: 0 | ||
$("li").each (i) -> | ||
done_frac = /\– (\d+)\/(\d+)$/i | ||
match = $(this).text().match done_frac | ||
if match | ||
numerator = parseInt match[1], 10 | ||
denominator = parseInt match[2], 10 | ||
tasks.total += denominator | ||
tasks.complete += numerator | ||
percentage = "#{Math.floor((numerator/denominator)*100)}%" | ||
$(this).append " – #{percentage}" | ||
# $(this).find("a").addClass "strikeout" if percentage is "100%" | ||
$(this).append($("<br/>")).append($("<div class='progress #{'progress-striped active' if percentage isnt "100%"}'><div class='bar' style='width: #{percentage};'></div></div>")) | ||
if tasks.total isnt 0 | ||
total_percentage = "#{Math.floor((tasks.complete/tasks.total)*100)}%" | ||
$("<p><strong>#{total_percentage} of total prework complete</strong></p>").insertBefore "#post h2:first" | ||
$("<div class='progress #{'progress-striped active' if total_percentage isnt '100%'}'><div class='bar' style='width: #{total_percentage};'></div></div>").insertBefore "#post h2:first" | ||
document.title = "#{total_percentage} - #{document.title}" | ||
$("h1,h2,h3,h4").on "click", -> | ||
clicked_id = $(this).attr "id" | ||
if clicked_id isnt undefined | ||
window.location.replace '#' + clicked_id | ||
else | ||
window.location.replace '' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
name: Max Jacobson | ||
description: A dorkblog | ||
url: http://maxjacobson.github.io | ||
title: hardscrabble | ||
author: Max Jacobson | ||
|
||
url: http://hardscrabble.net | ||
baseurl: / | ||
|
||
permalink: /:year/:title | ||
markdown: kramdown | ||
relative_permalinks: true | ||
exclude: ["Gemfile", "Gemfile.lock", "Guardfile", "README.md"] | ||
my_pages: ["feed", "about"] | ||
|
||
exclude: | ||
- "Gemfile" | ||
- "Gemfile.lock" | ||
- "Guardfile" | ||
- "README.md" | ||
|
||
markdown: kramdown | ||
pygments: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<footer> | ||
<p><a href="{{ site.baseurl }}about/">About</a></p> | ||
<p>All posts in <a href="{{ site.baseurl }}archive/">Archive</a>. <a href="{{ site.baseurl }}feed.xml">RSS Feed</a> available.</p> | ||
</footer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<header> | ||
<h1><a href="{{ site.baseurl }}">{{ site.title }}</a></h1> | ||
</header> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script src='{{ site.baseurl }}js/lib/jquery.min.js'></script> | ||
<script src='{{ site.baseurl }}js/helpers.js'></script> | ||
<script src='{{ site.baseurl }}js/app.js'></script> | ||
{% for script in page.scripts %} | ||
<script src='{{ site.baseurl }}js/{{ script }}.js'></script> | ||
{% endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<link rel="stylesheet" href="{{ site.baseurl }}css/style.css"> | ||
{% for stylesheet in page.stylesheets %} | ||
<link rel="stylesheet" href="{{ site.baseurl }}css/{{ stylesheet }}.css"> | ||
{% endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
--- | ||
layout: default | ||
--- | ||
<h2>{{ page.title }}</h2> | ||
<p class="date">{{ page.date | date_to_string }}</p> | ||
{% if page.beverage %} | ||
<p class="beverage"><strong>Beverage:</strong> {{ page.beverage }}</p> | ||
{% endif %} | ||
<p>Markdown source <a href="https://raw.github.com/maxjacobson/maxjacobson.github.io/master/{{page.path}}">on GitHub</a></p> | ||
|
||
<div id="post"> | ||
{{ content }} | ||
|
||
<div class="post"> | ||
|
||
<h2>{{ page.title }}</h2> | ||
|
||
<p class="date">{{ page.date | date_to_string }}</p> | ||
|
||
{{ content }} | ||
|
||
<p>Markdown source <a href="https://raw.github.com/maxjacobson/maxjacobson.github.io/master/{{page.path}}">on GitHub</a></p> | ||
|
||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.