shopify_app 5.0.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +4 -1
  5. data/.travis.yml +9 -0
  6. data/CHANGELOG +12 -1
  7. data/README.md +73 -108
  8. data/Rakefile +0 -1
  9. data/app/controllers/sessions_controller.rb +3 -0
  10. data/app/views/sessions/new.html.erb +17 -0
  11. data/config/routes.rb +10 -0
  12. data/lib/generators/shopify_app/controllers/controllers_generator.rb +29 -0
  13. data/lib/generators/shopify_app/install/install_generator.rb +83 -0
  14. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +22 -0
  15. data/lib/generators/shopify_app/install/templates/home_controller.rb +11 -0
  16. data/lib/generators/shopify_app/install/templates/index.html.erb +12 -0
  17. data/lib/generators/shopify_app/install/templates/omniauth.rb +2 -0
  18. data/lib/generators/shopify_app/install/templates/shopify_app.rb +6 -0
  19. data/lib/generators/shopify_app/install/templates/shopify_app_ready_script.html +8 -0
  20. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +11 -0
  21. data/lib/generators/shopify_app/{templates/config/initializers → install/templates}/shopify_session_repository.rb +3 -3
  22. data/lib/generators/shopify_app/routes/routes_generator.rb +31 -0
  23. data/lib/generators/shopify_app/routes/templates/routes.rb +7 -0
  24. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +42 -0
  25. data/lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb +15 -0
  26. data/lib/generators/shopify_app/shop_model/templates/session_storage.rb +16 -0
  27. data/lib/generators/shopify_app/shop_model/templates/shop.rb +3 -0
  28. data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +7 -0
  29. data/lib/generators/shopify_app/shopify_app_generator.rb +10 -63
  30. data/lib/generators/shopify_app/views/views_generator.rb +29 -0
  31. data/lib/shopify_app.rb +14 -13
  32. data/lib/shopify_app/configuration.rb +26 -36
  33. data/lib/shopify_app/controller.rb +18 -0
  34. data/lib/shopify_app/engine.rb +5 -0
  35. data/lib/shopify_app/login_protection.rb +34 -32
  36. data/lib/shopify_app/sessions_controller.rb +64 -0
  37. data/lib/shopify_app/shop.rb +15 -0
  38. data/lib/shopify_app/shopify_session_repository.rb +23 -21
  39. data/lib/shopify_app/version.rb +1 -1
  40. data/shopify_app.gemspec +5 -10
  41. data/test/app_templates/app/controllers/application_controller.rb +2 -0
  42. data/test/app_templates/config/application.rb +24 -0
  43. data/test/app_templates/config/initializers/shopify_app.rb +6 -0
  44. data/test/app_templates/config/routes.rb +3 -0
  45. data/test/controllers/sessions_controller_test.rb +82 -0
  46. data/test/dummy/app/controllers/application_controller.rb +3 -0
  47. data/test/dummy/app/controllers/home_controller.rb +7 -0
  48. data/test/dummy/config.ru +4 -0
  49. data/test/dummy/config/application.rb +26 -0
  50. data/test/dummy/config/boot.rb +5 -0
  51. data/test/dummy/config/database.yml +25 -0
  52. data/test/dummy/config/environment.rb +5 -0
  53. data/test/dummy/config/environments/test.rb +42 -0
  54. data/test/dummy/config/initializers/shopify_app.rb +6 -0
  55. data/test/dummy/config/routes.rb +10 -0
  56. data/test/dummy/config/secrets.yml +17 -0
  57. data/test/generators/install_generator_test.rb +103 -0
  58. data/test/generators/routes_generator_test.rb +33 -0
  59. data/test/generators/shop_model_generator_test.rb +40 -0
  60. data/test/generators/shopify_app_generator.rb +15 -0
  61. data/test/generators/views_generator_test.rb +15 -0
  62. data/test/shopify_app/configuration_test.rb +17 -0
  63. data/test/{lib/shopify_app → shopify_app}/in_memory_session_store_test.rb +6 -6
  64. data/test/{lib/shopify_app → shopify_app}/login_protection_test.rb +10 -7
  65. data/test/shopify_app/shopify_session_repository_test.rb +73 -0
  66. data/test/support/generator_test_helpers.rb +29 -0
  67. data/test/test_helper.rb +11 -3
  68. metadata +79 -61
  69. metadata.gz.sig +0 -0
  70. data/install.rb +0 -25
  71. data/lib/generators/shopify_app/README +0 -23
  72. data/lib/generators/shopify_app/USAGE +0 -22
  73. data/lib/generators/shopify_app/templates/app/assets/images/favicon.png +0 -0
  74. data/lib/generators/shopify_app/templates/app/assets/images/grid-18px.png +0 -0
  75. data/lib/generators/shopify_app/templates/app/assets/images/shopify-114.png +0 -0
  76. data/lib/generators/shopify_app/templates/app/assets/images/shopify-57.png +0 -0
  77. data/lib/generators/shopify_app/templates/app/assets/images/shopify-72.png +0 -0
  78. data/lib/generators/shopify_app/templates/app/assets/images/shopify.png +0 -0
  79. data/lib/generators/shopify_app/templates/app/assets/javascripts/application.js +0 -15
  80. data/lib/generators/shopify_app/templates/app/assets/stylesheets/application.css +0 -10
  81. data/lib/generators/shopify_app/templates/app/assets/stylesheets/imports.css.less +0 -5
  82. data/lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app.css.scss +0 -150
  83. data/lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app_buttons.css.less +0 -77
  84. data/lib/generators/shopify_app/templates/app/controllers/application_controller.rb +0 -13
  85. data/lib/generators/shopify_app/templates/app/controllers/home_controller.rb +0 -18
  86. data/lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb +0 -52
  87. data/lib/generators/shopify_app/templates/app/helpers/home_helper.rb +0 -9
  88. data/lib/generators/shopify_app/templates/app/helpers/login_helper.rb +0 -3
  89. data/lib/generators/shopify_app/templates/app/helpers/tabs_helper.rb +0 -11
  90. data/lib/generators/shopify_app/templates/app/views/home/design.html.erb +0 -3542
  91. data/lib/generators/shopify_app/templates/app/views/home/index.html.erb +0 -168
  92. data/lib/generators/shopify_app/templates/app/views/home/welcome.html.erb +0 -110
  93. data/lib/generators/shopify_app/templates/app/views/layouts/application.html.erb +0 -79
  94. data/lib/generators/shopify_app/templates/app/views/sessions/new.html.erb +0 -21
  95. data/lib/generators/shopify_app/templates/config/initializers/omniauth.rb +0 -14
  96. data/lib/generators/shopify_app/templates/config/initializers/rails_4_shim.rb +0 -1
  97. data/lib/generators/shopify_app/templates/public/404.html +0 -40
  98. data/lib/generators/shopify_app/templates/public/422.html +0 -40
  99. data/lib/generators/shopify_app/templates/public/500.html +0 -40
  100. data/lib/generators/shopify_app/templates/public/favicon.png +0 -0
  101. data/lib/generators/shopify_app/templates/public/shopify-114.png +0 -0
  102. data/lib/generators/shopify_app/templates/public/shopify-57.png +0 -0
  103. data/lib/generators/shopify_app/templates/public/shopify-72.png +0 -0
  104. data/lib/shopify_app/railtie.rb +0 -17
  105. data/test/config/development_config_file.yml +0 -8
  106. data/test/config/empty_config_file.yml +0 -1
  107. data/test/config/other_config_file.yml +0 -4
  108. data/test/config/shopify_app.yml +0 -4
  109. data/test/lib/shopify_app/configuration_test.rb +0 -91
  110. data/test/lib/shopify_app/shopify_session_repository_test.rb +0 -70
