Skip to content

Commit

Permalink
Merge branch 'bredesign'
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingmachine committed Oct 22, 2014
2 parents c7833e0 + 38083e3 commit 49f703d
Show file tree
Hide file tree
Showing 23 changed files with 1,045 additions and 182 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source :rubygems
source "https://rubygems.org"

gem "compass"
gem "susy"
Expand All @@ -14,3 +14,4 @@ gem "pygments.rb"
gem "oj"
gem "nokogiri"
gem "guard-nanoc"
gem "breakpoint"
106 changes: 61 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,68 +1,83 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
adsf (1.1.1)
adsf (1.2.0)
rack (>= 1.0.0)
breakpoint (2.5.0)
sass (~> 3.3)
sassy-maps (< 1.0.0)
builder (3.2.2)
chunky_png (1.2.8)
coderay (1.0.9)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.2)
coderay (1.1.0)
colored (1.2)
compass (0.12.2)
compass (1.0.1)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
cri (2.3.0)
colored (>= 1.2)
ffi (1.9.0)
formatador (0.2.4)
fssm (0.2.10)
guard (1.8.2)
compass-core (~> 1.0.1)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
cri (2.6.1)
colored (~> 1.2)
ffi (1.9.6)
formatador (0.2.5)
guard (2.6.1)
formatador (>= 0.2.4)
listen (>= 1.0.0)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-nanoc (1.0.1)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-nanoc (1.0.2)
guard (>= 1.8.0)
nanoc (>= 3.6.3)
haml (4.0.3)
haml (4.0.5)
tilt
kramdown (1.1.0)
listen (1.2.3)
hitimes (1.2.2)
kramdown (1.4.2)
listen (2.7.11)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
lumberjack (1.0.4)
lumberjack (1.0.9)
method_source (0.8.2)
mini_portile (0.5.1)
nanoc (3.6.4)
mini_portile (0.6.0)
multi_json (1.10.1)
nanoc (3.7.3)
cri (~> 2.3)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
oj (2.1.4)
posix-spawn (0.3.6)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
oj (2.10.3)
posix-spawn (0.3.9)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pygments.rb (0.5.2)
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rack (1.5.2)
rb-fsevent (0.9.3)
rb-inotify (0.9.1)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (3.0.0)
sass (3.2.10)
slop (3.4.6)
susy (1.0.9)
compass (>= 0.12.2)
sass (>= 3.2.0)
thor (0.18.1)
tilt (1.4.1)
redcarpet (3.2.0)
sass (3.4.6)
sassy-maps (0.4.0)
sass (~> 3.3)
slop (3.6.0)
susy (2.1.3)
sass (>= 3.3.0, < 3.5)
thor (0.19.1)
tilt (2.0.1)
timers (4.0.1)
hitimes
yajl-ruby (1.1.0)

PLATFORMS
Expand All @@ -71,6 +86,7 @@ PLATFORMS
DEPENDENCIES
RedCloth
adsf
breakpoint
builder
compass
guard-nanoc
Expand Down
27 changes: 18 additions & 9 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,31 @@ compile '/assets/javascripts/tipuesearch-data/' do
filter :erb
end

compile '/assets/stylesheets/*' do
unless item.identifier =~ /stylesheets\/_/ || item.identifier =~ /documentation/
filter(:sass, Compass.sass_engine_options)
end
end

compile '*' do
unless item.identifier.include?("#") # emacs tmp file
unless item.identifier.include?("#")
if item.binary?
# don’t filter binary items
else
item_layout = "default"

case item.attributes[:filename]
when /haml$/ then filter :haml; layout item_layout
when /textile$/ then filter :redcloth; layout item_layout
when /(markdown|md)$/ then filter :redcarpet, :options => {fenced_code_blocks: true, tables: true}, :renderer => RedcarpetSyntaxHighlighter; layout item_layout

when /coffee$/ then filter :coffeescript;
when /scss$/ then filter(:sass, Compass.sass_engine_options)
when /haml$/ then
filter :haml
layout item_layout
when /textile$/ then
filter :redcloth
layout item_layout
when /(markdown|md)$/ then
filter :redcarpet, :options => {fenced_code_blocks: true, tables: true}, :renderer => RedcarpetSyntaxHighlighter
layout item_layout
when /coffee$/ then filter :coffeescript
end

if item.attributes[:kind] == "documentation" && !item.attributes[:notoc]
filter :toc
end
Expand All @@ -56,7 +65,7 @@ route '/assets/javascripts/*' do
end

