caboodle 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. data/VERSION +1 -1
  2. data/lib/caboodle.rb +1 -1
  3. data/lib/caboodle/app/views/error.haml +2 -0
  4. data/lib/caboodle/kit.rb +31 -10
  5. data/lib/caboodle/kits/about/about.rb +8 -15
  6. data/lib/caboodle/kits/analytics/analytics.rb +21 -19
  7. data/lib/caboodle/kits/beta/beta.rb +10 -11
  8. data/lib/caboodle/kits/carbonmade/carbonmade.rb +2 -5
  9. data/lib/caboodle/kits/carbonmade/views/{carbonmade.haml → portfolio.haml} +0 -0
  10. data/lib/caboodle/kits/credits/credits.rb +4 -0
  11. data/lib/caboodle/kits/credits/views/credits.haml +3 -0
  12. data/lib/caboodle/kits/disqus/disqus.rb +6 -12
  13. data/lib/caboodle/kits/disqus/views/{disqus.haml → chat.haml} +0 -0
  14. data/lib/caboodle/kits/flickr/flickr.rb +8 -17
  15. data/lib/caboodle/kits/geo/geo.rb +9 -11
  16. data/lib/caboodle/kits/github/github.rb +2 -3
  17. data/lib/caboodle/kits/googlelocal/googlelocal.rb +3 -8
  18. data/lib/caboodle/kits/googlelocal/views/{googlelocal.haml → near_me.haml} +0 -0
  19. data/lib/caboodle/kits/gravatar/gravatar.rb +10 -12
  20. data/lib/caboodle/kits/history/history.rb +8 -31
  21. data/lib/caboodle/kits/history/views/history.scss +1 -1
  22. data/lib/caboodle/kits/jquery/jquery.rb +3 -5
  23. data/lib/caboodle/kits/lazyload/lazyload.rb +3 -5
  24. data/lib/caboodle/kits/linkedin/linkedin.rb +4 -5
  25. data/lib/caboodle/kits/linkedin/views/linkedin.scss +1 -1
  26. data/lib/caboodle/kits/onepage/onepage.rb +1 -4
  27. data/lib/caboodle/kits/posterous/posterous.rb +2 -4
  28. data/lib/caboodle/kits/seo/seo.rb +4 -6
  29. data/lib/caboodle/kits/soundcloud/soundcloud.rb +12 -13
  30. data/lib/caboodle/kits/soundcloud/views/{soundcloud.haml → music.haml} +0 -0
  31. data/lib/caboodle/kits/standard/standard.rb +9 -11
  32. data/lib/caboodle/kits/susy/views/susy/_base.scss +2 -2
  33. data/lib/caboodle/kits/susy/views/susy/screen.scss +1 -3
  34. data/lib/caboodle/kits/tumblr/tumblr.rb +30 -38
  35. data/lib/caboodle/kits/twitter/twitter.rb +10 -14
  36. data/lib/caboodle/kits/typekit/typekit.rb +1 -0
  37. data/lib/caboodle/kits/typekit/views/typekit.scss +17 -0
  38. data/lib/caboodle/kits/vimeo/views/vimeo.haml +2 -0
  39. data/lib/caboodle/kits/vimeo/vimeo.rb +5 -0
  40. metadata +13 -7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.14
1
+ 0.2.15
data/lib/caboodle.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  $:<<File.dirname(__FILE__)
2
2
  $:<<File.join(File.dirname(__FILE__),"caboodle")
3
- %{sinatra/base yaml hashie haml find sinatra/base sinatra/compass sinatra/advanced_routes compass susy pp sleepy caboodle/helpers caboodle/config caboodle/kit caboodle/app caboodle/scrape}.split.each{|a| require a}
3
+ %{sinatra/base yaml hashie haml maruku find sinatra/base sinatra/compass sinatra/advanced_routes compass susy pp sleepy caboodle/helpers caboodle/config caboodle/kit caboodle/app caboodle/scrape}.split.each{|a| require a}
@@ -0,0 +1,2 @@
1
+ .page.error.thin_page
2
+ %h2= @message
data/lib/caboodle/kit.rb CHANGED
@@ -27,6 +27,13 @@ module Caboodle
27
27
 
28
28
  Config = Hashie::Mash.new
29
29
 