@@ -0,0 +1,29 @@
1
+ class ActiveSupport::TestCase
2
+ TEMPLATE_PATH = File.expand_path("../../app_templates", __FILE__)
3
+
4
+ def provide_existing_application_controller
5
+ copy_to_generator_root("app/controllers", "application_controller.rb")
6
+ end
7
+
8
+ def provide_existing_application_file
9
+ copy_to_generator_root("config", "application.rb")
10
+ end
11
+
12
+ def provide_existing_routes_file
13
+ copy_to_generator_root("config", "routes.rb")
14
+ end
15
+
16
+ def provide_existing_initializer_file
17
+ copy_to_generator_root("config/initializers", "shopify_app.rb")
18
+ end
19
+
20
+ private
21
+
22
+ def copy_to_generator_root(destination, template)
23
+ template_file = File.join(TEMPLATE_PATH, destination, template)
24
+ destination = File.join(destination_root, destination)
25
+
26
+ FileUtils.mkdir_p(destination)
27
+ FileUtils.cp(template_file, destination)
28
+ end
29
+ end
@@ -1,5 +1,13 @@
1
- require 'minitest/autorun'
2
- require 'minitest/pride'
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
+ require 'rails/test_help'
3
6
  require 'mocha/setup'
7
+ require 'byebug'
8
+
9
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
10
+ # to be shown.
11
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
4
12
 
