playmo 0.0.6 → 0.0.10
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/.rspec +2 -0
- data/Gemfile +1 -1
- data/README.md +9 -45
- data/TODO.md +65 -9
- data/bin/playmo +6 -0
- data/lib/generators/rails/controller_generator.rb +5 -0
- data/lib/generators/rails/layout_generator.rb +26 -0
- data/lib/generators/rails/scaffold_controller_generator.rb +13 -0
- data/lib/generators/rails/templates/controller.rb +11 -0
- data/lib/generators/rails/templates/layout.html.erb +46 -0
- data/lib/generators/rails/templates/layout.html.haml +26 -0
- data/lib/generators/rails/templates/layout.html.slim +26 -0
- data/lib/generators/rails/templates/scaffold_controller.rb +56 -0
- data/lib/playmo.rb +45 -7
- data/lib/playmo/answer.rb +18 -0
- data/lib/playmo/choice.rb +52 -0
- data/lib/playmo/cli.rb +25 -0
- data/lib/playmo/cookbook.rb +83 -0
- data/lib/playmo/event.rb +7 -0
- data/lib/playmo/options.rb +17 -0
- data/lib/playmo/question.rb +59 -0
- data/lib/playmo/recipe.rb +50 -0
- data/lib/playmo/recipes/_/sample_recipe.rb +46 -0
- data/lib/playmo/recipes/application_controller_recipe.rb +24 -0
- data/lib/playmo/recipes/application_helper_recipe.rb +18 -0
- data/lib/playmo/recipes/assets_recipe.rb +19 -0
- data/lib/playmo/recipes/can_can_recipe.rb +0 -0
- data/lib/playmo/recipes/capistrano_recipe.rb +25 -0
- data/lib/playmo/recipes/compass_recipe.rb +19 -0
- data/lib/playmo/recipes/congrats_recipe.rb +20 -0
- data/lib/playmo/recipes/devise_recipe.rb +172 -0
- data/lib/playmo/recipes/forms_recipe.rb +42 -0
- data/lib/playmo/recipes/git_recipe.rb +31 -0
- data/lib/playmo/recipes/home_controller_recipe.rb +86 -0
- data/lib/playmo/recipes/javascript_framework_recipe.rb +69 -0
- data/lib/playmo/recipes/layout_recipe.rb +21 -0
- data/lib/playmo/recipes/markup_recipe.rb +34 -0
- data/lib/playmo/recipes/rspec_recipe.rb +25 -0
- data/lib/playmo/recipes/rvm_recipe.rb +17 -0
- data/lib/playmo/recipes/setup_database_recipe.rb +21 -0
- data/lib/playmo/recipes/templates/application_controller_recipe/application_controller.rb +54 -0
- data/lib/playmo/recipes/templates/application_controller_recipe/internal_error.html.erb +5 -0
- data/lib/playmo/recipes/templates/application_controller_recipe/not_found.html.erb +5 -0
- data/lib/playmo/recipes/templates/application_helper_recipe/application_helper.rb +118 -0
- data/lib/playmo/recipes/templates/assets_recipe/images/bg.jpg +0 -0
- data/lib/playmo/recipes/templates/assets_recipe/images/input-bg.gif +0 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/application.css.scss +29 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/media.css.scss +0 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_constants.css.scss +11 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_forms.css.scss +134 -0
- data/{stylesheets/_playmo_rails.sass → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_html5-boilerplate.css.scss} +1 -1
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_layout.css.scss +264 -0
- data/{templates/project/playmo/playmo.scss → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_overrides.css.scss} +14 -23
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_simple_form.css.scss +7 -0
- data/{stylesheets/playmo-rails/_fonts.scss → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/html5-boilerplate/_fonts.css.scss} +5 -6
- data/{stylesheets/playmo-rails/_helpers.scss → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/html5-boilerplate/_helpers.css.scss} +6 -1
- data/{stylesheets/playmo-rails/_media.scss → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/html5-boilerplate/_media.css.scss} +10 -9
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/html5-boilerplate/_reset.css.scss +47 -0
- data/{stylesheets/playmo-rails/_styles.scss → lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/html5-boilerplate/_styles.css.scss} +24 -24
- data/lib/playmo/recipes/templates/capistrano_recipe/.gitkeep +0 -0
- data/lib/playmo/recipes/templates/devise_recipe/.gitkeep +0 -0
- data/lib/playmo/recipes/templates/forms_recipe/.gitkeep +0 -0
- data/lib/playmo/recipes/templates/home_controller_recipe/_sidebar.html.erb +3 -0
- data/lib/playmo/recipes/templates/layout_recipe/application.html.erb +40 -0
- data/lib/playmo/recipes/templates/rspec_recipe/.gitkeep +0 -0
- data/lib/playmo/recipes/templates/rvm_recipe/.gitkeep +0 -0
- data/lib/playmo/silent.rb +17 -0
- data/playmo.gemspec +6 -2
- data/spec/cookbook_spec.rb +23 -0
- data/spec/recipes/home_controller_recipe_spec.rb +13 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/.gitkeep +0 -0
- metadata +144 -79
- data/lib/app/helpers/playmo_helper.rb +0 -54
- data/lib/generators/playmo/USAGE +0 -8
- data/lib/generators/playmo/install_generator.rb +0 -166
- data/lib/generators/playmo/templates/application.html.erb +0 -56
- data/lib/generators/playmo/templates/application_controller.rb +0 -9
- data/lib/generators/playmo/templates/application_helper.rb +0 -21
- data/lib/generators/playmo/templates/assets.yml +0 -32
- data/lib/generators/playmo/templates/deploy.rb +0 -50
- data/lib/generators/playmo/templates/jquery/jquery-1.5.2.min.js +0 -16
- data/lib/generators/playmo/templates/jquery/rails.js +0 -157
- data/lib/generators/playmo/templates/mootools/mootools-core-1.3.1.js +0 -485
- data/lib/generators/playmo/templates/mootools/mootools-more-1.3.1.1.js +0 -741
- data/lib/generators/playmo/templates/mootools/rails.js +0 -161
- data/lib/generators/playmo/templates/tasks/assets.rake +0 -10
- data/lib/generators/playmo/templates/tasks/sass.rake +0 -8
- data/stylesheets/playmo-rails/_handheld.scss +0 -8
- data/stylesheets/playmo-rails/_reset.scss +0 -56
- data/templates/project/boilerplate/css/handheld.scss +0 -7
- data/templates/project/boilerplate/css/style.scss +0 -141
- data/templates/project/boilerplate/files/apple-touch-icon.png +0 -0
- data/templates/project/boilerplate/files/crossdomain.xml +0 -25
- data/templates/project/boilerplate/files/favicon.ico +0 -0
- data/templates/project/boilerplate/files/robots.txt +0 -5
- data/templates/project/boilerplate/js/libs/dd_belatedpng.js +0 -13
- data/templates/project/boilerplate/js/libs/modernizr-1.7.min.js +0 -2
- data/templates/project/google/google.yml +0 -22
- data/templates/project/manifest.rb +0 -34
- data/templates/project/playmo/article.scss +0 -69
- data/templates/project/playmo/icons/outgoing.png +0 -0
- data/templates/project/rails/public/stylesheets/layout.scss +0 -20
- data/templates/project/rails/public/stylesheets/print.scss +0 -11
- data/templates/project/rails/public/stylesheets/screen.scss +0 -14
- data/templates/project/rails/public/stylesheets/wysiwyg.scss +0 -19
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Playmo
|
|
2
|
+
module Recipes
|
|
3
|
+
class MarkupRecipe < Playmo::Recipe
|
|
4
|
+
def setup
|
|
5
|
+
question "Please choose markup language you prefer to use" do
|
|
6
|
+
answer "Erb (by default)" => :install_erb
|
|
7
|
+
answer "Haml" => :install_haml
|
|
8
|
+
answer "Slim" => :install_slim
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
protected
|
|
13
|
+
|
|
14
|
+
def install_erb
|
|
15
|
+
# Do nothing
|
|
16
|
+
store(:markup, :erb)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def install_haml
|
|
20
|
+
gem "haml-rails"
|
|
21
|
+
store(:markup, :haml)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def install_slim
|
|
25
|
+
gem "slim-rails"
|
|
26
|
+
store(:markup, :slim)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Write down this recipe to our Cookbook if it's available
|
|
34
|
+
Playmo::Cookbook.instance.use(Playmo::Recipes::MarkupRecipe) if defined?(Playmo::Cookbook)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Playmo
|
|
2
|
+
module Recipes
|
|
3
|
+
class RspecRecipe < Playmo::Recipe
|
|
4
|
+
source_root File.expand_path('../templates/rspec_recipe', __FILE__)
|
|
5
|
+
|
|
6
|
+
def setup
|
|
7
|
+
question "Would you like to use Rspec in this project?" => :install_rspec
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
protected
|
|
11
|
+
|
|
12
|
+
def install_rspec
|
|
13
|
+
gem 'rspec'
|
|
14
|
+
|
|
15
|
+
# TODO: copy helpers etc
|
|
16
|
+
# TODO: factory_girl etc
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Write down this recipe to our Cookbook if it's available
|
|
24
|
+
require File.dirname(__FILE__) + '/application_helper_recipe'
|
|
25
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::ApplicationHelperRecipe, Playmo::Recipes::RspecRecipe) if defined?(Playmo::Cookbook)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Playmo
|
|
2
|
+
module Recipes
|
|
3
|
+
class RvmRecipe < Playmo::Recipe
|
|
4
|
+
source_root File.expand_path('../templates/rvm_recipe', __FILE__)
|
|
5
|
+
|
|
6
|
+
def setup
|
|
7
|
+
silently do
|
|
8
|
+
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Write down this recipe to our Cookbook if it's available
|
|
16
|
+
require File.dirname(__FILE__) + '/capistrano_recipe'
|
|
17
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::CapistranoRecipe, Playmo::Recipes::RvmRecipe) if defined?(Playmo::Cookbook)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Playmo
|
|
2
|
+
module Recipes
|
|
3
|
+
class SetupDatabaseRecipe < Playmo::Recipe
|
|
4
|
+
source_root File.expand_path('../templates/setup_database_recipe', __FILE__)
|
|
5
|
+
|
|
6
|
+
def setup
|
|
7
|
+
silently do
|
|
8
|
+
Event.events.listen(:after_install) do |event_data|
|
|
9
|
+
run "cd #{application_name} && rake db:create"
|
|
10
|
+
run "cd #{application_name} && rake db:migrate"
|
|
11
|
+
run "cd #{application_name} && rake db:seed"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Write down this recipe to our Cookbook if it's available
|
|
20
|
+
require File.dirname(__FILE__) + '/rvm_recipe'
|
|
21
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::RvmRecipe, Playmo::Recipes::SetupDatabaseRecipe) if defined?(Playmo::Cookbook)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
class ApplicationController < ActionController::Base
|
|
2
|
+
protect_from_forgery
|
|
3
|
+
rescue_from Exception, :with => :handle_exceptions
|
|
4
|
+
|
|
5
|
+
before_filter :set_current_user
|
|
6
|
+
|
|
7
|
+
protected
|
|
8
|
+
|
|
9
|
+
def set_current_user
|
|
10
|
+
User.current = current_user
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def not_found!
|
|
14
|
+
raise ActiveRecord::RecordNotFound.new('Not Found')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def handle_exceptions(e)
|
|
18
|
+
case e
|
|
19
|
+
#when CanCan::AccessDenied
|
|
20
|
+
# not_found
|
|
21
|
+
when ActiveRecord::RecordNotFound
|
|
22
|
+
not_found
|
|
23
|
+
else
|
|
24
|
+
internal_error(e)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def not_found
|
|
29
|
+
# Just render view
|
|
30
|
+
render 'application/not_found', :status => 404
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def internal_error(exception)
|
|
34
|
+
if Rails.env.production?
|
|
35
|
+
|
|
36
|
+
# Uncomment this if you want to use ExceptionNotifier
|
|
37
|
+
# Send message to admin email via exception_notification
|
|
38
|
+
# request.env['exception_notifier.options'] = {
|
|
39
|
+
# :sender_address => "noreply@example.ru",
|
|
40
|
+
# :exception_recipients => "johndoe@example.com"
|
|
41
|
+
# }
|
|
42
|
+
|
|
43
|
+
# ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver
|
|
44
|
+
|
|
45
|
+
# And just render view
|
|
46
|
+
render :layout => 'layouts/application',
|
|
47
|
+
:template => 'application/internal_error',
|
|
48
|
+
:status => 500
|
|
49
|
+
else
|
|
50
|
+
raise
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
module ApplicationHelper
|
|
2
|
+
attr_accessor :page_title
|
|
3
|
+
|
|
4
|
+
def flash_messages
|
|
5
|
+
return unless flash.any?
|
|
6
|
+
|
|
7
|
+
items = []
|
|
8
|
+
flash.each do |name, msg|
|
|
9
|
+
items << content_tag(:li, msg, :id => "flash-#{name}")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
content_tag :div, :id => 'flash-messages' do
|
|
13
|
+
content_tag :ul, raw(items.join)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Set page title. Use this method in your views
|
|
18
|
+
def title(page_title)
|
|
19
|
+
@page_title = page_title
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# This prints page title. Call this helper
|
|
23
|
+
# inside title tag of your layout
|
|
24
|
+
def page_title(default_title = '')
|
|
25
|
+
@page_title || default_title
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Print heading (h1 by default) and set page title
|
|
29
|
+
# at the same time. Use this method in your views
|
|
30
|
+
def heading_with_title(heading, tag=nil)
|
|
31
|
+
title(heading)
|
|
32
|
+
heading(heading, tag)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def heading(heading, tag=:h1)
|
|
36
|
+
tag = :h1 if tag.nil?
|
|
37
|
+
content_tag(tag, heading)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def admin_area(&block)
|
|
41
|
+
if user_signed_in?
|
|
42
|
+
content = with_output_buffer(&block)
|
|
43
|
+
content_tag(:div, content, :class => 'admin')
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def link_to_section(name, options = {}, html_options = {}, &block)
|
|
48
|
+
url_string = url_for(options)
|
|
49
|
+
|
|
50
|
+
if "/#{request.path.split('/')[1]}" == url_string
|
|
51
|
+
html_options[:class] = "#{html_options[:class]} current"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
link_to(name, options, html_options, &block)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def page_id
|
|
58
|
+
name = 'page-' + request.path_parameters[:controller] + '-' + request.path_parameters[:action]
|
|
59
|
+
name.gsub!(/_+/, '-')
|
|
60
|
+
name
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def link_to_website(url, html_options = {})
|
|
64
|
+
return nil if url.blank?
|
|
65
|
+
|
|
66
|
+
url = "http://#{url}" unless url =~ /^(ht|f)tps?:\/\//i
|
|
67
|
+
html_options[:href] = url
|
|
68
|
+
content_tag(:a, url, html_options)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Create a named haml tag to wrap IE conditional around a block
|
|
72
|
+
# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither
|
|
73
|
+
def ie_tag(name=:body, attrs={}, &block)
|
|
74
|
+
attrs.symbolize_keys!
|
|
75
|
+
result = "<!--[if lt IE 7 ]> #{ tag(name, add_class('ie6', attrs), true) } <![endif]-->\n".html_safe
|
|
76
|
+
result += "<!--[if IE 7 ]> #{ tag(name, add_class('ie7', attrs), true) } <![endif]-->\n".html_safe
|
|
77
|
+
result += "<!--[if IE 8 ]> #{ tag(name, add_class('ie8', attrs), true) } <![endif]-->\n".html_safe
|
|
78
|
+
result += "<!--[if IE 9 ]> #{ tag(name, add_class('ie9', attrs), true) } <![endif]-->\n".html_safe
|
|
79
|
+
result += "<!--[if (gte IE 9)|!(IE)]><!-->".html_safe
|
|
80
|
+
|
|
81
|
+
result += content_tag name, attrs do
|
|
82
|
+
"<!--<![endif]-->\n".html_safe + with_output_buffer(&block)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
result
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def ie_html(attrs={}, &block)
|
|
89
|
+
ie_tag(:html, attrs, &block)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def ie_body(attrs={}, &block)
|
|
93
|
+
ie_tag(:body, attrs, &block)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def google_account_id
|
|
97
|
+
ENV['GOOGLE_ACCOUNT_ID'] || google_config(:google_account_id)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def google_api_key
|
|
101
|
+
ENV['GOOGLE_API_KEY'] || google_config(:google_api_key)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
private
|
|
105
|
+
|
|
106
|
+
def add_class(name, attrs)
|
|
107
|
+
classes = attrs[:class] || ''
|
|
108
|
+
classes.strip!
|
|
109
|
+
classes = ' ' + classes if !classes.blank?
|
|
110
|
+
classes = name + classes
|
|
111
|
+
attrs.merge(:class => classes)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def google_config(key)
|
|
115
|
+
configs = YAML.load_file(File.join(Rails.root, 'config', 'google.yml'))[Rails.env.to_sym] rescue {}
|
|
116
|
+
configs[key]
|
|
117
|
+
end
|
|
118
|
+
end
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Here's where we define some default constants */
|
|
8
|
+
@import "partials/constants";
|
|
9
|
+
|
|
10
|
+
/* Then we'll import the compass extension */
|
|
11
|
+
@import "partials/html5-boilerplate";
|
|
12
|
+
|
|
13
|
+
/* Now, you can simply include everything
|
|
14
|
+
(except media) by uncommeting this line */
|
|
15
|
+
@include html5-boilerplate;
|
|
16
|
+
|
|
17
|
+
/* Or, you can import the "overrides" partial if
|
|
18
|
+
you want more control over individual mixins */
|
|
19
|
+
@import "partials/overrides";
|
|
20
|
+
|
|
21
|
+
/* Finally, put your own styles in these partials
|
|
22
|
+
and add more as needed (i.e. forms, tables, nav) */
|
|
23
|
+
@import "partials/layout";
|
|
24
|
+
@import "partials/forms";
|
|
25
|
+
|
|
26
|
+
@import "partials/simple_form";
|
|
27
|
+
|
|
28
|
+
/* Media should come last */
|
|
29
|
+
@import "media";
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
$base-font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; // default font-family
|
|
2
|
+
$base-font-size: 13px; // default font-size for YUI fonts
|
|
3
|
+
$base-line-height: 1.231; // default line-height for YUI fonts
|
|
4
|
+
$font-color: #444;
|
|
5
|
+
$link-color: #2D3861;
|
|
6
|
+
$link-hover-color: #3952AC;
|
|
7
|
+
$link-active-color: #3952AC;
|
|
8
|
+
$link-visited-color: #3952AC;
|
|
9
|
+
$selected-font-color: #fff; // color for selected text
|
|
10
|
+
$selected-background-color: #ff5E99; // bg-color for selected text
|
|
11
|
+
$list-left-margin: 2em; // left margin for ul an ol
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
form {
|
|
2
|
+
label {
|
|
3
|
+
font-weight: normal;
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
input[type=radio] {
|
|
7
|
+
margin: 0 3px 4px 3px;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
label.boolean { display: inline; }
|
|
12
|
+
h3 { margin: 20px 0 10px 0; }
|
|
13
|
+
|
|
14
|
+
div.input {
|
|
15
|
+
margin: 0 0 7px 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Fields */
|
|
19
|
+
input[type=text],
|
|
20
|
+
input[type=password],
|
|
21
|
+
input[type=search],
|
|
22
|
+
input[type=email],
|
|
23
|
+
input[type=tel],
|
|
24
|
+
input[type=number],
|
|
25
|
+
textarea, select {
|
|
26
|
+
font-size: 140%;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
width: 100%;
|
|
29
|
+
padding: 4px 9px;
|
|
30
|
+
border: 1px solid #a5a5a5;
|
|
31
|
+
border-right: 1px solid #ccc;
|
|
32
|
+
border-bottom: 1px solid #ccc;
|
|
33
|
+
background: #fff asset-url("input-bg.gif", image);
|
|
34
|
+
@include border-radius(4px);
|
|
35
|
+
@include single-box-shadow(#bbb, 1px, 1px, 3px, 0px, true);
|
|
36
|
+
@include box-sizing(border-box);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
input[type=text]:focus,
|
|
40
|
+
input[type=password]:focus,
|
|
41
|
+
input[type=search]:focus,
|
|
42
|
+
input[type=email]:focus,
|
|
43
|
+
input[type=tel]:focus,
|
|
44
|
+
input[type=number]:focus,
|
|
45
|
+
textarea:focus,
|
|
46
|
+
select:focus {
|
|
47
|
+
background: lightgoldenrodyellow !important;
|
|
48
|
+
border: 1px solid #a5a5a5 !important;
|
|
49
|
+
border-right: 1px solid #ccc !important;
|
|
50
|
+
border-bottom: 1px solid #ccc !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
textarea {
|
|
54
|
+
font-weight: normal;
|
|
55
|
+
font-size: 100%;
|
|
56
|
+
padding: 5px;
|
|
57
|
+
resize: vertical;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Buttons */
|
|
61
|
+
input[type=submit],
|
|
62
|
+
input[type=button] {
|
|
63
|
+
font-size: 140%;
|
|
64
|
+
padding: 3px 9px;
|
|
65
|
+
border: 1px solid #ddd;
|
|
66
|
+
border-right: 1px solid #bbb;
|
|
67
|
+
-moz-border-radius: 4px;
|
|
68
|
+
-webkit-border-radius: 4px;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
background: #EEEEEE;
|
|
71
|
+
background: -moz-linear-gradient(top, #EEEEEE 0%, #D5D5D5 100%);
|
|
72
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#EEEEEE), color-stop(100%,#D5D5D5));
|
|
73
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#EEEEEE', endColorstr='#D5D5D5',GradientType=0 );
|
|
74
|
+
color: #333;
|
|
75
|
+
text-shadow: 0 1px 1 #fff;
|
|
76
|
+
cursor: hand;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
box-shadow: inset 0 1px 10px 1px #ddd,
|
|
79
|
+
0px 1px 0 #ddd,
|
|
80
|
+
0 3px 0px #bbb,
|
|
81
|
+
0 3px 1px 0 #000;
|
|
82
|
+
|
|
83
|
+
-webkit-box-shadow: inset 0 1px 10px 1px #ddd,
|
|
84
|
+
0px 1px 0 #ddd,
|
|
85
|
+
0 3px 0px #bbb,
|
|
86
|
+
0 3px 1px 0 #000;
|
|
87
|
+
-moz-box-shadow: inset 0 1px 10px 1px #ddd,
|
|
88
|
+
0px 1px 0 #ddd,
|
|
89
|
+
0 3px 0px #bbb,
|
|
90
|
+
0 3px 1px 0 #000;
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
margin: -2px 0 10px 0;
|
|
94
|
+
outline: none;
|
|
95
|
+
-moz-outline: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
input[type=submit]:hover,
|
|
99
|
+
input[type=submit]:focus,
|
|
100
|
+
input[type=button]:hover,
|
|
101
|
+
input[type=button]:focus {
|
|
102
|
+
border: 1px solid #50B7D1;
|
|
103
|
+
border-right: 1px solid #286DA3;
|
|
104
|
+
background: #50B7D1;
|
|
105
|
+
background: -moz-linear-gradient(top, #50B7D1 0%, #286DA3 100%);
|
|
106
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#50B7D1), color-stop(100%,#286DA3));
|
|
107
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#50B7D1', endColorstr='#286DA3',GradientType=0 );
|
|
108
|
+
color: #fff;
|
|
109
|
+
text-shadow: -1px -1px 0 #333;
|
|
110
|
+
box-shadow: inset 0 1px 10px 1px #50B7D1,
|
|
111
|
+
0px 1px 0 #367B8C,
|
|
112
|
+
0 3px 0px #286DA3,
|
|
113
|
+
0 3px 1px 0 #000;
|
|
114
|
+
-webkit-box-shadow: inset 0 1px 10px 1px #50B7D1,
|
|
115
|
+
0px 1px 0 #367B8C,
|
|
116
|
+
0 3px 0px #286DA3,
|
|
117
|
+
0 3px 1px 0 #000;
|
|
118
|
+
-moz-box-shadow: inset 0 1px 10px 1px #50B7D1,
|
|
119
|
+
0px 1px 0 #367B8C,
|
|
120
|
+
0 3px 0px #286DA3,
|
|
121
|
+
0 3px 1px 0 #000;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
input[type=submit]:active,
|
|
125
|
+
input[type=button]:active {
|
|
126
|
+
border: 1px solid #286DA3;
|
|
127
|
+
border-right: 1px solid #50B7D1;
|
|
128
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#286DA3', endColorstr='#50B7D1',GradientType=0 );
|
|
129
|
+
box-shadow: -1px -1px 0 #225C8A;
|
|
130
|
+
-webkit-box-shadow: -1px -1px 0 #225C8A;
|
|
131
|
+
-moz-box-shadow: -1px -1px 0 #225C8A;
|
|
132
|
+
margin: 0 0 8px 0;
|
|
133
|
+
}
|
|
134
|
+
}
|