30
+ def markdown sym
31
+ puts sym
32
+ md = File.expand_path(File.join(Caboodle::App.root,"config","#{sym.to_s}.md"))
33
+ @content = Maruku.new(open(md).read).to_html_document
34
+ haml ".page.about.thin_page= @content"
35
+ end
36
+
30
37
  class << self
31
38
 
32
39
  attr_accessor :credit_link
@@ -224,10 +231,20 @@ module Caboodle
224
231
  Caboodle::Kits.each { |p| p.start }
225
232
  end
226
233
 
227
- def menu display, path, &block
234
+ def menu display, path=nil, &block
235
+ #todo proper slugify
236
+ slug = display.downcase.gsub(" ","-").gsub("'","")
237
+ path = "/#{slug}" unless path
228
238
  path = "/" if Site.home_kit == self.to_s.gsub("Caboodle::","")
229
239
  Caboodle::MenuItems << {:display=>display, :link=>path, :kit=>self}
230
- self.get path, &block
240
+ self.before {@title = display}
241
+ if block
242
+ self.get path, &block
243
+ else
244
+ eval "self.get '#{path}' do
245
+ haml :#{slug.gsub("-","_")}
246
+ end"
247
+ end
231
248
  @@has_menu = true
232
249
  end
233
250
 
@@ -274,6 +291,15 @@ module Caboodle
274
291
  Caboodle::SASS.uniq!
275
292
  end
276
293
 
294
+ def add_layout k, v
295
+ unless Caboodle::Layout[k.to_sym].blank?
296
+ Caboodle::Layout[k.to_sym] << "\n"
297
+ Caboodle::Layout[k.to_sym] << v
298
+ else
299
+ Caboodle::Layout[k.to_sym] = v
300
+ end
301
+ end
302
+
277
303
  alias_method :stylesheet, :stylesheets
278
304
 
279
305
  def javascripts array_of_js_files
@@ -298,12 +324,7 @@ module Caboodle
298
324
 
299
325
  def add_to_layout hash_of_items
300
326
  hash_of_items.each do |k,v|
301
- unless Caboodle::Layout[k.to_sym].blank?
302
- Caboodle::Layout[k.to_sym] << "\n"
303
- Caboodle::Layout[k.to_sym] << v
304
- else
305
- Caboodle::Layout[k.to_sym] = v
306
- end
327
+ add_layout k, v
307
328
  end
308
329
  end
309
330
 
@@ -313,10 +334,10 @@ module Caboodle
313
334
  end
314
335
  end
315
336
 
316
- def credit url
337
+ def credit url, title=nil
317
338
  #todo there must be an easier way
318
339
  class_eval "def credit_link
319
- \"<a rel='me' href='#{url}'>#{self.name.split("::").last}</a>\"
340
+ \"<a rel='me' href='#{url}'>#{title || self.name.split("::").last}</a>\"
320
341
  end"
321
342
  end
322
343
 
@@ -1,17 +1,10 @@
1
- require 'maruku'
2
-
3
- module Caboodle
4
- class About < Caboodle::Kit
5
-
6
- description "Gives you an About page at /about. Edit the Markdown file located in your application config directory."
7
-
8
- files ["about.md"]
9
-
10
- menu "About", "/about" do
11
- @title = "About"
12
- md = File.expand_path(File.join(Caboodle::App.root,"config","about.md"))
13
- @content = Maruku.new(open(md).read).to_html_document
14
- haml ".page.about.thin_page= @content"
15
- end
1
+ class Caboodle::About < Caboodle::Kit
2
+
3
+ description "Gives you an About page at /about. Edit the Markdown file located in your application config directory."
4
+
5
+ files ["about.md"]
6
+
7
+ menu "About", "/about" do
8
+ markdown :about
16
9
  end
17
10
  end