5
- require File.expand_path('../../lib/shopify_app.rb', __FILE__)
13
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
@@ -30,7 +30,7 @@ cert_chain:
30
30
  fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
31
31
  TConQSX2BnZdhIEYW+cKzEC/bLc=
32
32
  -----END CERTIFICATE-----
33
- date: 2015-02-20 00:00:00.000000000 Z
33
+ date: 2015-04-30 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rails
@@ -81,21 +81,35 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.1.4
83
83
  - !ruby/object:Gem::Dependency
84
- name: less-rails-bootstrap
84
+ name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '2.0'
90
- type: :runtime
89
+ version: '0'
90
+ type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '2.0'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rake
98
+ name: byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sqlite3
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ">="
@@ -136,78 +150,82 @@ dependencies:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
139
- description: Creates a basic sessions controller for authenticating with your Shop
140
- and also a product controller which lets your edit your products easily.
141
- email:
142
- - edward@shopify.com
143
- - willem@shopify.com
144
- - david.underwood@shopify.com
153
+ description:
154
+ email:
145
155
  executables: []
146
156
  extensions: []
147
157
  extra_rdoc_files: []
148
158
  files:
149
159
  - ".gitignore"
160
+ - ".travis.yml"
150
161
  - CHANGELOG
151
162
  - Gemfile
152
163
  - LICENSE
153
164
  - README.md
154
165
  - RELEASING
155
166
  - Rakefile
156
- - install.rb
157
- - lib/generators/shopify_app/README
158
- - lib/generators/shopify_app/USAGE
167
+ - app/controllers/sessions_controller.rb
168
+ - app/views/sessions/new.html.erb
169
+ - config/routes.rb
170
+ - lib/generators/shopify_app/controllers/controllers_generator.rb
171
+ - lib/generators/shopify_app/install/install_generator.rb
172
+ - lib/generators/shopify_app/install/templates/embedded_app.html.erb
173
+ - lib/generators/shopify_app/install/templates/home_controller.rb
174
+ - lib/generators/shopify_app/install/templates/index.html.erb
175
+ - lib/generators/shopify_app/install/templates/omniauth.rb
176
+ - lib/generators/shopify_app/install/templates/shopify_app.rb
177
+ - lib/generators/shopify_app/install/templates/shopify_app_ready_script.html
178
+ - lib/generators/shopify_app/install/templates/shopify_provider.rb
179
+ - lib/generators/shopify_app/install/templates/shopify_session_repository.rb
180
+ - lib/generators/shopify_app/routes/routes_generator.rb
181
+ - lib/generators/shopify_app/routes/templates/routes.rb
182
+ - lib/generators/shopify_app/shop_model/shop_model_generator.rb
183
+ - lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb
184
+ - lib/generators/shopify_app/shop_model/templates/session_storage.rb
185
+ - lib/generators/shopify_app/shop_model/templates/shop.rb
186
+ - lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb
159
187
  - lib/generators/shopify_app/shopify_app_generator.rb
