sbdevcore 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/app/assets/images/28DaysLater.ttf +0 -0
  2. data/app/assets/images/ajax-loader.gif +0 -0
  3. data/app/assets/javascripts/jquery.tools.min.js +16 -108
  4. data/app/assets/javascripts/rails.validations.custom.js +5 -0
  5. data/app/assets/javascripts/sbdev-ajax.js +14 -0
  6. data/app/assets/javascripts/sbdevcore-tools.js +24 -37
  7. data/app/assets/javascripts/sbdevcore.js +8 -3
  8. data/app/assets/javascripts/tiny_mce_config.js +2 -0
  9. data/app/assets/stylesheets/_bar_nav.scss +6 -4
  10. data/app/assets/stylesheets/_buttons.scss +16 -10
  11. data/app/assets/stylesheets/_forms.scss +51 -0
  12. data/app/assets/stylesheets/_mixins.scss +40 -15
  13. data/app/assets/stylesheets/_overlay.scss +4 -7
  14. data/app/assets/stylesheets/_sbdev_core.scss +55 -19
  15. data/app/assets/stylesheets/_yui_base.scss +142 -0
  16. data/app/controllers/contacts_controller.rb +2 -36
  17. data/app/controllers/downloadables_controller.rb +6 -46
  18. data/app/controllers/galleries_controller.rb +4 -49
  19. data/app/controllers/indices_controller.rb +2 -45
  20. data/app/controllers/photos_controller.rb +4 -48
  21. data/app/controllers/sbdev_core_controller.rb +40 -0
  22. data/app/controllers/texts_controller.rb +3 -46
  23. data/app/controllers/videos_controller.rb +4 -45
  24. data/app/models/contact.rb +5 -1
  25. data/app/models/downloadable.rb +3 -1
  26. data/app/models/index.rb +4 -1
  27. data/app/models/photo.rb +3 -1
  28. data/app/models/video.rb +2 -0
  29. data/app/views/admins/mailer/confirmation_instructions.html.haml +4 -0
  30. data/app/views/admins/mailer/reset_password_instructions.html.haml +6 -0
  31. data/app/views/admins/mailer/unlock_instructions.html.haml +5 -0
  32. data/app/views/admins/passwords/edit.html.haml +8 -0
  33. data/app/views/admins/passwords/new.html.haml +6 -0
  34. data/app/views/admins/sessions/new.html.haml +8 -0
  35. data/app/views/admins/shared/_links.haml +19 -0
  36. data/app/views/application/_header.html.haml +1 -0
  37. data/app/views/application/_secondary_nav.html.haml +3 -0
  38. data/app/views/contacts/_form.html.haml +5 -0
  39. data/app/views/contacts/edit.html.haml +6 -0
  40. data/app/views/contacts/index.html.haml +21 -0
  41. data/app/views/contacts/new.html.haml +2 -0
  42. data/app/views/contacts/show.html.haml +24 -0
  43. data/app/views/downloadables/_form.html.haml +6 -0
  44. data/app/views/downloadables/_show.html.haml +7 -0
  45. data/app/views/downloadables/edit.html.haml +3 -0
  46. data/app/views/downloadables/new.html.haml +4 -0
  47. data/app/views/galleries/_form.html.haml +22 -0
  48. data/app/views/galleries/edit.html.haml +10 -0
  49. data/app/views/galleries/index.html.haml +9 -0
  50. data/app/views/galleries/new.html.haml +3 -0
  51. data/app/views/galleries/show.html.haml +9 -0
  52. data/app/views/indices/_form.html.haml +43 -0
  53. data/app/views/indices/_show.html.haml +17 -0
  54. data/app/views/indices/edit.html.haml +3 -0
  55. data/app/views/indices/index.html.haml +17 -0
  56. data/app/views/layouts/application.html.haml +16 -1
  57. data/app/views/layouts/bar_nav.html.haml +7 -14
  58. data/app/views/layouts/sbdev_core.html.haml +39 -0
  59. data/app/views/layouts/tab_nav.html.haml +9 -14
  60. data/app/views/mailer/message.haml +4 -0
  61. data/app/views/photos/_form.html.haml +10 -0
  62. data/app/views/photos/_show.html.haml +7 -0
  63. data/app/views/photos/edit.html.haml +3 -0
  64. data/app/views/photos/index.html.haml +21 -0
  65. data/app/views/photos/new.html.haml +4 -0
  66. data/app/views/photos/show.html.haml +4 -0
  67. data/app/views/sbdev_core/index.html.haml +1 -0
  68. data/app/views/sbdev_core/show.html.haml +4 -0
  69. data/app/views/sbdev_core/show.js.haml +1 -0
  70. data/app/views/shared/_asset_show.html.haml +1 -0
  71. data/app/views/shared/_devise_links.haml +15 -0
  72. data/app/views/shared/_gallery.html.haml +14 -0
  73. data/app/views/shared/_prioritizable_fields.html.haml +5 -0
  74. data/app/views/texts/_form.html.haml +3 -0
  75. data/app/views/texts/_show.html.haml +6 -0
  76. data/app/views/texts/edit.html.haml +3 -0
  77. data/app/views/texts/new.html.haml +4 -0
  78. data/app/views/texts/show.html.haml +8 -0
  79. data/app/views/videos/_form.html.haml +7 -0
  80. data/app/views/videos/_show.html.haml +12 -0
  81. data/app/views/videos/edit.html.haml +3 -0
  82. data/app/views/videos/index.html.haml +11 -0
  83. data/app/views/videos/new.html.haml +4 -0
  84. data/app/views/videos/show.html.haml +9 -0
  85. data/app/views/videos/show.js.haml +4 -0
  86. data/config/initializers/client_side_validations.rb +14 -0
  87. data/config/initializers/custom_validators.rb +15 -0
  88. data/config/initializers/load_app_config.rb +2 -0
  89. data/config/initializers/simple_form.rb +93 -0
  90. data/config/locales/en.yml +4 -1
  91. data/db/migrate/20110811000613_create_indices.rb +3 -0
  92. data/db/seeds.rb +23 -57
  93. data/lib/generators/sbdevcore/install_generator.rb +0 -2
  94. data/lib/generators/sbdevcore/templates/application.scss +1 -0
  95. data/lib/generators/sbdevcore/templates/application/_404.html.haml +2 -0
  96. data/lib/generators/sbdevcore/templates/application/_footer.html.haml +2 -1
  97. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.haml +3 -0
  98. data/lib/generators/sbdevcore/templates/application/_nav.html.haml +1 -1
  99. data/lib/generators/sbdevcore/templates/config/initializers/mailer_setup.rb +2 -2
  100. data/lib/generators/sbdevcore/templates/config/initializers/simple_form.rb +93 -0
  101. data/lib/generators/sbdevcore/templates/new_contact.html.haml +4 -0
  102. data/lib/sbdevcore.rb +25 -2
  103. data/lib/sbdevcore/engine.rb +13 -34
  104. data/lib/sbdevcore/version.rb +1 -1
  105. data/lib/tasks/sbdevcore.rake +1 -1
  106. data/public/404.html +2 -2
  107. data/sbdevcore.gemspec +7 -2
  108. metadata +296 -156
  109. data/app/assets/stylesheets/_js_errors.scss +0 -26
  110. data/app/controllers/core_controller.rb +0 -5
  111. data/app/controllers/sbdevcore/application_controller_extensions.rb +0 -13
  112. data/app/controllers/statics_controller.rb +0 -6
  113. data/app/models/asset.rb +0 -27
  114. data/app/views/admins/confirmations/new.html.erb +0 -12
  115. data/app/views/admins/mailer/confirmation_instructions.html.erb +0 -5
  116. data/app/views/admins/mailer/reset_password_instructions.html.erb +0 -8
  117. data/app/views/admins/mailer/unlock_instructions.html.erb +0 -7
  118. data/app/views/admins/passwords/edit.html.erb +0 -16
  119. data/app/views/admins/passwords/new.html.erb +0 -12
  120. data/app/views/admins/registrations/edit.html.erb +0 -25
  121. data/app/views/admins/registrations/new.html.erb +0 -18
  122. data/app/views/admins/sessions/new.html.erb +0 -17
  123. data/app/views/admins/unlocks/new.html.erb +0 -12
  124. data/app/views/contacts/_form.html.erb +0 -18
  125. data/app/views/contacts/edit.html.erb +0 -8
  126. data/app/views/contacts/index.html.erb +0 -27
  127. data/app/views/contacts/new.html.erb +0 -4
  128. data/app/views/contacts/show.html.erb +0 -32
  129. data/app/views/downloadables/_form.html.erb +0 -17
  130. data/app/views/downloadables/_show.html.erb +0 -8
  131. data/app/views/downloadables/edit.html.erb +0 -4
  132. data/app/views/downloadables/new.html.erb +0 -6
  133. data/app/views/galleries/_form.html.erb +0 -33
  134. data/app/views/galleries/edit.html.erb +0 -13
  135. data/app/views/galleries/index.html.erb +0 -16
  136. data/app/views/galleries/new.html.erb +0 -8
  137. data/app/views/galleries/show.html.erb +0 -17
  138. data/app/views/indices/_form.html.erb +0 -60
  139. data/app/views/indices/_show.html.erb +0 -22
  140. data/app/views/indices/edit.html.erb +0 -12
  141. data/app/views/indices/index.html.erb +0 -23
  142. data/app/views/indices/new.html.erb +0 -8
  143. data/app/views/indices/show.html.erb +0 -4
  144. data/app/views/indices/show.js.erb +0 -1
  145. data/app/views/photos/_form.html.erb +0 -27
  146. data/app/views/photos/_show.html.erb +0 -14
  147. data/app/views/photos/edit.html.erb +0 -4
  148. data/app/views/photos/index.html.erb +0 -27
  149. data/app/views/photos/new.html.erb +0 -6
  150. data/app/views/photos/overlay.html.erb +0 -1
  151. data/app/views/photos/show.html.erb +0 -5
  152. data/app/views/shared/_asset_show.html.erb +0 -1
  153. data/app/views/shared/_gallery.html.erb +0 -21
  154. data/app/views/shared/_prioritizable_fields.html.erb +0 -10
  155. data/app/views/shared/course_type_index.html.erb +0 -16
  156. data/app/views/texts/_form.html.erb +0 -9
  157. data/app/views/texts/_new.html.erb +0 -6
  158. data/app/views/texts/_show.html.erb +0 -9
  159. data/app/views/texts/edit.html.erb +0 -4
  160. data/app/views/texts/new.html.erb +0 -6
  161. data/app/views/texts/show.html.erb +0 -9
  162. data/app/views/videos/_form.html.erb +0 -17
  163. data/app/views/videos/_show.html.erb +0 -16
  164. data/app/views/videos/edit.html.erb +0 -4
  165. data/app/views/videos/index.html.erb +0 -17
  166. data/app/views/videos/new.html.erb +0 -6
  167. data/app/views/videos/show.html.erb +0 -12
  168. data/lib/generators/sbdevcore/templates/application/_404.html.erb +0 -2
  169. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.erb +0 -7
  170. data/lib/generators/sbdevcore/templates/config/tiny_mce.yml +0 -46
  171. data/lib/generators/sbdevcore/templates/new_contact.html.erb +0 -4
  172. data/vendor/assets/stylesheets/.gitkeep +0 -0
  173. data/vendor/plugins/.gitkeep +0 -0