@@ -1,21 +1,23 @@
1
- module Caboodle
2
- class Analytics < Caboodle::Kit
3
- description "Adds Google Analytics to every page of the site"
4
- required [:analytics_id]
5
- end
6
- end
7
-
8
- Caboodle::Layout.add_to_layout "after_body" => "<script type=\"text/javascript\">
9
- var _gaq = _gaq || [];
10
- _gaq.push(['_setAccount', '#{Caboodle::Site.analytics_id}']);
11
- _gaq.push(['_setDomainName', 'none']);
12
- _gaq.push(['_setAllowLinker', true]);
13
- _gaq.push(['_trackPageview']);
1
+ class Caboodle::Analytics < Caboodle::Kit
2
+
3
+ description "Adds Google Analytics to every page of the site"
4
+
5
+ required [:analytics_id]
6
+
7
+ if ENV["RACK_ENV"] == "production"
8
+ add_layout :after_body, "<script type=\"text/javascript\">
9
+ var _gaq = _gaq || [];
10
+ _gaq.push(['_setAccount', '#{Caboodle::Site.analytics_id}']);
11
+ _gaq.push(['_setDomainName', 'none']);
12
+ _gaq.push(['_setAllowLinker', true]);
13
+ _gaq.push(['_trackPageview']);
14
14
 
15
- (function() {
16
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
17
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
18
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
19
- })();
15
+ (function() {
16
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
17
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
18
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
19
+ })();
20
20
 
21
- </script>"
21
+ </script>"
22
+ end
23
+ end
@@ -1,11 +1,10 @@
1
- module Caboodle
2
- class Beta < Caboodle::Kit
3
-
4
- description "Displays a beta message on every page of the site"
5
-
6
- required [:beta_message]
7
- add_sass ["beta"]
8
- end
9
- end
10
-
11
- Caboodle::Layout.above_header = "<div id='beta'><p>#{Caboodle::Site.beta_message}</p></div>"
1
+ class Caboodle::Beta < Caboodle::Kit
2
+
3
+ description "Displays a beta message on every page of the site"
4
+
5
+ required [:beta_message]
6
+
7
+ add_sass ["beta"]
8
+
9
+ add_layout :above_header, "<div id='beta'><p>#{Caboodle::Site.beta_message}</p></div>"
10
+ end
@@ -2,14 +2,11 @@ module Caboodle
2
2
  class Carbonmade < Caboodle::Kit
3
3
  description "Embeds a Carbonmade.com portfolio."
4
4
 
5
- menu "Portfolio", "/portfolio" do
6
- @title = "Portfolio"
7
- haml :carbonmade
8
- end
5
+ menu "Portfolio"
9
6
 
10
7
  required [:carbonmade_url]
11
8
 
12
- credit Caboodle::Site.carbonmade_url
9
+ credit Caboodle::Site.carbonmade_url, "Carbonmade portfolio"
13
10
 
14
11
  add_sass ["carbonmade"]
15
12
  end
@@ -0,0 +1,4 @@
1
+ class Caboodle::Credits < Caboodle::Kit
2
+ description "Adds a Credits page to the footer"
3
+ menu "Credits"
4
+ end
@@ -0,0 +1,3 @@
1
+ .page.credits
2
+ %h2
3
+ We'll add a credits page here
@@ -1,13 +1,7 @@
1
- module Caboodle
2
- class Disqus < Caboodle::Kit
3
-
4
- description "Adds a chat page and support for other kits that require comments"
5
-
6
- menu "Chat", "/chat" do
7
- @title = "Chat"
8
- haml :disqus
9
- end
10
-
11
- required [:disqus]
12
- end
1
+ class Caboodle::Disqus < Caboodle::Kit
2
+ description "Adds a chat page and support for other kits that require comments"
3
+
4
+ menu "Chat"
5
+
6
+ required [:disqus]
13
7
  end
@@ -51,26 +51,17 @@ module Caboodle
51
51
 
52
52
  description "A browsable Flickr.com gallery with sets"
53
53
 
54
- menu "Photography", "/photography" do
55
- unless Site.flickr_user_id.blank?
56
- @photosets = FlickrAPI.photosets rescue []
57
- @title = "Photography"
58
- haml :photography
59
- else
60
- "<h2>Please set your Flickr username</h2>"
61
- end
54
+ menu "Photography" do
55
+ @photosets = FlickrAPI.photosets rescue []
56
+ haml :photography
62
57
  end
63
58
 
64
59
  get "/photography/:set_id" do |set_id|
65
- unless Site.flickr_user_id.blank?
66
- @photosets = FlickrAPI.photosets rescue []
67
- @set_id = set_id
68
- @photoset = Caboodle::FlickrAPI.photoset_info(@set_id) rescue nil
69
- @title = "Photography: #{@photoset.title if @photoset.respond_to?(:title)}"
70
- haml :photography
71
- else
72
- "<h2>Please set your Flickr username</h2>"
73
- end
60
+ @photosets = FlickrAPI.photosets rescue []
61
+ @set_id = set_id
62
+ @photoset = Caboodle::FlickrAPI.photoset_info(@set_id) rescue nil
63
+ @title = "Photography: #{@photoset.title if @photoset.respond_to?(:title)}"
64
+ haml :photography
74
65
  end