160
- - lib/generators/shopify_app/templates/app/assets/images/favicon.png
161
- - lib/generators/shopify_app/templates/app/assets/images/grid-18px.png
162
- - lib/generators/shopify_app/templates/app/assets/images/shopify-114.png
163
- - lib/generators/shopify_app/templates/app/assets/images/shopify-57.png
164
- - lib/generators/shopify_app/templates/app/assets/images/shopify-72.png
165
- - lib/generators/shopify_app/templates/app/assets/images/shopify.png
166
- - lib/generators/shopify_app/templates/app/assets/javascripts/application.js
167
- - lib/generators/shopify_app/templates/app/assets/stylesheets/application.css
168
- - lib/generators/shopify_app/templates/app/assets/stylesheets/imports.css.less
169
- - lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app.css.scss
170
- - lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app_buttons.css.less
171
- - lib/generators/shopify_app/templates/app/controllers/application_controller.rb
172
- - lib/generators/shopify_app/templates/app/controllers/home_controller.rb
173
- - lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb
174
- - lib/generators/shopify_app/templates/app/helpers/home_helper.rb
175
- - lib/generators/shopify_app/templates/app/helpers/login_helper.rb
176
- - lib/generators/shopify_app/templates/app/helpers/tabs_helper.rb
177
- - lib/generators/shopify_app/templates/app/views/home/design.html.erb
178
- - lib/generators/shopify_app/templates/app/views/home/index.html.erb
179
- - lib/generators/shopify_app/templates/app/views/home/welcome.html.erb
180
- - lib/generators/shopify_app/templates/app/views/layouts/application.html.erb
181
- - lib/generators/shopify_app/templates/app/views/sessions/new.html.erb
182
- - lib/generators/shopify_app/templates/config/initializers/omniauth.rb
183
- - lib/generators/shopify_app/templates/config/initializers/rails_4_shim.rb
184
- - lib/generators/shopify_app/templates/config/initializers/shopify_session_repository.rb
185
- - lib/generators/shopify_app/templates/public/404.html
186
- - lib/generators/shopify_app/templates/public/422.html
187
- - lib/generators/shopify_app/templates/public/500.html
188
- - lib/generators/shopify_app/templates/public/favicon.png
189
- - lib/generators/shopify_app/templates/public/shopify-114.png
190
- - lib/generators/shopify_app/templates/public/shopify-57.png
191
- - lib/generators/shopify_app/templates/public/shopify-72.png
188
+ - lib/generators/shopify_app/views/views_generator.rb
192
189
  - lib/shopify_app.rb
193
190
  - lib/shopify_app/configuration.rb
191
+ - lib/shopify_app/controller.rb
192
+ - lib/shopify_app/engine.rb
194
193
  - lib/shopify_app/in_memory_session_store.rb
195
194
  - lib/shopify_app/login_protection.rb
196
- - lib/shopify_app/railtie.rb
195
+ - lib/shopify_app/sessions_controller.rb
196
+ - lib/shopify_app/shop.rb
197
197
  - lib/shopify_app/shopify_session_repository.rb
198
198
  - lib/shopify_app/version.rb
199
199
  - shipit.rubygems.yml
200
200
  - shopify_app.gemspec
