-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
390 additions
and
63 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 |
---|---|---|
|
@@ -6,4 +6,5 @@ vendor/gems/* | |
!vendor/gems/cache/ | ||
.sass-cache/* | ||
foreman.env | ||
.env | ||
.env | ||
log |
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,3 +1,2 @@ | ||
compass: bundle exec compass watch | ||
web: bundle exec unicorn -p 4141 -c ./unicorn.rb | ||
worker: bundle exec rake resque:work QUEUE=web |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# encoding: utf-8 | ||
|
||
Sketching.controllers :chapters do | ||
|
||
get :index, :map=>"/book" do | ||
#expires_in 30 | ||
@chapters = Chapter.all.order_by([[:published_at, :desc]]) | ||
@chapter = @chapters.first | ||
haml :"chapters/index", :layout => !request.xhr? | ||
end | ||
|
||
get :show, :map => "/book/:slug" do | ||
#expires_in 30 | ||
not_found unless @chapter = Chapter.where(:slug => params[:slug]).first | ||
haml :"chapters/show", :layout => !request.xhr? | ||
end | ||
|
||
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
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
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,37 @@ | ||
- # coding: utf-8 | ||
|
||
- @post = Post.last | ||
- hue = @post.hue | ||
- content_for :header do | ||
%a.back_link{:href=>"/"} Sketching with Code | ||
.mega{:style=>"background-color:hsl(#{hue},50%,75%);"} | ||
%h1 | ||
Words in progress | ||
|
||
|
||
%article | ||
%p | ||
Over the next few weeks you'll see some of my writing about hacking, some things edited from what I've published, some new material, published here. | ||
|
||
%p | ||
It's an experiment in writing for the web. Is it a "web book"? I don't know yet, but I'm sure it's going to be interesting. | ||
|
||
%p | ||
%strong | ||
Add your email for updates | ||
:plain | ||
<div id="mc_embed_signup"> | ||
<form action="http://makeshift.us6.list-manage.com/subscribe/post?u=c14f3f1491719e4e90f5612c9&id=042a791f81" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | ||
|
||
<div class="mc-field-group"> | ||
<label for="mce-EMAIL">Your email </label> | ||
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | ||
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"> | ||
</div> | ||
<div id="mce-responses" class="clear"> | ||
<div class="response" id="mce-error-response" style="display:none"></div> | ||
<div class="response" id="mce-success-response" style="display:none"></div> | ||
</div> | ||
</form> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
- # coding: utf-8 | ||
- require "compass" | ||
- hue = @chapter.hue | ||
- @hide_footer = true | ||
|
||
- content_for :scripts do | ||
%script{:src => "http://disqus.com/forums/sketchingwithcode/embed.js", :type => "text/javascript"} | ||
- content_for :sass do | ||
:sass | ||
$article-link-color: hsl(#{hue},50%,50%) | ||
body.#{@chapter.slug} | ||
a | ||
color: $article-link-color | ||
&:hover | ||
color: lighten($article-link-color, 10) | ||
|
||
- content_for :sass do | ||
- Chapter.all.each do |chapter| | ||
:sass | ||
body.#{@chapter.slug} | ||
a.#{chapter.slug} | ||
color: #aaa | ||
&:hover | ||
color: lighten(hsl(#{chapter.hue},50%,50%), 0) | ||
|
||
- content_for :header do | ||
%a.back_link{:href=>"/"} Sketching with Code | ||
.mega{:style=>"background-color:hsl(#{hue},50%,75%);"} | ||
%h1= @chapter.title | ||
%article | ||
= @chapter.content_html.html_safe | ||
.next-prev | ||
.prev | ||
- if @chapter.previous_chapter | ||
%a{:href=>"/book/#{@chapter.previous_chapter}"} | ||
⇠ | ||
= @chapter.previous_chapter.title | ||
.next | ||
- if @chapter.next_chapter | ||
%a{:href=>"/book/#{@chapter.next_chapter}"} | ||
= @chapter.next_chapter.title | ||
⇢ | ||
- if false | ||
%footer#comments | ||
#disqus_thread | ||
%noscript | ||
%a{:href => "http://sketchingwithcode.disqus.com/?url=ref"} View the discussion thread. | ||
|
||
.chapter-list | ||
%ul | ||
- Chapter.all.order_by([[:ordering, :asc]]).each do |chapter| | ||
%li | ||
%a{:class => [chapter.slug, @chapter == chapter ? "active" : ""], :href=>"/book/#{chapter.slug}"}= chapter.title |
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
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 |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
Sketching with Code | ||
%nav | ||
%ul | ||
%li | ||
%a{:href=>"/"} Thoughts | ||
%li | ||
%a{:href=>"/book"} Book | ||
%li | ||
|
Oops, something went wrong.