75
66
 
76
67
  required [:flickr_username, :flickr_api_key]
@@ -1,14 +1,12 @@
1
1
  require 'rack-geo'
2
2
 
3
- module Caboodle
4
- class Geo < Caboodle::Kit
5
- optional [:zip, :postcode, :address, :latitude, :longitude]
6
-
7
- before do
8
- @latitude, @longitude, @uncertainty = 37.0625, -95.677068, 100
9
- @coords = "#{@latitude};#{@longitude} epu=#{@uncertainty}"
10
- headers "HTTP_GEO_POSITION" => @coords
11
- end
12
-
13
- end
3
+ class Caboodle::Geo < Caboodle::Kit
4
+ optional [:zip, :postcode, :address, :latitude, :longitude]
5
+
6
+ before do
7
+ @latitude, @longitude, @uncertainty = 37.0625, -95.677068, 100
8
+ @coords = "#{@latitude};#{@longitude} epu=#{@uncertainty}"
9
+ headers "HTTP_GEO_POSITION" => @coords
10
+ end
11
+
14
12
  end
@@ -3,8 +3,7 @@ module Caboodle
3
3
 
4
4
  description "A single page which links to all of a Github account's public repos"
5
5
 
6
- menu "Code", "/code" do
7
- @title = "Code"
6
+ menu "Code" do
8
7
  @repos = GithubAPI.repositories
9
8
 
10
9
  @repos.sort!{|a, b| a.watchers <=> b.watchers}.reverse!
@@ -19,7 +18,7 @@ module Caboodle
19
18
 
20
19
  required [:github_username]
21
20
 
22
- credit "http://github.com/#{Site.github_username}"
21
+ credit "http://github.com/#{Site.github_username}", "Fork #{Site.github_username} on Github"
23
22
  end
24
23
 
25
24
  class GithubAPI < Weary::Base
@@ -11,23 +11,18 @@ module Caboodle
11
11
 
12
12
  before do
13
13
  @locations = Config.google_local_locations
14
- end
15
-
16
- menu "Near me", "/near_me" do
17
- @title = "Near me"
18
14
  @location = Config.google_local_locations.first
19
- haml :googlelocal
20
15
  end
21
16
 
17
+ menu "Near me"
18
+
22
19
  get "/near_me/:slug" do
23
20
  Config.google_local_locations.each do |loc|
24
21
  if loc.title.downcase.gsub(" ","-") == params[:slug]
25
22
  @location = loc
26
23
  end
27
24
  end
28
-
29
- puts @location.inspect
30
-
25
+
31
26
  if @location
32
27
  haml :googlelocal
33
28
  else
@@ -1,17 +1,15 @@
1
1
  require 'digest/md5'
2
2
 
3
- module Caboodle
4
- class Standard < Caboodle::Kit
5
-
6
- description "Sets the logo of the site to your gravatar.com image"
7
-
8
- optional [:email]
9
-
10
- configure do
11
- if Caboodle::Site.logo_url.to_s.blank? && !Caboodle::Site.email.to_s.blank?
12
- hash = Digest::MD5.hexdigest(Caboodle::Site.email)
13
- Caboodle::Site.logo_url = "http://www.gravatar.com/avatar/#{hash}"
14
- end
3
+ class Caboodle::Gravatar < Caboodle::Kit
4
+
5
+ description "Sets the logo of the site to your gravatar.com image"
6
+
7
+ optional [:email]
8
+
9
+ configure do
10
+ if Caboodle::Site.logo_url.to_s.blank? && !Caboodle::Site.email.to_s.blank?
11
+ hash = Digest::MD5.hexdigest(Caboodle::Site.email)
12
+ Caboodle::Site.logo_url = "http://www.gravatar.com/avatar/#{hash}"
15
13
  end
16
14
  end
17
15
  end
