gumdrop 0.3 → 0.3.2
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 +6 -0
- data/lib/gumdrop/cli.rb +4 -4
- data/lib/gumdrop/generator.rb +2 -15
- data/lib/gumdrop/stitch_ex.rb +14 -0
- data/lib/gumdrop/template/backbone/Gemfile +29 -0
- data/lib/gumdrop/template/backbone/Rakefile +38 -0
- data/lib/gumdrop/template/backbone/app_src/app.js.coffee +32 -0
- data/lib/gumdrop/template/backbone/app_src/init.js.coffee +10 -0
- data/lib/gumdrop/template/backbone/app_src/utils/index.js.coffee +29 -0
- data/lib/gumdrop/template/backbone/config.ru +21 -0
- data/lib/gumdrop/template/backbone/data/config.yml +4 -0
- data/lib/gumdrop/template/backbone/lib/javascript/all.js.coffee +18 -0
- data/lib/gumdrop/template/backbone/lib/javascript/backbone.js +1158 -0
- data/lib/gumdrop/template/backbone/lib/javascript/hogan.js +509 -0
- data/lib/gumdrop/template/backbone/lib/javascript/jquery.js +9266 -0
- data/lib/gumdrop/template/backbone/lib/javascript/underscore.js +981 -0
- data/lib/gumdrop/template/backbone/lib/site.rb +58 -0
- data/lib/gumdrop/template/backbone/lib/stitch_compilers.rb +85 -0
- data/lib/gumdrop/template/backbone/lib/view_helpers.rb +17 -0
- data/lib/gumdrop/template/backbone/powrc +2 -0
- data/lib/gumdrop/template/backbone/source/default.htaccess +22 -0
- data/lib/gumdrop/template/backbone/source/favicon.ico +0 -0
- data/lib/gumdrop/template/backbone/source/feed.xml.builder.txt +23 -0
- data/lib/gumdrop/template/backbone/source/index.html.erb +2 -0
- data/lib/gumdrop/template/backbone/source/theme/screen.css.sass +9 -0
- data/lib/gumdrop/template/backbone/source/theme/scripts/app.js.coffee +4 -0
- data/lib/gumdrop/template/backbone/source/theme/styles/_tools.scss +434 -0
- data/lib/gumdrop/template/backbone/source/theme/templates/app.template.slim +14 -0
- data/lib/gumdrop/template/backbone/source/theme/templates/site.template.slim +33 -0
- data/lib/gumdrop/version.rb +1 -1
- metadata +39 -13
@@ -0,0 +1,58 @@
|
|
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
|
+
require 'stitch_compilers'
|
15
|
+
|
16
|
+
generate do
|
17
|
+
|
18
|
+
stitch 'app.js', :identifier=>'app', :paths=>['./app_src'], :root=>'./app_src', :prune=>false, :compress=>false
|
19
|
+
stitch 'lib.js', :identifier=>'lib', :paths=>['./lib/javascript'], :root=>'./lib/javascript', :prune=>true, :compress=>false
|
20
|
+
|
21
|
+
# Create minified 'production' versions
|
22
|
+
#stitch 'app.min.js', :identifier=>'app', :paths=>['./app_src'], :root=>'./app_src', :prune=>false, :compress=>true
|
23
|
+
#stitch 'lib.min.js', :identifier=>'lib', :paths=>['./lib/javascript'], :root=>'./lib/javascript', :prune=>true, :compress=>true
|
24
|
+
|
25
|
+
|
26
|
+
# Examples of other generatory things:
|
27
|
+
#
|
28
|
+
# page "about.html", :template=>'about', :passthru=>'Available in the template' # requires a about.template.XX file
|
29
|
+
#
|
30
|
+
# page 'robots.txt' do
|
31
|
+
# # And content returned will be put in the file
|
32
|
+
# """
|
33
|
+
# User-Agent: *
|
34
|
+
# Disallow: /
|
35
|
+
# """
|
36
|
+
# end
|
37
|
+
#
|
38
|
+
# stitch 'app.js', :paths=>['source/app_src'], :root=>'source/app_src', :compress=>true, :prune=>true # Prune will remove the source files from the output tree -- you can add :dependencies=>['dir'] too
|
39
|
+
#
|
40
|
+
# # Maybe for a tumblr-like pager
|
41
|
+
# pager= Gumdrop.data.pager_for :posts, base_path:'posts/page', page_size:5
|
42
|
+
# pager.each do |page|
|
43
|
+
# page "#{page.uri}.html", template:'post_page', posts:page.items, pager:pager, current_page:pager.current_page
|
44
|
+
# end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
# Example of using a content filter to compress CoffeeScript/JS output
|
49
|
+
# require 'jsmin'
|
50
|
+
# content_filter do |content, info|
|
51
|
+
# if info.ext == '.js'
|
52
|
+
# puts " Compress: #{info.filename}"
|
53
|
+
# JSMin.minify content
|
54
|
+
# else
|
55
|
+
# content
|
56
|
+
# end
|
57
|
+
# end
|
58
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'stitch-rb'
|
2
|
+
|
3
|
+
class HoganCompiler < Stitch::Compiler
|
4
|
+
# List of supported extensions
|
5
|
+
extensions :mustache
|
6
|
+
|
7
|
+
# A compile method which takes a file path,
|
8
|
+
# and returns a compiled string
|
9
|
+
def compile(path)
|
10
|
+
content = File.read(path)
|
11
|
+
%{
|
12
|
+
var template = Hogan.compile(#{content.to_json});
|
13
|
+
module.exports = (function(data){ return template.render(data); });
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module CssJsCode
|
19
|
+
|
20
|
+
def export_js_code(path)
|
21
|
+
content= File.read(path)
|
22
|
+
%{
|
23
|
+
var css = #{ transpile(content, File.extname(path)).to_json },
|
24
|
+
node = null;
|
25
|
+
module.exports= {
|
26
|
+
content: css,
|
27
|
+
apply: function(to){
|
28
|
+
if(node != null) return;
|
29
|
+
if(to == null) to= document.body;
|
30
|
+
node= document.createElement('style');
|
31
|
+
node.innerHTML= css;
|
32
|
+
to.appendChild(node);
|
33
|
+
return this;
|
34
|
+
},
|
35
|
+
remove: function() {
|
36
|
+
if(node != null) {
|
37
|
+
node.parentNode.removeChild(node);
|
38
|
+
node = null;
|
39
|
+
}
|
40
|
+
return this;
|
41
|
+
}
|
42
|
+
};
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
def transpile(content, ext)
|
47
|
+
content
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
class CssCompiler < Stitch::Compiler
|
53
|
+
include CssJsCode
|
54
|
+
|
55
|
+
extensions :css
|
56
|
+
|
57
|
+
def compile(path)
|
58
|
+
export_js_code path
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
begin
|
65
|
+
require 'sass'
|
66
|
+
|
67
|
+
class SassCompiler < Stitch::Compiler
|
68
|
+
include CssJsCode
|
69
|
+
|
70
|
+
extensions :sass, :scss
|
71
|
+
|
72
|
+
def compile(path)
|
73
|
+
export_js_code path
|
74
|
+
end
|
75
|
+
|
76
|
+
def transpile(content, ext)
|
77
|
+
type = (ext == '.sass') ? :sass : :scss
|
78
|
+
Sass::Engine.new(content, :syntax=>type).render
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
rescue
|
83
|
+
# Sass Not available
|
84
|
+
end
|
85
|
+
|
@@ -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,22 @@
|
|
1
|
+
# For clean urls
|
2
|
+
DirectoryIndex index.html
|
3
|
+
|
4
|
+
<IfModule mod_rewrite.c>
|
5
|
+
RewriteEngine On
|
6
|
+
RewriteBase /
|
7
|
+
|
8
|
+
# Do not do anything for already existing files and folders
|
9
|
+
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
10
|
+
RewriteCond %{REQUEST_FILENAME} -d
|
11
|
+
RewriteRule .+ - [L]
|
12
|
+
|
13
|
+
# add .html file extension (if such file does exist)
|
14
|
+
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f
|
15
|
+
RewriteRule ^(.+[^/])/?$ $1.html [L,QSA]
|
16
|
+
</IfModule>
|
17
|
+
|
18
|
+
# BEGIN Gzip
|
19
|
+
<IfModule mod_deflate.c>
|
20
|
+
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
|
21
|
+
</IfModule>
|
22
|
+
# END Gzip
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
xml.instruct!
|
2
|
+
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
3
|
+
xml.title data.config.title
|
4
|
+
xml.subtitle data.config.tagline
|
5
|
+
xml.id data.config.url
|
6
|
+
xml.link "href" => data.config.url
|
7
|
+
xml.link "href" => "#{data.config.url}/feed.xml", "rel" => "self"
|
8
|
+
xml.updated data.blog.first.date.to_time.iso8601
|
9
|
+
xml.author { xml.name data.config.author }
|
10
|
+
|
11
|
+
data.blog.each do |post|
|
12
|
+
xml.entry do
|
13
|
+
url= "#{data.config.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 data.config.author }
|
20
|
+
xml.content post.body, "type" => "html"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,434 @@
|
|
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
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="en"
|
3
|
+
head
|
4
|
+
meta charset="utf-8"
|
5
|
+
title= data.config.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');
|