201
- - test/config/development_config_file.yml
202
- - test/config/empty_config_file.yml
203
- - test/config/other_config_file.yml
204
- - test/config/shopify_app.yml
205
- - test/lib/shopify_app/configuration_test.rb
206
- - test/lib/shopify_app/in_memory_session_store_test.rb
207
- - test/lib/shopify_app/login_protection_test.rb
208
- - test/lib/shopify_app/shopify_session_repository_test.rb
201
+ - test/app_templates/app/controllers/application_controller.rb
202
+ - test/app_templates/config/application.rb
203
+ - test/app_templates/config/initializers/shopify_app.rb
204
+ - test/app_templates/config/routes.rb
205
+ - test/controllers/sessions_controller_test.rb
206
+ - test/dummy/app/controllers/application_controller.rb
207
+ - test/dummy/app/controllers/home_controller.rb
208
+ - test/dummy/config.ru
209
+ - test/dummy/config/application.rb
210
+ - test/dummy/config/boot.rb
211
+ - test/dummy/config/database.yml
212
+ - test/dummy/config/environment.rb
213
+ - test/dummy/config/environments/test.rb
214
+ - test/dummy/config/initializers/shopify_app.rb
215
+ - test/dummy/config/routes.rb
216
+ - test/dummy/config/secrets.yml
217
+ - test/generators/install_generator_test.rb
218
+ - test/generators/routes_generator_test.rb
219
+ - test/generators/shop_model_generator_test.rb
220
+ - test/generators/shopify_app_generator.rb
221
+ - test/generators/views_generator_test.rb
222
+ - test/shopify_app/configuration_test.rb
223
+ - test/shopify_app/in_memory_session_store_test.rb
224
+ - test/shopify_app/login_protection_test.rb
225
+ - test/shopify_app/shopify_session_repository_test.rb
226
+ - test/support/generator_test_helpers.rb
209
227
  - test/test_helper.rb
210
- homepage: http://www.shopify.com/developers
228
+ homepage:
211
229
  licenses: []
212
230
  metadata: {}
213
231
  post_install_message:
@@ -225,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
243
  - !ruby/object:Gem::Version
226
244
  version: '0'
227
245
  requirements: []
228
- rubyforge_project: shopify-api
246
+ rubyforge_project:
229
247
  rubygems_version: 2.2.2
230
248
  signing_key:
231
249
  specification_version: 4