@@ -1,34 +1,11 @@
1
- gem "sinatra-compass"
2
- require "sinatra/compass"
3
-
4
- gem "compass-susy-plugin"
5
- require "susy"
6
-
7
- require "compass"
8
- require "sinatra/base"
9
- require "sinatra/sugar"
10
- require "sinatra/advanced_routes"
11
-
12
-
13
- module Caboodle
14
- class History < Caboodle::Kit
15
-
16
- description "A list of things you have done in the past."
1
+ class Caboodle::History < Caboodle::Kit
17
2
 
18
- config_files ["history.yml"]
19
-
20
- menu "History", "/history" do
21
- @title = "History"
22
- haml :history
23
- end
3
+ description "A list of things you have done in the past."
4
+
5
+ config_files ["history.yml"]
6
+
7
+ menu "History"
8
+
9
+ add_sass ["history"]
24
10
 
25
- get("/history/:name.css") do
26
- content_type 'text/css', :charset => 'utf-8'
27
- options = {:sass_dir => File.join(File.dirname(__FILE__),"views"), :syntax=>:scss}
28
- sass :"#{params[:name]}", options.merge!(::Compass.sass_engine_options)
29
- end
30
-
31
- add_sass ["history"]
32
-
33
- end
34
11
  end
@@ -5,7 +5,7 @@
5
5
  border: 0px !important;
6
6
  dt {
7
7
  @include adjust-font-size-to(24px);
8
- @include slab-family;
8
+ @include main-family;
9
9
  @include columns(1,6);
10
10
  border: 0px !important;
11
11
  }
@@ -1,6 +1,4 @@
1
- module Caboodle
2
- class Jquery < Caboodle::Kit
3
- description "Adds Jquery to every page of the site"
4
- javascripts ["http://ajax.googleapis.com/ajax/libs/jquery/#{Caboodle::Site.jquery_version || "1.4.2"}/jquery.min.js"]
5
- end
1
+ class Caboodle::Jquery < Caboodle::Kit
2
+ description "Adds Jquery to every page of the site"
3
+ javascripts ["http://ajax.googleapis.com/ajax/libs/jquery/#{Caboodle::Site.jquery_version || "1.4.2"}/jquery.min.js"]
6
4
  end
@@ -1,6 +1,4 @@
1
- module Caboodle
2
- class LazyLoad < Caboodle::Kit
3
- description "Improves page load times for javascript-enabled browsers by loading images on demand as the user scrolls the page."
4
- javascripts ["/jquery.lazyload.mini.js","/lazyload.js"]
5
- end
1
+ class Caboodle::LazyLoad < Caboodle::Kit
2
+ description "Improves page load times for javascript-enabled browsers by loading images on demand as the user scrolls the page."
3
+ javascripts ["/jquery.lazyload.mini.js","/lazyload.js"]
6
4
  end
@@ -17,16 +17,15 @@ module Caboodle
17
17
  class Linkedin < Caboodle::Kit
18
18
 
19
19
  description "Displays a Linkedin profile as a CV with consistent layout with the rest of the site."
20
-
21
- menu "CV", "/cv" do
22
- @title = "Curriculum Vitae"
23
- @linkedin = LinkedinAPI.new #rescue nil
20
+
21
+ menu "CV" do
22
+ @linkedin = LinkedinAPI.new
24
23
  haml :cv
25
24
  end
26
25
 
27
26
  required [:linkedin_full_name, :linkedin_profile_url]
28
27
 
29
- credit Caboodle::Site.linkedin_profile_url
28
+ credit Caboodle::Site.linkedin_profile_url, "Linkedin profile"
30
29
 
31
30
  add_sass ["linkedin"]
32
31
 
@@ -25,7 +25,7 @@
25
25
 
26
26
  h3, dt {
27
27
  @include adjust-font-size-to(24px);
28
- @include slab-family;
28
+ @include main-family;
29
29
  }
30
30
 