@@ -0,0 +1,7 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ %div{:id => f.object.id.to_s}
3
+ = f.input :name
4
+ = f.input :description
5
+ = f.hidden_field :remote_type, {:value => "Youtube"}
6
+ = f.input :remote_id, :label => "Youtube ID"
7
+ = render "shared/prioritizable_fields", :locals => {:f => f}
@@ -0,0 +1,12 @@
1
+ .center.asset{:id => "video#{video.id}"}
2
+ = "<h3>#{video.name}</h3>" unless video.name.blank?
3
+ %object{:align => "c", :height => "390", :width => "520"}
4
+ %param{:name => "movie", :value => video.url}/
5
+ %param{:name => "allowFullScreen", :value => "true"}/
6
+ %param{:name => "allowscriptaccess", :value => "always"}/
7
+ %embed{:allowfullscreen => "true", :allowscriptaccess => "always", :height => "390", :src => video.url, :type => "application/x-shockwave-flash", :width => "520"}
8
+ = "<p>By: #{video.description}</p>" unless video.description.blank?
9
+ - if admin_signed_in?
10
+ %p.asset-admin
11
+ = link_to "Remove Video", video, :confirm => 'Are you sure?', :method => :delete
12
+ = link_to "Edit Video", edit_video_path(video), :rel=>"#overlay", :class => "overlayed"
@@ -0,0 +1,3 @@
1
+ = simple_form_for @photo, :validate => true, :html => { :multipart => true} do |f|
2
+ = render :partial => 'form', :locals => {:f => f}
3
+ = f.submit
@@ -0,0 +1,11 @@
1
+ - title "Videos"
2
+ %table
3
+ %tr
4
+ %th Name
5
+ - for video in @videos
6
+ %tr
7
+ %td= h video.name
8
+ %td= link_to "Show", video
9
+ %td= link_to "Edit", edit_video_path(video)
10
+ %td= link_to "Destroy", video, :confirm => 'Are you sure?', :method => :delete
11
+ %p= link_to "New Video", new_video_path
@@ -0,0 +1,4 @@
1
+ = simple_form_for @index, :validate => true, :html => { :multipart => true} do |f|
2
+ = f.simple_fields_for :videos, @video do |video_form|
3
+ = render "videos/form", :locals => {:f => video_form}
4
+ = f.button :submit
@@ -0,0 +1,9 @@
1
+ - title "Video"
2
+ %p
3
+ %strong Name:
4
+ = h @video.name
5
+ %p
6
+ = link_to "Edit", edit_video_path(@video)
7
+ |
8
+ \#{link_to "Destroy", @video, :confirm => 'Are you sure?', :method => :delete} |
9
+ \#{link_to "View All", videos_path}
@@ -0,0 +1,4 @@
1
+ $("#gallery_wrap_inner").fadeOut('fast', function() {
2
+ $("#gallery_wrap_inner").html("#{escape_javascript(render :partial => 'show', :locals => {:video => @video})}");
3
+ });
4
+ $("#gallery_wrap_inner").fadeIn('slow');
@@ -0,0 +1,14 @@
1
+ # ClientSideValidations Initializer
2
+
3
+ require 'client_side_validations/simple_form' if defined?(::SimpleForm)
4
+ require 'client_side_validations/formtastic' if defined?(::Formtastic)
5
+
6
+ # Uncomment the following block if you want each input field to have the validation messages attached.
7
+ # ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
8
+ # unless html_tag =~ /^<label/
9
+ # %{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
10
+ # else
11
+ # %{<div class="field_with_errors">#{html_tag}</div>}.html_safe
12
+ # end
13
+ # end
14
+
@@ -0,0 +1,15 @@
1
+ # config/initializers/email_validator.rb
2
+ class EmailValidator < ActiveModel::EachValidator
3
+ def validate_each(record, attr_name, value)
4
+ unless value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
5
+ record.errors.add(attr_name, :email, options.merge(:value => value))
6
+ end
7
+ end
8
+ end
9
+
10
+ # This allows us to assign the validator in the model
11
+ module ActiveModel::Validations::HelperMethods
12
+ def validates_email(*attr_names)
13
+ validates_with EmailValidator, _merge_attributes(attr_names)
14
+ end
15
+ end
@@ -0,0 +1,2 @@
1
+ raw_config = File.read(Rails.root.join("config", "app_config.yml"))
2
+ APP_CONFIG = (YAML.load(raw_config)[Rails.env].merge YAML.load(raw_config)['shared']).symbolize_keys
@@ -0,0 +1,93 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Components used by the form builder to generate a complete input. You can remove
4
+ # any of them, change the order, or even add your own components to the stack.
5
+ config.components = [ :placeholder, :label_input, :hint, :error ]
6
+
7
+ # Default tag used on hints.
8
+ # config.hint_tag = :span
9
+
10
+ # CSS class to add to all hint tags.
11
+ # config.hint_class = :hint
12
+
13
+ # CSS class used on errors.
14
+ # config.error_class = :error
15
+
16
+ # Default tag used on errors.
17
+ # config.error_tag = :span
18
+
19
+ # Method used to tidy up errors.
20
+ # config.error_method = :first
21
+
22
+ # Default tag used for error notification helper.
23
+ # config.error_notification_tag = :p
24
+
25
+ # CSS class to add for error notification helper.
26
+ # config.error_notification_class = :error_notification
27
+
28
+ # ID to add for error notification helper.
29
+ # config.error_notification_id = nil
30
+
31
+ # You can wrap all inputs in a pre-defined tag.
32
+ # config.wrapper_tag = :div
33
+
34
+ # CSS class to add to all wrapper tags.
35
+ # config.wrapper_class = :input
36
+
37
+ # CSS class to add to the wrapper if the field has errors.
38
+ # config.wrapper_error_class = :field_with_errors
39
+
40
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
41
+ # config.collection_wrapper_tag = nil
42
+
43
+ # You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span.
44
+ # config.item_wrapper_tag = :span
45
+
46
+ # Series of attempts to detect a default label method for collection.
47
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
48
+
49
+ # Series of attempts to detect a default value method for collection.
50
+ # config.collection_value_methods = [ :id, :to_s ]
51
+
52
+ # How the label text should be generated altogether with the required text.
53
+ config.label_text = lambda { |label, required| "#{label} #{required}" }
54
+
55
+ # You can define the class to use on all labels. Default is nil.
56
+ # config.label_class = nil
57
+
58
+ # You can define the class to use on all forms. Default is simple_form.
59
+ config.form_class = "simple_form"
60
+
61
+ # Whether attributes are required by default (or not). Default is true.
62
+ config.required_by_default = false
63
+
64
+ # Tell browsers whether to use default HTML5 validations (novalidate option).
65
+ # Default is enabled.
66
+ config.browser_validations = false
67
+
68
+ # Determines whether HTML5 types (:email, :url, :search, :tel) and attributes
69
+ # (e.g. required) are used or not. True by default.
70
+ # Having this on in non-HTML5 compliant sites can cause odd behavior in
71
+ # HTML5-aware browsers such as Chrome.
72
+ # config.html5 = true
73
+
74
+ # Custom mappings for input types. This should be a hash containing a regexp
75
+ # to match as key, and the input type that will be used when the field name
76
+ # matches the regexp as value.
77
+ # config.input_mappings = { /count/ => :integer }
78
+
79
+ # Collection of methods to detect if a file type was given.
80
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
81
+
82
+ # Default priority for time_zone inputs.
83
+ # config.time_zone_priority = nil
84
+
85
+ # Default priority for country inputs.
86
+ # config.country_priority = nil
87
+
88
+ # Default size for text inputs.
89
+ config.default_input_size = 50
90
+
91
+ # When false, do not use translations for labels, hints or placeholders.
92
+ config.translate = true
93
+ end
@@ -2,4 +2,7 @@
2
2
  # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