route '/assets/stylesheets/*' do
unless item.identifier.include?("#") # emacs tmp file
unless item.identifier.include?("#") || item.identifier =~ /stylesheets\/_/ # emacs tmp file
"/stylesheets/#{basename(item.attributes[:filename])}.css"
end
end
Expand Down
1 change: 1 addition & 0 deletions bredesign/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source 'http://rubygems.org'
gem "middleman", "~>3.3.6"
gem 'compass'
gem 'susy'
gem "breakpoint"
# Live-reloading plugin
gem "middleman-livereload", "~> 3.1.0"

Expand Down
4 changes: 4 additions & 0 deletions bredesign/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
breakpoint (2.0.7)
compass (>= 0.12.1)
sass (>= 3.2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.1)
Expand Down Expand Up @@ -125,6 +128,7 @@ PLATFORMS
ruby

DEPENDENCIES
breakpoint
compass
middleman (~> 3.3.6)
middleman-livereload (~> 3.1.0)
Expand Down
45 changes: 32 additions & 13 deletions bredesign/source/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
CLOJURE<span> for the </span>BRAVE<span> and </span>TRUE
</div>
<div class="subtitle">
<span>a practical guide for stouthearted beginners</span>
<span>a practical book for stouthearted beginners</span>
</div>
</div>
<div class="lambda">
λ
</div>
</div>

<div class="engage-me-please">
<div class="container">
<a href="https://leanpub.com/clojure-for-the-brave-and-true" class="buy">Buy the DRM-free PDF, epub, and mobi!</a>
Expand All @@ -24,10 +25,40 @@
</div>
</div>

<div id="top-nav">
<div class="items container">
<ul>
<li class="home">
&larr;
&uarr;
&rarr;
</li>
<li class="chapters">
<select>
<option>Chapter 1</option>
</select>
</li>
<li class=""><a href="https://leanpub.com/clojure-for-the-brave-and-true" class="buy">buy the ebook!!?!</a></li>
<li class="subscribe">
<form action="http://flyingmachinestudios.us1.list-manage.com/subscribe/post?u=60763b0c4890c24bd055f32e6&amp;amp;id=0b40ffd1e1" class="validate" id="mc-embedded-subscribe-form" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<input class="email" id="mce-EMAIL" name="EMAIL" placeholder="email address" required="" type="email" value="">
<input class="button" id="mc-embedded-subscribe" name="subscribe" type="submit" value="subscribe">
</form>
</li>
<li class="tweet">
<a href="https://twitter.com/share" class="twitter-share-button">tweet bravely and truly</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs')
</script>
</li>
</ul>
</div>
</div>


<div class="page container">
<div class="chapter-nav">
<div class="wrapper">
<ol>
<li><a href="/organization/#1__Your_Project_as_a_Library">1. Your Project as a Library</a></li>
<li><a href="/organization/#2__Storing_Objects_with_def">2. Storing Objects with def</a></li>
Expand All @@ -43,18 +74,6 @@
<li><a href="/organization/#6__To_Catch_a_Burglar">6. To Catch a Burglar</a></li>
<li><a href="/organization/#7__Summary">7. Summary</a></li>
</ol>
<div class="wrapper">
<a href="https://leanpub.com/clojure-for-the-brave-and-true" class="buy">buy the ebook!!?!</a>
<form action="http://flyingmachinestudios.us1.list-manage.com/subscribe/post?u=60763b0c4890c24bd055f32e6&amp;amp;id=0b40ffd1e1" class="validate" id="mc-embedded-subscribe-form" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<p>
<input class="email" id="mce-EMAIL" name="EMAIL" placeholder="email address" required="" type="email" value="">
<input class="button" id="mc-embedded-subscribe" name="subscribe" type="submit" value="Subscribe for email updates">
</p>
</form>
<a href="https://twitter.com/share" class="twitter-share-button">tweet bravely and truly</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs')
</script>
</div>
</div>
<div class="content">
Expand Down
6 changes: 2 additions & 4 deletions bredesign/source/javascripts/sticky.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
$(document).ready(function(){
$(".chapter-nav .wrapper").sticky({
topSpacing: 30,
topSpacing: 60,
getWidthFrom: ".chapter-nav"
});

$("#top-nav").sticky({

})
$("#top-nav").sticky()
});
Loading

0 comments on commit 49f703d

Please sign in to comment.