caboodle 0.2.12 → 0.2.13
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.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/caboodle/command.rb +3 -1
- data/lib/caboodle/kit.rb +26 -1
- data/lib/caboodle/kits/beta/beta.rb +1 -1
- data/lib/caboodle/kits/carbonmade/carbonmade.rb +2 -0
- data/lib/caboodle/kits/carbonmade/views/carbonmade.scss +0 -0
- data/lib/caboodle/kits/debugger/debugger.rb +3 -4
- data/lib/caboodle/kits/geo/geo.rb +14 -0
- data/lib/caboodle/kits/github/views/github.haml +1 -1
- data/lib/caboodle/kits/googlelocal/config/googlelocal.yml +16 -0
- data/lib/caboodle/kits/googlelocal/googlelocal.rb +18 -0
- data/lib/caboodle/kits/googlelocal/views/googlelocal.haml +33 -0
- data/lib/caboodle/kits/googlelocal/views/googlelocal.scss +11 -0
- data/lib/caboodle/kits/history/history.rb +3 -1
- data/lib/caboodle/kits/history/views/history.haml +2 -2
- data/lib/caboodle/kits/linkedin/views/cv.haml +1 -1
- data/lib/caboodle/kits/soundcloud/views/soundcloud.haml +1 -1
- data/lib/caboodle/kits/susy/susy.rb +0 -2
- data/lib/caboodle/kits/susy/views/susy/screen.scss +21 -6
- data/lib/caboodle/kits/tumblr/views/tumblr.haml +1 -1
- data/lib/caboodle/kits/twitter/views/twitter.haml +1 -1
- data/lib/caboodle/scrape.rb +45 -0
- metadata +23 -8
- data/lib/caboodle/app/views/stylesheets/_base.scss +0 -49
- data/lib/caboodle/app/views/stylesheets/_defaults.scss +0 -257
- data/lib/caboodle/app/views/stylesheets/ie.scss +0 -10
- data/lib/caboodle/app/views/stylesheets/print.scss +0 -33
- data/lib/caboodle/app/views/stylesheets/screen.scss +0 -145
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.13
|
data/lib/caboodle/command.rb
CHANGED
@@ -13,8 +13,10 @@ module Caboodle
|
|
13
13
|
puts "Welcome to Caboodle!"
|
14
14
|
site_name = args.first
|
15
15
|
puts `mkdir -p #{site_name}`
|
16
|
-
puts `cd #{site_name} && cp -
|
16
|
+
puts `cd #{site_name} && cp -i #{File.expand_path(File.join(File.dirname(__FILE__), 'app'))}/config.ru .`
|
17
|
+
puts `cd #{site_name} && cp -ri #{File.expand_path(File.join(File.dirname(__FILE__), 'app'))}/config .`
|
17
18
|
puts `cd #{site_name} && cp -i #{File.expand_path(File.join(File.dirname(__FILE__), 'app'))}/.gems .`
|
19
|
+
puts `cd #{site_name} && cp -i #{File.expand_path(File.join(File.dirname(__FILE__), 'app'))}/public .`
|
18
20
|
puts `cd #{site_name} && git init`
|
19
21
|
config = File.expand_path(File.join(".",site_name,"config","site.yml"))
|
20
22
|
Caboodle::Kit.configure_site config
|
data/lib/caboodle/kit.rb
CHANGED
@@ -7,7 +7,7 @@ module Caboodle
|
|
7
7
|
set :root, File.expand_path(File.join(File.dirname(__FILE__),"app"))
|
8
8
|
set :public, Proc.new { File.join(root, "public") }
|
9
9
|
set :haml, {:format => :html5 }
|
10
|
-
|
10
|
+
|
11
11
|
helpers Sinatra::CaboodleHelpers
|
12
12
|
|
13
13
|
template :layout do
|
@@ -19,7 +19,10 @@ module Caboodle
|
|
19
19
|
response.headers['Cache-Control'] = "public, max-age=#{Caboodle::Site.cache_for}"
|
20
20
|
end
|
21
21
|
|
22
|
+
Config = Hashie::Mash.new
|
23
|
+
|
22
24
|
class << self
|
25
|
+
|
23
26
|
attr_accessor :credit_link
|
24
27
|
|
25
28
|
def configure_site config_path
|
@@ -53,6 +56,14 @@ module Caboodle
|
|
53
56
|
Caboodle::Site[k.to_s] = v } rescue puts "Warning! Skipping #{p}"
|
54
57
|
Caboodle::Site.kits.uniq!
|
55
58
|
end
|
59
|
+
|
60
|
+
def load_custom_config p
|
61
|
+
loaded = YAML.load_file(p)
|
62
|
+
Hashie::Mash.new(loaded).each{ |k,v|
|
63
|
+
v.strip! if v.class == String
|
64
|
+
Config[k.to_s] = v
|
65
|
+
}
|
66
|
+
end
|
56
67
|
|
57
68
|
def dump_config
|
58
69
|
begin
|
@@ -65,6 +76,20 @@ module Caboodle
|
|
65
76
|
puts "Cannot write to config file: #{p}"
|
66
77
|
end
|
67
78
|
end
|
79
|
+
|
80
|
+
def config_files array_of_files
|
81
|
+
configure do
|
82
|
+
array_of_files.each do |file|
|
83
|
+
config_path = File.expand_path(File.join(Caboodle::App.root,"config",file))
|
84
|
+
if File.exists?(config_path)
|
85
|
+
load_custom_config(config_path)
|
86
|
+
else
|
87
|
+
`cp "#{File.join(root,"config",file)}" "#{File.join(Caboodle::App.root,"config",".")}"` rescue "Could not create the config yml file"
|
88
|
+
puts "\nThis kit has a separate configuration file which you must edit:\n #{File.expand_path(File.join(Caboodle::App.root,"config",file))}\n"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
68
93
|
|
69
94
|
def setup
|
70
95
|
require_all
|
File without changes
|
@@ -4,12 +4,11 @@ module Caboodle
|
|
4
4
|
puts "Running debugger"
|
5
5
|
puts Caboodle::Debug.inspect
|
6
6
|
Caboodle::Debug.each do |debug|
|
7
|
-
Caboodle::Layout.
|
8
|
-
Caboodle::Layout.
|
9
|
-
Caboodle::Layout.
|
7
|
+
Caboodle::Layout.below_footer = "<div id='debug'>"
|
8
|
+
Caboodle::Layout.below_footer << "<p>#{debug}</p>"
|
9
|
+
Caboodle::Layout.below_footer << "</div>"
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rack-geo'
|
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
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
:google_local_locations:
|
2
|
+
Home:
|
3
|
+
description: My home is in North London
|
4
|
+
address: Southgate, London, UK
|
5
|
+
latitude: 51.511867
|
6
|
+
longitude: -0.127587
|
7
|
+
Work:
|
8
|
+
description: I work at All In near Leicester Square
|
9
|
+
address: 4-5 Great Newport Street, London, WC1 2EH
|
10
|
+
latitude: 51.632483
|
11
|
+
longitude: -0.127931
|
12
|
+
Old Stomping Ground:
|
13
|
+
description: I used to spend a lot of time in Birmingham
|
14
|
+
address: 4-5 Great Newport Street, London, WC1 2EH
|
15
|
+
latitude: 52.446594
|
16
|
+
longitude: -1.881065
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Caboodle
|
2
|
+
class Googlelocal < Caboodle::Kit
|
3
|
+
required [:google_maps_api_key]
|
4
|
+
|
5
|
+
config_files ["googlelocal.yml"]
|
6
|
+
|
7
|
+
stylesheets ["http://www.google.com/uds/solutions/mapsearch/gsmapsearch.css", "http://www.google.com/uds/css/gsearch.css"]
|
8
|
+
|
9
|
+
menu "Near me", "/near_me" do
|
10
|
+
@title = "Near me"
|
11
|
+
@locations = Config.google_local_locations
|
12
|
+
puts @locations.inspect
|
13
|
+
haml :googlelocal
|
14
|
+
end
|
15
|
+
|
16
|
+
add_sass ["googlelocal"]
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#mapsearch
|
2
|
+
%span
|
3
|
+
Loading...
|
4
|
+
|
5
|
+
%script{:src=>"http://maps.google.com/maps?file=api&v=2&key=#{Caboodle::Site.google_maps_api_key}", :type=>"text/javascript"}
|
6
|
+
%script{:src=>"http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-msw&key=#{Caboodle::Site.google_maps_api_key}", :type=>"text/javascript"}
|
7
|
+
:javascript
|
8
|
+
window._uds_msw_donotrepair = true;
|
9
|
+
%script{:src=>"http://www.google.com/uds/solutions/mapsearch/gsmapsearch.js?mode=new", :type=>"text/javascript"}
|
10
|
+
:javascript
|
11
|
+
var localSearch;
|
12
|
+
function LoadMapSearchControl() {
|
13
|
+
var options = {
|
14
|
+
zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
|
15
|
+
title : '#{Caboodle::Site.title}',
|
16
|
+
url : '#{request.host}',
|
17
|
+
idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1,
|
18
|
+
activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1
|
19
|
+
}
|
20
|
+
|
21
|
+
var center = new Object();
|
22
|
+
center.lat = #{@locations.first.latitude};
|
23
|
+
center.lng = #{@locations.first.longitude};
|
24
|
+
localSearch = new GSmapSearchControl(
|
25
|
+
document.getElementById("mapsearch"),
|
26
|
+
center,
|
27
|
+
options
|
28
|
+
);
|
29
|
+
}
|
30
|
+
$(document).ready(function(){LoadMapSearchControl()});
|
31
|
+
|
32
|
+
%h2
|
33
|
+
Search for something in the local area
|
@@ -12,7 +12,9 @@ require "sinatra/advanced_routes"
|
|
12
12
|
|
13
13
|
module Caboodle
|
14
14
|
class History < Caboodle::Kit
|
15
|
-
|
15
|
+
|
16
|
+
config_files ["history.yml"]
|
17
|
+
|
16
18
|
configure do
|
17
19
|
config_path = File.expand_path(File.join(Caboodle::App.root,"config","history.yml"))
|
18
20
|
if File.exists?(config_path)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- #todo - this should be a vcalendar
|
2
2
|
#history.page
|
3
3
|
%dl
|
4
|
-
- if Caboodle::
|
5
|
-
- Caboodle::
|
4
|
+
- if Caboodle::History.config.history_years.respond_to?(:sort)
|
5
|
+
- Caboodle::History.config.history_years.sort.reverse.each do |year,items|
|
6
6
|
%dt.year{:class=>year}
|
7
7
|
= year
|
8
8
|
%dd
|
@@ -16,7 +16,6 @@ module Caboodle
|
|
16
16
|
content_type 'text/css', :charset => 'utf-8'
|
17
17
|
sass_dir = File.expand_path(File.join(File.dirname(__FILE__),"views","susy"))
|
18
18
|
load_paths = [Caboodle::App.root, File.join(Caboodle::App.root,"views"), File.join(Caboodle::App.root,"views","stylesheets"), sass_dir] + ::Compass.sass_engine_options[:load_paths]
|
19
|
-
Caboodle::Layout.after_footer ||= ""
|
20
19
|
Caboodle::Kits.each do |name|
|
21
20
|
kit_name = name.to_s.split("::").last || name
|
22
21
|
kit_name = kit_name.downcase
|
@@ -28,7 +27,6 @@ module Caboodle
|
|
28
27
|
the_sass = open(File.join(File.dirname(__FILE__),"views","susy","screen.scss")).read
|
29
28
|
imported_files = []
|
30
29
|
Caboodle::SASS.each do |s|
|
31
|
-
Caboodle::Layout.after_footer << "<p>#{s}</p>"
|
32
30
|
the_sass << "\n"
|
33
31
|
add_file = "@import \"#{s}\";"
|
34
32
|
imported_files << add_file
|
@@ -29,8 +29,8 @@ header#site-header {
|
|
29
29
|
@include leader(6,32px);
|
30
30
|
@include trailer(2,32px);
|
31
31
|
#logo {
|
32
|
-
@include columns(
|
33
|
-
|
32
|
+
@include columns(2,12);
|
33
|
+
|
34
34
|
img {
|
35
35
|
width: 64px;
|
36
36
|
height: auto;
|
@@ -126,15 +126,30 @@ section.subsection {
|
|
126
126
|
|
127
127
|
.page {
|
128
128
|
iframe {
|
129
|
-
|
129
|
+
@include columns(12,12);
|
130
130
|
height: 580px;
|
131
|
-
|
132
|
-
|
133
|
-
|
131
|
+
@include rhythm-borders(8px);
|
132
|
+
border-color: #eee;
|
133
|
+
padding: 0px;
|
134
134
|
scroll: none;
|
135
135
|
}
|
136
136
|
}
|
137
137
|
|
138
|
+
.page.thin_page {
|
139
|
+
iframe {
|
140
|
+
@include columns(10,10);
|
141
|
+
height: 580px;
|
142
|
+
@include rhythm-borders(8px);
|
143
|
+
border-color: #eee;
|
144
|
+
padding: 0px;
|
145
|
+
scroll: none;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
.thin_page {
|
150
|
+
@include prefix(2);
|
151
|
+
}
|
152
|
+
|
138
153
|
#testing {
|
139
154
|
background-color: red;
|
140
155
|
}
|
data/lib/caboodle/scrape.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'nokogiri'
|
2
2
|
require 'hashie'
|
3
|
+
require 'net/http'
|
3
4
|
|
4
5
|
module Caboodle
|
5
6
|
def self.scrape url
|
@@ -9,4 +10,48 @@ module Caboodle
|
|
9
10
|
def self.mash req
|
10
11
|
::Hashie::Mash.new(req.perform_sleepily.parse)
|
11
12
|
end
|
13
|
+
|
14
|
+
def self.extract_feed url
|
15
|
+
Caboodle::FeedDetector.fetch_feed_url url
|
16
|
+
end
|
17
|
+
|
18
|
+
class FeedDetector
|
19
|
+
|
20
|
+
##
|
21
|
+
# return the feed url for a url
|
22
|
+
# for example: http://blog.dominiek.com/ => http://blog.dominiek.com/feed/atom.xml
|
23
|
+
# only_detect can force detection of :rss or :atom
|
24
|
+
def self.fetch_feed_url(page_url, only_detect=nil)
|
25
|
+
url = URI.parse(page_url)
|
26
|
+
host_with_port = url.host
|
27
|
+
host_with_port << ":#{url.port}" unless url.port == 80
|
28
|
+
|
29
|
+
res = Weary.get(page_url).perform_sleepily
|
30
|
+
|
31
|
+
feed_url = self.get_feed_path(res.body, only_detect)
|
32
|
+
"http://#{host_with_port}/#{feed_url.gsub(/^\//, '')}" unless !feed_url || feed_url =~ /^http:\/\//
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# get the feed href from an HTML document
|
37
|
+
# for example:
|
38
|
+
# ...
|
39
|
+
# <link href="/feed/atom.xml" rel="alternate" type="application/atom+xml" />
|
40
|
+
# ...
|
41
|
+
# => /feed/atom.xml
|
42
|
+
# only_detect can force detection of :rss or :atom
|
43
|
+
def self.get_feed_path(html, only_detect=nil)
|
44
|
+
unless only_detect && only_detect != :atom
|
45
|
+
md ||= /<link.*href=['"]*([^\s'"]+)['"]*.*application\/atom\+xml.*>/.match(html)
|
46
|
+
md ||= /<link.*application\/atom\+xml.*href=['"]*([^\s'"]+)['"]*.*>/.match(html)
|
47
|
+
end
|
48
|
+
unless only_detect && only_detect != :rss
|
49
|
+
md ||= /<link.*href=['"]*([^\s'"]+)['"]*.*application\/rss\+xml.*>/.match(html)
|
50
|
+
md ||= /<link.*application\/rss\+xml.*href=['"]*([^\s'"]+)['"]*.*>/.match(html)
|
51
|
+
end
|
52
|
+
md && md[1]
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
12
57
|
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:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 13
|
10
|
+
version: 0.2.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stef Lewandowski
|
@@ -191,6 +191,20 @@ dependencies:
|
|
191
191
|
version: "0"
|
192
192
|
type: :runtime
|
193
193
|
version_requirements: *id011
|
194
|
+
- !ruby/object:Gem::Dependency
|
195
|
+
name: rack-geo
|
196
|
+
prerelease: false
|
197
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
hash: 3
|
203
|
+
segments:
|
204
|
+
- 0
|
205
|
+
version: "0"
|
206
|
+
type: :runtime
|
207
|
+
version_requirements: *id012
|
194
208
|
description: Caboodle is a Rack and Sinatra-based framework for creating websites which combine information from various online services. There are Kits for many of the larger services, which provide a way to retrieve and display photos, videos, blog posts, status updates and so on. Caboodle normalises the display of all of these discrete Kits so that you can create a website which looks seamless but is made up of a variety of things from a variety of sources.
|
195
209
|
email: stef@stef.io
|
196
210
|
executables:
|
@@ -233,11 +247,6 @@ files:
|
|
233
247
|
- lib/caboodle/app/public/images/grid.png
|
234
248
|
- lib/caboodle/app/public/js/application.js
|
235
249
|
- lib/caboodle/app/views/layout.haml
|
236
|
-
- lib/caboodle/app/views/stylesheets/_base.scss
|
237
|
-
- lib/caboodle/app/views/stylesheets/_defaults.scss
|
238
|
-
- lib/caboodle/app/views/stylesheets/ie.scss
|
239
|
-
- lib/caboodle/app/views/stylesheets/print.scss
|
240
|
-
- lib/caboodle/app/views/stylesheets/screen.scss
|
241
250
|
- lib/caboodle/command.rb
|
242
251
|
- lib/caboodle/config.rb
|
243
252
|
- lib/caboodle/config/defaults.yml
|
@@ -249,6 +258,7 @@ files:
|
|
249
258
|
- lib/caboodle/kits/broken/broken.rb
|
250
259
|
- lib/caboodle/kits/carbonmade/carbonmade.rb
|
251
260
|
- lib/caboodle/kits/carbonmade/views/carbonmade.haml
|
261
|
+
- lib/caboodle/kits/carbonmade/views/carbonmade.scss
|
252
262
|
- lib/caboodle/kits/debugger/debugger.rb
|
253
263
|
- lib/caboodle/kits/disqus/disqus.rb
|
254
264
|
- lib/caboodle/kits/disqus/views/disqus.haml
|
@@ -256,9 +266,14 @@ files:
|
|
256
266
|
- lib/caboodle/kits/flickr/public/galleria.noconflict.min.js
|
257
267
|
- lib/caboodle/kits/flickr/views/photography.haml
|
258
268
|
- lib/caboodle/kits/flickr/views/photography.scss
|
269
|
+
- lib/caboodle/kits/geo/geo.rb
|
259
270
|
- lib/caboodle/kits/github/github.rb
|
260
271
|
- lib/caboodle/kits/github/views/_repo.haml
|
261
272
|
- lib/caboodle/kits/github/views/github.haml
|
273
|
+
- lib/caboodle/kits/googlelocal/config/googlelocal.yml
|
274
|
+
- lib/caboodle/kits/googlelocal/googlelocal.rb
|
275
|
+
- lib/caboodle/kits/googlelocal/views/googlelocal.haml
|
276
|
+
- lib/caboodle/kits/googlelocal/views/googlelocal.scss
|
262
277
|
- lib/caboodle/kits/gravatar/gravatar.rb
|
263
278
|
- lib/caboodle/kits/history/config/history.yml
|
264
279
|
- lib/caboodle/kits/history/history.rb
|
@@ -1,49 +0,0 @@
|
|
1
|
-
//**
|
2
|
-
// Susy: Un-obtrusive grids for designers
|
3
|
-
// By: Eric A. Meyer and OddBird
|
4
|
-
// Site: www.oddbird.net/susy/
|
5
|
-
//**
|
6
|
-
|
7
|
-
// Font Sizes --------------------------------------------------------------
|
8
|
-
|
9
|
-
$base-font-size: 16px;
|
10
|
-
$base-line-height: 24px;
|
11
|
-
|
12
|
-
// Grid --------------------------------------------------------------
|
13
|
-
|
14
|
-
$total-cols: 12;
|
15
|
-
$col-width: 4em;
|
16
|
-
$gutter-width: 1em;
|
17
|
-
$side-gutter-width: $gutter-width;
|
18
|
-
|
19
|
-
// Don't move this @import above the GRID and FONT-SIZE variables.
|
20
|
-
@import "susy/susy";
|
21
|
-
|
22
|
-
// Colors --------------------------------------------------------------
|
23
|
-
|
24
|
-
$base: #4c4c4c;
|
25
|
-
$alt: #ff6600;
|
26
|
-
|
27
|
-
// Fonts --------------------------------------------------------------
|
28
|
-
|
29
|
-
@mixin sans-family {
|
30
|
-
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
31
|
-
font-weight: lighter;
|
32
|
-
}
|
33
|
-
|
34
|
-
@mixin serif-family {
|
35
|
-
font-family: 'Adobe Caslon Pro', Caslon, Baskerville, Palatino, 'Palatino Linotype', "Hoefler Text", Garamond, "URW Palladio L", "Book Antiqua", Georgia, serif;
|
36
|
-
}
|
37
|
-
|
38
|
-
@mixin monospace-family {
|
39
|
-
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
|
40
|
-
}
|
41
|
-
|
42
|
-
@mixin slab-family {
|
43
|
-
font-family: "museo-slab-1", "Helvetica Neue", Arial, Helvetica, sans-serif;
|
44
|
-
font-weight: lighter;
|
45
|
-
}
|
46
|
-
|
47
|
-
// OTHER MIXINS --------------------------------------------------------------
|
48
|
-
// Mixins set here will be available in defaults, screen, print and IE
|
49
|
-
// Or anywhere you import either base.sass or defaults.sass
|
@@ -1,257 +0,0 @@
|
|
1
|
-
//** DEFAULT STYLES **//
|
2
|
-
|
3
|
-
// Based on the work of:
|
4
|
-
// Andy Clarke: http://forabeautifulweb.com/
|
5
|
-
|
6
|
-
// Imports --------------------------------------------------------------*/
|
7
|
-
|
8
|
-
@import "base";
|
9
|
-
@import "susy/reset";
|
10
|
-
|
11
|
-
/* Body --------------------------------------------------------------*/
|
12
|
-
|
13
|
-
body {
|
14
|
-
@include serif-family;
|
15
|
-
color: $base;
|
16
|
-
}
|
17
|
-
|
18
|
-
/* Links --------------------------------------------------------------*/
|
19
|
-
|
20
|
-
a {
|
21
|
-
&:link, &:visited {
|
22
|
-
color: $alt;
|
23
|
-
}
|
24
|
-
&:focus, &:hover, &:active {
|
25
|
-
color: darken($alt,5);
|
26
|
-
text-decoration: none;
|
27
|
-
}
|
28
|
-
img {
|
29
|
-
border: none;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
/* Headings --------------------------------------------------------------*/
|
34
|
-
|
35
|
-
h1, h2, h3, h4, h5, h6 {
|
36
|
-
font-weight: normal;
|
37
|
-
img {
|
38
|
-
margin: 0;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
h1 {
|
43
|
-
@include adjust-font-size-to(48px);
|
44
|
-
@include trailer(1,48px);
|
45
|
-
}
|
46
|
-
|
47
|
-
h2 {
|
48
|
-
@include adjust-font-size-to(32px);
|
49
|
-
@include trailer(1,32px);
|
50
|
-
}
|
51
|
-
|
52
|
-
h3 {
|
53
|
-
@include adjust-font-size-to(24px);
|
54
|
-
@include trailer(1,24px);
|
55
|
-
}
|
56
|
-
|
57
|
-
h4 {
|
58
|
-
@include adjust-font-size-to(18px);
|
59
|
-
@include trailer(1,18px);
|
60
|
-
}
|
61
|
-
|
62
|
-
h5, h6 {
|
63
|
-
@include trailer(1);
|
64
|
-
font-weight: bold;
|
65
|
-
}
|
66
|
-
|
67
|
-
/* Text --------------------------------------------------------------*/
|
68
|
-
|
69
|
-
cite, em, dfn {
|
70
|
-
font-style: italic;
|
71
|
-
}
|
72
|
-
|
73
|
-
strong, dfn {
|
74
|
-
font-weight: bold;
|
75
|
-
}
|
76
|
-
|
77
|
-
sup, sub {
|
78
|
-
line-height: 0;
|
79
|
-
}
|
80
|
-
|
81
|
-
abbr, acronym {
|
82
|
-
border-bottom: 1px dotted;
|
83
|
-
cursor: help;
|
84
|
-
}
|
85
|
-
|
86
|
-
address {
|
87
|
-
@include trailer;
|
88
|
-
font-style: italic;
|
89
|
-
}
|
90
|
-
|
91
|
-
ins {
|
92
|
-
text-decoration: underline;
|
93
|
-
}
|
94
|
-
|
95
|
-
del {
|
96
|
-
text-decoration: line-through;
|
97
|
-
}
|
98
|
-
|
99
|
-
pre, code, tt {
|
100
|
-
margin: $base-rhythm-unit {
|
101
|
-
left: -$base-rhythm-unit;
|
102
|
-
};
|
103
|
-
padding-left: $base-rhythm-unit;
|
104
|
-
border-left: 1px dotted;
|
105
|
-
@include monospace-family;
|
106
|
-
}
|
107
|
-
|
108
|
-
pre {
|
109
|
-
white-space: pre;
|
110
|
-
}
|
111
|
-
|
112
|
-
code {
|
113
|
-
display: block;
|
114
|
-
}
|
115
|
-
|
116
|
-
q {
|
117
|
-
font-style: italic;
|
118
|
-
em {
|
119
|
-
font-style: normal;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
p {
|
124
|
-
@include trailer;
|
125
|
-
}
|
126
|
-
|
127
|
-
blockquote, q {
|
128
|
-
quotes : "" "";
|
129
|
-
}
|
130
|
-
|
131
|
-
blockquote {
|
132
|
-
margin: $base-rhythm-unit {
|
133
|
-
left: -$base-rhythm-unit;
|
134
|
-
};
|
135
|
-
padding-left: $base-rhythm-unit;
|
136
|
-
border-left: 1px solid;
|
137
|
-
@include serif-family;
|
138
|
-
font-style: italic;
|
139
|
-
}
|
140
|
-
|
141
|
-
blockquote, q {
|
142
|
-
&:before, &:after {
|
143
|
-
content: "";
|
144
|
-
}
|
145
|
-
}
|
146
|
-
|
147
|
-
/* Replaced --------------------------------------------------------------*/
|
148
|
-
|
149
|
-
img {
|
150
|
-
vertical-align: bottom;
|
151
|
-
}
|
152
|
-
|
153
|
-
/* Lists --------------------------------------------------------------*/
|
154
|
-
|
155
|
-
@mixin list-default($ol: false) {
|
156
|
-
margin: 0 $base-rhythm-unit $base-rhythm-unit 0;
|
157
|
-
@if $ol {
|
158
|
-
list-style: decimal;
|
159
|
-
} @else {
|
160
|
-
list-style: disc;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
@mixin no-style-list {
|
165
|
-
@include no-bullets;
|
166
|
-
margin: 0;
|
167
|
-
padding: 0;
|
168
|
-
}
|
169
|
-
|
170
|
-
ol {
|
171
|
-
@include list-default(ol);
|
172
|
-
}
|
173
|
-
|
174
|
-
ul {
|
175
|
-
@include list-default;
|
176
|
-
}
|
177
|
-
|
178
|
-
li {
|
179
|
-
ul, ol {
|
180
|
-
list-style-type: circle;
|
181
|
-
margin: 0 $base-rhythm-unit $base-rhythm-unit*.5;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
|
185
|
-
dl {
|
186
|
-
@include trailer;
|
187
|
-
@include leading-border(1px);
|
188
|
-
dt {
|
189
|
-
@include adjust-font-size-to(18px);
|
190
|
-
@include trailer(.5,18px);
|
191
|
-
}
|
192
|
-
}
|
193
|
-
|
194
|
-
dd {
|
195
|
-
@include trailer;
|
196
|
-
@include trailing-border(1px);
|
197
|
-
}
|
198
|
-
|
199
|
-
/* Tables --------------------------------------------------------------*/
|
200
|
-
/* tables still need 'cellspacing="0"' in the markup */
|
201
|
-
|
202
|
-
table {
|
203
|
-
@include trailer;
|
204
|
-
width: 100%;
|
205
|
-
border-collapse: separate;
|
206
|
-
border-spacing: 0;
|
207
|
-
}
|
208
|
-
|
209
|
-
table, td, th {
|
210
|
-
vertical-align: top;
|
211
|
-
}
|
212
|
-
|
213
|
-
th, thead th {
|
214
|
-
font-weight: bold;
|
215
|
-
}
|
216
|
-
|
217
|
-
th, td, caption {
|
218
|
-
padding: $base-rhythm-unit*.5;
|
219
|
-
text-align: left;
|
220
|
-
font-weight: normal;
|
221
|
-
}
|
222
|
-
|
223
|
-
th, td {
|
224
|
-
@include trailing-border(1px,.5);
|
225
|
-
}
|
226
|
-
|
227
|
-
tfoot {
|
228
|
-
@include adjust-font-size-to(14px);
|
229
|
-
}
|
230
|
-
|
231
|
-
caption {
|
232
|
-
@include adjust-font-size-to(24px);
|
233
|
-
@include trailer(1,24px);
|
234
|
-
}
|
235
|
-
|
236
|
-
/* Forms --------------------------------------------------------------*/
|
237
|
-
|
238
|
-
fieldset {
|
239
|
-
@include trailer;
|
240
|
-
@include rhythm-borders(1px);
|
241
|
-
}
|
242
|
-
|
243
|
-
legend {
|
244
|
-
@include adjust-font-size-to(18px);
|
245
|
-
font-weight: bold;
|
246
|
-
}
|
247
|
-
|
248
|
-
label {
|
249
|
-
font-weight: bold;
|
250
|
-
}
|
251
|
-
|
252
|
-
textarea, input:not([type="radio"]) {
|
253
|
-
// box-sizing will help us control the width of inputs
|
254
|
-
// which are otherwise very hard to manage in the grid.
|
255
|
-
@include box-sizing(border-box);
|
256
|
-
width: 100%;
|
257
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/* Welcome to Susy. Use this file to write IE specific override styles.
|
2
|
-
* Import this file using the following HTML or equivalent:
|
3
|
-
* <!--[if IE]>
|
4
|
-
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
5
|
-
* <![endif]--> */
|
6
|
-
|
7
|
-
// Imports --------------------------------------------------------------*/
|
8
|
-
|
9
|
-
@import "base";
|
10
|
-
|
@@ -1,33 +0,0 @@
|
|
1
|
-
/* Welcome to Susy. Use this file to define print styles.
|
2
|
-
* Import this file using the following HTML or equivalent:
|
3
|
-
* <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" /> */
|
4
|
-
|
5
|
-
// Imports --------------------------------------------------------------*/
|
6
|
-
|
7
|
-
@import "defaults";
|
8
|
-
|
9
|
-
/* Print Defaults --------------------------------------------------------------*/
|
10
|
-
|
11
|
-
@mixin print {
|
12
|
-
nav {
|
13
|
-
// no need to navigate on paper
|
14
|
-
display: none;
|
15
|
-
}
|
16
|
-
* {
|
17
|
-
// floated elements disappear when they overflow the page
|
18
|
-
float: none !important;
|
19
|
-
background: none;
|
20
|
-
}
|
21
|
-
body {
|
22
|
-
@include serif-family;
|
23
|
-
font-size: 12pt;
|
24
|
-
background: white;
|
25
|
-
color: black;
|
26
|
-
}
|
27
|
-
a:link:after, a:visited:after {
|
28
|
-
// print target URLs next to their links
|
29
|
-
content: " (" attr(href) ") ";
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
@include print;
|
@@ -1,145 +0,0 @@
|
|
1
|
-
/* Welcome to Susy. Use this file to define screen styles.
|
2
|
-
* Import this file using the following HTML or equivalent:
|
3
|
-
* <link href="/stylesheets/screen.css" media="screen" rel="stylesheet" type="text/css" /> */
|
4
|
-
|
5
|
-
// Imports --------------------------------------------------------------*/
|
6
|
-
|
7
|
-
@import "defaults";
|
8
|
-
|
9
|
-
/* Layout --------------------------------------------------------------*/
|
10
|
-
|
11
|
-
@include susy;
|
12
|
-
|
13
|
-
// change '#page' to match your HTML container element(s)
|
14
|
-
#page {
|
15
|
-
@include container;
|
16
|
-
//@include show-grid("grid.png");
|
17
|
-
@include sans-family;
|
18
|
-
}
|
19
|
-
|
20
|
-
// show-grid loads a 64+16x24 grid image by default
|
21
|
-
// For other grid settings, run `compass grid-img 30+10x20`
|
22
|
-
// Where 30 is the column width, 10 is the gutter width,
|
23
|
-
// and 20 is the (optional) line-height.
|
24
|
-
|
25
|
-
/* Styles --------------------------------------------------------------*/
|
26
|
-
|
27
|
-
header#site-header {
|
28
|
-
@include full;
|
29
|
-
@include leader(6,32px);
|
30
|
-
@include trailer(2,32px);
|
31
|
-
#logo {
|
32
|
-
@include columns(1,12);
|
33
|
-
@include prefix(1);
|
34
|
-
img {
|
35
|
-
width: 64px;
|
36
|
-
height: auto;
|
37
|
-
|
38
|
-
}
|
39
|
-
}
|
40
|
-
#site-title {
|
41
|
-
@include columns(5,12);
|
42
|
-
h1{
|
43
|
-
@include adjust-font-size-to(24px);
|
44
|
-
color: black;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
#site-description {
|
48
|
-
@include columns(5,12);
|
49
|
-
h2 {
|
50
|
-
@include adjust-font-size-to(24px);
|
51
|
-
color: #ddd;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
nav {
|
55
|
-
@include trailer(1,32px);
|
56
|
-
@include prefix(2);
|
57
|
-
ul {
|
58
|
-
@include inline-block-list(12px);
|
59
|
-
li {
|
60
|
-
@include slab-family;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
65
|
-
|
66
|
-
#access {
|
67
|
-
@include skip-link();
|
68
|
-
}
|
69
|
-
|
70
|
-
section#main {
|
71
|
-
@include full;
|
72
|
-
header#page_title
|
73
|
-
{
|
74
|
-
h1, h2 {
|
75
|
-
@include adjust-font-size-to(48px);
|
76
|
-
color: #aaa;
|
77
|
-
@include prefix(2);
|
78
|
-
}
|
79
|
-
}
|
80
|
-
section#content {
|
81
|
-
min-height: 320px;
|
82
|
-
@include prefix(0);
|
83
|
-
@include columns(12,12);
|
84
|
-
@include leader(1,32px);
|
85
|
-
h1, h2 {
|
86
|
-
@include adjust-font-size-to(24px);
|
87
|
-
}
|
88
|
-
article {
|
89
|
-
@include trailer(2,32px);
|
90
|
-
aside {
|
91
|
-
color: #aaa;
|
92
|
-
a {
|
93
|
-
color: #999;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
}
|
98
|
-
aside#sidebar {
|
99
|
-
@include columns(2,12);
|
100
|
-
ul {
|
101
|
-
@include no-style-list;
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
footer {
|
107
|
-
@include prefix(2);
|
108
|
-
@include full;
|
109
|
-
@include slab-family;
|
110
|
-
}
|
111
|
-
|
112
|
-
section.subsection {
|
113
|
-
@include columns(12,12);
|
114
|
-
aside.submenu {
|
115
|
-
@include columns(2,12);
|
116
|
-
ul {
|
117
|
-
@include no-style-list;
|
118
|
-
@include adjust-font-size-to(12px);
|
119
|
-
}
|
120
|
-
}
|
121
|
-
|
122
|
-
section.subpage {
|
123
|
-
@include columns(9,12);
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
.page {
|
128
|
-
@include prefix(2);
|
129
|
-
iframe {
|
130
|
-
width: 580px;
|
131
|
-
height: 580px;
|
132
|
-
background-color: #eee;
|
133
|
-
padding: 32px;
|
134
|
-
overflow: hidden;
|
135
|
-
scroll: none;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
#testing {
|
140
|
-
background-color: red;
|
141
|
-
}
|
142
|
-
|
143
|
-
section#errors {
|
144
|
-
background-color: #ffdddd;
|
145
|
-
}
|