kublog 0.0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/.gitignore +9 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +177 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.rdoc +102 -0
  6. data/Rakefile +39 -0
  7. data/app/assets/images/kublog/.gitkeep +0 -0
  8. data/app/assets/images/kublog/missing_image.png +0 -0
  9. data/app/assets/javascripts/kublog/application.js +13 -0
  10. data/app/assets/javascripts/kublog/categories.js.coffee +48 -0
  11. data/app/assets/javascripts/kublog/comments.js.coffee +30 -0
  12. data/app/assets/javascripts/kublog/email.js.coffee +32 -0
  13. data/app/assets/javascripts/kublog/images.js.coffee +77 -0
  14. data/app/assets/javascripts/kublog/posts.js.coffee +44 -0
  15. data/app/assets/javascripts/kublog/shared.js.coffee.erb +19 -0
  16. data/app/assets/javascripts/kublog/wysiwyg.controls.js.coffee +68 -0
  17. data/app/assets/plugins/kublog/ajaxyupload/images/ajax-loader.gif +0 -0
  18. data/app/assets/plugins/kublog/ajaxyupload/javascripts/jquery.ajaxyupload.js +126 -0
  19. data/app/assets/plugins/kublog/fancybox/images/blank.gif +0 -0
  20. data/app/assets/plugins/kublog/fancybox/images/fancy_close.png +0 -0
  21. data/app/assets/plugins/kublog/fancybox/images/fancy_loading.png +0 -0
  22. data/app/assets/plugins/kublog/fancybox/images/fancy_nav_left.png +0 -0
  23. data/app/assets/plugins/kublog/fancybox/images/fancy_nav_right.png +0 -0
  24. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_e.png +0 -0
  25. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_n.png +0 -0
  26. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_ne.png +0 -0
  27. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_nw.png +0 -0
  28. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_s.png +0 -0
  29. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_se.png +0 -0
  30. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_sw.png +0 -0
  31. data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_w.png +0 -0
  32. data/app/assets/plugins/kublog/fancybox/images/fancy_title_left.png +0 -0
  33. data/app/assets/plugins/kublog/fancybox/images/fancy_title_main.png +0 -0
  34. data/app/assets/plugins/kublog/fancybox/images/fancy_title_over.png +0 -0
  35. data/app/assets/plugins/kublog/fancybox/images/fancy_title_right.png +0 -0
  36. data/app/assets/plugins/kublog/fancybox/images/fancybox-x.png +0 -0
  37. data/app/assets/plugins/kublog/fancybox/images/fancybox-y.png +0 -0
  38. data/app/assets/plugins/kublog/fancybox/images/fancybox.png +0 -0
  39. data/app/assets/plugins/kublog/fancybox/javascripts/fancybox-1.3.4.js +46 -0
  40. data/app/assets/plugins/kublog/fancybox/stylesheets/fancybox-1.3.4.css +359 -0
  41. data/app/assets/plugins/kublog/livequery/javascripts/jquery.livequery.js +250 -0
  42. data/app/assets/plugins/kublog/wysiwyg/images/ajax-loader.gif +0 -0
  43. data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.bg.png +0 -0
  44. data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.gif +0 -0
  45. data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.jpg +0 -0
  46. data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.no-alpha.gif +0 -0
  47. data/app/assets/plugins/kublog/wysiwyg/javascripts/jquery.wysiwyg.js +2377 -0
  48. data/app/assets/plugins/kublog/wysiwyg/javascripts/wysiwyg.image.js +284 -0
  49. data/app/assets/plugins/kublog/wysiwyg/javascripts/wysiwyg.link.js +249 -0
  50. data/app/assets/plugins/kublog/wysiwyg/stylesheets/jquery.wysiwyg.css +94 -0
  51. data/app/assets/stylesheets/kublog/application.css +9 -0
  52. data/app/assets/stylesheets/kublog/categories.css +4 -0
  53. data/app/assets/stylesheets/kublog/comments.css +4 -0
  54. data/app/assets/stylesheets/kublog/email.css +7 -0
  55. data/app/assets/stylesheets/kublog/images.css +41 -0
  56. data/app/assets/stylesheets/kublog/posts.css +39 -0
  57. data/app/controllers/kublog/application_controller.rb +12 -0
  58. data/app/controllers/kublog/categories_controller.rb +47 -0
  59. data/app/controllers/kublog/comments_controller.rb +37 -0
  60. data/app/controllers/kublog/images_controller.rb +44 -0
  61. data/app/controllers/kublog/posts_controller.rb +66 -0
  62. data/app/helpers/kublog/application_helper.rb +4 -0
  63. data/app/helpers/kublog/posts_helper.rb +38 -0
  64. data/app/mailers/kublog/post_mailer.rb +11 -0
  65. data/app/models/kublog/category.rb +26 -0
  66. data/app/models/kublog/comment.rb +46 -0
  67. data/app/models/kublog/image.rb +23 -0
  68. data/app/models/kublog/post.rb +51 -0
  69. data/app/presenters/kublog/post_presenter.rb +23 -0
  70. data/app/presenters/kublog/posts_presenter.rb +29 -0
  71. data/app/uploaders/kublog/file_uploader.rb +56 -0
  72. data/app/views/kublog/post_mailer/new_post.html.erb +1 -0
  73. data/app/views/kublog/post_mailer/new_post.liquid.html.erb +7 -0
  74. data/app/views/kublog/posts/_email_form.html.erb +13 -0
  75. data/app/views/kublog/posts/_form.html.erb +71 -0
  76. data/app/views/kublog/posts/_image_form.html.erb +26 -0
  77. data/app/views/kublog/posts/edit.html.erb +3 -0
  78. data/app/views/kublog/posts/index.atom.builder +15 -0
  79. data/app/views/kublog/posts/index.html.erb +36 -0
  80. data/app/views/kublog/posts/new.html.erb +3 -0
  81. data/app/views/kublog/posts/show.html.erb +46 -0
  82. data/app/views/layouts/kublog/application.html.erb +14 -0
  83. data/config/locales/kublog/en.yml +54 -0
  84. data/config/routes.rb +13 -0
  85. data/db/migrate/20110816211552_create_kublog_posts.rb +27 -0
  86. data/db/migrate/20110817215828_create_kublog_images.rb +11 -0
  87. data/db/migrate/20110818181434_create_kublog_categories.rb +11 -0
  88. data/db/migrate/20110822194341_create_kublog_comments.rb +14 -0
  89. data/kublog.gemspec +39 -0
  90. data/lib/kublog.rb +92 -0
  91. data/lib/kublog/author.rb +13 -0
  92. data/lib/kublog/engine.rb +5 -0
  93. data/lib/kublog/notifiable.rb +26 -0
  94. data/lib/kublog/notification/email.rb +86 -0
  95. data/lib/kublog/notification/email_job.rb +14 -0
  96. data/lib/kublog/notification/fb_post.rb +43 -0
  97. data/lib/kublog/notification/fb_post_job.rb +16 -0
  98. data/lib/kublog/notification/tweet.rb +68 -0
  99. data/lib/kublog/notification/tweet_job.rb +16 -0
  100. data/lib/kublog/user_integration/common.rb +31 -0
  101. data/lib/kublog/user_integration/devise.rb +23 -0
  102. data/lib/kublog/version.rb +3 -0
  103. data/lib/kublog/xhr_upload/file_helper.rb +36 -0
  104. data/lib/tasks/kublog_tasks.rake +4 -0
  105. data/script/rails +6 -0
  106. data/test/dummy/Rakefile +7 -0
  107. data/test/dummy/app/assets/javascripts/application.js +9 -0
  108. data/test/dummy/app/assets/javascripts/sessions.js +2 -0
  109. data/test/dummy/app/assets/javascripts/users.js +2 -0
  110. data/test/dummy/app/assets/stylesheets/application.css +157 -0
  111. data/test/dummy/app/assets/stylesheets/sessions.css +4 -0
  112. data/test/dummy/app/assets/stylesheets/users.css +4 -0
  113. data/test/dummy/app/controllers/application_controller.rb +19 -0
  114. data/test/dummy/app/controllers/sessions_controller.rb +22 -0
  115. data/test/dummy/app/controllers/users_controller.rb +17 -0
  116. data/test/dummy/app/helpers/application_helper.rb +2 -0
  117. data/test/dummy/app/helpers/error_messages_helper.rb +23 -0
  118. data/test/dummy/app/helpers/layout_helper.rb +22 -0
  119. data/test/dummy/app/helpers/sessions_helper.rb +2 -0
  120. data/test/dummy/app/helpers/users_helper.rb +2 -0
  121. data/test/dummy/app/mailers/.gitkeep +0 -0
  122. data/test/dummy/app/models/.gitkeep +0 -0
  123. data/test/dummy/app/models/ability.rb +2 -0
  124. data/test/dummy/app/models/user.rb +25 -0
  125. data/test/dummy/app/views/layouts/_account.html.erb +8 -0
  126. data/test/dummy/app/views/layouts/application.html.erb +29 -0
  127. data/test/dummy/app/views/layouts/kublog/application.html.erb +31 -0
  128. data/test/dummy/app/views/sessions/new.html.erb +15 -0
  129. data/test/dummy/app/views/users/new.html.erb +28 -0
  130. data/test/dummy/config.ru +4 -0
  131. data/test/dummy/config/application.rb +42 -0
  132. data/test/dummy/config/boot.rb +10 -0
  133. data/test/dummy/config/database.yml +25 -0
  134. data/test/dummy/config/environment.rb +5 -0
  135. data/test/dummy/config/environments/development.rb +38 -0
  136. data/test/dummy/config/environments/production.rb +51 -0
  137. data/test/dummy/config/environments/test.rb +39 -0
  138. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  139. data/test/dummy/config/initializers/inflections.rb +10 -0
  140. data/test/dummy/config/initializers/mime_types.rb +5 -0
  141. data/test/dummy/config/initializers/secret_token.rb +7 -0
  142. data/test/dummy/config/initializers/session_store.rb +8 -0
  143. data/test/dummy/config/initializers/wrap_parameters.rb +12 -0
  144. data/test/dummy/config/locales/en.yml +54 -0
  145. data/test/dummy/config/routes.rb +13 -0
  146. data/test/dummy/db/migrate/20110816225222_create_users.rb +11 -0
  147. data/test/dummy/db/migrate/20110819135547_create_delayed_jobs.rb +21 -0
  148. data/test/dummy/db/schema.rb +96 -0
  149. data/test/dummy/lib/assets/.gitkeep +0 -0
  150. data/test/dummy/log/.gitkeep +0 -0
  151. data/test/dummy/public/404.html +26 -0
  152. data/test/dummy/public/422.html +26 -0
  153. data/test/dummy/public/500.html +26 -0
  154. data/test/dummy/public/favicon.ico +0 -0
  155. data/test/dummy/script/delayed_job +5 -0
  156. data/test/dummy/script/rails +6 -0
  157. data/test/dummy/test/fixtures/users.yml +9 -0
  158. data/test/dummy/test/functional/sessions_controller_test.rb +7 -0
  159. data/test/dummy/test/functional/users_controller_test.rb +7 -0
  160. data/test/dummy/test/unit/helpers/sessions_helper_test.rb +4 -0
  161. data/test/dummy/test/unit/helpers/users_helper_test.rb +4 -0
  162. data/test/dummy/test/unit/user_test.rb +7 -0
  163. data/test/factories.rb +9 -0
  164. data/test/fixtures/kublog/categories.yml +7 -0
  165. data/test/fixtures/kublog/comments.yml +7 -0
  166. data/test/fixtures/kublog/images.yml +9 -0
  167. data/test/fixtures/kublog/posts.yml +9 -0
  168. data/test/functional/kublog/categories_controller_test.rb +9 -0
  169. data/test/functional/kublog/comments_controller_test.rb +9 -0
  170. data/test/functional/kublog/images_controller_test.rb +9 -0
  171. data/test/functional/kublog/post_mailer_test.rb +9 -0
  172. data/test/functional/kublog/posts_controller_test.rb +9 -0
  173. data/test/integration/navigation_test.rb +10 -0
  174. data/test/kublog_test.rb +7 -0
  175. data/test/test_helper.rb +12 -0
  176. data/test/unit/helpers/kublog/categories_helper_test.rb +6 -0
  177. data/test/unit/helpers/kublog/comments_helper_test.rb +6 -0
  178. data/test/unit/helpers/kublog/images_helper_test.rb +6 -0
  179. data/test/unit/helpers/kublog/posts_helper_test.rb +6 -0
  180. data/test/unit/kublog/category_test.rb +9 -0
  181. data/test/unit/kublog/comment_test.rb +9 -0
  182. data/test/unit/kublog/image_test.rb +9 -0
  183. data/test/unit/kublog/post_test.rb +19 -0
  184. metadata +439 -0