31
31
  ul.vcalendar {
@@ -3,10 +3,7 @@ module Caboodle
3
3
 
4
4
  description "Embeds a Onepage.com contact card and loads it at /contact"
5
5
 
6
- menu "Contact", "/contact" do
7
- @title = "Contact"
8
- haml :contact
9
- end
6
+ menu "Contact"
10
7
 
11
8
  required [:onepage_username]
12
9
 
@@ -162,10 +162,8 @@ module Caboodle
162
162
 
163
163
  rss ["feed://stef.posterous.com/rss.xml"]
164
164
 
165
- credit "http://#{Caboodle::Site.posterous_sitename}.posterous.com"
165
+ credit "http://#{Caboodle::Site.posterous_sitename}.posterous.com", "#{Caboodle::Site.posterous_sitename} on Posterous"
166
166
 
167
167
  add_sass ["posterous"]
168
168
  end
169
- end
170
-
171
- #Caboodle::Posterous.new #gets the ID set up
169
+ end
@@ -1,7 +1,5 @@
1
- module Caboodle
2
- class SEO < Caboodle::Kit
3
- description "Adds basic search engine optimisation"
4
- add_to_layout "meta" => "<meta type='keywords' value='#{Caboodle::Site.seo_keywords}' /><meta type='description' value='#{Caboodle::Site.seo_description}' />"
5
- optional [:seo_keywords,:seo_description]
6
- end
1
+ class Caboodle::SEO < Caboodle::Kit
2
+ description "Adds basic search engine optimisation"
3
+ add_layout :meta, "<meta type='keywords' value='#{Caboodle::Site.seo_keywords}' /><meta type='description' value='#{Caboodle::Site.seo_description}' />"
4
+ optional [:seo_keywords,:seo_description]
7
5
  end
@@ -1,11 +1,10 @@
1
1
  module Caboodle
2
2
  class Soundcloud < Caboodle::Kit
3
3
  description "Displays a search of soundcloud as embedded players on a single page."
4
-
5
- menu "Mixes", "/mixes" do
6
- @title = "Mixes"
4
+
5
+ menu "Music" do
7
6
  @mixes = SoundcloudAPI.sets
8
- haml :soundcloud
7
+ haml :music
9
8
  end
10
9
 
11
10
  required [:soundcloud_query]
@@ -15,15 +14,15 @@ module Caboodle
15
14
 
16
15
  class SoundcloudAPI < Weary::Base
17
16
 
18
- declare "sets" do |r|
19
- r.url = "http://api.soundcloud.com/playlists?q=#{Site.soundcloud_query}"
20
- r.via = :get
21
- r.headers = {'Accept' => 'application/xml'}
22
- end
23
-
24
- def self.sets
25
- Hashie::Mash.new(SoundcloudAPI.new.sets.perform_sleepily.parse).playlists
26
- end
17
+ declare "sets" do |r|
18
+ r.url = "http://api.soundcloud.com/playlists?q=#{Site.soundcloud_query}"
19
+ r.via = :get
20
+ r.headers = {'Accept' => 'application/xml'}
21
+ end
22
+
23
+ def self.sets
24
+ Hashie::Mash.new(SoundcloudAPI.new.sets.perform_sleepily.parse).playlists
25
+ end
27
26
 
28
27
  end
29
28
  end
@@ -1,13 +1,11 @@
1
- module Caboodle
2
- class Standard < Caboodle::Kit
3
- description "The default home page and site options"
4
- required [:title, :description, :author]
5
- optional [:logo_url]
6
- if Caboodle::Site.home_kit.blank?
7
- puts "Using the default home kit - you will want to run 'caboodle kit:home <kit name>' to specify your own kit"
8
- get "/" do
9
- haml :standard
10
- end
1
+ class Caboodle::Standard < Caboodle::Kit
2
+ description "The default home page and site options"
3
+ required [:title, :description, :author]
4
+ optional [:logo_url]
5
+ if Caboodle::Site.home_kit.blank?
6
+ puts "Using the default home kit - you will want to run 'caboodle kit:home <kit name>' to specify your own kit"
7
+ get "/" do
8
+ haml :standard
11
9
  end
12
10
  end
13
- end
11
+ end
@@ -39,8 +39,8 @@ $alt: #ff6600;
39
39
  font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
40
40
  }
41
41
 