3
 
4
4
  en:
5
- hello: "Hello world"
5
+ errors:
6
+ messages:
7
+ email: "Please provide a properly formatted email."
8
+ presence: "Please provide a properly formatted email."
@@ -2,6 +2,8 @@ class CreateIndices < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :indices do |t|
4
4
  t.string :name
5
+ t.string :title
6
+ t.string :slug
5
7
  t.string :page_title
6
8
  t.text :keywords
7
9
  t.text :page_description
@@ -10,5 +12,6 @@ class CreateIndices < ActiveRecord::Migration
10
12
 
11
13
  t.timestamps
12
14
  end
15
+ add_index :indices, :slug, :unique => true
13
16
  end
14
17
  end
data/db/seeds.rb CHANGED
@@ -29,77 +29,43 @@ LOREM_SANS_HTML = <<-END_LOREM
29
29
 
30
30
  id = 0
31
31
  #
32
+ Admin.all.each(&:destroy)
32
33
  Admin.create({:username => 'admin', :password => 'secret', :password_confirmation => 'secret', :email => APP_CONFIG[:contact_email].first})
33
34
  #
34
- statics.each do |index|
35
+ Index.all.each(&:destroy)
36
+ [statics + dynamics].flatten.each do |index|
35
37
  attr = {
36
38
  :name => index,
37
- :title => index.capitalize,
39
+ :title => index,
38
40
  :page_title => APP_CONFIG[:app_name] + " - " + index.capitalize,
39
41
  :page_description => APP_CONFIG[:app_name] + " - " + index.capitalize,
40
42
  :keywords => index,
41
43
  :texts_attributes => {
42
44
  (id += 1).to_s =>{
43
- :content => "<h2>#{index.titleize}</h2> #{LOREM_LONG}",
45
+ :content => "#{LOREM_LONG}",
44
46
  :priority => "1"
45
- # :photos_attributes => {
46
- # (id += 1).to_s => {
47
- # :asset => File.open("#{RAILS_ROOT}/db/seeds/sunset-1.jpg", 'rb'),
48
- # :klass => "right",
49
- # :title => "sunset",
50
- # :priority => "1",
51
- # :description => LOREM_SANS_HTML
52
- # }
53
- # }
54
47
  }
55
- # (id += 1).to_s =>{
56
- # :priority => "2",
57
- # "videos_attributes" => {
58
- # (id += 1).to_s =>{
59
- # :remote_type => "Youtube",
60
- # :remote_id => "lbROjOciOZA",
61
- # :priority => 1,
62
- # :title => "Roatan Diving"
63
- # }
64
- # }
65
- # }
66
48
  }
67
49
  }
