plate 0.5.4 → 0.6.0
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 +15 -0
- data/README.md +21 -19
- data/Rakefile +9 -5
- data/lib/plate.rb +16 -11
- data/lib/plate/asset.rb +86 -23
- data/lib/plate/builder.rb +286 -150
- data/lib/plate/callbacks.rb +20 -4
- data/lib/plate/cli.rb +65 -53
- data/lib/plate/dsl.rb +68 -0
- data/lib/plate/errors.rb +7 -4
- data/lib/plate/hash_proxy.rb +27 -0
- data/lib/plate/helpers/url_helper.rb +19 -0
- data/lib/plate/layout.rb +41 -36
- data/lib/plate/less_template.rb +34 -0
- data/lib/plate/page.rb +108 -84
- data/lib/plate/sass_template.rb +15 -12
- data/lib/plate/site.rb +31 -1
- data/lib/plate/version.rb +1 -1
- data/lib/plate/view.rb +30 -11
- data/lib/templates/bootstrap.min.css +241 -0
- data/lib/templates/callbacks.rb +37 -0
- data/lib/templates/config.yml +9 -1
- data/lib/templates/index.html +37 -0
- data/lib/templates/layout.html.erb +41 -0
- data/lib/templates/rss.erb +32 -0
- metadata +53 -17
- data/lib/templates/index.md +0 -6
- data/lib/templates/layout.erb +0 -12
data/lib/plate/site.rb
CHANGED
@@ -7,7 +7,7 @@ module Plate
|
|
7
7
|
include Callbacks
|
8
8
|
|
9
9
|
attr_accessor :assets, :build_destination, :cache_location, :destination,
|
10
|
-
:layouts, :logger, :options, :pages, :posts, :source
|
10
|
+
:layouts, :logger, :metadata, :options, :pages, :posts, :source
|
11
11
|
|
12
12
|
def initialize(source, destination, options = {})
|
13
13
|
# Setup source and destination for the site files
|
@@ -53,6 +53,8 @@ module Plate
|
|
53
53
|
self.layouts = []
|
54
54
|
self.pages = []
|
55
55
|
self.posts = PostCollection.new
|
56
|
+
|
57
|
+
@metadata = {}
|
56
58
|
end
|
57
59
|
|
58
60
|
# The default blog post category
|
@@ -128,6 +130,34 @@ module Plate
|
|
128
130
|
logger.send(:log, message, style) if logger and logger.respond_to?(:log)
|
129
131
|
end
|
130
132
|
|
133
|
+
# Access to read all meta data for this site. Meta data can be set on the
|
134
|
+
# site instance by passing in the `metadata` hash, or it can be pulled
|
135
|
+
# from the config file under the heading of `meta`.
|
136
|
+
#
|
137
|
+
# All keys within the hash can be accessed directly by calling the key
|
138
|
+
# as a method name:
|
139
|
+
#
|
140
|
+
# @example
|
141
|
+
# # Set the meta data hash
|
142
|
+
# @site.meta = { :title => 'My Site Title' }
|
143
|
+
#
|
144
|
+
# # Does the title key exist?
|
145
|
+
# @site.meta.title? # => true
|
146
|
+
#
|
147
|
+
# # Return the title value
|
148
|
+
# @site.meta.title # => 'My Site 'Title'
|
149
|
+
def meta
|
150
|
+
@meta ||= HashProxy.new(self.metadata)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Set the meta data hash object for this site.
|
154
|
+
def meta=(hash)
|
155
|
+
# Reset the meta hash proxy
|
156
|
+
@meta = nil
|
157
|
+
|
158
|
+
self.metadata = hash
|
159
|
+
end
|
160
|
+
|
131
161
|
def page_engine_extensions
|
132
162
|
@page_engine_extensions ||= self.registered_page_engines.keys.collect { |e| ".#{e}" }
|
133
163
|
end
|
data/lib/plate/version.rb
CHANGED
data/lib/plate/view.rb
CHANGED
@@ -1,45 +1,64 @@
|
|
1
1
|
module Plate
|
2
|
-
# Views are utility classes that are only called within a page or layout file to be able
|
3
|
-
# site or page specific variables.
|
2
|
+
# Views are utility classes that are only called within a page or layout file to be able
|
3
|
+
# to access site or page specific variables.
|
4
|
+
#
|
5
|
+
# All default helpers as well as any custom helpers are automatically included into each
|
6
|
+
# view and are accessible within your pages.
|
4
7
|
class View
|
5
8
|
include BloggingHelper
|
6
9
|
include MetaHelper
|
7
10
|
include URLHelper
|
8
|
-
|
11
|
+
|
12
|
+
# @return [Page] The current page (or post) being rendered.
|
13
|
+
attr_reader :page
|
14
|
+
|
15
|
+
# @return [Site] The current site build.
|
9
16
|
attr_reader :site, :page
|
10
|
-
|
17
|
+
|
18
|
+
# Create a new view by passing in the current {Plate::Site site} and {Plate::Page page}
|
19
|
+
# instance.
|
11
20
|
def initialize(site, page)
|
12
21
|
@site = site
|
13
22
|
@page = page
|
14
23
|
end
|
15
|
-
|
24
|
+
|
16
25
|
# The full list of assets for this site.
|
26
|
+
#
|
27
|
+
# @return [Array]
|
17
28
|
def assets
|
18
29
|
self.site.assets
|
19
30
|
end
|
20
|
-
|
31
|
+
|
21
32
|
# Dump out information about this view.
|
33
|
+
#
|
34
|
+
# @return [String]
|
22
35
|
def inspect
|
23
36
|
"#<#{self.class}:0x#{object_id.to_s(16)} site=#{site ? site.source : nil} page=#{page ? page.file : nil}>"
|
24
37
|
end
|
25
|
-
|
38
|
+
|
26
39
|
# Reference to all pages and static files in this site.
|
40
|
+
#
|
41
|
+
# @return [Array]
|
27
42
|
def pages
|
28
43
|
self.site.pages
|
29
44
|
end
|
30
|
-
|
45
|
+
|
31
46
|
# Reference to the current post, if this view is rendered with a blog post.
|
47
|
+
#
|
48
|
+
# @return [Post,Page]
|
32
49
|
def post
|
33
50
|
self.page
|
34
51
|
end
|
35
|
-
|
52
|
+
|
36
53
|
# Reference to all posts in this site.
|
54
|
+
#
|
55
|
+
# @return [PostCollection]
|
37
56
|
def posts
|
38
57
|
self.site.posts
|
39
58
|
end
|
40
|
-
|
59
|
+
|
41
60
|
# Allow this class to pass through to access attributes on the page
|
42
|
-
def method_missing(method, *args, &block)
|
61
|
+
def method_missing(method, *args, &block)
|
43
62
|
self.page.send(method, *args, &block)
|
44
63
|
rescue NoMethodError
|
45
64
|
super
|
@@ -0,0 +1,241 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap v2.0.2
|
3
|
+
*
|
4
|
+
* Copyright 2012 Twitter, Inc
|
5
|
+
* Licensed under the Apache License v2.0
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
*
|
8
|
+
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
9
|
+
*/
|
10
|
+
.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
|
11
|
+
.clearfix:after{clear:both;}
|
12
|
+
.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}
|
13
|
+
.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
|
14
|
+
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
|
15
|
+
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
|
16
|
+
audio:not([controls]){display:none;}
|
17
|
+
html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
|
18
|
+
a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
|
19
|
+
a:hover,a:active{outline:0;}
|
20
|
+
sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
|
21
|
+
sup{top:-0.5em;}
|
22
|
+
sub{bottom:-0.25em;}
|
23
|
+
img{height:auto;border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;}
|
24
|
+
button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
|
25
|
+
button,input{*overflow:visible;line-height:normal;}
|
26
|
+
button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
|
27
|
+
button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
|
28
|
+
input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
|
29
|
+
input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
|
30
|
+
textarea{overflow:auto;vertical-align:top;}
|
31
|
+
body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
|
32
|
+
a{color:#0088cc;text-decoration:none;}
|
33
|
+
a:hover{color:#005580;text-decoration:underline;}
|
34
|
+
.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
|
35
|
+
.row:after{clear:both;}
|
36
|
+
[class*="span"]{float:left;margin-left:20px;}
|
37
|
+
.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
|
38
|
+
.span12{width:940px;}
|
39
|
+
.span11{width:860px;}
|
40
|
+
.span10{width:780px;}
|
41
|
+
.span9{width:700px;}
|
42
|
+
.span8{width:620px;}
|
43
|
+
.span7{width:540px;}
|
44
|
+
.span6{width:460px;}
|
45
|
+
.span5{width:380px;}
|
46
|
+
.span4{width:300px;}
|
47
|
+
.span3{width:220px;}
|
48
|
+
.span2{width:140px;}
|
49
|
+
.span1{width:60px;}
|
50
|
+
.offset12{margin-left:980px;}
|
51
|
+
.offset11{margin-left:900px;}
|
52
|
+
.offset10{margin-left:820px;}
|
53
|
+
.offset9{margin-left:740px;}
|
54
|
+
.offset8{margin-left:660px;}
|
55
|
+
.offset7{margin-left:580px;}
|
56
|
+
.offset6{margin-left:500px;}
|
57
|
+
.offset5{margin-left:420px;}
|
58
|
+
.offset4{margin-left:340px;}
|
59
|
+
.offset3{margin-left:260px;}
|
60
|
+
.offset2{margin-left:180px;}
|
61
|
+
.offset1{margin-left:100px;}
|
62
|
+
.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
|
63
|
+
.row-fluid:after{clear:both;}
|
64
|
+
.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;}
|
65
|
+
.row-fluid>[class*="span"]:first-child{margin-left:0;}
|
66
|
+
.row-fluid > .span12{width:99.99999998999999%;}
|
67
|
+
.row-fluid > .span11{width:91.489361693%;}
|
68
|
+
.row-fluid > .span10{width:82.97872339599999%;}
|
69
|
+
.row-fluid > .span9{width:74.468085099%;}
|
70
|
+
.row-fluid > .span8{width:65.95744680199999%;}
|
71
|
+
.row-fluid > .span7{width:57.446808505%;}
|
72
|
+
.row-fluid > .span6{width:48.93617020799999%;}
|
73
|
+
.row-fluid > .span5{width:40.425531911%;}
|
74
|
+
.row-fluid > .span4{width:31.914893614%;}
|
75
|
+
.row-fluid > .span3{width:23.404255317%;}
|
76
|
+
.row-fluid > .span2{width:14.89361702%;}
|
77
|
+
.row-fluid > .span1{width:6.382978723%;}
|
78
|
+
.container{margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
|
79
|
+
.container:after{clear:both;}
|
80
|
+
.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
|
81
|
+
.container-fluid:after{clear:both;}
|
82
|
+
p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
|
83
|
+
.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
|
84
|
+
h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
|
85
|
+
h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
|
86
|
+
h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
|
87
|
+
h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
|
88
|
+
h4,h5,h6{line-height:18px;}
|
89
|
+
h4{font-size:14px;}h4 small{font-size:12px;}
|
90
|
+
h5{font-size:12px;}
|
91
|
+
h6{font-size:11px;color:#999999;text-transform:uppercase;}
|
92
|
+
.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
|
93
|
+
.page-header h1{line-height:1;}
|
94
|
+
ul,ol{padding:0;margin:0 0 9px 25px;}
|
95
|
+
ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
|
96
|
+
ul{list-style:disc;}
|
97
|
+
ol{list-style:decimal;}
|
98
|
+
li{line-height:18px;}
|
99
|
+
ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
|
100
|
+
dl{margin-bottom:18px;}
|
101
|
+
dt,dd{line-height:18px;}
|
102
|
+
dt{font-weight:bold;line-height:17px;}
|
103
|
+
dd{margin-left:9px;}
|
104
|
+
.dl-horizontal dt{float:left;clear:left;width:120px;text-align:right;}
|
105
|
+
.dl-horizontal dd{margin-left:130px;}
|
106
|
+
hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
|
107
|
+
strong{font-weight:bold;}
|
108
|
+
em{font-style:italic;}
|
109
|
+
.muted{color:#999999;}
|
110
|
+
abbr[title]{border-bottom:1px dotted #ddd;cursor:help;}
|
111
|
+
abbr.initialism{font-size:90%;text-transform:uppercase;}
|
112
|
+
blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
|
113
|
+
blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
|
114
|
+
blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
|
115
|
+
q:before,q:after,blockquote:before,blockquote:after{content:"";}
|
116
|
+
address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}
|
117
|
+
small{font-size:100%;}
|
118
|
+
cite{font-style:normal;}
|
119
|
+
code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
120
|
+
code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
|
121
|
+
pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;word-wrap:break-word;}pre.prettyprint{margin-bottom:18px;}
|
122
|
+
pre code{padding:0;color:inherit;background-color:transparent;border:0;}
|
123
|
+
.pre-scrollable{max-height:340px;overflow-y:scroll;}
|
124
|
+
.nav{margin-left:0;margin-bottom:18px;list-style:none;}
|
125
|
+
.nav>li>a{display:block;}
|
126
|
+
.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
|
127
|
+
.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
|
128
|
+
.nav li+.nav-header{margin-top:9px;}
|
129
|
+
.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
|
130
|
+
.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
|
131
|
+
.nav-list>li>a{padding:3px 15px;}
|
132
|
+
.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
|
133
|
+
.nav-list [class^="icon-"]{margin-right:2px;}
|
134
|
+
.nav-list .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
|
135
|
+
.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";}
|
136
|
+
.nav-tabs:after,.nav-pills:after{clear:both;}
|
137
|
+
.nav-tabs>li,.nav-pills>li{float:left;}
|
138
|
+
.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
|
139
|
+
.nav-tabs{border-bottom:1px solid #ddd;}
|
140
|
+
.nav-tabs>li{margin-bottom:-1px;}
|
141
|
+
.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
|
142
|
+
.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
|
143
|
+
.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
|
144
|
+
.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;}
|
145
|
+
.nav-stacked>li{float:none;}
|
146
|
+
.nav-stacked>li>a{margin-right:0;}
|
147
|
+
.nav-tabs.nav-stacked{border-bottom:0;}
|
148
|
+
.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
|
149
|
+
.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
|
150
|
+
.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
|
151
|
+
.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
|
152
|
+
.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
|
153
|
+
.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
|
154
|
+
.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;}
|
155
|
+
.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
|
156
|
+
.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
|
157
|
+
.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;}
|
158
|
+
.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333;}
|
159
|
+
.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;}
|
160
|
+
.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
|
161
|
+
.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
|
162
|
+
.tabs-stacked .open>a:hover{border-color:#999999;}
|
163
|
+
.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";}
|
164
|
+
.tabbable:after{clear:both;}
|
165
|
+
.tab-content{display:table;width:100%;}
|
166
|
+
.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;}
|
167
|
+
.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
|
168
|
+
.tab-content>.active,.pill-content>.active{display:block;}
|
169
|
+
.tabs-below .nav-tabs{border-top:1px solid #ddd;}
|
170
|
+
.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;}
|
171
|
+
.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
|
172
|
+
.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;}
|
173
|
+
.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;}
|
174
|
+
.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
|
175
|
+
.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
|
176
|
+
.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
|
177
|
+
.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
|
178
|
+
.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
|
179
|
+
.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
|
180
|
+
.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
|
181
|
+
.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
|
182
|
+
.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
|
183
|
+
.navbar{*position:relative;*z-index:2;overflow:visible;margin-bottom:18px;}
|
184
|
+
.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
|
185
|
+
.navbar .container{width:auto;}
|
186
|
+
.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;}
|
187
|
+
.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;}
|
188
|
+
.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
|
189
|
+
.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
|
190
|
+
.nav-collapse.collapse{height:auto;}
|
191
|
+
.navbar{color:#999999;}.navbar .brand:hover{text-decoration:none;}
|
192
|
+
.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;}
|
193
|
+
.navbar .navbar-text{margin-bottom:0;line-height:40px;}
|
194
|
+
.navbar .btn,.navbar .btn-group{margin-top:5px;}
|
195
|
+
.navbar .btn-group .btn{margin-top:0;}
|
196
|
+
.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";}
|
197
|
+
.navbar-form:after{clear:both;}
|
198
|
+
.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
|
199
|
+
.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0;}
|
200
|
+
.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
|
201
|
+
.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
|
202
|
+
.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query:-moz-placeholder{color:#cccccc;}
|
203
|
+
.navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
|
204
|
+
.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
|
205
|
+
.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
|
206
|
+
.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
|
207
|
+
.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
|
208
|
+
.navbar-fixed-top{top:0;}
|
209
|
+
.navbar-fixed-bottom{bottom:0;}
|
210
|
+
.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
|
211
|
+
.navbar .nav.pull-right{float:right;}
|
212
|
+
.navbar .nav>li{display:block;float:left;}
|
213
|
+
.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
|
214
|
+
.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
|
215
|
+
.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;}
|
216
|
+
.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;}
|
217
|
+
.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
|
218
|
+
.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
|
219
|
+
.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
|
220
|
+
.navbar-fixed-bottom .dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
|
221
|
+
.navbar-fixed-bottom .dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
|
222
|
+
.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
|
223
|
+
.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);}
|
224
|
+
.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;}
|
225
|
+
.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;}
|
226
|
+
.navbar .nav.pull-right .dropdown-menu,.navbar .nav .dropdown-menu.pull-right{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before,.navbar .nav .dropdown-menu.pull-right:before{left:auto;right:12px;}
|
227
|
+
.navbar .nav.pull-right .dropdown-menu:after,.navbar .nav .dropdown-menu.pull-right:after{left:auto;right:13px;}
|
228
|
+
.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#c09853;}
|
229
|
+
.alert-heading{color:inherit;}
|
230
|
+
.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
|
231
|
+
.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
|
232
|
+
.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
|
233
|
+
.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
|
234
|
+
.alert-block{padding-top:14px;padding-bottom:14px;}
|
235
|
+
.alert-block>p,.alert-block>ul{margin-bottom:0;}
|
236
|
+
.alert-block p+p{margin-top:5px;}
|
237
|
+
.hero-unit{padding:60px;margin-bottom:30px;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
|
238
|
+
.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit;}
|
239
|
+
.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
|
240
|
+
.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
|
241
|
+
.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#
|
2
|
+
# This is a sample callbacks file. It is designed to be a starting
|
3
|
+
# point for your own site's callbacks. You can uncomment any of the
|
4
|
+
# callback examples below to see how they work.
|
5
|
+
#
|
6
|
+
|
7
|
+
####################################################################
|
8
|
+
# A sample site callback to be called after the entire site build has finished.
|
9
|
+
#
|
10
|
+
# This callback adds a humans.txt file in the root of your site with the author's name
|
11
|
+
# after each site build.
|
12
|
+
|
13
|
+
# callback :site, :after_render do |site|
|
14
|
+
# page = DynamicPage.new(site, '/humans.txt')
|
15
|
+
#
|
16
|
+
# page.layout = false
|
17
|
+
# page.content = <<-content
|
18
|
+
# /* AUTHOR */
|
19
|
+
# Name: #{site.meta.author}
|
20
|
+
#
|
21
|
+
# /* SITE */
|
22
|
+
# Software: Generated with Plate! http://platerb.com
|
23
|
+
# content
|
24
|
+
#
|
25
|
+
# page.write!
|
26
|
+
# end
|
27
|
+
|
28
|
+
####################################################################
|
29
|
+
# This sample callback is registered on each blog post. It adds a `rel=external`
|
30
|
+
# attribute to all `<a>` tags that have an external link.
|
31
|
+
#
|
32
|
+
# This is just an example to show how to manipulate the body content of a post
|
33
|
+
# or page before it is written to the destination.
|
34
|
+
|
35
|
+
# callback :post, :after_render do |post|
|
36
|
+
# post.body.gsub!('<a href="http://', '<a rel="external" href="http://')
|
37
|
+
# end
|
data/lib/templates/config.yml
CHANGED
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
base_url: "http://example.com"
|
4
|
+
permalink: "/posts/:year/:month/:slug"
|
5
|
+
meta:
|
6
|
+
title: "My New Site"
|
7
|
+
description: "A really great site, generated with Plate!"
|
8
|
+
author: "Clark Kent"
|
9
|
+
email: "me@example.com"
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
title: "Home"
|
3
|
+
|
4
|
+
<div class="hero-unit">
|
5
|
+
<h1>Hello, world!</h1>
|
6
|
+
<p>Your new site is ready to go. Feel free to delete this file and get started.</p>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="row">
|
10
|
+
<div class="span4">
|
11
|
+
<h2>Post</h2>
|
12
|
+
<p>To add a new blog post, simply run the following command:</p>
|
13
|
+
<pre>plate post "My First Post Title"</pre>
|
14
|
+
<p>The post will be put into the <em>posts</em> directory in the appropriate year and month sub-directories.</p>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="span4">
|
18
|
+
<h2>Build</h2>
|
19
|
+
<p>To build your site, simply run the following command:</p>
|
20
|
+
<pre>plate build</pre>
|
21
|
+
<p>This will compile your site and all of its content into the <em>public</em> directory by default.</p>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="span4">
|
25
|
+
<h2>Publish</h2>
|
26
|
+
<p>To publish your site, just drop the <em>public</em> directory into the root of any major web hosting server.</p>
|
27
|
+
<p>If you are on a Mac you can easily run your site with the built-in web server by changing your destination directory to your user account’s <em>Sites</em> directory. You can do so by putting the following line in the plate.yml configuration file.</p>
|
28
|
+
<pre>destination: ~/Sites/</pre>
|
29
|
+
<p>Note: this will overwrite anything existing in that folder, so be careful.</p>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<hr>
|
34
|
+
|
35
|
+
<p>
|
36
|
+
<strong>Need some help getting started?</strong> Try checking out <a href="http://platerb.com/">platerb.com →</a>
|
37
|
+
</p>
|