42
- @mixin slab-family {
43
- font-family: "museo-slab-1", "Helvetica Neue", Arial, Helvetica, sans-serif;
42
+ @mixin main-family {
43
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
44
44
  font-weight: lighter;
45
45
  }
46
46
 
@@ -30,7 +30,7 @@ header#site-header {
30
30
  @include trailer(2,32px);
31
31
  #logo {
32
32
  @include columns(2,12);
33
-
33
+ height: 64px;
34
34
  img {
35
35
  width: 64px;
36
36
  height: auto;
@@ -58,7 +58,6 @@ header#site-header {
58
58
  ul {
59
59
  @include inline-block-list(12px);
60
60
  li {
61
- @include slab-family;
62
61
  }
63
62
  }
64
63
  }
@@ -107,7 +106,6 @@ section#main {
107
106
  footer {
108
107
  @include prefix(2);
109
108
  @include full;
110
- @include slab-family;
111
109
  }
112
110
 
113
111
  section.subsection {
@@ -1,44 +1,36 @@
1
1
  gem "tumblr-rb"
2
2
  require 'tumblr'
3
3
 
4
- module Caboodle
5
- class Tumblr < Caboodle::Kit
6
- description "Includes a tumblr.com account"
7
-
8
- helpers do
9
- def semantic_date post
10
- date = Date.parse(post.date)
11
- a = []
12
- a << "slug-#{post.slug}"
13
- a << "y#{date.year}"
14
- a << "m#{date.month}"
15
- a << "d#{date.day}"
16
- a.join(" ")
17
- end
4
+ class Caboodle::Tumblr < Caboodle::Kit
5
+ description "Includes a tumblr.com account"
6
+
7
+ helpers do
8
+ def semantic_date post
9
+ date = Date.parse(post.date)
10
+ a = []
11
+ a << "slug-#{post.slug}"
12
+ a << "y#{date.year}"
13
+ a << "m#{date.month}"
14
+ a << "d#{date.day}"
15
+ a.join(" ")
18
16
  end
19
-
20
- required [:tumblr_email, :tumblr_password, :tumblr_sitename]
21
-
22
- menu "Tumblr", "/tumblr" do
23
- puts "Get tumblr"
24
- tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
25
- req = tumblr.read(Caboodle::Site.tumblr_sitename, {:num=>10}).perform_sleepily
26
- puts req.inspect
27
- posts = ::Tumblr::Reader.get_posts(req)
28
- puts posts.inspect
29
-
30
- #posts = tumblr.get_posts(result)
31
- haml :tumblr, :locals => { :posts => posts }
32
- end
33
-
34
- get "/tumblr/page/:page" do
35
- tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
36
- result
37
- posts = tumblr.get_posts()
38
- haml :tumblr, :locals => { :posts => posts }
39
- end
40
-
41
- add_sass ["tumblr"]
42
-
43
17
  end
18
+
19
+ required [:tumblr_email, :tumblr_password, :tumblr_sitename]
20
+
21
+ menu "Tumblr" do
22
+ tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
23
+ req = tumblr.read(Caboodle::Site.tumblr_sitename, {:num=>10}).perform_sleepily
24
+ posts = ::Tumblr::Reader.get_posts(req)
25
+ haml :tumblr, :locals => { :posts => posts }
26
+ end
27
+
28
+ get "/tumblr/page/:page" do
29
+ tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
30
+ posts = tumblr.get_posts()
31
+ haml :tumblr, :locals => { :posts => posts }
32
+ end
33
+
34
+ add_sass ["tumblr"]
35
+
44
36
  end
@@ -1,15 +1,11 @@
1
- module Caboodle
2
- class Twitter < Caboodle::Kit
3
- description "Display recent tweets from a given twitter account, with infinite scrolling for looking back in time."
4
- menu "Twitter", "/twitter" do
5
- @title = "Twitter"
6
- haml :twitter
7
- end
8
-
9
- required [:twitter_username]
10
-
11
- credit "http://twitter.com/#{Caboodle::Site.twitter_username}"
12
-
13
- add_sass ["twitter"]
14
- end
1
+ class Caboodle::Twitter < Caboodle::Kit
2
+ description "Display recent tweets from a given twitter account, with infinite scrolling for looking back in time."
3
+
4
+ menu "Twitter"
5
+
6
+ required [:twitter_username]
7
+
8
+ credit "http://twitter.com/#{Caboodle::Site.twitter_username}", "Follow @#{Caboodle::Site.twitter_username} on Twitter"
9
+
10
+ add_sass ["twitter"]
15
11
  end
@@ -3,5 +3,6 @@ module Caboodle
3
3
  description "Adds support for Typekit.com CSS options"
4
4
  javascripts ["http://use.typekit.com/#{Caboodle::Site.typekit}.js","/typekit.js"]
5
5
  required [:typekit]
6
+ add_sass ["typekit"]
6
7
  end
7
8
  end
@@ -0,0 +1,17 @@
1
+ // #todo set the family programatically
2
+ @mixin main-family {
3
+ font-family: "museo-slab-1", "Helvetica Neue", Arial, Helvetica, sans-serif;
4
+ font-weight: lighter;
5
+ }
6
+
7
+ footer {
8
+ @include main-family;
9
+ }
10
+
11
+ nav {
12
+ ul {
13
+ li {
14
+ @include main-family;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ %h2
2
+ Simple layout
@@ -0,0 +1,5 @@
1
+ class Caboodle::Vimeo < Caboodle::Kit
2
+ description "Displays your Vimeo.com videos"
3
+
4
+ menu "Vimeo"
5
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboodle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 14
10
- version: 0.2.14
9
+ - 15
10
+ version: 0.2.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stef Lewandowski
@@ -260,6 +260,7 @@ files:
260
260
  - lib/caboodle/app/public/images/favicon.ico
261
261
  - lib/caboodle/app/public/images/grid.png
262
262
  - lib/caboodle/app/public/js/application.js
263
+ - lib/caboodle/app/views/error.haml
263
264
  - lib/caboodle/app/views/layout.haml
264
265
  - lib/caboodle/command.rb
265
266
  - lib/caboodle/config.rb
@@ -273,11 +274,13 @@ files:
273
274
  - lib/caboodle/kits/beta/views/beta.scss
274
275
  - lib/caboodle/kits/broken/broken.rb
275
276
  - lib/caboodle/kits/carbonmade/carbonmade.rb
276
- - lib/caboodle/kits/carbonmade/views/carbonmade.haml
277
277
  - lib/caboodle/kits/carbonmade/views/carbonmade.scss
278
+ - lib/caboodle/kits/carbonmade/views/portfolio.haml
279
+ - lib/caboodle/kits/credits/credits.rb
280
+ - lib/caboodle/kits/credits/views/credits.haml
278
281
  - lib/caboodle/kits/debugger/debugger.rb
279
282
  - lib/caboodle/kits/disqus/disqus.rb
280
- - lib/caboodle/kits/disqus/views/disqus.haml
283
+ - lib/caboodle/kits/disqus/views/chat.haml
281
284
  - lib/caboodle/kits/flickr/flickr.rb
282
285
  - lib/caboodle/kits/flickr/public/galleria.noconflict.min.js
283
286
  - lib/caboodle/kits/flickr/views/photography.haml
@@ -288,8 +291,8 @@ files:
288
291
  - lib/caboodle/kits/github/views/github.haml
289
292
  - lib/caboodle/kits/googlelocal/config/googlelocal.yml
290
293
  - lib/caboodle/kits/googlelocal/googlelocal.rb
291
- - lib/caboodle/kits/googlelocal/views/googlelocal.haml
292
294
  - lib/caboodle/kits/googlelocal/views/googlelocal.scss
295
+ - lib/caboodle/kits/googlelocal/views/near_me.haml
293
296
  - lib/caboodle/kits/gravatar/gravatar.rb
294
297
  - lib/caboodle/kits/history/config/history.yml
295
298
  - lib/caboodle/kits/history/history.rb
@@ -316,7 +319,7 @@ files:
316
319
  - lib/caboodle/kits/seo/seo.rb
317
320
  - lib/caboodle/kits/skimmed/skimmed.rb
318
321
  - lib/caboodle/kits/soundcloud/soundcloud.rb
319
- - lib/caboodle/kits/soundcloud/views/soundcloud.haml
322
+ - lib/caboodle/kits/soundcloud/views/music.haml
320
323
  - lib/caboodle/kits/standard/standard.rb
321
324
  - lib/caboodle/kits/standard/views/standard.haml
322
325
  - lib/caboodle/kits/susy/susy.rb
@@ -343,6 +346,9 @@ files:
343
346
  - lib/caboodle/kits/twitter/views/twitter.scss
344
347
  - lib/caboodle/kits/typekit/public/typekit.js
345
348
  - lib/caboodle/kits/typekit/typekit.rb
349
+ - lib/caboodle/kits/typekit/views/typekit.scss
350
+ - lib/caboodle/kits/vimeo/views/vimeo.haml
351
+ - lib/caboodle/kits/vimeo/vimeo.rb
346
352
  - lib/caboodle/scrape.rb
347
353
  - test/helper.rb
348
354
  - test/test_caboodle.rb