@@ -0,0 +1,14 @@
1
+ # Class configured to Notify via DelayedJob
2
+ module Kublog
3
+ module Notification
4
+ class EmailJob
5
+ def initialize(post, user)
6
+ @post, @user = post, user
7
+ end
8
+
9
+ def perform
10
+ PostMailer.new_post(@post, @user).deliver
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,43 @@
1
+ module Kublog
2
+ module Notification
3
+ module FbPost
4
+
5
+ def self.included(base)
6
+ base.send :include, InstanceMethods
7
+
8
+ base.send :include, case Kublog.notification_processing.try(:to_sym)
9
+ when :delayed_job then DelayedJob
10
+ else Immediate
11
+ end
12
+
13
+ base.send :after_create, :notify_facebook
14
+ base.send :validates_presence_of, :facebook_text, :if => :facebook_notify
15
+ end
16
+
17
+ module InstanceMethods
18
+
19
+ protected
20
+
21
+ def notify_facebook
22
+ if self.facebook_notify
23
+ wall_post_deliver(:link => self.url, :message => self.facebook_text)
24
+ end
25
+ end
26
+
27
+ end
28
+
29
+ module DelayedJob
30
+ def wall_post_deliver(elements={})
31
+ Delayed::Job.enqueue(FbPostJob.new(elements))
32
+ end
33
+ end
34
+
35
+ module Immediate
36
+ def wall_post_deliver(elements={})
37
+ Kublog.facebook_client.link!(elements)
38
+ end
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,16 @@
1
+ # Class configured to Notify via DelayedJob
2
+ module Kublog
3
+ module Notification
4
+ class FbPostJob
5
+
6
+ def initialize(elements={})
7
+ @elements = elements
8
+ end
9
+
10
+ def perform
11
+ Kublog.facebook_client.link!(@elements)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,68 @@
1
+ # Includes functionality to send to twitter on after_create callback
2
+
3
+ module Kublog
4
+ module Notification
5
+ module Tweet
6
+
7
+ def self.included(base)
8
+ base.send :include, InstanceMethods
9
+ base.send :extend, ClassMethods
10
+
11
+ base.send :include, case Kublog.notification_processing.try(:to_sym)
12
+ when :delayed_job then DelayedJob
13
+ else Immediate
14
+ end
15
+
16
+ base.send :after_create, :notify_tweet
17
+ base.send :validates_presence_of, :tweet_text, :if => :twitter_notify
18
+ end
19
+
20
+ module InstanceMethods
21
+
22
+ protected
23
+
24
+ def notify_tweet
25
+ if self.twitter_notify
26
+ tweet_deliver([self.tweet_text, self.url].join(' '))
27
+ end
28
+ end
29
+
30
+ end
31
+ end
32
+
33
+ module ClassMethods
34
+
35
+ # TODO Find out more about Twitter::NotFound()
36
+ # Configure whether or not to send errors
37
+ def safe_twitter_update(update, post)
38
+ begin
39
+ return Kublog.twitter_client.update(update)
40
+ rescue Twitter::NotFound
41
+ latest_tweet = Kublog.twitter_client.user_timeline.first
42
+ if latest_tweet.text.gsub(/ http:\/\/[^ ]\Z/, '') == post.tweet_text
43
+ return latest_tweet
44
+ else
45
+ return {:id => nil, :text => post.tweet_text}
46
+ end
47
+ end
48
+ end
49
+
50
+ end
51
+
52
+ # Queues Process on DJ
53
+ module DelayedJob
54
+ def tweet_deliver(tweet)
55
+ Delayed::Job.enqueue(TweetJob.new(tweet, self))
56
+ end
57
+ end
58
+
59
+ # Delivers Immediately
60
+ module Immediate
61
+ def tweet_deliver(tweet)
62
+ response = safe_twitter_update(tweet, self)
63
+ self.update_attributes :tweet_id => response.id, :tweet_text => response.text
64
+ end
65
+ end
66
+
67
+ end
68
+ end
@@ -0,0 +1,16 @@
1
+ # Class configured to Notify via DelayedJob
2
+ module Kublog
3
+ module Notification
4
+ class TweetJob
5
+
6
+ def initialize(tweet, post)
7
+ @tweet, @post = tweet, post
8
+ end
9
+
10
+ def perform
11
+ Post.safe_twitter_update(@tweet, @post)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,31 @@
1
+ module Kublog
2
+ module UserIntegration
3
+ module Common
4
+
5
+ def self.included(base)
6
+ base.send :include, InstanceMethods
7
+ base.send :helper_method, :current_user, :is_admin?, :signed_in?
8
+ end
9
+
10
+ module InstanceMethods
11
+ # Uses session[:user_id] to get the user session
12
+ # should be able to change user for x name of model
13
+ def current_user
14
+ @current_user ||= User.find_by_id(session[:user_id])
15
+ end
16
+
17
+ # Tries admin? method for user to filter out publishing actions
18
+ def is_admin?
19
+ current_user && current_user.try(:admin?)
20
+ end
21
+
22
+ ## Sign in helper method
23
+ def signed_in?
24
+ !!current_user
25
+ end
26
+
27
+ end
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,23 @@
1
+ module Kublog
2
+ module UserIntegration
3
+ module Devise
4
+
5
+ def self.included(base)
6
+ base.send :include, InstanceMethods
7
+ base.send :helper_method,:is_admin?
8
+ end
9
+
10
+ module InstanceMethods
11
+
12
+ # Uses the already defined current_user method by Devise
13
+ # get the admin? value to filter out publishing actions
14
+
15
+ def is_admin?
16
+ current_user && current_user.try(:admin?)
17
+ end
18
+
19
+ end
20
+
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module Kublog
2
+ VERSION = "0.0.1.1"
3
+ end
@@ -0,0 +1,36 @@
1
+ module Kublog
2
+ module XhrUpload
3
+ module FileHelper
4
+
5
+ protected
6
+
7
+ # Gets the file received throug Rack Environment
8
+ def received_file
9
+ if env['rack.input']
10
+ make_tempfile(env['rack.input'], :filename => env['HTTP_X_FILE_NAME'], :type => env["CONTENT_TYPE"])
11
+ end
12
+ end
13
+
14
+ # Taken from rack. Follows the example of maca to create a TempFile
15
+ # via XHR Request. Used to asynchronously upload images
16
+ def make_tempfile(input, options = {})
17
+ tempfile = Tempfile.new('image-upload')
18
+ tempfile.set_encoding(Encoding::BINARY) if tempfile.respond_to?(:set_encoding)
19
+ tempfile.binmode
20
+ buffer = ""
21
+ while input.read(1024 * 4, buffer)
22
+ entire_buffer_written_out = false
23
+ while !entire_buffer_written_out
24
+ written = tempfile.write(buffer)
25
+ entire_buffer_written_out = written == Rack::Utils.bytesize(buffer)
26
+ if !entire_buffer_written_out
27
+ buffer.slice!(0 .. written - 1)
28
+ end
29
+ end
30
+ end
31
+ tempfile.rewind
32
+ {:tempfile => tempfile}.merge(options)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :kublog do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ #!/usr/bin/env ruby
3
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4
+
5
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
6
+ load File.expand_path('../../test/dummy/script/rails', __FILE__)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,9 @@
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
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,157 @@
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_tree .
7
+ */
8
+
9
+ .main-attributes{
10
+ float:left;
11
+ }
12
+
13
+ .admin-actions{
14
+ margin-top:10px;
15
+ }
16
+
17
+ .field.submit{
18
+ clear:both;
19
+ }
20
+
21
+ hr{
22
+ clear:both;
23
+ height: 0;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .post-actions, .sharing-attributes{
28
+ float:right;
29
+ width:300px;
30
+ border:1px solid #ddd;
31
+ margin-top:20px;
32
+ padding:10px;
33
+ }
34
+
35
+ .sharing-attributes .field{
36
+ width:250px;
37
+ }
38
+
39
+ .sharing-attributes textarea.small{
40
+ display:block;
41
+ }
42
+
43
+ .sharing-attributes span{
44
+ font-size:11px;
45
+ float:right;
46
+ }
47
+
48
+ .post-actions h2, .sharing-attributes h2{
49
+ margin-top:0px;
50
+ }
51
+
52
+ .sharing-attributes{
53
+ margin-top:25px;
54
+ }
55
+
56
+ .post-actions ul{
57
+ padding:0px;
58
+ }
59
+
60
+ .post-actions li{
61
+ list-style-type:none;
62
+ margin-bottom:10px;
63
+ }
64
+
65
+ #account{
66
+ margin-top:10px;
67
+ float:right;
68
+ }
69
+
70
+ #header h1{
71
+ float:left;
72
+ margin:0px;
73
+ }
74
+
75
+ .new-comment h2{
76
+ margin-bottom:0px;
77
+ }
78
+
79
+ html, body {
80
+ background-color: #4B7399;
81
+ font-family: Verdana, Helvetica, Arial;
82
+ font-size: 14px;
83
+ }
84
+
85
+ a img {
86
+ border: none;
87
+ }
88
+
89
+ a {
90
+ color: #0000FF;
91
+ }
92
+
93
+ .clear {
94
+ clear: both;
95
+ height: 0;
96
+ overflow: hidden;
97
+ }
98
+
99
+ #container {
100
+ width: 75%;
101
+ margin: 0 auto;
102
+ background-color: #FFF;
103
+ padding: 20px 40px;
104
+ border: solid 1px black;
105
+ margin-top: 20px;
106
+ }
107
+
108
+ #flash_notice, #flash_error, #flash_alert {
109
+ padding: 5px 8px;
110
+ margin: 10px 0;
111
+ }
112
+
113
+ #flash_notice {
114
+ background-color: #CFC;
115
+ border: solid 1px #6C6;
116
+ }
117
+
118
+ #flash_error, #flash_alert {
119
+ background-color: #FCC;
120
+ border: solid 1px #C66;
121
+ }
122
+
123
+ .error_messages {
124
+ width: 400px;
125
+ border: 2px solid #CF0000;
126
+ padding: 0px;
127
+ padding-bottom: 12px;
128
+ margin-bottom: 20px;
129
+ background-color: #f0f0f0;
130
+ font-size: 12px;
131
+ }
132
+
133
+ .error_messages h2 {
134
+ text-align: left;
135
+ font-weight: bold;
136
+ padding: 5px 10px;
137
+ font-size: 12px;
138
+ margin: 0;
139
+ background-color: #c00;
140
+ color: #fff;
141
+ }
142
+
143
+ .error_messages p {
144
+ margin: 8px 10px;
145
+ }
146
+
147
+ .error_messages ul {
148
+ margin: 0;
149
+ }
150
+
151
+ .field_with_errors {
152
+ display: inline;
153
+ }
154
+
155
+ form .field, form .actions {
156
+ margin: 10px 0;
157
+ }