volt 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +37 -0
  6. data/Guardfile +9 -0
  7. data/LICENSE.txt +22 -0
  8. data/Rakefile +23 -0
  9. data/Readme.md +34 -0
  10. data/VERSION +1 -0
  11. data/bin/volt +4 -0
  12. data/docs/GETTING_STARTED.md +7 -0
  13. data/docs/GUIDE.md +33 -0
  14. data/lib/volt.rb +15 -0
  15. data/lib/volt/benchmark/benchmark.rb +25 -0
  16. data/lib/volt/cli.rb +34 -0
  17. data/lib/volt/console.rb +19 -0
  18. data/lib/volt/controllers/model_controller.rb +29 -0
  19. data/lib/volt/extra_core/array.rb +10 -0
  20. data/lib/volt/extra_core/blank.rb +88 -0
  21. data/lib/volt/extra_core/extra_core.rb +7 -0
  22. data/lib/volt/extra_core/numeric.rb +9 -0
  23. data/lib/volt/extra_core/object.rb +36 -0
  24. data/lib/volt/extra_core/string.rb +29 -0
  25. data/lib/volt/extra_core/stringify_keys.rb +7 -0
  26. data/lib/volt/extra_core/true_false.rb +44 -0
  27. data/lib/volt/extra_core/try.rb +31 -0
  28. data/lib/volt/models.rb +5 -0
  29. data/lib/volt/models/array_model.rb +37 -0
  30. data/lib/volt/models/model.rb +210 -0
  31. data/lib/volt/models/model_wrapper.rb +23 -0
  32. data/lib/volt/models/params.rb +67 -0
  33. data/lib/volt/models/url.rb +192 -0
  34. data/lib/volt/page/url_tracker.rb +36 -0
  35. data/lib/volt/reactive/array_extensions.rb +13 -0
  36. data/lib/volt/reactive/event_chain.rb +126 -0
  37. data/lib/volt/reactive/events.rb +283 -0
  38. data/lib/volt/reactive/object_tracker.rb +99 -0
  39. data/lib/volt/reactive/object_tracking.rb +15 -0
  40. data/lib/volt/reactive/reactive_array.rb +222 -0
  41. data/lib/volt/reactive/reactive_tags.rb +64 -0
  42. data/lib/volt/reactive/reactive_value.rb +368 -0
  43. data/lib/volt/reactive/string_extensions.rb +34 -0
  44. data/lib/volt/router/routes.rb +83 -0
  45. data/lib/volt/server.rb +121 -0
  46. data/lib/volt/server/binding_setup.rb +2 -0
  47. data/lib/volt/server/channel_handler.rb +31 -0
  48. data/lib/volt/server/component_handler.rb +88 -0
  49. data/lib/volt/server/if_binding_setup.rb +29 -0
  50. data/lib/volt/server/request_handler.rb +16 -0
  51. data/lib/volt/server/scope.rb +43 -0
  52. data/lib/volt/server/source_map_server.rb +31 -0
  53. data/lib/volt/server/template_parser.rb +452 -0
  54. data/lib/volt/store/mongo.rb +5 -0
  55. data/lib/volt/templates/attribute_binding.rb +110 -0
  56. data/lib/volt/templates/base_binding.rb +37 -0
  57. data/lib/volt/templates/channel.rb +48 -0
  58. data/lib/volt/templates/content_binding.rb +35 -0
  59. data/lib/volt/templates/document_events.rb +80 -0
  60. data/lib/volt/templates/each_binding.rb +115 -0
  61. data/lib/volt/templates/event_binding.rb +51 -0
  62. data/lib/volt/templates/if_binding.rb +74 -0
  63. data/lib/volt/templates/memory_test.rb +26 -0
  64. data/lib/volt/templates/page.rb +146 -0
  65. data/lib/volt/templates/reactive_template.rb +38 -0
  66. data/lib/volt/templates/render_queue.rb +5 -0
  67. data/lib/volt/templates/sub_context.rb +23 -0
  68. data/lib/volt/templates/targets/attribute_section.rb +33 -0
  69. data/lib/volt/templates/targets/attribute_target.rb +18 -0
  70. data/lib/volt/templates/targets/base_section.rb +14 -0
  71. data/lib/volt/templates/targets/binding_document/base_node.rb +3 -0
  72. data/lib/volt/templates/targets/binding_document/component_node.rb +112 -0
  73. data/lib/volt/templates/targets/binding_document/html_node.rb +11 -0
  74. data/lib/volt/templates/targets/dom_section.rb +147 -0
  75. data/lib/volt/templates/targets/dom_target.rb +11 -0
  76. data/lib/volt/templates/template_binding.rb +159 -0
  77. data/lib/volt/templates/template_renderer.rb +50 -0
  78. data/spec/models/event_chain_spec.rb +129 -0
  79. data/spec/models/model_spec.rb +340 -0
  80. data/spec/models/old_model_spec.rb +109 -0
  81. data/spec/models/reactive_array_spec.rb +262 -0
  82. data/spec/models/reactive_tags_spec.rb +35 -0
  83. data/spec/models/reactive_value_spec.rb +336 -0
  84. data/spec/models/string_extensions_spec.rb +57 -0
  85. data/spec/router/routes_spec.rb +24 -0
  86. data/spec/server/template_parser_spec.rb +50 -0
  87. data/spec/spec_helper.rb +20 -0
  88. data/spec/store/mongo_spec.rb +4 -0
  89. data/spec/templates/targets/binding_document/component_node_spec.rb +18 -0
  90. data/spec/templates/template_binding_spec.rb +98 -0
  91. data/templates/.gitignore +12 -0
  92. data/templates/Gemfile.tt +8 -0
  93. data/templates/app/.empty_directory +0 -0
  94. data/templates/app/home/config/routes.rb +1 -0
  95. data/templates/app/home/controllers/index_controller.rb +5 -0
  96. data/templates/app/home/css/.empty_directory +0 -0
  97. data/templates/app/home/models/.empty_directory +0 -0
  98. data/templates/app/home/views/index/about.html +9 -0
  99. data/templates/app/home/views/index/home.html +7 -0
  100. data/templates/app/home/views/index/index.html +28 -0
  101. data/templates/config.ru +4 -0
  102. data/templates/public/css/ansi.css +0 -0
  103. data/templates/public/css/bootstrap-theme.css +459 -0
  104. data/templates/public/css/bootstrap.css +7098 -0
  105. data/templates/public/css/jumbotron.css +79 -0
  106. data/templates/public/fonts/glyphicons-halflings-regular.eot +0 -0
  107. data/templates/public/fonts/glyphicons-halflings-regular.svg +229 -0
  108. data/templates/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  109. data/templates/public/fonts/glyphicons-halflings-regular.woff +0 -0
  110. data/templates/public/index.html +25 -0
  111. data/templates/public/js/bootstrap.js +0 -0
  112. data/templates/public/js/jquery-2.0.3.js +8829 -0
  113. data/templates/public/js/sockjs-0.2.1.min.js +27 -0
  114. data/templates/spec/spec_helper.rb +20 -0
  115. data/volt.gemspec +41 -0
  116. metadata +412 -0