68
50
  Index.create(attr)
69
51
  end
70
- dynamics.each do |index|
71
- attr = {
72
- :name => index,
73
- :title => index.capitalize,
74
- :page_title => APP_CONFIG[:app_name] + " - " + index.capitalize,
75
- :page_description => APP_CONFIG[:app_name] + " - " + index.capitalize,
76
- :keywords => index,
77
- :texts_attributes => {
78
- (id += 1).to_s =>{
79
- :content => "<h2>#{index.titleize}</h2> #{LOREM_LONG}",
80
- :priority => "1"
81
- # :photos_attributes => {
82
- # (id += 1).to_s => {
83
- # :asset => File.open("#{RAILS_ROOT}/db/seeds/sunset-1.jpg", 'rb'),
84
- # :klass => "right",
85
- # :title => "sunset",
86
- # :priority => "1",
87
- # :description => LOREM_SANS_HTML
88
- # }
89
- # }
52
+
53
+ statics.each do |index|
54
+ 3.times do |i|
55
+ sub_index = index + "_#{i.to_s}"
56
+ attr = {
57
+ :name => sub_index,
58
+ :title => sub_index,
59
+ :page_title => APP_CONFIG[:app_name] + " - " + sub_index.capitalize,
60
+ :page_description => APP_CONFIG[:app_name] + " - " + sub_index.capitalize,
61
+ :keywords => sub_index,
62
+ :texts_attributes => {
63
+ (id += 1).to_s =>{
64
+ :content => "#{LOREM_LONG}",
65
+ :priority => "1"
66
+ }
90
67
  }
91
- # (id += 1).to_s =>{
92
- # :priority => "2",
93
- # "videos_attributes" => {
94
- # (id += 1).to_s =>{
95
- # :remote_type => "Youtube",
96
- # :remote_id => "lbROjOciOZA",
97
- # :priority => 1,
98
- # :title => "Roatan Diving"
99
- # }
100
- # }
101
- # }
102
68
  }
103
- }
104
- Index.create(attr)
105
- end
69
+ Index.find(index).indices.create!(attr)
70
+ end
71
+ end
@@ -38,8 +38,6 @@ Index.find_all_by_name(APP_CONFIG[:static_pages]).each do |page|
38
38
  copy_file "application.scss", "app/assets/stylesheets/application.scss", :force => true
39
39
  copy_file "sass.scss", "app/assets/stylesheets/sass.scss", :force => true
40
40
  directory "application", "app/views/application"
41
-
42
- copy_file "new_contact.html.erb", "app/views/contacts/new.html.erb", :force => true
43
41
  inject_into_file "app/assets/javascripts/application.js", "//= require tinymce.jquery\n//= require sbdevcore\n", :before => "//= require_tree ."
44
42
 
45
43
  dev_mailer = <<-OPTS
@@ -2,4 +2,5 @@
2
2
  // and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
3
3
  // the top of the compiled file, but it's generally better to create a new file per style scope.
4
4
  //= require_self
5
+ //= require formalize
5
6
  @import "sass.scss";
@@ -0,0 +1,2 @@
1
+ %p To Err is Human, To Arr is Pirate.
2
+ %p We're sorry the page you were looking for cannot be found.
@@ -3,4 +3,5 @@
3
3
  =link_to "Admin Sign out", destroy_admin_session_path, :method => :delete
4
4
  -else
5
5
  =link_to "Admin Sign in", new_admin_session_path
6
- | Site By: Adam Olsen =mail_to "aosalias@gmail.com", "aosalias@gmail.com"
6
+ | Site By: Adam Olsen
7
+ =mail_to "aosalias@gmail.com", "aosalias@gmail.com"
@@ -0,0 +1,3 @@
1
+ - unless indices.empty?
2
+ .inline_nav.corner-all.box-shadow
3
+ %ul
@@ -1,4 +1,4 @@
1
1
  #nav
2
2
  =link_to 'Home', home_path, :class => 'button'
3
3
  =link_to 'About', about_path, :class => 'button'
4
- =link_to 'Contact', new_contact_path, :class => 'overlayed button', :rel=>"#overlay"
4
+ =link_to 'Contact', new_contact_path, :class => 'button', :rel=>"#overlay"
@@ -2,8 +2,8 @@ ActionMailer::Base.smtp_settings = {
2
2
  :address => "smtp.gmail.com",
3
3
  :port => 587,
4
4
  :domain => "sbdev.heroku.com",
5
- :user_name => "aosalias",
6
- :password => "nunnery85",
5
+ :user_name => "sbdevmailer",
6
+ :password => "sbd3vftw",
7
7
  :authentication => "plain",
8
8
  :enable_starttls_auto => true
9
9
  }
@@ -0,0 +1,93 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Components used by the form builder to generate a complete input. You can remove
4
+ # any of them, change the order, or even add your own components to the stack.
5
+ config.components = [ :placeholder, :label_input, :hint, :error ]
6
+
7
+ # Default tag used on hints.
8
+ # config.hint_tag = :span
9
+
10
+ # CSS class to add to all hint tags.
11
+ # config.hint_class = :hint
12
+
13
+ # CSS class used on errors.
14
+ # config.error_class = :error
15
+
16
+ # Default tag used on errors.
17
+ # config.error_tag = :span
18
+
19
+ # Method used to tidy up errors.
20
+ # config.error_method = :first
21
+
22
+ # Default tag used for error notification helper.
23
+ # config.error_notification_tag = :p
24
+
25
+ # CSS class to add for error notification helper.
26
+ # config.error_notification_class = :error_notification
27
+
28
+ # ID to add for error notification helper.
29
+ # config.error_notification_id = nil
30
+
31
+ # You can wrap all inputs in a pre-defined tag.
32
+ # config.wrapper_tag = :div
33
+
34
+ # CSS class to add to all wrapper tags.
35
+ # config.wrapper_class = :input
36
+
37
+ # CSS class to add to the wrapper if the field has errors.
38
+ # config.wrapper_error_class = :field_with_errors
39
+
40
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
41
+ # config.collection_wrapper_tag = nil
42
+
43
+ # You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span.
44
+ # config.item_wrapper_tag = :span
45
+
46
+ # Series of attempts to detect a default label method for collection.
47
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
48
+
49
+ # Series of attempts to detect a default value method for collection.
50
+ # config.collection_value_methods = [ :id, :to_s ]
51
+
52
+ # How the label text should be generated altogether with the required text.
53
+ config.label_text = lambda { |label, required| "#{label} #{required}" }
54
+
55
+ # You can define the class to use on all labels. Default is nil.
56
+ # config.label_class = nil
57
+
58
+ # You can define the class to use on all forms. Default is simple_form.
59
+ config.form_class = "simple_form validate"
60
+
61
+ # Whether attributes are required by default (or not). Default is true.
62
+ config.required_by_default = true
63
+
64
+ # Tell browsers whether to use default HTML5 validations (novalidate option).
65
+ # Default is enabled.
66
+ config.browser_validations = true
67
+
68
+ # Determines whether HTML5 types (:email, :url, :search, :tel) and attributes
69
+ # (e.g. required) are used or not. True by default.
70
+ # Having this on in non-HTML5 compliant sites can cause odd behavior in
71
+ # HTML5-aware browsers such as Chrome.
72
+ # config.html5 = true
73
+
74
+ # Custom mappings for input types. This should be a hash containing a regexp
75
+ # to match as key, and the input type that will be used when the field name
76
+ # matches the regexp as value.
77
+ # config.input_mappings = { /count/ => :integer }
78
+
79
+ # Collection of methods to detect if a file type was given.
80
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
81
+
82
+ # Default priority for time_zone inputs.
83
+ # config.time_zone_priority = nil
84
+
85
+ # Default priority for country inputs.
86
+ # config.country_priority = nil
87
+
88
+ # Default size for text inputs.
89
+ config.default_input_size = 50
90
+
91
+ # When false, do not use translations for labels, hints or placeholders.
92
+ config.translate = true
93
+ end