gumdrop 0.2.13 → 0.2.14
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/ChangeLog.md +4 -0
- data/lib/gumdrop.rb +40 -11
- data/lib/gumdrop/cli.rb +12 -5
- data/lib/gumdrop/content.rb +3 -3
- data/lib/gumdrop/dsl.rb +19 -0
- data/lib/gumdrop/generator.rb +0 -17
- data/lib/gumdrop/template/{Gemfile → default/Gemfile} +0 -0
- data/lib/gumdrop/template/{Rakefile → default/Rakefile} +0 -0
- data/lib/gumdrop/template/{config.ru → default/config.ru} +0 -0
- data/lib/gumdrop/template/{data → default/data}/config.yml +0 -0
- data/lib/gumdrop/template/{lib → default/lib}/site.rb +0 -0
- data/lib/gumdrop/template/{lib → default/lib}/view_helpers.rb +0 -0
- data/lib/gumdrop/template/{default.htaccess → default/source/default.htaccess} +0 -0
- data/lib/gumdrop/template/{source → default/source}/favicon.ico +0 -0
- data/lib/gumdrop/template/{source → default/source}/feed.xml.builder.txt +0 -0
- data/lib/gumdrop/template/{source → default/source}/index.html.erb +0 -0
- data/lib/gumdrop/template/{source → default/source}/theme/screen.css.sass +0 -0
- data/lib/gumdrop/template/{source → default/source}/theme/scripts/app.js.coffee +0 -0
- data/lib/gumdrop/template/{source → default/source}/theme/styles/_tools.scss +0 -0
- data/lib/gumdrop/template/{source → default/source}/theme/templates/site.template.slim +0 -0
- data/lib/gumdrop/template/twitter/Gemfile +28 -0
- data/lib/gumdrop/template/twitter/Rakefile +35 -0
- data/lib/gumdrop/template/twitter/config.ru +17 -0
- data/lib/gumdrop/template/twitter/data/config.yml +4 -0
- data/lib/gumdrop/template/twitter/lib/site.rb +43 -0
- data/lib/gumdrop/template/twitter/lib/view_helpers.rb +17 -0
- data/lib/gumdrop/template/twitter/source/_sidebar.html.slim +1 -0
- data/lib/gumdrop/template/twitter/source/container-app.html.slim +89 -0
- data/lib/gumdrop/template/twitter/source/default.htaccess +16 -0
- data/lib/gumdrop/template/twitter/source/favicon.ico +0 -0
- data/lib/gumdrop/template/twitter/source/feed.xml.builder.txt +23 -0
- data/lib/gumdrop/template/twitter/source/fluid.html.slim +134 -0
- data/lib/gumdrop/template/twitter/source/hero.html.slim +49 -0
- data/lib/gumdrop/template/twitter/source/index.html.erb +10 -0
- data/lib/gumdrop/template/twitter/source/theme/screen.css.sass +3 -0
- data/lib/gumdrop/template/twitter/source/theme/scripts/app.js.coffee +4 -0
- data/lib/gumdrop/template/twitter/source/theme/scripts/jquery.js +4 -0
- data/lib/gumdrop/template/twitter/source/theme/styles/_tools.scss +434 -0
- data/lib/gumdrop/template/twitter/source/theme/templates/site.template.slim +19 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/LICENSE +13 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/Makefile +30 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/README.md +115 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/bootstrap-min.css +330 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/bootstrap.css +2362 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/css/docs.css +317 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/favicon.ico +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/bird.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/browsers.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-01.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-02.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-03.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/grid-18px.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/twitter-logo-no-bird.png +0 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/application.js +52 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/google-code-prettify/prettify.css +41 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/google-code-prettify/prettify.js +28 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/index.html +1932 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/docs/javascript.html +676 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/examples/container-app.html +119 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/examples/fluid.html +126 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/examples/hero.html +79 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-alerts.js +104 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-dropdown.js +50 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-modal.js +238 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-popover.js +77 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-scrollspy.js +105 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-tabs.js +62 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-twipsy.js +307 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/index.html +38 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-alerts.js +41 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-dropdown.js +52 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-modal.js +151 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-popover.js +76 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-scrollspy.js +31 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-tabs.js +49 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-twipsy.js +81 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/vendor/qunit.css +232 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/vendor/qunit.js +1510 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/bootstrap.less +26 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/forms.less +465 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/mixins.less +217 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/patterns.less +1005 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/reset.less +141 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/scaffolding.less +135 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/tables.less +171 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/type.less +187 -0
- data/lib/gumdrop/template/twitter/source/theme/twitter/lib/variables.less +60 -0
- data/lib/gumdrop/version.rb +1 -1
- metadata +98 -27
data/ChangeLog.md
CHANGED
data/lib/gumdrop.rb
CHANGED
@@ -7,7 +7,14 @@ DEFAULT_OPTIONS= {
|
|
7
7
|
:relative_paths => true,
|
8
8
|
:auto_run => false,
|
9
9
|
:force_reload => false,
|
10
|
-
:root => "."
|
10
|
+
:root => ".",
|
11
|
+
:log_level => :info
|
12
|
+
}
|
13
|
+
|
14
|
+
LOG_LEVELS = {
|
15
|
+
:info => 0,
|
16
|
+
:warning => 1,
|
17
|
+
:error => 2
|
11
18
|
}
|
12
19
|
|
13
20
|
module Gumdrop
|
@@ -15,9 +22,9 @@ module Gumdrop
|
|
15
22
|
autoload :Context, "gumdrop/context"
|
16
23
|
autoload :Content, "gumdrop/content"
|
17
24
|
autoload :DeferredLoader, "gumdrop/deferred_loader"
|
25
|
+
autoload :DSL, "gumdrop/dsl"
|
18
26
|
autoload :Generator, "gumdrop/generator"
|
19
27
|
autoload :GeneratedrContent, "gumdrop/generator"
|
20
|
-
autoload :GenerationDSL, "gumdrop/generator"
|
21
28
|
autoload :HashObject, "gumdrop/hash_object"
|
22
29
|
autoload :Pager, "gumdrop/pager"
|
23
30
|
autoload :Server, "gumdrop/server"
|
@@ -27,7 +34,7 @@ module Gumdrop
|
|
27
34
|
|
28
35
|
class << self
|
29
36
|
|
30
|
-
attr_accessor :root_path, :source_path, :site, :layouts, :generators, :partials, :config, :data, :content_filters
|
37
|
+
attr_accessor :root_path, :source_path, :site, :layouts, :generators, :partials, :config, :data, :content_filters, :blacklist
|
31
38
|
|
32
39
|
def run(opts={})
|
33
40
|
# Opts
|
@@ -39,7 +46,6 @@ module Gumdrop
|
|
39
46
|
if File.exists? "#{root}/lib/view_helpers.rb"
|
40
47
|
# In server mode, we want to reload it every time... right?
|
41
48
|
load "#{root}/lib/view_helpers.rb"
|
42
|
-
#require 'view_helpers'
|
43
49
|
end
|
44
50
|
|
45
51
|
@site = Hash.new {|h,k| h[k]= nil }
|
@@ -51,13 +57,12 @@ module Gumdrop
|
|
51
57
|
@data = Gumdrop::DeferredLoader.new()
|
52
58
|
|
53
59
|
@content_filters= []
|
60
|
+
@blacklist = []
|
54
61
|
|
55
62
|
if File.exists? "#{root}/lib/site.rb"
|
56
63
|
# In server mode, we want to reload it every time... right?
|
57
64
|
source= IO.readlines("#{root}/lib/site.rb").join('')
|
58
|
-
|
59
|
-
#load "#{root}/lib/site.rb"
|
60
|
-
# require 'site'
|
65
|
+
DSL.class_eval source
|
61
66
|
end
|
62
67
|
|
63
68
|
# Scan
|
@@ -89,20 +94,44 @@ module Gumdrop
|
|
89
94
|
generator.execute()
|
90
95
|
end
|
91
96
|
|
97
|
+
@blacklist.each do |skip_path|
|
98
|
+
@site.keys.each do |source_path|
|
99
|
+
if source_path.starts_with? skip_path
|
100
|
+
Gumdrop.report " -ignoring: #{source_path}", :info
|
101
|
+
@site.delete source_path
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
92
105
|
|
93
106
|
# Render
|
94
107
|
unless opts[:dry_run]
|
95
108
|
site.keys.sort.each do |path|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
109
|
+
#unless @blacklist.detect {|p| path.starts_with?(p) }
|
110
|
+
node= site[path]
|
111
|
+
output_path= "output/#{node.to_s}"
|
112
|
+
FileUtils.mkdir_p File.dirname(output_path)
|
113
|
+
node.renderTo output_path, @content_filters
|
114
|
+
# else
|
115
|
+
# Gumdrop.report " -ignoring: #{path}", :info
|
116
|
+
# end
|
100
117
|
end
|
101
118
|
puts "Done."
|
102
119
|
end
|
103
120
|
|
104
121
|
end
|
105
122
|
|
123
|
+
# levels: info, warning, error
|
124
|
+
def report(msg, level=:info)
|
125
|
+
ll= Gumdrop.config.log_level
|
126
|
+
case level
|
127
|
+
when :info
|
128
|
+
puts msg if ll == :info
|
129
|
+
when :warning
|
130
|
+
puts msg if ll == :info or ll == :warning
|
131
|
+
else
|
132
|
+
puts msg
|
133
|
+
end
|
134
|
+
end
|
106
135
|
end
|
107
136
|
|
108
137
|
Gumdrop.config= Gumdrop::HashObject.new(DEFAULT_OPTIONS)
|
data/lib/gumdrop/cli.rb
CHANGED
@@ -6,6 +6,7 @@ opts = Trollop::options do
|
|
6
6
|
opt :debug, "Enable debugging output"
|
7
7
|
opt :quiet, "No output"
|
8
8
|
opt :create, "Create a gumdrop project", :type=>String
|
9
|
+
opt :template, "Specify template to use for new project (default || twitter)", :type=>String, :default=>'default'
|
9
10
|
opt :build, "Build HTML output"
|
10
11
|
opt :server, "Runs development server"
|
11
12
|
opt :port, "Specifies port to run server on", :type=>:int
|
@@ -22,17 +23,23 @@ end
|
|
22
23
|
if opts[:create_given]
|
23
24
|
require 'fileutils'
|
24
25
|
here= File.dirname(__FILE__)
|
25
|
-
there= File.expand_path(opts[:create])
|
26
|
-
|
26
|
+
there= File.expand_path( opts[:create] )
|
27
|
+
template_name = opts[:template]
|
28
|
+
|
27
29
|
if File.file? there
|
28
30
|
puts "You cannot specify a file as the target!"
|
29
31
|
elsif !File.directory? there
|
30
32
|
FileUtils.mkdir_p there
|
31
33
|
end
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
35
|
+
if File.directory? File.join(here, 'template', template_name)
|
36
|
+
# FileUtils.cp_r Dir[File.join(here, "template", template_name, "*")], there
|
37
|
+
puts "Creating gumdrop project based on #{template_name} template at #{there}"
|
38
|
+
FileUtils.cp_r File.join(here, "template", template_name, "."), there
|
39
|
+
puts "Done."
|
40
|
+
else
|
41
|
+
puts "Invalid template '#{template_name}'!"
|
42
|
+
end
|
36
43
|
|
37
44
|
elsif opts[:build_given]
|
38
45
|
Gumdrop.run(opts)
|
data/lib/gumdrop/content.rb
CHANGED
@@ -45,10 +45,10 @@ module Gumdrop
|
|
45
45
|
|
46
46
|
def renderTo(output_path, filters=[], opts={})
|
47
47
|
return copyTo(output_path, opts) unless useLayout?
|
48
|
+
Gumdrop.report " Rendering: #{@uri}", :warning
|
48
49
|
output= render()
|
49
50
|
filters.each {|f| output= f.call(output, self) }
|
50
51
|
File.open output_path, 'w' do |f|
|
51
|
-
puts " Rendering: #{@uri}"
|
52
52
|
f.write output
|
53
53
|
end
|
54
54
|
end
|
@@ -60,10 +60,10 @@ module Gumdrop
|
|
60
60
|
true
|
61
61
|
end
|
62
62
|
if do_copy
|
63
|
-
|
63
|
+
Gumdrop.report " Copying: #{@uri}", :warning
|
64
64
|
FileUtils.cp_r @path, output, opts
|
65
65
|
else
|
66
|
-
|
66
|
+
Gumdrop.report " (same): #{@uri}", :info
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
data/lib/gumdrop/dsl.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Gumdrop
|
2
|
+
module DSL
|
3
|
+
|
4
|
+
def self.generate(&block)
|
5
|
+
# Auto-generated, numerical, key for a site-level generator
|
6
|
+
Gumdrop.generators[Gumdrop.generators.keys.length] = Generator.new(block)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.content_filter(&block)
|
10
|
+
Gumdrop.content_filters << block
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.skip(path)
|
14
|
+
Gumdrop.report " blacklist: #{path}", :info
|
15
|
+
Gumdrop.blacklist << path
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
data/lib/gumdrop/generator.rb
CHANGED
@@ -66,21 +66,4 @@ module Gumdrop
|
|
66
66
|
# Nothing special, per se...
|
67
67
|
end
|
68
68
|
|
69
|
-
module GenerationDSL
|
70
|
-
|
71
|
-
# attr_accessor :generators
|
72
|
-
# @generators=[]
|
73
|
-
|
74
|
-
def self.generate(&block)
|
75
|
-
|
76
|
-
# Auto-generated, numerical, key for a site-level generator
|
77
|
-
Gumdrop.generators[Gumdrop.generators.keys.length] = Generator.new(block)
|
78
|
-
end
|
79
|
-
|
80
|
-
def self.content_filter(&block)
|
81
|
-
Gumdrop.content_filters << block
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
69
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "i18n"
|
4
|
+
gem "sinatra"
|
5
|
+
gem "active_support"
|
6
|
+
gem "rake"
|
7
|
+
gem "gumdrop", :path=>File.expand_path("~/Projects/OpenSource/gumdrop")
|
8
|
+
|
9
|
+
# Add your dependencies here:
|
10
|
+
|
11
|
+
gem "slim"
|
12
|
+
gem "sass"
|
13
|
+
gem "less"
|
14
|
+
gem "coffee-script"
|
15
|
+
|
16
|
+
|
17
|
+
# For markdown support, a couple of options:
|
18
|
+
# gem "rdiscount"
|
19
|
+
gem 'maruku'
|
20
|
+
|
21
|
+
# For template support:
|
22
|
+
# gem "less"
|
23
|
+
# gem "haml"
|
24
|
+
|
25
|
+
# For xml generation support:
|
26
|
+
# gem 'builder'
|
27
|
+
|
28
|
+
# gem 'jsmin'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require "bundler/setup"
|
3
|
+
require 'gumdrop'
|
4
|
+
|
5
|
+
# For the SYNC task
|
6
|
+
USER='user'
|
7
|
+
SERVER='server.com'
|
8
|
+
FOLDER="~/#{SERVER}"
|
9
|
+
|
10
|
+
desc "Build source files into output"
|
11
|
+
task :build do
|
12
|
+
system("bundle exec gumdrop -b")
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Run development server"
|
16
|
+
task :serve do
|
17
|
+
system("bundle exec gumdrop -s")
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Syncs with public server using rsync (if configured)"
|
21
|
+
task :sync do
|
22
|
+
cmd= "rsync -avz --delete output/ #{USER}@#{SERVER}:#{FOLDER}"
|
23
|
+
puts "Running:\n#{cmd}\n"
|
24
|
+
system(cmd)
|
25
|
+
puts "Done."
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "Outputs the Gumdrop version"
|
29
|
+
task :version do
|
30
|
+
puts Gumdrop::VERSION
|
31
|
+
end
|
32
|
+
|
33
|
+
task :default do
|
34
|
+
puts `rake -T`
|
35
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'gumdrop'
|
12
|
+
|
13
|
+
Gumdrop.config.auto_run= false
|
14
|
+
Gumdrop.config.force_reload= false
|
15
|
+
Gumdrop.run :dry_run=>true
|
16
|
+
|
17
|
+
run Gumdrop::Server
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Any specialized code for your site goes here...
|
2
|
+
|
3
|
+
puts "Build: #{Gumdrop.data.config.title} (gumdrop v#{Gumdrop::VERSION})"
|
4
|
+
|
5
|
+
if defined? Encoding
|
6
|
+
Encoding.default_internal = Encoding.default_external = "UTF-8"
|
7
|
+
else
|
8
|
+
$KCODE = "UTF-8"
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'slim'
|
12
|
+
Slim::Engine.set_default_options :pretty => true
|
13
|
+
|
14
|
+
skip "theme/twitter/lib"
|
15
|
+
skip "theme/twitter/docs"
|
16
|
+
skip "theme/twitter/examples"
|
17
|
+
skip "theme/twitter/Makefile"
|
18
|
+
skip "theme/twitter/README"
|
19
|
+
|
20
|
+
# Example of using a content filter to compress CoffeeScript/JS output
|
21
|
+
# require 'jsmin'
|
22
|
+
# content_filter do |content, info|
|
23
|
+
# if info.ext == '.js'
|
24
|
+
# puts " Compress: #{info.filename}"
|
25
|
+
# JSMin.minify content
|
26
|
+
# else
|
27
|
+
# content
|
28
|
+
# end
|
29
|
+
# end
|
30
|
+
|
31
|
+
|
32
|
+
# Example site-level generator
|
33
|
+
# generate do
|
34
|
+
#
|
35
|
+
# page "about.html", :template=>'about', :passthru=>'Available in the template' # requires a about.template.XX file
|
36
|
+
#
|
37
|
+
# # Maybe for a tumblr-like pager
|
38
|
+
# pager= Gumdrop.data.pager_for :posts, :base_path=>'posts/page', :page_size=>5
|
39
|
+
# pager.each do |page|
|
40
|
+
# page "#{page.uri}.html", :template=>'post_page', :posts=>page.items, :pager=>pager, :current_page=>pager.current_page
|
41
|
+
# end
|
42
|
+
#
|
43
|
+
# end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Gumdrop::ViewHelpers
|
2
|
+
|
3
|
+
# Calculate the years for a copyright
|
4
|
+
def copyright_years(start_year, divider="–")
|
5
|
+
end_year = Date.today.year
|
6
|
+
if start_year == end_year
|
7
|
+
"#{start_year}"
|
8
|
+
else
|
9
|
+
"#{start_year}#{divider}#{end_year}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# Your custom helpers go here!
|
15
|
+
#
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
p I'm the SIDEBAR!
|
@@ -0,0 +1,89 @@
|
|
1
|
+
css:
|
2
|
+
/* Override some defaults */
|
3
|
+
html, body {
|
4
|
+
background-color: #eee;
|
5
|
+
}
|
6
|
+
body {
|
7
|
+
padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
|
8
|
+
}
|
9
|
+
.container > footer p {
|
10
|
+
text-align: center; /* center align it with the container */
|
11
|
+
}
|
12
|
+
.container {
|
13
|
+
width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
|
14
|
+
}
|
15
|
+
|
16
|
+
/* The white background content wrapper */
|
17
|
+
.content {
|
18
|
+
background-color: #fff;
|
19
|
+
padding: 20px;
|
20
|
+
margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
|
21
|
+
-webkit-border-radius: 0 0 6px 6px;
|
22
|
+
-moz-border-radius: 0 0 6px 6px;
|
23
|
+
border-radius: 0 0 6px 6px;
|
24
|
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
25
|
+
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
26
|
+
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
27
|
+
}
|
28
|
+
|
29
|
+
/* Page header tweaks */
|
30
|
+
.page-header {
|
31
|
+
background-color: #f5f5f5;
|
32
|
+
padding: 20px 20px 10px;
|
33
|
+
margin: -20px -20px 20px;
|
34
|
+
}
|
35
|
+
|
36
|
+
/* Styles you shouldn't keep as they are for displaying this base example only */
|
37
|
+
.content .span10,
|
38
|
+
.content .span4 {
|
39
|
+
min-height: 500px;
|
40
|
+
}
|
41
|
+
/* Give a quick and non-cross-browser friendly divider */
|
42
|
+
.content .span4 {
|
43
|
+
margin-left: 0;
|
44
|
+
padding-left: 19px;
|
45
|
+
border-left: 1px solid #eee;
|
46
|
+
}
|
47
|
+
|
48
|
+
.topbar .btn {
|
49
|
+
border: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
.topbar
|
54
|
+
.fill
|
55
|
+
.container
|
56
|
+
a.brand[href="#"]
|
57
|
+
| Project name
|
58
|
+
ul.nav
|
59
|
+
li.active
|
60
|
+
a[href="#"]
|
61
|
+
| Home
|
62
|
+
li
|
63
|
+
a[href="#about"]
|
64
|
+
| About
|
65
|
+
li
|
66
|
+
a[href="#contact"]
|
67
|
+
| Contact
|
68
|
+
form.pull-right[action=""]
|
69
|
+
input.input-small[type="text" placeholder="Username"]
|
70
|
+
input.input-small[type="password" placeholder="Password"]
|
71
|
+
button.btn[type="submit"]
|
72
|
+
| Sign in
|
73
|
+
.container
|
74
|
+
.content
|
75
|
+
.page-header
|
76
|
+
h1
|
77
|
+
| Page name
|
78
|
+
small
|
79
|
+
| Supporting text or tagline
|
80
|
+
.row
|
81
|
+
.span10
|
82
|
+
h2
|
83
|
+
| Main content
|
84
|
+
.span4
|
85
|
+
h3
|
86
|
+
| Secondary content
|
87
|
+
footer
|
88
|
+
p
|
89
|
+
| © Company 2011
|