gumdrop 0.8.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/ChangeLog.md +13 -0
- data/Gemfile +6 -2
- data/Gemfile.lock +43 -3
- data/Rakefile +37 -21
- data/Readme.md +60 -158
- data/bin/gumdrop +2 -1
- data/gumdrop.gemspec +11 -4
- data/lib/gumdrop/builder.rb +164 -0
- data/lib/gumdrop/cli/external.rb +14 -9
- data/lib/gumdrop/cli/internal.rb +54 -22
- data/lib/gumdrop/cli.rb +21 -0
- data/lib/gumdrop/content.rb +195 -132
- data/lib/gumdrop/data.rb +185 -0
- data/lib/gumdrop/data_providers/csv.rb +18 -0
- data/lib/gumdrop/data_providers/pstore.rb +25 -0
- data/lib/gumdrop/data_providers/sqlite.rb +43 -0
- data/lib/gumdrop/data_providers/xml.rb +15 -0
- data/lib/gumdrop/data_providers/yaml_and_json.rb +18 -0
- data/lib/gumdrop/data_providers/yamldb.rb +18 -0
- data/lib/gumdrop/data_providers/yamldoc.rb +12 -0
- data/lib/gumdrop/generator.rb +118 -94
- data/lib/gumdrop/renderer.rb +272 -0
- data/lib/gumdrop/server.rb +36 -27
- data/lib/gumdrop/site.rb +283 -338
- data/lib/gumdrop/support/compressor.rb +52 -0
- data/lib/gumdrop/support/sprockets.rb +14 -23
- data/lib/gumdrop/support/stitch.rb +25 -14
- data/lib/gumdrop/support/yaml_doc_template.rb +29 -0
- data/lib/gumdrop/util/configurable.rb +44 -0
- data/lib/gumdrop/util/core_ex.rb +84 -0
- data/lib/gumdrop/util/eventable.rb +35 -0
- data/lib/gumdrop/util/hash_object.rb +70 -0
- data/lib/gumdrop/util/loggable.rb +44 -0
- data/lib/gumdrop/util/pager.rb +51 -0
- data/lib/gumdrop/{support → util}/proxy_handler.rb +7 -6
- data/lib/gumdrop/util/scanner.rb +47 -0
- data/lib/gumdrop/util/site_access.rb +16 -0
- data/lib/gumdrop/util/view_helpers.rb +50 -0
- data/lib/gumdrop/util/yaml_doc.rb +51 -0
- data/lib/gumdrop/version.rb +2 -2
- data/lib/gumdrop.rb +40 -77
- data/specs/content_spec.rb +83 -73
- data/specs/fixtures/expected/data-access/from-csv.html +4 -0
- data/specs/fixtures/expected/data-access/from-json.html +6 -0
- data/specs/fixtures/expected/data-access/from-sqlite.html +5 -0
- data/specs/fixtures/expected/data-access/from-xml.html +4 -0
- data/specs/fixtures/expected/data-access/from-yaml.html +5 -0
- data/specs/fixtures/expected/data-access/from-yamldb.html +5 -0
- data/specs/fixtures/expected/data-access/from-yamldoc.html +2 -0
- data/specs/fixtures/expected/gen-with-block/as-file.html +1 -0
- data/specs/fixtures/expected/gen-with-block/as-plain.html +1 -0
- data/specs/fixtures/expected/gen-with-block/layout-nested.html +1 -0
- data/specs/fixtures/expected/gen-with-block/layout-nil.html +1 -0
- data/specs/fixtures/expected/gen-with-block/layout-wrap.html +1 -0
- data/specs/fixtures/expected/gen-with-inline-render/0-as-file.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/0-as-plain.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/0-layout-nil.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/0-layout-sub.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/0-layout-wrap.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/1-as-file.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/1-as-plain.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/1-layout-nil.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/1-layout-sub.html +4 -0
- data/specs/fixtures/expected/gen-with-inline-render/1-layout-wrap.html +4 -0
- data/specs/fixtures/expected/goodbye.html +1 -0
- data/specs/fixtures/expected/hello.html +1 -0
- data/specs/fixtures/expected/image.png +0 -0
- data/specs/fixtures/expected/index.html +47 -0
- data/specs/fixtures/expected/js/sprockets-app.js +7 -0
- data/specs/fixtures/expected/js/stitch-app.js +65 -0
- data/specs/fixtures/expected/js/stitch-app.min.js +5 -0
- data/specs/fixtures/expected/js/stitch-app.min.src.js +65 -0
- data/specs/fixtures/expected/js/straight.js +8 -0
- data/specs/fixtures/expected/js/test-coffee.js +5 -0
- data/specs/fixtures/expected/pages/docs/force-abs.html +2 -0
- data/specs/fixtures/expected/pages/docs/index.html +2 -0
- data/specs/fixtures/expected/partials/hoisted-data.html +3 -0
- data/specs/fixtures/expected/partials/nested.html +7 -0
- data/specs/fixtures/expected/partials/params.html +1 -0
- data/specs/fixtures/expected/partials/with-layouts.html +1 -0
- data/specs/fixtures/expected/robots.txt +1 -0
- data/specs/fixtures/expected/test-multi-procs.html +4 -0
- data/specs/fixtures/expected/test-nested-layout.html +1 -0
- data/specs/fixtures/expected/test-no-layout.html +2 -0
- data/specs/fixtures/expected/test-yamldoc.html +1 -0
- data/specs/fixtures/expected/test.html +2 -0
- data/{templates/backbone → specs/fixtures/source}/Gemfile +8 -4
- data/specs/fixtures/source/Gemfile.lock +84 -0
- data/specs/fixtures/source/Gumdrop +60 -9
- data/specs/fixtures/source/data/csv_data.csv +2 -0
- data/specs/fixtures/source/data/json_data.json +13 -0
- data/specs/fixtures/source/data/sql_data.sqlite +0 -0
- data/specs/fixtures/source/data/xml_data.xml +4 -0
- data/specs/fixtures/source/data/yaml_db.yamldb +9 -0
- data/specs/fixtures/source/data/yaml_items.yaml +2 -0
- data/specs/fixtures/source/data/yamldoc.yamldoc +4 -0
- data/specs/fixtures/source/data-access/from-csv.html.erb +4 -0
- data/specs/fixtures/source/data-access/from-json.html.erb +6 -0
- data/specs/fixtures/source/data-access/from-sqlite.html.erb +5 -0
- data/specs/fixtures/source/data-access/from-xml.html.erb +5 -0
- data/specs/fixtures/source/data-access/from-yaml.html.erb +5 -0
- data/specs/fixtures/source/data-access/from-yamldb.html.erb +5 -0
- data/specs/fixtures/source/data-access/from-yamldoc.html.erb +2 -0
- data/specs/fixtures/source/gen-with-inline-render.generator +7 -0
- data/specs/fixtures/source/goodbye.html.erb +1 -0
- data/specs/fixtures/source/hello.html +1 -0
- data/specs/fixtures/source/image.png +0 -0
- data/specs/fixtures/source/index.html.erb +6 -0
- data/specs/fixtures/source/js/sprockets/app.js +2 -0
- data/specs/fixtures/source/js/sprockets/view.js.coffee +1 -0
- data/specs/fixtures/source/js/stitch/app.js +1 -0
- data/specs/fixtures/source/js/stitch/view.js.coffee +1 -0
- data/specs/fixtures/source/js/straight.js +8 -0
- data/specs/fixtures/source/js/test-coffee.js.coffee +1 -0
- data/specs/fixtures/source/layouts/site.layout.erb +1 -0
- data/specs/fixtures/source/layouts/sub.layout.erb +1 -0
- data/specs/fixtures/source/layouts/wrap.layout.erb +1 -0
- data/specs/fixtures/source/pages/_users-nested.html.erb +7 -0
- data/specs/fixtures/source/pages/docs/force-abs.html.erb +2 -0
- data/specs/fixtures/source/pages/docs/index.html.erb +2 -0
- data/specs/fixtures/source/partials/_post_entry.html.erb +4 -0
- data/specs/fixtures/source/partials/_provides_name.html.erb +1 -0
- data/specs/fixtures/source/partials/_user-params.html.erb +1 -0
- data/specs/fixtures/source/partials/_user.html.erb +1 -0
- data/specs/fixtures/source/partials/_user_sets_layout.html.erb +1 -0
- data/specs/fixtures/source/partials/hoisted-data.html.erb +6 -0
- data/specs/fixtures/source/partials/nested.html.erb +1 -0
- data/specs/fixtures/source/partials/params.html.erb +1 -0
- data/specs/fixtures/source/partials/with-layouts.html.erb +1 -0
- data/specs/fixtures/source/test-multi-procs.html.markdown.erb +3 -0
- data/specs/fixtures/source/test-nested-layout.html.erb +1 -0
- data/specs/fixtures/source/test-no-layout.html.erb +2 -0
- data/specs/fixtures/source/test-yamldoc.html.erb.yamldoc +4 -0
- data/specs/fixtures/source/test.html.erb +2 -0
- data/specs/hash_object_spec.rb +53 -8
- data/specs/render_spec.rb +10 -0
- data/specs/site_spec.rb +79 -0
- data/specs/spec_helper.rb +59 -0
- data/templates/blank/Gemfile +0 -4
- data/templates/blank/Gumdrop +180 -113
- data/templates/default/Gemfile +3 -8
- data/templates/default/Gumdrop +166 -95
- data/templates/default/ReadMe.md +14 -0
- data/templates/default/config.ru +1 -0
- data/templates/default/data/news/20120703.yamldoc +14 -0
- data/templates/default/data/news/20120704.yamldoc +8 -0
- data/templates/{backbone/source/feed.xml.builder.txt → default/source/feed.xml.builder} +4 -4
- data/templates/default/source/index.html.erb +10 -1
- data/templates/default/source/theme/layout/_sidebar.html +1 -0
- data/templates/{backbone/source/theme/templates/site.template.slim → default/source/theme/layout/site.layout.slim} +3 -3
- metadata +212 -63
- data/lib/gumdrop/context.rb +0 -135
- data/lib/gumdrop/data_manager.rb +0 -214
- data/lib/gumdrop/support/base_packager.rb +0 -60
- data/lib/gumdrop/support/callbacks.rb +0 -30
- data/lib/gumdrop/support/hash_object.rb +0 -22
- data/lib/gumdrop/view_helpers.rb +0 -25
- data/notes.md +0 -347
- data/specs/deferred_loader_spec.rb +0 -31
- data/specs/fixtures/expected/posts/post1.html +0 -1
- data/specs/fixtures/expected/posts/post1.js +0 -14
- data/specs/fixtures/expected/posts/post2.html +0 -5
- data/specs/fixtures/expected/sub/sub/sub/test.html +0 -5
- data/specs/fixtures/expected/sub/sub/sub/test2.html +0 -5
- data/specs/fixtures/expected/test.js +0 -14
- data/specs/fixtures/source/posts/post1.html.slim +0 -6
- data/specs/fixtures/source/posts/post1.js.coffee +0 -3
- data/specs/fixtures/source/posts/post2.html.erb +0 -5
- data/specs/fixtures/source/sub/sub/sub/test.html +0 -5
- data/specs/fixtures/source/sub/sub/sub/test2.html.erb +0 -5
- data/specs/fixtures/source/test.js.coffee +0 -4
- data/specs/fixtures/source/test.js.erb.coffee +0 -3
- data/templates/backbone/Gumdrop +0 -123
- data/templates/backbone/Rakefile +0 -38
- data/templates/backbone/app/app.js.coffee +0 -49
- data/templates/backbone/app/init.js.coffee +0 -10
- data/templates/backbone/app/models/.gitkeep +0 -0
- data/templates/backbone/app/utils/index.js.coffee +0 -27
- data/templates/backbone/app/views/home.js.coffee +0 -17
- data/templates/backbone/app/views/styles/home.scss +0 -8
- data/templates/backbone/app/views/templates/home.mustache +0 -2
- data/templates/backbone/config.ru +0 -20
- data/templates/backbone/lib/all.js.coffee +0 -18
- data/templates/backbone/lib/backbone.js +0 -1158
- data/templates/backbone/lib/hogan.js +0 -509
- data/templates/backbone/lib/jquery.js +0 -9266
- data/templates/backbone/lib/underscore.js +0 -981
- data/templates/backbone/powrc +0 -2
- data/templates/backbone/source/default.htaccess.erb +0 -27
- data/templates/backbone/source/favicon.ico +0 -0
- data/templates/backbone/source/index.html.erb +0 -2
- data/templates/backbone/source/theme/screen.css.sass +0 -9
- data/templates/backbone/source/theme/scripts/app.js.coffee +0 -4
- data/templates/backbone/source/theme/styles/_tools.scss +0 -434
- data/templates/backbone/source/theme/templates/app.template.slim +0 -14
- data/templates/default/Rakefile +0 -38
- data/templates/default/powrc +0 -2
- data/templates/default/source/default.htaccess.erb +0 -27
- data/templates/default/source/feed.xml.builder.txt +0 -23
- data/templates/default/source/theme/templates/site.template.slim +0 -33
data/templates/backbone/powrc
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
<% use_layout nil %>
|
2
|
-
# For clean urls
|
3
|
-
DirectoryIndex index.html
|
4
|
-
|
5
|
-
<IfModule mod_rewrite.c>
|
6
|
-
RewriteEngine On
|
7
|
-
RewriteBase /
|
8
|
-
|
9
|
-
# Do not do anything for already existing files and folders
|
10
|
-
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
11
|
-
RewriteCond %{REQUEST_FILENAME} -d
|
12
|
-
RewriteRule .+ - [L]
|
13
|
-
|
14
|
-
# add .html file extension (if such file does exist)
|
15
|
-
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f
|
16
|
-
RewriteRule ^(.+[^/])/?$ $1.html [L,QSA]
|
17
|
-
</IfModule>
|
18
|
-
|
19
|
-
# BEGIN Gzip
|
20
|
-
<IfModule mod_deflate.c>
|
21
|
-
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
|
22
|
-
</IfModule>
|
23
|
-
# END Gzip
|
24
|
-
|
25
|
-
<% site.redirects.each do |opts| %>
|
26
|
-
# Redirect <%= opts[:from] %> <%= opts[:to] %>
|
27
|
-
<% end %>
|
File without changes
|
@@ -1,434 +0,0 @@
|
|
1
|
-
// Layout Tools v 1.2
|
2
|
-
|
3
|
-
// Sample Usage:
|
4
|
-
// #container {
|
5
|
-
// @include border-radius(5px);
|
6
|
-
// }
|
7
|
-
|
8
|
-
// GRID
|
9
|
-
|
10
|
-
// = The 1Kb Grid = (slightly modified)
|
11
|
-
@mixin grid($columns:12, $column_width:60, $column_margin:20) {
|
12
|
-
.row, section {
|
13
|
-
overflow: hidden;
|
14
|
-
margin: 0 auto;
|
15
|
-
width: #{$columns * $column_width + $columns * $column_margin}px;
|
16
|
-
|
17
|
-
.row {
|
18
|
-
margin: 0 #{$column_margin - $column_margin * 1.5}px;
|
19
|
-
display: inline-block;
|
20
|
-
width: auto;
|
21
|
-
}
|
22
|
-
|
23
|
-
.col {
|
24
|
-
margin: 0 #{$column_margin / 2}px;
|
25
|
-
overflow: hidden;
|
26
|
-
float: left;
|
27
|
-
display: inline;
|
28
|
-
width: #{$column_width * 1 + $column_margin * (1 - 1)}px;
|
29
|
-
|
30
|
-
@for $i from 2 through $columns {
|
31
|
-
&.span-#{$i} {
|
32
|
-
width: #{$column_width * $i + $column_margin * ($i - 1)}px;
|
33
|
-
//&:hover
|
34
|
-
// outline: 1px solid red
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
// TEST
|
42
|
-
@mixin gridTest($columns:12, $column_width:60, $column_margin:20) {
|
43
|
-
row {
|
44
|
-
display: block;
|
45
|
-
overflow: hidden;
|
46
|
-
margin: 0 auto;
|
47
|
-
width: #{$columns * $column_width + $columns * $column_margin}px;
|
48
|
-
|
49
|
-
row {
|
50
|
-
margin: 0 #{$column_margin - $column_margin * 1.5}px;
|
51
|
-
display: inline-block;
|
52
|
-
width: auto;
|
53
|
-
}
|
54
|
-
|
55
|
-
col {
|
56
|
-
margin: 0 #{$column_margin / 2}px;
|
57
|
-
overflow: hidden;
|
58
|
-
float: left;
|
59
|
-
display: inline;
|
60
|
-
width: #{$column_width * 1 + $column_margin * (1 - 1)}px;
|
61
|
-
}
|
62
|
-
@for $i from 2 through $columns {
|
63
|
-
col#{$i} {
|
64
|
-
margin: 0 #{$column_margin / 2}px;
|
65
|
-
overflow: hidden;
|
66
|
-
float: left;
|
67
|
-
display: inline;
|
68
|
-
width: #{$column_width * $i + $column_margin * ($i - 1)}px;
|
69
|
-
//&:hover
|
70
|
-
// outline: 1px solid red
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
// CSS RESET
|
77
|
-
|
78
|
-
@mixin css-clear($boxmodel:'border-box') {
|
79
|
-
* {
|
80
|
-
@include box-model($boxmodel);
|
81
|
-
}
|
82
|
-
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
|
83
|
-
margin:0;
|
84
|
-
padding:0;
|
85
|
-
}
|
86
|
-
article, aside, dialog, figure, footer, header, hgroup, menu, nav, section {
|
87
|
-
display: block;
|
88
|
-
}
|
89
|
-
table {
|
90
|
-
border-collapse:collapse;
|
91
|
-
border-spacing:0;
|
92
|
-
}
|
93
|
-
fieldset,img {
|
94
|
-
border:0;
|
95
|
-
}
|
96
|
-
address,caption,cite,code,dfn,em,strong,th,var {
|
97
|
-
font-style:normal;
|
98
|
-
font-weight:normal;
|
99
|
-
}
|
100
|
-
ol,ul {
|
101
|
-
list-style:none;
|
102
|
-
}
|
103
|
-
caption,th {
|
104
|
-
text-align:left;
|
105
|
-
}
|
106
|
-
h1,h2,h3,h4,h5,h6 {
|
107
|
-
font-size:100%;
|
108
|
-
font-weight:normal;
|
109
|
-
}
|
110
|
-
q:before,q:after {
|
111
|
-
content:'';
|
112
|
-
}
|
113
|
-
abbr,acronym {
|
114
|
-
border:0;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
|
118
|
-
@mixin css-reset($size:14px, $boxmodel:'border-box') {
|
119
|
-
@include css-clear($boxmodel);
|
120
|
-
body {
|
121
|
-
font-size: $size;
|
122
|
-
line-height: 1.3em;
|
123
|
-
}
|
124
|
-
h1, h2, h3, h4, h5, h6 {
|
125
|
-
font-weight: bold;
|
126
|
-
}
|
127
|
-
h1 {
|
128
|
-
font-size: 175%;
|
129
|
-
}
|
130
|
-
h2 {
|
131
|
-
font-size: 155%;
|
132
|
-
}
|
133
|
-
h3 {
|
134
|
-
font-size: 135%;
|
135
|
-
}
|
136
|
-
h4 {
|
137
|
-
font-size: 120%;
|
138
|
-
}
|
139
|
-
h5 {
|
140
|
-
font-size: 105%;
|
141
|
-
}
|
142
|
-
h6 {
|
143
|
-
font-size: 100%;
|
144
|
-
}
|
145
|
-
p, blockquote, h1, h2, h3, h4, h5, h6, pre, ol, ul {
|
146
|
-
padding: 0.5em 0;
|
147
|
-
}
|
148
|
-
b, strong {
|
149
|
-
font-weight: bold;
|
150
|
-
}
|
151
|
-
i, em {
|
152
|
-
font-style: italic;
|
153
|
-
}
|
154
|
-
ul, ol {
|
155
|
-
padding-left: 2em;
|
156
|
-
}
|
157
|
-
ul {
|
158
|
-
list-style: circle;
|
159
|
-
}
|
160
|
-
ol {
|
161
|
-
list-style: decimal;
|
162
|
-
}
|
163
|
-
blockquote {
|
164
|
-
padding-left: 4em;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
|
168
|
-
@mixin debug-hover($color:'red') {
|
169
|
-
&:hover {
|
170
|
-
outline: 1px solid $color;
|
171
|
-
}
|
172
|
-
}
|
173
|
-
|
174
|
-
|
175
|
-
// Vertical Background Gradient
|
176
|
-
@mixin vbg-gradient($fc: #FFF, $tc: #FFF) {
|
177
|
-
background: $fc;
|
178
|
-
background: -webkit-gradient(linear, left top, left bottom, from($fc), to($tc));
|
179
|
-
background: -moz-linear-gradient(top, $fc, $tc);
|
180
|
-
}
|
181
|
-
|
182
|
-
// Vertical Background Gradient, 3 color
|
183
|
-
@mixin vbg-gradient3($fc: #FFF, $mc: #FFF, $tc: #FFF) {
|
184
|
-
background: $fc;
|
185
|
-
background: -webkit-gradient(linear, left top, left bottom, from($fc), color-stop(0.5, $mc), to($tc));
|
186
|
-
background: -moz-linear-gradient(top, $fc, $mc, $tc);
|
187
|
-
}
|
188
|
-
|
189
|
-
// Horizontal Background Gradient
|
190
|
-
@mixin hbg-gradient($fc: #FFF, $tc: #FFF) {
|
191
|
-
background: $fc;
|
192
|
-
background: -webkit-gradient(linear, left top, right top, from($fc), to($tc));
|
193
|
-
background: -moz-linear-gradient(left, $fc, $tc);
|
194
|
-
}
|
195
|
-
|
196
|
-
|
197
|
-
// Box Model
|
198
|
-
@mixin box-model($type:'border-box') {
|
199
|
-
box-sizing: $type;
|
200
|
-
-moz-box-sizing: $type;
|
201
|
-
-ms-box-sizing: $type;
|
202
|
-
-webkit-box-sizing: $type;
|
203
|
-
}
|
204
|
-
|
205
|
-
@mixin hbox ($boxAlign:stretch, $boxPack:left) {
|
206
|
-
@include display-box();
|
207
|
-
@include box-orient(horizontal);
|
208
|
-
@include box-align($boxAlign);
|
209
|
-
@include box-pack($boxPack);
|
210
|
-
}
|
211
|
-
|
212
|
-
@mixin vbox ($boxAlign:stretch, $boxPack:left) {
|
213
|
-
@include display-box();
|
214
|
-
@include box-orient(vertical);
|
215
|
-
@include box-align($boxAlign);
|
216
|
-
@include box-pack($boxPack);
|
217
|
-
}
|
218
|
-
|
219
|
-
@mixin display-box () {
|
220
|
-
display: box;
|
221
|
-
display: -webkit-box;
|
222
|
-
display: -moz-box;
|
223
|
-
}
|
224
|
-
|
225
|
-
|
226
|
-
@mixin box-flex ($s: 0) {
|
227
|
-
box-flex: $s;
|
228
|
-
-webkit-box-flex: $s;
|
229
|
-
-moz-box-flex: $s;
|
230
|
-
}
|
231
|
-
|
232
|
-
|
233
|
-
@mixin box-orient($dir:horizontal) {
|
234
|
-
box-orient: $dir;
|
235
|
-
-webkit-box-orient: $dir;
|
236
|
-
-moz-box-orient: $dir;
|
237
|
-
}
|
238
|
-
|
239
|
-
@mixin box-pack($dir:left) {
|
240
|
-
box-pack: $dir;
|
241
|
-
-webkit-box-pack: $dir;
|
242
|
-
-moz-box-pack: $dir;
|
243
|
-
}
|
244
|
-
|
245
|
-
@mixin box-align($dir:stretch) {
|
246
|
-
box-align: $dir;
|
247
|
-
-webkit-box-align: $dir;
|
248
|
-
-moz-box-align: $dir;
|
249
|
-
}
|
250
|
-
|
251
|
-
@mixin box-lines($rows:single) {
|
252
|
-
box-lines: $rows;
|
253
|
-
-webkit-box-lines: $rows;
|
254
|
-
-moz-box-lines: $rows;
|
255
|
-
}
|
256
|
-
|
257
|
-
|
258
|
-
// SHADOWS
|
259
|
-
|
260
|
-
// TEXT shadow
|
261
|
-
@mixin text-shadow($props) {
|
262
|
-
text-shadow: $props;
|
263
|
-
-moz-text-shadow: $props;
|
264
|
-
-webkit-text-shadow: $props; }
|
265
|
-
|
266
|
-
// BOX shadow
|
267
|
-
@mixin box-shadow($props) {
|
268
|
-
box-shadow: $props;
|
269
|
-
-moz-box-shadow: $props;
|
270
|
-
-webkit-box-shadow: $props; }
|
271
|
-
|
272
|
-
@mixin inset-box-shadow ($h: 0px, $v: 0px, $b: 4px, $c: #333) {
|
273
|
-
box-shadow: inset $h $v $b $c;
|
274
|
-
-moz-box-shadow: inset $h $v $b $c;
|
275
|
-
-webkit-box-shadow: inset $h $v $b $c;
|
276
|
-
}
|
277
|
-
|
278
|
-
@mixin border-as-shadow($tlc:#000, $brc:#FFF, $width:1px, $style:solid) {
|
279
|
-
border: {
|
280
|
-
top: $width $style $tlc;
|
281
|
-
left: $width $style $tlc;
|
282
|
-
right: $width $style $brc;
|
283
|
-
bottom: $width $style $brc;
|
284
|
-
};
|
285
|
-
}
|
286
|
-
|
287
|
-
|
288
|
-
// BORDER RADIUS
|
289
|
-
|
290
|
-
// All corners
|
291
|
-
@mixin border-radius($radius) {
|
292
|
-
border-radius: $radius;
|
293
|
-
-moz-border-radius: $radius;
|
294
|
-
-webkit-border-radius: $radius; }
|
295
|
-
|
296
|
-
// Top Right
|
297
|
-
@mixin border-radius-top-right($radius) {
|
298
|
-
@include border-radius-top-right($radius); }
|
299
|
-
|
300
|
-
// Bottom Right
|
301
|
-
@mixin border-radius-bottom-right($radius) {
|
302
|
-
@include border-radius-bottom-right($radius); }
|
303
|
-
|
304
|
-
// Bottom Left
|
305
|
-
@mixin border-radius-bottom-left($radius) {
|
306
|
-
@include border-radius-bottom-left($radius); }
|
307
|
-
|
308
|
-
// Top Left
|
309
|
-
@mixin border-radius-top-left($radius) {
|
310
|
-
@include border-radius-top-left($radius); }
|
311
|
-
|
312
|
-
// Top
|
313
|
-
@mixin border-radius-top($radius) {
|
314
|
-
@include border-radius-top-left($radius);
|
315
|
-
@include border-radius-top-right($radius); }
|
316
|
-
|
317
|
-
// Right
|
318
|
-
@mixin border-radius-right($radius) {
|
319
|
-
@include border-radius-top-right($radius);
|
320
|
-
@include border-radius-bottom-right($radius); }
|
321
|
-
|
322
|
-
// Bottom
|
323
|
-
@mixin border-radius-bottom($radius) {
|
324
|
-
@include border-radius-bottom-right($radius);
|
325
|
-
@include border-radius-bottom-left($radius); }
|
326
|
-
|
327
|
-
// Left
|
328
|
-
@mixin border-radius-left($radius) {
|
329
|
-
@include border-radius-top-left($radius);
|
330
|
-
@include border-radius-bottom-left($radius); }
|
331
|
-
|
332
|
-
// Let's setup the rules so we don't have to repeat ourselves
|
333
|
-
// These are mixins for this mixin and are re-used above
|
334
|
-
@mixin border-radius-top-right($radius) {
|
335
|
-
border-top-right-radius: $radius;
|
336
|
-
-moz-border-radius-topright: $radius;
|
337
|
-
-webkit-border-top-right-radius: $radius; }
|
338
|
-
|
339
|
-
@mixin border-radius-bottom-right($radius) {
|
340
|
-
border-bottom-right-radius: $radius;
|
341
|
-
-moz-border-radius-bottomright: $radius;
|
342
|
-
-webkit-border-bottom-right-radius: $radius; }
|
343
|
-
|
344
|
-
@mixin border-radius-bottom-left($radius) {
|
345
|
-
border-bottom-left-radius: $radius;
|
346
|
-
-moz-border-radius-bottomleft: $radius;
|
347
|
-
-webkit-border-bottom-left-radius: $radius; }
|
348
|
-
|
349
|
-
@mixin border-radius-top-left($radius) {
|
350
|
-
border-top-left-radius: $radius;
|
351
|
-
-moz-border-radius-topleft: $radius;
|
352
|
-
-webkit-border-top-left-radius: $radius; }
|
353
|
-
|
354
|
-
@mixin animate($name, $dur:1s, $easing:ease-in-out, $iter:infinite, $dir:alternate) {
|
355
|
-
-webkit-animation-name: $name;
|
356
|
-
-webkit-animation-duration: $dur;
|
357
|
-
-webkit-animation-direction: $dir;
|
358
|
-
-webkit-animation-iteration-count: $iter;
|
359
|
-
-webkit-animation-timing-function: $easing;
|
360
|
-
}
|
361
|
-
|
362
|
-
@mixin transition($info:all 250 ease-out) {
|
363
|
-
-webkit-transition: $info;
|
364
|
-
-moz-transition: $info;
|
365
|
-
-o-transition: $info;
|
366
|
-
transition: $info;
|
367
|
-
}
|
368
|
-
|
369
|
-
@mixin transform( $s:'rotate(45deg)') {
|
370
|
-
-moz-transform: $s;
|
371
|
-
-webkit-transform: $s;
|
372
|
-
-o-transform: $s;
|
373
|
-
transform: $s;
|
374
|
-
}
|
375
|
-
|
376
|
-
@mixin box-attrs() {
|
377
|
-
*[box-flex="0"] { @include box-flex(0); }
|
378
|
-
*[box-flex="1"] { @include box-flex(1); }
|
379
|
-
*[box-flex="2"] { @include box-flex(2); }
|
380
|
-
*[box-flex="3"] { @include box-flex(3); }
|
381
|
-
*[box-flex="4"] { @include box-flex(4); }
|
382
|
-
*[box-flex="5"] { @include box-flex(5); }
|
383
|
-
*[box-flex="6"] { @include box-flex(6); }
|
384
|
-
*[box-flex="7"] { @include box-flex(7); }
|
385
|
-
*[box-flex="8"] { @include box-flex(8); }
|
386
|
-
*[box-flex="9"] { @include box-flex(9); }
|
387
|
-
*[box-flex="10"] { @include box-flex(10); }
|
388
|
-
|
389
|
-
*[box-align="start"] { @include box-align(start); }
|
390
|
-
*[box-align="center"] { @include box-align(center); }
|
391
|
-
*[box-align="end"] { @include box-align(end); }
|
392
|
-
*[box-align="baseline"] { @include box-align(baseline); }
|
393
|
-
*[box-align="stretch"] { @include box-align(stretch); }
|
394
|
-
|
395
|
-
*[box-pack="start"] { @include box-pack(start); }
|
396
|
-
*[box-pack="center"] { @include box-pack(center); }
|
397
|
-
*[box-pack="end"] { @include box-pack(end); }
|
398
|
-
*[box-pack="justify"] { @include box-pack(justify); }
|
399
|
-
*[box-pack="stretch"] { @include box-pack(justify); }
|
400
|
-
|
401
|
-
*[box-lines="single"] { @include box-lines(single); }
|
402
|
-
*[box-lines="multiple"] { @include box-lines(multiple); }
|
403
|
-
|
404
|
-
*[box-orient="horizontal"] { @include box-orient(horizontal); }
|
405
|
-
*[box-orient="vertical"] { @include box-orient(vertical); }
|
406
|
-
|
407
|
-
}
|
408
|
-
|
409
|
-
// Font stuff
|
410
|
-
|
411
|
-
@mixin web-font($family, $url, $format:'truetype') {
|
412
|
-
@font-face {
|
413
|
-
font-family: $family;
|
414
|
-
src: url($url) format($format);
|
415
|
-
}
|
416
|
-
}
|
417
|
-
|
418
|
-
// Color stuff
|
419
|
-
|
420
|
-
@function strengthen($color, $multiplier: 1, $reversed: $reversed-text) {
|
421
|
-
@if $reversed {
|
422
|
-
@return lighten($color, 20% * $multiplier);
|
423
|
-
} @else {
|
424
|
-
@return darken($color, 20% * $multiplier);
|
425
|
-
}
|
426
|
-
}
|
427
|
-
|
428
|
-
@function soften($color, $multiplier: 1, $reversed: $reversed-text) {
|
429
|
-
@if $reversed {
|
430
|
-
@return darken($color, 20% * $multiplier);
|
431
|
-
} @else {
|
432
|
-
@return lighten($color, 20% * $multiplier);
|
433
|
-
}
|
434
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
html lang="en"
|
3
|
-
head
|
4
|
-
meta charset="utf-8"
|
5
|
-
title= config.site_title
|
6
|
-
/[if le IE 9]
|
7
|
-
script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"
|
8
|
-
/link rel="stylesheet" href==uri('theme/screen.css') type="text/css" media="screen" charset="utf-8"
|
9
|
-
body
|
10
|
-
== yield
|
11
|
-
script src==uri('lib.js')
|
12
|
-
script src==uri('app.js')
|
13
|
-
javascript:
|
14
|
-
app('init');
|
data/templates/default/Rakefile
DELETED
@@ -1,38 +0,0 @@
|
|
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_dir"
|
11
|
-
task :build do
|
12
|
-
Gumdrop::CLI::Internal.new.build
|
13
|
-
end
|
14
|
-
|
15
|
-
desc "Run development server"
|
16
|
-
task :server do
|
17
|
-
Gumdrop::CLI::Internal.new.server
|
18
|
-
end
|
19
|
-
task :serve => :server
|
20
|
-
|
21
|
-
desc "Outputs the Gumdrop version"
|
22
|
-
task :version do
|
23
|
-
puts Gumdrop::VERSION
|
24
|
-
end
|
25
|
-
|
26
|
-
task :default do
|
27
|
-
puts `rake -T`
|
28
|
-
end
|
29
|
-
|
30
|
-
desc "Syncs with public server using rsync (if configured)"
|
31
|
-
task :sync do
|
32
|
-
site= Gumdrop::Site.new Gumdrop.fetch_site_file
|
33
|
-
output= File.expand_path site.config.output_dir
|
34
|
-
cmd= "rsync -avz --delete #{output} #{USER}@#{SERVER}:#{FOLDER}"
|
35
|
-
puts "Running:\n#{cmd}\n"
|
36
|
-
system(cmd)
|
37
|
-
puts "Done."
|
38
|
-
end
|
data/templates/default/powrc
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
<% use_layout nil %>
|
2
|
-
# For clean urls
|
3
|
-
DirectoryIndex index.html
|
4
|
-
|
5
|
-
<IfModule mod_rewrite.c>
|
6
|
-
RewriteEngine On
|
7
|
-
RewriteBase /
|
8
|
-
|
9
|
-
# Do not do anything for already existing files and folders
|
10
|
-
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
11
|
-
RewriteCond %{REQUEST_FILENAME} -d
|
12
|
-
RewriteRule .+ - [L]
|
13
|
-
|
14
|
-
# add .html file extension (if such file does exist)
|
15
|
-
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f
|
16
|
-
RewriteRule ^(.+[^/])/?$ $1.html [L,QSA]
|
17
|
-
</IfModule>
|
18
|
-
|
19
|
-
# BEGIN Gzip
|
20
|
-
<IfModule mod_deflate.c>
|
21
|
-
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
|
22
|
-
</IfModule>
|
23
|
-
# END Gzip
|
24
|
-
|
25
|
-
<% site.redirects.each do |opts| %>
|
26
|
-
# Redirect <%= opts[:from] %> <%= opts[:to] %>
|
27
|
-
<% end %>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
xml.instruct!
|
2
|
-
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
3
|
-
xml.title config.site_title
|
4
|
-
xml.subtitle config.site_tagline
|
5
|
-
xml.id config.site_url
|
6
|
-
xml.link "href" => config.site_url
|
7
|
-
xml.link "href" => "#{config.site_url}/feed.xml", "rel" => "self"
|
8
|
-
xml.updated data.blog.first.date.to_time.iso8601
|
9
|
-
xml.author { xml.name config.site_author }
|
10
|
-
|
11
|
-
data.blog.each do |post|
|
12
|
-
xml.entry do
|
13
|
-
url= "#{config.site_url}/posts/#{post.slug}"
|
14
|
-
xml.title post.title
|
15
|
-
xml.link "rel" => "alternate", "href" => url
|
16
|
-
xml.id url
|
17
|
-
xml.published post.date.to_time.iso8601
|
18
|
-
xml.updated post.date.to_time.iso8601
|
19
|
-
xml.author { xml.name config.site_author }
|
20
|
-
xml.content post.body, "type" => "html"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
html lang="en"
|
3
|
-
head
|
4
|
-
meta charset="utf-8"
|
5
|
-
title= config.site_title
|
6
|
-
/[if le IE 9]
|
7
|
-
script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"
|
8
|
-
link rel="stylesheet" href==uri('theme/screen.css') type="text/css" media="screen" charset="utf-8"
|
9
|
-
script src==uri('theme/scripts/app.js')
|
10
|
-
body
|
11
|
-
div.row
|
12
|
-
div.col.span-12
|
13
|
-
header
|
14
|
-
h1= config.site_title
|
15
|
-
h4= config.site_tagline
|
16
|
-
div.row
|
17
|
-
div.col.span-12
|
18
|
-
nav
|
19
|
-
ul
|
20
|
-
li
|
21
|
-
a href==uri('/index.html') Home
|
22
|
-
article
|
23
|
-
div.row
|
24
|
-
div.col.span-8
|
25
|
-
section
|
26
|
-
== yield
|
27
|
-
div.col.span-4
|
28
|
-
aside
|
29
|
-
== render 'sidebar'
|
30
|
-
div.row
|
31
|
-
div.col.span-12
|
32
|
-
footer
|
33
|
-
== copyright_years 2011
|