@@ -0,0 +1,50 @@
1
+ # require 'volt/server/template_parser'
2
+ #
3
+ # describe TemplateParser do
4
+ # it 'should parse a doc' do
5
+ # template = <<-END
6
+ # <h1>Header {name}</h1>
7
+ #
8
+ # <p class="{paragraph_class}">{content}</p>
9
+ #
10
+ # <!-- Original Comment -->
11
+ # {#each some_array}
12
+ # <p>Line {some_name}</p>
13
+ # {/}
14
+ #
15
+ # END
16
+ # parser = TemplateParser.new(template, 'main')
17
+ # end
18
+ #
19
+ # it 'should parse nested' do
20
+ # template = <<-END
21
+ # <div class="test">
22
+ # <div class="test2">
23
+ # <h1>Header</h1>
24
+ # </div>
25
+ # </div>
26
+ # END
27
+ # parser = TemplateParser.new(template, 'main')
28
+ # end
29
+ #
30
+ # it "should parse nested bindings" do
31
+ # template = <<-END
32
+ # 1{#if _a}2
33
+ # 3{#if _b}4
34
+ # _a and _b
35
+ # {/}
36
+ # {/}
37
+ # END
38
+ # parser = TemplateParser.new(template, 'main')
39
+ #
40
+ # expect(parser.templates.keys).to eq(["main/body", "main/body/__template/1", "main/body/__template/0"])
41
+ # expect(parser.templates['main/body/__template/1']).to eq({"html"=>"4\n _a and _b\n ", "bindings"=>{}})
42
+ # end
43
+ #
44
+ # it "should parse templates in attributes" do
45
+ # template = <<-END
46
+ # <div class="{#if _model._is_cool}cool{/}">yes</div>
47
+ # END
48
+ # parser = TemplateParser.new(template, 'main')
49
+ # end
50
+ # end
@@ -0,0 +1,20 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
8
+ RSpec.configure do |config|
9
+ config.treat_symbols_as_metadata_keys_with_true_values = true
10
+ config.run_all_when_everything_filtered = true
11
+ config.filter_run :focus
12
+
13
+ # Run specs in random order to surface order dependencies. If you find an
14
+ # order dependency and want to debug it, you can fix the order by providing
15
+ # the seed, which is printed after each run.
16
+ # --seed 1234
17
+ config.order = 'random'
18
+
19
+ config.enable_any_instance_mocks = true
20
+ end
@@ -0,0 +1,4 @@
1
+ # require 'volt/mongo'
2
+ # include Mongo
3
+ #
4
+ # mongo_client = MongoClient.new("localhost", 27017)
@@ -0,0 +1,18 @@
1
+ require 'volt/templates/targets/binding_document/component_node'
2
+
3
+ describe ComponentNode do
4
+ before do
5
+ html = <<-END
6
+ <!-- $0 -->Before <!-- $1 -->Inside<!-- $/1 --> After<!-- $/0 -->
7
+ END
8
+
9
+ @component = ComponentNode.new
10
+ @component.html = html
11
+ end
12
+
13
+ it "should find a component from a binding id" do
14
+ expect(@component.find_by_binding_id(1).to_html).to eq('Inside')
15
+ expect(@component.find_by_binding_id(0).to_html).to eq('Before Inside After')
16
+
17
+ end
18
+ end
@@ -0,0 +1,98 @@
1
+ require 'volt/templates/template_binding'
2
+
3
+ # Setup page stub
4
+
5
+ class Page
6
+ attr_accessor :templates
7
+ end
8
+
9
+
10
+ describe TemplateBinding do
11
+ before do
12
+ $page = Page.new
13
+
14
+ # TODO: We should decouple things so we don't need to allocate
15
+ @template_binding = TemplateBinding.allocate
16
+ @template_binding.setup_path('home/index/index')
17
+ end
18
+
19
+ after do
20
+ $page = nil
21
+ end
22
+
23
+ it "should lookup sub-templates within its own file" do
24
+ $page.templates = {
25
+ 'home/index/blog/nav' => '',
26
+ 'home/index/index/nav' => '',
27
+ }
28
+
29
+ expect(@template_binding.path_for_template('nav').first).to eq('home/index/index/nav')
30
+ end
31
+
32
+ it "should lookup sub-templates within another local view" do
33
+ $page.templates = {
34
+ 'home/index/blog/nav' => '',
35
+ 'home/index/index/nav' => '',
36
+ }
37
+
38
+ expect(@template_binding.path_for_template('blog/nav').first).to eq('home/index/blog/nav')
39
+ end
40
+
41
+ it "should lookup in another view" do
42
+ $page.templates = {
43
+ 'home/index/nav/body' => '',
44
+ }
45
+
46
+ expect(@template_binding.path_for_template('nav').first).to eq('home/index/nav/body')
47
+ end
48
+
49
+ it "should lookup in a controller" do
50
+ $page.templates = {
51
+ 'home/nav/index/body' => ''
52
+ }
53
+
54
+ expect(@template_binding.path_for_template('nav').first).to eq('home/nav/index/body')
55
+ end
56
+
57
+ it "should lookup in a controller/view" do
58
+ $page.templates = {
59
+ 'home/blog/nav/body' => ''
60
+ }
61
+
62
+ expect(@template_binding.path_for_template('blog/nav').first).to eq('home/blog/nav/body')
63
+ end
64
+
65
+ it "should lookup in a controller" do
66
+ $page.templates = {
67
+ 'home/nav/index/body' => ''
68
+ }
69
+
70
+ expect(@template_binding.path_for_template('nav').first).to eq('home/nav/index/body')
71
+ end
72
+
73
+ it "should lookup in a component" do
74
+ $page.templates = {
75
+ 'nav/index/index/body' => ''
76
+ }
77
+
78
+ expect(@template_binding.path_for_template('nav').first).to eq('nav/index/index/body')
79
+ end
80
+
81
+ it "should lookup in a component/controller/view" do
82
+ $page.templates = {
83
+ 'nav/index/index/body' => '',
84
+ 'auth/login/new/body' => ''
85
+ }
86
+
87
+ expect(@template_binding.path_for_template('auth/login/new').first).to eq('auth/login/new/body')
88
+ end
89
+
90
+ it "should let you force a sub template" do
91
+ $page.templates = {
92
+ 'nav/index/index/title' => '',
93
+ 'auth/login/new/title' => ''
94
+ }
95
+
96
+ expect(@template_binding.path_for_template('nav', 'title').first).to eq('nav/index/index/title')
97
+ end
98
+ end
@@ -0,0 +1,12 @@
1
+ .bundle
2
+ .config
3
+ .yardoc
4
+ _yardoc
5
+ coverage
6
+ doc/
7
+ rdoc
8
+ tmp
9
+ .idea
10
+ .yardoc
11
+ .sass-cache
12
+ .DS_Store
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'voltframework'
4
+
5
+ # Needed at the moment
6
+ gem 'opal', git: 'https://github.com/opal/opal.git'
7
+ gem 'opal-jquery', :git => 'https://github.com/opal/opal-jquery.git'
8
+ gem 'sockjs', git: 'https://github.com/kacperk/sockjs-ruby.git', require: false, platforms: :mri
File without changes
@@ -0,0 +1 @@
1
+ get "/about", _controller: 'about'
@@ -0,0 +1,5 @@
1
+ class IndexController < ModelController
2
+ def initialize
3
+ @model = page
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ <:title>
2
+ About
3
+ </:title>
4
+
5
+ <:body>
6
+ <h1>About</h1>
7
+
8
+ <p>About page...</p>
9
+ </:body>
@@ -0,0 +1,7 @@
1
+ <:title>
2
+ Home
3
+ </:title>
4
+
5
+ <:body>
6
+ <h1>Home</h1>
7
+ </:body>
@@ -0,0 +1,28 @@
1
+ <:title>
2
+ {#template params._controller.or('home'), "title"}
3
+ </:title>
4
+
5
+ <:body>
6
+ <div class="container">
7
+ <div class="header">
8
+ <ul class="nav nav-pills pull-right">
9
+ <:nav page="" text="Home" />
10
+ <:nav page="about" text="About" />
11
+ </ul>
12
+ <h3 class="text-muted">Project name</h3>
13
+ </div>
14
+
15
+ {#template params._controller.or('home')}
16
+
17
+ <div class="footer">
18
+ <p>&copy; Company 2014</p>
19
+ </div>
20
+
21
+ </div>
22
+ </:body>
23
+
24
+ <:nav>
25
+ <li class="{#if params._controller.or('') == page}active{/}">
26
+ <a href="/{page}">{text}</a>
27
+ </li>
28
+ </:nav>
@@ -0,0 +1,4 @@
1
+ # Run via rack server
2
+ require 'bundler/setup'
3
+ require 'volt/server'
4
+ run Server.app
File without changes
@@ -0,0 +1,459 @@
1
+ /*!
2
+ * Bootstrap v3.0.2 by @fat and @mdo
3
+ * Copyright 2013 Twitter, Inc.
4
+ * Licensed under http://www.apache.org/licenses/LICENSE-2.0
5
+ *
6
+ * Designed and built with all the love in the world by @mdo and @fat.
7
+ */
8
+
9
+ .btn-default,
10
+ .btn-primary,
11
+ .btn-success,
12
+ .btn-info,
13
+ .btn-warning,
14
+ .btn-danger {
15
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
16
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
17
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
18
+ }
19
+
20
+ .btn-default:active,
21
+ .btn-primary:active,
22
+ .btn-success:active,
23
+ .btn-info:active,
24
+ .btn-warning:active,
25
+ .btn-danger:active,
26
+ .btn-default.active,
27
+ .btn-primary.active,
28
+ .btn-success.active,
29
+ .btn-info.active,
30
+ .btn-warning.active,
31
+ .btn-danger.active {
32
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
33
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
34
+ }
35
+
36
+ .btn:active,
37
+ .btn.active {
38
+ background-image: none;
39
+ }
40
+
41
+ .btn-default {
42
+ text-shadow: 0 1px 0 #fff;
43
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#e0e0e0));
44
+ background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
45
+ background-image: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
46
+ background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
47
+ background-repeat: repeat-x;
48
+ border-color: #dbdbdb;
49
+ border-color: #ccc;
50
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
51
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
52
+ }
53
+
54
+ .btn-default:hover,
55
+ .btn-default:focus {
56
+ background-color: #e0e0e0;
57
+ background-position: 0 -15px;
58
+ }
59
+
60
+ .btn-default:active,
61
+ .btn-default.active {
62
+ background-color: #e0e0e0;
63
+ border-color: #dbdbdb;
64
+ }
65
+
66
+ .btn-primary {
67
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#2d6ca2));
68
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
69
+ background-image: -moz-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
70
+ background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
71
+ background-repeat: repeat-x;
72
+ border-color: #2b669a;
73
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
74
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
75
+ }
76
+
77
+ .btn-primary:hover,
78
+ .btn-primary:focus {
79
+ background-color: #2d6ca2;
80
+ background-position: 0 -15px;
81
+ }
82
+
83
+ .btn-primary:active,
84
+ .btn-primary.active {
85
+ background-color: #2d6ca2;
86
+ border-color: #2b669a;
87
+ }
88
+
89
+ .btn-success {
90
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#419641));
91
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
92
+ background-image: -moz-linear-gradient(top, #5cb85c 0%, #419641 100%);
93
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
94
+ background-repeat: repeat-x;
95
+ border-color: #3e8f3e;
96
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
97
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
98
+ }
99
+
100
+ .btn-success:hover,
101
+ .btn-success:focus {
102
+ background-color: #419641;
103
+ background-position: 0 -15px;
104
+ }
105
+
106
+ .btn-success:active,
107
+ .btn-success.active {
108
+ background-color: #419641;
109
+ border-color: #3e8f3e;
110
+ }
111
+
112
+ .btn-warning {
113
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#eb9316));
114
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
115
+ background-image: -moz-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
116
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
117
+ background-repeat: repeat-x;
118
+ border-color: #e38d13;
119
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
120
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
121
+ }
122
+
123
+ .btn-warning:hover,
124
+ .btn-warning:focus {
125
+ background-color: #eb9316;
126
+ background-position: 0 -15px;
127
+ }
128
+
129
+ .btn-warning:active,
130
+ .btn-warning.active {
131
+ background-color: #eb9316;
132
+ border-color: #e38d13;
133
+ }
134
+
135
+ .btn-danger {
136
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c12e2a));
137
+ background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
138
+ background-image: -moz-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
139
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
140
+ background-repeat: repeat-x;
141
+ border-color: #b92c28;
142
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
143
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
144
+ }
145
+
146
+ .btn-danger:hover,
147
+ .btn-danger:focus {
148
+ background-color: #c12e2a;
149
+ background-position: 0 -15px;
150
+ }
151
+
152
+ .btn-danger:active,
153
+ .btn-danger.active {
154
+ background-color: #c12e2a;
155
+ border-color: #b92c28;
156
+ }
157
+
158
+ .btn-info {
159
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#2aabd2));
160
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
161
+ background-image: -moz-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
162
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
163
+ background-repeat: repeat-x;
164
+ border-color: #28a4c9;
165
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
166
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
167
+ }
168
+
169
+ .btn-info:hover,
170
+ .btn-info:focus {
171
+ background-color: #2aabd2;
172
+ background-position: 0 -15px;
173
+ }
174
+
175
+ .btn-info:active,
176
+ .btn-info.active {
177
+ background-color: #2aabd2;
178
+ border-color: #28a4c9;
179
+ }
180
+
181
+ .thumbnail,
182
+ .img-thumbnail {
183
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
184
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
185
+ }
186
+
187
+ .dropdown-menu > li > a:hover,
188
+ .dropdown-menu > li > a:focus {
189
+ background-color: #e8e8e8;
190
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
191
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
192
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
193
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
194
+ background-repeat: repeat-x;
195
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
196
+ }
197
+
198
+ .dropdown-menu > .active > a,
199
+ .dropdown-menu > .active > a:hover,
200
+ .dropdown-menu > .active > a:focus {
201
+ background-color: #357ebd;
202
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
203
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
204
+ background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
205
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
206
+ background-repeat: repeat-x;
207
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
208
+ }
209
+
210
+ .navbar-default {
211
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
212
+ background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
213
+ background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
214
+ background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
215
+ background-repeat: repeat-x;
216
+ border-radius: 4px;
217
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
218
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
219
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
220
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
221
+ }
222
+
223
+ .navbar-default .navbar-nav > .active > a {
224
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f3f3f3));
225
+ background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
226
+ background-image: -moz-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
227
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
228
+ background-repeat: repeat-x;
229
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
230
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
231
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
232
+ }
233
+
234
+ .navbar-brand,
235
+ .navbar-nav > li > a {
236
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
237
+ }
238
+
239
+ .navbar-inverse {
240
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
241
+ background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
242
+ background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
243
+ background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
244
+ background-repeat: repeat-x;
245
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
246
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
247
+ }
248
+
249
+ .navbar-inverse .navbar-nav > .active > a {
250
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#222222), to(#282828));
251
+ background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
252
+ background-image: -moz-linear-gradient(top, #222222 0%, #282828 100%);
253
+ background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
254
+ background-repeat: repeat-x;
255
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
256
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
257
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
258
+ }
259
+
260
+ .navbar-inverse .navbar-brand,
261
+ .navbar-inverse .navbar-nav > li > a {
262
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
263
+ }
264
+
265
+ .navbar-static-top,
266
+ .navbar-fixed-top,
267
+ .navbar-fixed-bottom {
268
+ border-radius: 0;
269
+ }
270
+
271
+ .alert {
272
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
273
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
274
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
275
+ }
276
+
277
+ .alert-success {
278
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
279
+ background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
280
+ background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
281
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
282
+ background-repeat: repeat-x;
283
+ border-color: #b2dba1;
284
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
285
+ }
286
+
287
+ .alert-info {
288
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
289
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
290
+ background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
291
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
292
+ background-repeat: repeat-x;
293
+ border-color: #9acfea;
294
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
295
+ }
296
+
297
+ .alert-warning {
298
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
299
+ background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
300
+ background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
301
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
302
+ background-repeat: repeat-x;
303
+ border-color: #f5e79e;
304
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
305
+ }
306
+
307
+ .alert-danger {
308
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
309
+ background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
310
+ background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
311
+ background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
312
+ background-repeat: repeat-x;
313
+ border-color: #dca7a7;
314
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
315
+ }
316
+
317
+ .progress {
318
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
319
+ background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
320
+ background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
321
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
322
+ background-repeat: repeat-x;
323
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
324
+ }
325
+
326
+ .progress-bar {
327
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
328
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
329
+ background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
330
+ background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
331
+ background-repeat: repeat-x;
332
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
333
+ }
334
+
335
+ .progress-bar-success {
336
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
337
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
338
+ background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
339
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
340
+ background-repeat: repeat-x;
341
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
342
+ }
343
+
344
+ .progress-bar-info {
345
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
346
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
347
+ background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
348
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
349
+ background-repeat: repeat-x;
350
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
351
+ }
352
+
353
+ .progress-bar-warning {
354
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
355
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
356
+ background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
357
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
358
+ background-repeat: repeat-x;
359
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
360
+ }
361
+
362
+ .progress-bar-danger {
363
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
364
+ background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
365
+ background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
366
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
367
+ background-repeat: repeat-x;
368
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
369
+ }
370
+
371
+ .list-group {
372
+ border-radius: 4px;
373
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
374
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
375
+ }
376
+
377
+ .list-group-item.active,
378
+ .list-group-item.active:hover,
379
+ .list-group-item.active:focus {
380
+ text-shadow: 0 -1px 0 #3071a9;
381
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
382
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
383
+ background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
384
+ background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
385
+ background-repeat: repeat-x;
386
+ border-color: #3278b3;
387
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
388
+ }
389
+
390
+ .panel {
391
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
392
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
393
+ }
394
+
395
+ .panel-default > .panel-heading {
396
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
397
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
398
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
399
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
400
+ background-repeat: repeat-x;
401
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
402
+ }
403
+
404
+ .panel-primary > .panel-heading {
405
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
406
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
407
+ background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
408
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
409
+ background-repeat: repeat-x;
410
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
411
+ }
412
+
413
+ .panel-success > .panel-heading {
414
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
415
+ background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
416
+ background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
417
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
418
+ background-repeat: repeat-x;
419
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
420
+ }
421
+
422
+ .panel-info > .panel-heading {
423
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
424
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
425
+ background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
426
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
427
+ background-repeat: repeat-x;
428
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
429
+ }
430
+
431
+ .panel-warning > .panel-heading {
432
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
433
+ background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
434
+ background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
435
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
436
+ background-repeat: repeat-x;
437
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
438
+ }
439
+
440
+ .panel-danger > .panel-heading {
441
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
442
+ background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
443
+ background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
444
+ background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
445
+ background-repeat: repeat-x;
446
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
447
+ }
448
+
449
+ .well {
450
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
451
+ background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
452
+ background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
453
+ background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
454
+ background-repeat: repeat-x;
455
+ border-color: #dcdcdc;
456
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
457
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
458
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
459
+ }