pinkman 0.9.9.8 → 0.9.9.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +12 -12
- data/app/assets/javascripts/pinkman_base/collection.coffee +48 -20
- data/app/assets/javascripts/pinkman_base/common.coffee +38 -9
- data/app/assets/javascripts/pinkman_base/controller.coffee +134 -36
- data/app/assets/javascripts/pinkman_base/mixins.coffee +8 -4
- data/app/assets/javascripts/pinkman_base/object.coffee.erb +15 -13
- data/app/assets/javascripts/pinkman_base/pinkman.coffee +16 -0
- data/app/assets/javascripts/pinkman_base/render.coffee.erb +17 -5
- data/app/assets/javascripts/pinkman_base/router.coffee +95 -46
- data/app/assets/javascripts/pinkman_base/tools.coffee +3 -3
- data/app/assets/stylesheets/_colors.scss +45 -0
- data/app/assets/stylesheets/_custom_colors.scss +7 -0
- data/app/assets/stylesheets/_mixins.scss +39 -0
- data/app/assets/stylesheets/_settings.scss +1 -0
- data/app/assets/stylesheets/pinkman/buttons.scss +15 -0
- data/app/assets/stylesheets/pinkman/colors.scss +99 -0
- data/app/assets/stylesheets/pinkman/containers.scss +15 -0
- data/app/assets/stylesheets/pinkman/elements.scss +33 -0
- data/app/assets/stylesheets/pinkman/forms.scss +89 -0
- data/app/assets/stylesheets/pinkman/grid.scss +120 -0
- data/app/assets/stylesheets/pinkman/imgs.scss +7 -0
- data/app/assets/stylesheets/pinkman/lists.scss +58 -0
- data/app/assets/stylesheets/pinkman/loaders.scss +495 -0
- data/app/assets/stylesheets/pinkman/margins.scss +65 -0
- data/app/assets/stylesheets/pinkman/portfolio.scss +59 -0
- data/app/assets/stylesheets/pinkman/pygments.css.erb +1 -0
- data/app/assets/stylesheets/pinkman/reset.scss +51 -0
- data/app/assets/stylesheets/pinkman/sector.scss +10 -0
- data/app/assets/stylesheets/pinkman/tables.scss +62 -0
- data/app/assets/stylesheets/pinkman/typo.scss +104 -0
- data/app/assets/stylesheets/pinkman.css +17 -0
- data/app/controllers/pinkman/pinkman_controller.rb +6 -0
- data/app/helpers/pinkman/pinkman_helper.rb +14 -0
- data/app/views/pinkman/_error_for.html.slim +4 -0
- data/app/views/pinkman/pinkman/_form_input.html.slim +4 -0
- data/app/views/pinkman/pinkman/_form_select.html.slim +13 -0
- data/app/views/pinkman/pinkman/_form_textarea.html.slim +4 -0
- data/app/views/pinkman/pinkman/hello.html.erb +53 -0
- data/config/routes.rb +7 -0
- data/lib/generators/pinkman/USAGE +60 -14
- data/lib/generators/pinkman/app_base_generator.rb +16 -4
- data/lib/generators/pinkman/controller_generator.rb +29 -0
- data/lib/generators/pinkman/crud_generator.rb +24 -0
- data/lib/generators/pinkman/initializer_generator.rb +12 -0
- data/lib/generators/pinkman/install_generator.rb +29 -2
- data/lib/generators/pinkman/model_generator.rb +2 -2
- data/lib/generators/pinkman/page_generator.rb +15 -0
- data/lib/generators/pinkman/route_generator.rb +40 -0
- data/lib/generators/pinkman/route_resource_generator.rb +40 -0
- data/lib/generators/pinkman/template_generator.rb +47 -0
- data/lib/generators/pinkman/templates/api.rb.erb +6 -6
- data/lib/generators/pinkman/templates/api_controller.rb +22 -18
- data/lib/generators/pinkman/templates/app.coffee.erb +1 -0
- data/lib/generators/pinkman/templates/app_app.coffee.erb +1 -0
- data/lib/generators/pinkman/templates/app_collection.coffee.erb +1 -1
- data/lib/generators/pinkman/templates/app_object.coffee.erb +1 -1
- data/lib/generators/pinkman/templates/app_router.coffee.erb +1 -0
- data/lib/generators/pinkman/templates/app_routes.coffee.erb +34 -0
- data/lib/generators/pinkman/templates/controller.coffee.erb +4 -0
- data/lib/generators/pinkman/templates/example.mixin.coffee.erb +32 -0
- data/lib/generators/pinkman/templates/hello.controller.coffee.erb +98 -0
- data/lib/generators/pinkman/templates/initializer.rb.erb +6 -0
- data/lib/generators/pinkman/templates/my.pinkman.app.js +70 -0
- data/lib/generators/pinkman/templates/pink_template.html.erb.erb +4 -0
- data/lib/generators/pinkman/templates/pink_template.html.haml.erb +3 -0
- data/lib/generators/pinkman/templates/pink_template.html.slim.erb +3 -0
- data/lib/generators/pinkman/templates/serializer.rb.erb +6 -6
- data/lib/pinkman/base_helper.rb +15 -0
- data/lib/pinkman/form_helper/form_helpers.rb +65 -0
- data/lib/pinkman/form_helper.rb +36 -0
- data/lib/pinkman/serializer/base.rb +0 -1
- data/lib/pinkman/version.rb +1 -1
- data/lib/pinkman/views_helpers/collection_helper.rb +16 -0
- data/lib/pinkman/views_helpers/conditional_helper.rb +19 -0
- data/lib/pinkman/views_helpers/dispatcher.rb +27 -0
- data/lib/pinkman/views_helpers/form_helper.rb +63 -0
- data/lib/pinkman/views_helpers/template_helper.rb +65 -0
- data/lib/pinkman/views_helpers/writer_helper.rb +31 -0
- data/lib/pinkman/views_helpers.rb +71 -0
- data/lib/pinkman.rb +31 -5
- data/public/jquery.pinkman.min.js +4 -0
- data/public/pinkman.min.js +2 -29
- metadata +61 -4
- data/app/helpers/pinkman_helper.rb +0 -87
@@ -11,6 +11,7 @@ Pinkman.template_engines =
|
|
11
11
|
@handlebars(context)
|
12
12
|
template
|
13
13
|
else
|
14
|
+
throw 'Pinkman: handlebars not found.'
|
14
15
|
|
15
16
|
|
16
17
|
hogan: (template,html) ->
|
@@ -20,6 +21,7 @@ Pinkman.template_engines =
|
|
20
21
|
@hogan.render(context)
|
21
22
|
template
|
22
23
|
else
|
24
|
+
throw 'Pinkman: hogan not found.'
|
23
25
|
|
24
26
|
|
25
27
|
markup: (template,html) ->
|
@@ -27,6 +29,7 @@ Pinkman.template_engines =
|
|
27
29
|
template.render = (context) -> Mark.up(html,context)
|
28
30
|
template
|
29
31
|
else
|
32
|
+
throw 'Pinkman: markup not found.'
|
30
33
|
|
31
34
|
template: (options) ->
|
32
35
|
if Pinkman.templates.include(template: options.template, engine: options.engine)
|
@@ -95,6 +98,7 @@ Pinkman.template_engines =
|
|
95
98
|
return(options.object)
|
96
99
|
|
97
100
|
compile: (engine, template, html) ->
|
101
|
+
# console.log engine
|
98
102
|
e = Pinkman.template_engines[engine]
|
99
103
|
e(template,html)
|
100
104
|
template
|
@@ -110,6 +114,7 @@ Pinkman.template_engines =
|
|
110
114
|
$(el).find("option[value='#{obj[$(el).attr('name')]}']").attr('selected','selected')
|
111
115
|
|
112
116
|
render: (options) ->
|
117
|
+
|
113
118
|
# 1 check if template exists
|
114
119
|
if options? and options.template? and $('#' + options.template).length
|
115
120
|
|
@@ -132,6 +137,8 @@ Pinkman.template_engines =
|
|
132
137
|
# 6 callback function
|
133
138
|
options.callback(options.object,content) if options.callback? and typeof options.callback == 'function'
|
134
139
|
return(content)
|
140
|
+
else
|
141
|
+
throw "Pinkman: #{options.template} not found."
|
135
142
|
|
136
143
|
# Pinkman sync:
|
137
144
|
|
@@ -151,11 +158,16 @@ Pinkman.sync = (obj,attribute,value) ->
|
|
151
158
|
|
152
159
|
|
153
160
|
Pinkman.render = (options) ->
|
154
|
-
options
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
161
|
+
if $p.isObject(options) or $p.isString(options)
|
162
|
+
options = {template: (options + '-template'), target: options} if $p.isString(options)
|
163
|
+
options.template = options.template + '-template' unless /-template$/.test(options.template)
|
164
|
+
options.reRender = true unless options.reRender? and options.reRender == false
|
165
|
+
options.collectionReRender = true unless options.collectionReRender? and options.collectionReRender == false
|
166
|
+
options.engine = Pinkman.template_engine unless options.engine? and options.engine != ''
|
167
|
+
Pinkman.template_engines.render(options)
|
168
|
+
options.object.queue(options) if options.reRender and options.object? and options.object.isPink
|
169
|
+
else
|
170
|
+
throw "Pinkman.render: options argument is neither an object nor a string."
|
159
171
|
|
160
172
|
Pinkman.scrolling = new PinkmanCollection unless Pinkman.scrolling?
|
161
173
|
|
@@ -44,6 +44,9 @@ class window.PinkmanPath extends Pinkman.object
|
|
44
44
|
|
45
45
|
level: (index) ->
|
46
46
|
@levels.getBy('index',index)
|
47
|
+
|
48
|
+
lastLevel: ->
|
49
|
+
@levels.last()
|
47
50
|
|
48
51
|
match: (path) ->
|
49
52
|
path = new PinkmanPath(path) if Pinkman.isString(path)
|
@@ -58,6 +61,9 @@ class window.PinkmanPath extends Pinkman.object
|
|
58
61
|
else
|
59
62
|
false
|
60
63
|
|
64
|
+
|
65
|
+
deduceControllerName: ->
|
66
|
+
@static.extract('entry').join('-').replace(/[\/_]/g,'-').replace(/^-/,'')
|
61
67
|
|
62
68
|
# receives a string and matches it through the defined routes
|
63
69
|
class window.PinkmanRouteMatcher extends Pinkman.object
|
@@ -69,11 +75,15 @@ class window.PinkmanRouteMatcher extends Pinkman.object
|
|
69
75
|
@controllers.each (c) =>
|
70
76
|
# console.log 'dentro dos controllers desse router'
|
71
77
|
c.setParams(@params())
|
72
|
-
c.build(yes)
|
78
|
+
c.build(yes,this)
|
73
79
|
, =>
|
74
80
|
callback(this.route, this.url) if typeof callback == 'function'
|
75
81
|
else
|
76
82
|
false
|
83
|
+
|
84
|
+
# removes old pink-yield div and inserts this one (new/current)
|
85
|
+
makeYielder: ->
|
86
|
+
$(@yieldIn).html("<div class='pink-yield' id='#{@controller}'></div>") if @yieldIn and @route.blank
|
77
87
|
|
78
88
|
match: (url) ->
|
79
89
|
path = new PinkmanPath(url)
|
@@ -105,7 +115,35 @@ class window.PinkmanRouteMatcher extends Pinkman.object
|
|
105
115
|
class window.PinkmanRoute extends Pinkman.object
|
106
116
|
yieldIn: ->
|
107
117
|
@yield || @container
|
118
|
+
|
119
|
+
# handleNamespacedController
|
120
|
+
# Desc: Forces a namespaced controller to start with the namespace name.
|
121
|
+
# Example 1:
|
122
|
+
# routes.namespace 'admin', (routes) ->
|
123
|
+
# routes.match 'abc', controller: 'abc'
|
124
|
+
# The controller name will be set to 'admin-abc'.
|
125
|
+
# Example 2:
|
126
|
+
# routes.namespace 'admin', (routes) ->
|
127
|
+
# routes.match 'abc', controller: 'admin-abc'
|
128
|
+
# The controller name remains 'admin-abc'.
|
129
|
+
|
130
|
+
handleNamespacedController: (namespace) ->
|
131
|
+
@set('controller',"#{namespace.replace(/\//g,'-')}-#{@controller}") if namespace and @controller and not (new RegExp("^#{namespace}")).test(@controller)
|
108
132
|
|
133
|
+
definePathHelper: ->
|
134
|
+
helperName = @path.deduceControllerName().replace(/-/g,'_') + '_path'
|
135
|
+
Pinkman.path_helpers.push helperName
|
136
|
+
$p.defineGlobalVar helperName, (args...) =>
|
137
|
+
i = 0
|
138
|
+
array = []
|
139
|
+
for level in @path.levels.collection
|
140
|
+
if level.dynamic
|
141
|
+
array.push(args[i])
|
142
|
+
i = i + 1
|
143
|
+
else
|
144
|
+
array.push(level.entry)
|
145
|
+
'/' + array.join('/')
|
146
|
+
|
109
147
|
|
110
148
|
# Routes collection. Have the capability to search a string through routes and storage all defined routes. Used once in Pinkman.routes
|
111
149
|
class window.PinkmanRoutes extends Pinkman.collection
|
@@ -153,14 +191,14 @@ class window.PinkmanRouter
|
|
153
191
|
|
154
192
|
@analytics:
|
155
193
|
create: (id) ->
|
156
|
-
console.log 'chamou'
|
157
|
-
console.log id
|
194
|
+
# console.log 'chamou'
|
195
|
+
# console.log id
|
158
196
|
ga('create', id, 'auto');
|
159
197
|
ga('send', 'pageview');
|
160
198
|
|
161
199
|
send: (route,path) ->
|
162
200
|
unless @created? and @created
|
163
|
-
console.log this
|
201
|
+
# console.log this
|
164
202
|
@create(Pinkman.router._config.analytics)
|
165
203
|
@created = true
|
166
204
|
else
|
@@ -174,8 +212,7 @@ class window.PinkmanRouter
|
|
174
212
|
@render: (r, callback) ->
|
175
213
|
@saveWindowScroll(Pinkman.routes.current.controller) if Pinkman.routes.current?
|
176
214
|
Pinkman.state.initialize()
|
177
|
-
yieldIn = r.route.yieldIn() || @_config.yield
|
178
|
-
$(yieldIn).html("<div class='pink-yield' id='#{r.controller}'></div>") if r.route.blank
|
215
|
+
r.yieldIn = r.route.yieldIn() || @_config.yield
|
179
216
|
r.initialize (args...) =>
|
180
217
|
@analytics.send(args...) if @_config.analytics?
|
181
218
|
callback() if typeof callback == 'function'
|
@@ -185,7 +222,7 @@ class window.PinkmanRouter
|
|
185
222
|
# console.log 'topo'
|
186
223
|
window.scrollTo(0,0)
|
187
224
|
else
|
188
|
-
sleep 0.15, =>
|
225
|
+
$p.sleep 0.15, =>
|
189
226
|
@restoreWindowScroll(r.route.controller)
|
190
227
|
true
|
191
228
|
|
@@ -208,8 +245,11 @@ class window.PinkmanRouter
|
|
208
245
|
Pinkman.state.push(path)
|
209
246
|
|
210
247
|
@force: (path) ->
|
211
|
-
(
|
212
|
-
|
248
|
+
@location(path) unless @visit(path)
|
249
|
+
|
250
|
+
@location: (path) ->
|
251
|
+
window.location = path
|
252
|
+
|
213
253
|
@restore: (path) ->
|
214
254
|
(window.location=path) unless @activate(path,null,{freeze: yes})
|
215
255
|
|
@@ -231,58 +271,67 @@ class window.PinkmanRouter
|
|
231
271
|
@start: ->
|
232
272
|
Pinkman.ready =>
|
233
273
|
Pinkman.router = this
|
274
|
+
App.router = this
|
275
|
+
window.$r = App.router
|
234
276
|
@activate(window.location.pathname)
|
235
|
-
$('body').on 'click', 'a', (ev) =>
|
277
|
+
$('body').on 'click', 'a:not([data-pinkman="false"])', (ev) =>
|
236
278
|
ev.preventDefault()
|
237
279
|
path = ev.currentTarget.href
|
238
280
|
(window.location = path) unless path? and @visit(path)
|
239
281
|
|
240
|
-
|
241
|
-
|
242
|
-
|
282
|
+
namespace: (namespace, rules) ->
|
283
|
+
namespace = namespace.replace(/^\//,'')
|
284
|
+
namespaced = new @constructor()
|
285
|
+
namespaced._namespace = if @_namespace then ("#{@_namespace}/#{namespace}") else namespace
|
286
|
+
rules(namespaced) if typeof rules == 'function'
|
287
|
+
|
288
|
+
resources: (resourceName) ->
|
289
|
+
|
290
|
+
# controllerPrefix = if @_namespace then @_namespace.replace(/\//,'-') + '-' else ''
|
291
|
+
|
292
|
+
resourceName = resourceName.replace(/\/$/,'')
|
293
|
+
controllerName = resourceName.replace(/[\/_]/g,'-').replace(/^-/,'')
|
294
|
+
|
295
|
+
# index
|
296
|
+
@match resourceName, controller: controllerName + '-index'
|
297
|
+
# new
|
298
|
+
@match resourceName + '/new', controller: controllerName + '-new'
|
299
|
+
# edit
|
300
|
+
@match resourceName + '/:id/edit', controller: controllerName + '-edit'
|
301
|
+
# show
|
302
|
+
@match resourceName + '/:id', controller: controllerName + '-show'
|
303
|
+
|
304
|
+
|
305
|
+
match: (path, object) ->
|
243
306
|
if Pinkman.isString(path)
|
307
|
+
path = path.replace(/^\//,'')
|
308
|
+
path = "/#{@_namespace}/" + path if @_namespace
|
244
309
|
p = new PinkmanPath(path)
|
245
310
|
route = new PinkmanRoute
|
246
311
|
route.set('id',path)
|
247
312
|
route.set('url',path)
|
248
313
|
route.set('path',p).set('depth',p.depth).set('staticDepth',p.staticDepth).set('dynamicDepth',p.dynamicDepth)
|
249
|
-
route.set('blank',yes)
|
250
|
-
route.set('controller', if object? and object.controller? then object.controller else p.
|
314
|
+
route.set('blank',yes)
|
315
|
+
route.set('controller', if object? and object.controller? then object.controller else p.deduceControllerName())
|
316
|
+
|
317
|
+
# handle namespaced controller name (add namespace prefix)
|
318
|
+
route.handleNamespacedController(@_namespace)
|
319
|
+
|
320
|
+
route.definePathHelper()
|
321
|
+
|
251
322
|
if object? and typeof object == 'object'
|
252
323
|
route.set('blank',no) if (object.keep? and object.keep) or (object.blank? and not object.blank)
|
253
|
-
route.set('yield',object.container|| object.yield )
|
324
|
+
route.set('yield',object.container || object.yield )
|
254
325
|
Pinkman.routes.push(route)
|
255
326
|
return(route)
|
327
|
+
|
328
|
+
get: (args...) ->
|
329
|
+
console.log 'Routes: "get" function deprecated. Use match instead.'
|
330
|
+
match(args...)
|
331
|
+
|
256
332
|
|
257
333
|
root: (controller) ->
|
258
|
-
@
|
334
|
+
@match('/',controller: controller)
|
259
335
|
|
260
|
-
|
261
|
-
|
262
|
-
#
|
263
|
-
# AppRouter.config yield: 'body'
|
264
|
-
#
|
265
|
-
# AppRouter.define (r) ->
|
266
|
-
#
|
267
|
-
# # @namespace 'lol', =>
|
268
|
-
# # @get 'test'
|
269
|
-
# # # define /lol/test
|
270
|
-
# #
|
271
|
-
# #
|
272
|
-
# # @get 'produto/:id',
|
273
|
-
# # controller: 'produto'
|
274
|
-
# # #define /produto/qualquer-coisa
|
275
|
-
# # # controler.param.id = 'qualquer-coisa'
|
276
|
-
# #
|
277
|
-
#
|
278
|
-
#
|
279
|
-
# @get 'test',
|
280
|
-
# controller: 'test'
|
281
|
-
#
|
282
|
-
# ->
|
283
|
-
# header
|
284
|
-
# title Lol
|
285
|
-
# body#test
|
286
|
-
# execute 'controller.test.main'
|
287
|
-
#
|
288
|
-
# AppRouter.visit 'test'
|
336
|
+
Pinkman.router = PinkmanRouter
|
337
|
+
Pinkman.path_helpers = []
|
@@ -1,6 +1,6 @@
|
|
1
|
-
window.sleep = (
|
2
|
-
|
3
|
-
|
1
|
+
window.sleep = (args...) ->
|
2
|
+
console.log '[DEPRECATED] Use $p.sleep instead of window.sleep'
|
3
|
+
$p.sleep args...
|
4
4
|
|
5
5
|
Number.prototype.print = (precision, delimiter, separator) ->
|
6
6
|
n = this
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@import 'custom_colors';
|
2
|
+
|
3
|
+
$line_color_light: darken($bg_light,10%);
|
4
|
+
$line_color_dark: lighten($bg_dark,10%);
|
5
|
+
$line_color: $line_color_light;
|
6
|
+
|
7
|
+
$error_color: #e23b42;
|
8
|
+
|
9
|
+
// ----- Alias
|
10
|
+
$primary: $primary_color;
|
11
|
+
$secondary: $secondary_color;
|
12
|
+
|
13
|
+
// _____________________________Alertas
|
14
|
+
$sucess: #2ecc71;
|
15
|
+
$warning: #f1c40f;
|
16
|
+
$danger: #e74c3c;
|
17
|
+
|
18
|
+
// _____________________________YURI
|
19
|
+
// pateta de Cores novas
|
20
|
+
$snow: #FCF7F8;
|
21
|
+
$light_grey: #CED3DC;
|
22
|
+
$medium_grey: #ABA9C3;
|
23
|
+
$blue_site: #3191F7;
|
24
|
+
$carbon: #414448;
|
25
|
+
|
26
|
+
|
27
|
+
// New Colors
|
28
|
+
$white: white;
|
29
|
+
$navy: #001F3F;
|
30
|
+
$blue: #0074D9;
|
31
|
+
$aqua: #7FDBFF;
|
32
|
+
$teal: #39CCCC;
|
33
|
+
$olive: #3D9970;
|
34
|
+
$green: #2ECC40;
|
35
|
+
$lime: #01FF70;
|
36
|
+
$yellow: #FFDC00;
|
37
|
+
$orange: #FF851B;
|
38
|
+
$red: #ea2739;
|
39
|
+
$maroon: #85144b;
|
40
|
+
$fuchsia: #F012BE;
|
41
|
+
$purple: #B10DC9;
|
42
|
+
$black: #111111;
|
43
|
+
$gray: #AAAAAA;
|
44
|
+
$grey: $gray;
|
45
|
+
$silver: #DDDDDD;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
@mixin box_sizing {
|
4
|
+
box-sizing: border-box;
|
5
|
+
-webkit-box-sizing: border-box;
|
6
|
+
-moz-box-sizing: border-box;
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin scrollbar_color($color,$bg){
|
10
|
+
/* Let's get this party started */
|
11
|
+
::-webkit-scrollbar {
|
12
|
+
width: 10px;
|
13
|
+
}
|
14
|
+
/* Track */
|
15
|
+
::-webkit-scrollbar-track {
|
16
|
+
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
17
|
+
background-color: $color;
|
18
|
+
-webkit-border-radius: 3px;
|
19
|
+
border-radius: 3px;
|
20
|
+
}
|
21
|
+
|
22
|
+
/* Handle */
|
23
|
+
::-webkit-scrollbar-thumb {
|
24
|
+
-webkit-border-radius: 3px;
|
25
|
+
border-radius: 3px;
|
26
|
+
background: $bg;
|
27
|
+
}
|
28
|
+
::-webkit-scrollbar-thumb:window-inactive {
|
29
|
+
background: $bg;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
@mixin transition($property,$time: 320ms,$type: ease) {
|
35
|
+
-webkit-transition: $property $time $type;
|
36
|
+
-moz-transition: $property $time $type;
|
37
|
+
-o-transition: $property $time $type;
|
38
|
+
transition: $property $time $type;
|
39
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
$default_font_size: 12px;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
@import '../settings';
|
2
|
+
@import '../colors';
|
3
|
+
|
4
|
+
// ------------ Layout
|
5
|
+
|
6
|
+
html, body{
|
7
|
+
color: $text_color;
|
8
|
+
|
9
|
+
.night, &.night{
|
10
|
+
background-color: $bg_dark;
|
11
|
+
color: $text_color_light;
|
12
|
+
}
|
13
|
+
|
14
|
+
}
|
15
|
+
|
16
|
+
// ------------ Text
|
17
|
+
|
18
|
+
.text-color{
|
19
|
+
color: $text_color;
|
20
|
+
}
|
21
|
+
.text-light { color: $text_color_light; }
|
22
|
+
.text-dark { color: $text_color_dark; }
|
23
|
+
|
24
|
+
.primary {color: $primary_color; }
|
25
|
+
.secondary {color: $secondary_color; }
|
26
|
+
.navy { color: $navy; }
|
27
|
+
.blue { color: $blue; }
|
28
|
+
.aqua { color: $aqua; }
|
29
|
+
.teal { color: $teal; }
|
30
|
+
.olive { color: $olive; }
|
31
|
+
.green { color: $green; }
|
32
|
+
.lime { color: $lime; }
|
33
|
+
.yellow { color: $yellow; }
|
34
|
+
.orange { color: $orange; }
|
35
|
+
.red { color: $red; }
|
36
|
+
.maroon { color: $maroon; }
|
37
|
+
.fuchsia { color: $fuchsia; }
|
38
|
+
.purple { color: $purple; }
|
39
|
+
.black { color: $black; }
|
40
|
+
.gray { color: $gray; }
|
41
|
+
.silver { color: $silver; }
|
42
|
+
.white { color: $white; }
|
43
|
+
|
44
|
+
// ------------ Backgrounds
|
45
|
+
|
46
|
+
.bg-light { background-color: $bg_light; }
|
47
|
+
.bg-dark { background-color: $bg_dark; }
|
48
|
+
|
49
|
+
.bg-text { background-color: $text_color; }
|
50
|
+
.bg-text-light { background-color: $text_color_light; }
|
51
|
+
.bg-text-dark { background-color: $text_color_dark; }
|
52
|
+
|
53
|
+
.bg-carbon { background-color: $carbon; }
|
54
|
+
|
55
|
+
.bg-primary { background-color: $primary_color; }
|
56
|
+
.bg-secondary { background-color: $secondary_color; }
|
57
|
+
.bg-navy { background-color: $navy; }
|
58
|
+
.bg-blue { background-color: $blue; }
|
59
|
+
.bg-aqua { background-color: $aqua; }
|
60
|
+
.bg-teal { background-color: $teal; }
|
61
|
+
.bg-olive { background-color: $olive; }
|
62
|
+
.bg-green { background-color: $green; }
|
63
|
+
.bg-lime { background-color: $lime; }
|
64
|
+
.bg-yellow { background-color: $yellow; }
|
65
|
+
.bg-orange { background-color: $orange; }
|
66
|
+
.bg-red { background-color: $red; }
|
67
|
+
.bg-maroon { background-color: $maroon; }
|
68
|
+
.bg-fuchsia { background-color: $fuchsia; }
|
69
|
+
.bg-purple { background-color: $purple; }
|
70
|
+
.bg-black { background-color: $black; }
|
71
|
+
.bg-gray { background-color: $gray; }
|
72
|
+
.bg-silver { background-color: $silver; }
|
73
|
+
.bg-white { background-color: $white; }
|
74
|
+
|
75
|
+
// ------------ Lines && Borders
|
76
|
+
|
77
|
+
.border-light { border-color: $line_color_light; }
|
78
|
+
.border-dark { border-color: $line_color_dark; }
|
79
|
+
|
80
|
+
|
81
|
+
.border-primary {border-color: $primary_color !important; }
|
82
|
+
.border-secondary {border-color: $secondary_color !important; }
|
83
|
+
.border-navy { border-color: $navy !important; }
|
84
|
+
.border-blue { border-color: $blue !important; }
|
85
|
+
.border-aqua { border-color: $aqua !important; }
|
86
|
+
.border-teal { border-color: $teal !important; }
|
87
|
+
.border-olive { border-color: $olive !important; }
|
88
|
+
.border-green { border-color: $green !important; }
|
89
|
+
.border-lime { border-color: $lime !important; }
|
90
|
+
.border-yellow { border-color: $yellow !important; }
|
91
|
+
.border-orange { border-color: $orange !important; }
|
92
|
+
.border-red { border-color: $red !important; }
|
93
|
+
.border-maroon { border-color: $maroon !important; }
|
94
|
+
.border-fuchsia { border-color: $fuchsia !important; }
|
95
|
+
.border-purple { border-color: $purple !important; }
|
96
|
+
.border-black { border-color: $black !important; }
|
97
|
+
.border-gray { border-color: $gray !important; }
|
98
|
+
.border-silver { border-color: $silver !important; }
|
99
|
+
.border-white { border-color: $white !important; }
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@import '../colors';
|
2
|
+
@import '../mixins';
|
3
|
+
|
4
|
+
hr {
|
5
|
+
display: block;
|
6
|
+
clear: both;
|
7
|
+
margin: 0 0 15px 0;
|
8
|
+
padding: 0 0 15px 0;
|
9
|
+
border: none;
|
10
|
+
border-bottom: 1px solid $line_color;
|
11
|
+
}
|
12
|
+
|
13
|
+
.bsbb{
|
14
|
+
@include box_sizing;
|
15
|
+
}
|
16
|
+
div.highlight{
|
17
|
+
border-radius: 5px;
|
18
|
+
}
|
19
|
+
|
20
|
+
.code-box, pre{
|
21
|
+
border-radius: 5px;
|
22
|
+
text-align: left !important;
|
23
|
+
background-color: lighten($bg_light,6%) !important;
|
24
|
+
padding: 0;
|
25
|
+
margin: 0 auto;
|
26
|
+
max-width: 100%;
|
27
|
+
overflow: hidden;
|
28
|
+
font-family: monospace;
|
29
|
+
font-size: 0.9rem;
|
30
|
+
white-space: -moz-pre-wrap;
|
31
|
+
white-space: -o-pre-wrap;
|
32
|
+
word-wrap: break-word;
|
33
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
@import '../settings';
|
2
|
+
@import '../colors';
|
3
|
+
@import '../mixins';
|
4
|
+
|
5
|
+
form{
|
6
|
+
&.primary-option{
|
7
|
+
|
8
|
+
input{
|
9
|
+
padding: 10px 5px;
|
10
|
+
background-color: $bg_dark;
|
11
|
+
border: none;
|
12
|
+
border-radius: 0;
|
13
|
+
|
14
|
+
}
|
15
|
+
}
|
16
|
+
&.secondary-option{
|
17
|
+
input{
|
18
|
+
margin-bottom: 30px;
|
19
|
+
border: none;
|
20
|
+
border-bottom: solid 2px $bg_light;
|
21
|
+
border-radius: 0;
|
22
|
+
&:focus{
|
23
|
+
border: none;
|
24
|
+
border-bottom: solid 2px darken($bg_light,10%);
|
25
|
+
color: $bg_light;
|
26
|
+
border-radius: 0;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.form-field{
|
33
|
+
@include scrollbar_color($primary_color,$bg_light);
|
34
|
+
margin: 10px auto 20px auto;
|
35
|
+
width: 90%;
|
36
|
+
max-width: 620px;
|
37
|
+
label, input, textarea {
|
38
|
+
@include box_sizing;
|
39
|
+
text-align: left;
|
40
|
+
display: block;
|
41
|
+
width: 100%;
|
42
|
+
margin: 0 auto;
|
43
|
+
}
|
44
|
+
label{
|
45
|
+
font-weight: bold;
|
46
|
+
color: $bg_light;
|
47
|
+
}
|
48
|
+
input, textarea {
|
49
|
+
outline: none;
|
50
|
+
padding: 5px;
|
51
|
+
font-family: inherit;
|
52
|
+
background-color: transparent;
|
53
|
+
border: 1px solid $line_color;
|
54
|
+
border-radius: 3px;
|
55
|
+
&:focus{
|
56
|
+
color: $primary;
|
57
|
+
border: 1px solid $primary_color;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
textarea{
|
61
|
+
resize: none;
|
62
|
+
min-height: 200px;
|
63
|
+
overflow: auto;
|
64
|
+
}
|
65
|
+
.info{
|
66
|
+
font-size: 0.9em;
|
67
|
+
font-weight: normal;
|
68
|
+
text-align: left;
|
69
|
+
}
|
70
|
+
|
71
|
+
label, .info{
|
72
|
+
margin: 3px 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
.error{
|
76
|
+
font-size: 1em;
|
77
|
+
padding: 10px;
|
78
|
+
margin: 10px 0 0 0;
|
79
|
+
text-align: left;
|
80
|
+
color: white;
|
81
|
+
background-color: $error_color;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
input.hidden{
|
86
|
+
position: fixed;
|
87
|
+
left: -10000px;
|
88
|
+
top: -10000px;
|
89
|
+
}
|