metadata.gz.sig CHANGED
Binary file
data/install.rb DELETED
@@ -1,25 +0,0 @@
1
- puts
2
- puts "Shopify App Generator"
3
- puts "---------------------"
4
- puts
5
- puts "To get started, first register your app as a Shopify Partner:"
6
- puts
7
- puts " * Go to http://www.shopify.com/partners and create or login to your Partner account."
8
- puts
9
- puts " * Jump over to the Apps tab and hit the 'Create a new app' button"
10
- puts " (Make sure to set the Application URL to http://localhost:3000/login during development)"
11
- puts
12
- puts " * Install the Shopify API gem:
13
-
14
- $ gem install shopify_api"
15
- puts
16
- puts " * Run
17
-
18
- $ rails generate shopify_app your_app_api_key your_app_secret"
19
- puts
20
- puts " * Set up a test shop to install your app in (do this on the Partner site)"
21
- puts
22
- puts " * Run $ rails server"
23
- puts
24
- puts " * Visit http://localhost:3000 and use the test shop's URL to install this app"
25
- puts
@@ -1,23 +0,0 @@
1
-
2
-
3
- What's next?
4
- ------------
5
-
6
- Make sure to set the Application URL of the application in your Shopify partner account
7
- to <tt>http://localhost:3000/login</tt>.
8
-
9
- Then, start your application with:
10
-
11
- $ rails server
12
-
13
- Now visit http://localhost:3000 and install your application in a Shopify store.
14
-
15
- After your application has been given read or read/write API permission by the
16
- shop, you're ready to start experimenting with the Shopify API.
17
-
18
- Questions or problems?
19
- ----------------------
20
-
21
- API Reference http://api.shopify.com
22
- Developer Forums http://forums.shopify.com/categories/9
23
- Developer Wiki http://wiki.shopify.com/Shopify_App_Development
@@ -1,22 +0,0 @@
1
- Description:
2
- This is a generator for creating a basic Shopify application to quickly get
3
- you started. You can see some examples on how to use the Shopify API.
4
-
5
- The generator creates a basic sessions controller for authenticating with your
6
- Shop and a controller called "home" which displays basic information
7
- about your products, orders and articles.
8
-
9
- Note: It's recommended to use this on a new Rails project, so that the
10
- generator won't overwrite/delete some of your files.
11
-
12
- Usage:
13
- Pass your API key and then your Secret, which the sessions controller
14
- will need to authenticate with your shop.
15
- If you don't have an API key yet, register your application in our
16
- partner system at http://www.shopify.com/partners
17
-
18
-
19
- Examples:
20
- script/generate shopify_app edffbb1bb793e2750686e6f4647a384a abbcee050...
21
-
22
- This will create a sessions controller and a home controller and views.
@@ -1,15 +0,0 @@
1
- // This is a manifest file that'll be compiled into including all the files listed below.
2
- // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
- // be included in the compiled file accessible from http://example.com/assets/application.js
4
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
- // the compiled file.
6
- //
7
- // If you need to customize any bootstrap js, we've placed the un-minified versions in
8
- // assets/javascripts/bootstrap including the test suite that ships with bootstrap.
9
- // Love,
10
- // Shopify
11
- //
12
- //= require jquery
13
- //= require jquery_ujs
14
- //= require twitter/bootstrap
15
- //= require_tree .
@@ -1,10 +0,0 @@
1
- /*
2
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
- * the top of the compiled file, but it's generally better to create a new file per style scope.
5
- *= require_self
6
- *= require twitter/bootstrap
7
- *= require imports
8
- *= require shopify_app_buttons
9
- *= require shopify_app
10
- */
@@ -1,5 +0,0 @@
1
- /*
2
- * Temporary fix until less-rails-bootstrap fixes issue #26 https://github.com/metaskills/less-rails-bootstrap/issues/26
3
- */
4
-
5
- @import "twitter/bootstrap/responsive.less";
@@ -1,150 +0,0 @@
1
- /* SCSS
2
- ============================================================= */
3
- /* Mixins */
4
- @mixin rounded($px:3px) { -webkit-border-radius:$px; -moz-border-radius:$px; border-radius:$px; }
5
- @mixin border-radius($tl,$tr,$br,$bl) { -webkit-border-radius:$tl $tr $br $bl; -moz-border-radius:$tl $tr $br $bl; border-radius:$tl $tr $br $bl; }
6
- @mixin box-shadow($x:0,$y:1px,$spread:1px,$opac:0.15) { -moz-box-shadow:$x $y $spread rgba(0,0,0,$opac); -webkit-box-shadow:$x $y $spread rgba(0,0,0,$opac); box-shadow:$x $y $spread rgba(0,0,0,$opac); }
7
- @mixin transition($properties:all,$timing:0.3s,$transition:ease-in-out) { -o-transition: $properties $timing $transition; -webkit-transition: $properties $timing $transition; -moz-transition: $properties $timing $transition; }
8
- @mixin gradient($color1, $color2) { background-image:-o-linear-gradient($color1, $color2); background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, $color1),color-stop(1, $color2)); background-image: -moz-linear-gradient(center bottom,$color1 0%, $color2 100%); background-image: linear-gradient(top, $color1, $color2); }
9
-
10
- /* Fonts */
11
- $open-sans: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
12
-
13
- /* Colours */
14
- $col-blue: #40a1c9;
15
- $col-blue-hover: #2a8eb7;
16
- $col-blue-hover-light: #86cce9;
17
- $col-green: #96c944;
18
- $col-light-green: #c4ec84;
19
- $col-green-hover: #87b936;
20
- $col-grey: #818181;
21
- $col-grey-hover: #d2d2d2;
22
- $col-light-grey: #c3c2c3;
23
-
24
-
25
- /* BOOTSTRAP OVERRIDES
26
- ============================================================= */
27
- html, body { background-color: #eee; }
28
- body { padding-top: 40px;}
29
-
30
- footer { margin-top: 7px; padding-top: 7px; color:#aaa;}
31
-
32
- a { color:$col-blue;
33
- &:hover { color:$col-blue-hover; text-decoration:none;}
34
- }
35
-
36
- .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
37
- background-color:$col-blue !important;
38
- [class^="icon-"] { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings-white.png');}
39
- }
40
-
41
- .container {
42
- > footer p { text-align: center;}
43
- > .content { background-color: #fff; padding: 20px; margin: 0 -20px; @include border-radius(0,0,6px,6px); @include box-shadow(0,1px,2px);}
44
- }
45
-
46
- .page-header h1 { color:$col-blue;}
47
-
48
- .content { min-height: 500px;}
49
-
50
- [class^="icon-"] { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings.png');}
51
-
52
- .icon-white { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings-white.png');}
53
-
54
- .navbar {
55
- .brand { color: #fff;}
56
- .navbar-inner { background-image:none; background-color:#000; box-shadow:none;}
57
- .nav > li.active > a, .nav > li.active > a:hover { background-color: #222;}
58
- p a { color: #ffffff;}
59
- }
60
-
61
- .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover { background-color: #171717;}
62
-
63
- .btn-navbar {
64
- background-color: #111;
65
- background-image: none;
66
- border-color:#222;
67
- -webkit-box-shadow: none;
68
- -moz-box-shadow: none;
69
- box-shadow: none;
70
- }
71
- .btn-navbar:hover { border-color:#333;}
72
- .btn-navbar:before { opacity:0;}
73
-
74
- input:focus, textarea:focus {
75
- border-color: rgba(64,161,201, 0.8);
76
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
77
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
78
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
79
- }
80
-
81
- input[type=text].btn-large { height:20px;}
82
-
83
- a.thumbnail:hover {
84
- border-color: rgba(64,161,201, 0.8);
85
- -webkit-box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
86
- -moz-box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
87
- box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
88
- }
89
-
90
- @media(max-width: 768px) {
91
- .container > .content { @include rounded(0);}
92
- }
93
-
94
- @media (max-width: 980px) {
95
- body { padding-top: 0px !important;}
96
- .navbar .nav.pull-right { display:none;}
97
- .navbar-fixed-top { margin:0;}
98
- }
99
-
100
-
101
- /* APP CSS
102
- ============================================================= */
103
- /* General */
104
- h1,h2,h3,h4,h5,h6,.brand {
105
- font-family: $open-sans;
106
- font-weight:normal;
107
- small { letter-spacing:0px;}
108
- }
109
-
110
- h1,h2 { letter-spacing:-1px;}
111
-
112
- .polaroid { float:right; display:block; padding: 20px; margin: 0 0 50px 50px; border: 1px solid #ccc; border: 1px solid #fff; background: #f5f5f5;
113
- @include gradient(#f5f5f5,#f0f0f0);
114
- @include box-shadow(0,1px,5px,.5);
115
- @include rounded(4px);
116
- }
117
-
118
- #login-header { border-bottom:none;
119
- h1 { text-align:center;}
120
- }
121
-
122
- /* Optional Bootstrap Overrides */
123
- .accordion-body {
124
- background: #f9f9f9;
125
- .accordion-inner { padding:20px;
126
- img { border:1px solid rgba(0,0,0,.07);}
127
- }
128
- }
129
-
130
- .modal { max-height:700px; width:auto;
131
- .modal-body { text-align:center;}
132
- }
133
-
134
- /* "Where do I start?" header -- you can delete this safely (all the way to the bottom) */
135
- .jumbotron { background: #222; margin:-20px -20px 20px -20px; position: relative;}
136
- .jumbotron h1 { font-size: 54px; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);}
137
- .jumbotron h1, .jumbotron p { margin-right:0; margin-bottom: 9px; color: #fff; text-align: center; text-shadow: 0 1px 1px rgba(0, 0, 0, .3);}
138
- .jumbotron .inner { background: transparent url('/assets/grid-18px.png') top center; padding: 45px 0;
139
- -webkit-box-shadow: inset 0 -20px 300px rgba(0,0,0,.4); -moz-box-shadow: inset 0 -20px 300px rgba(0,0,0,.4);}
140
-
141
- @media (max-width: 480px) {
142
- .jumbotron h1,.jumbotron p { text-align: center; margin-right: 0;}
143
- .jumbotron h1 { font-size: 45px; margin-right: 0;}
144
- .jumbotron p { margin-right: 0; font-size: 18px; line-height: 24px;}}
145
- @media (min-width: 480px) and (max-width: 768px) {
146
- .jumbotron h1 { font-size: 54px;}
147
- .jumbotron h1,.jumbotron p { margin-right: 0;}}
148
- @media (min-width: 768px) and (max-width: 940px) {
149
- .jumbotron h1 { font-size: 72px;}}
150
-