Permalink
Browse files

Bootstrap

  • Loading branch information...
1 parent 593ce81 commit 23ec5c99eb2ccf8d60a96a7be5cd0db584ae4f31 @sferik sferik committed Dec 25, 2011
Showing with 2,899 additions and 397 deletions.
  1. BIN app/assets/images/logos/boston.png
  2. BIN app/assets/images/logos/cfa.png
  3. +48 −107 app/assets/javascripts/main.js.erb
  4. +2,467 −0 app/assets/stylesheets/bootstrap.css
  5. +100 −58 app/assets/stylesheets/screen.css
  6. +1 −1 app/controllers/info_window_controller.rb
  7. +1 −1 app/controllers/sessions_controller.rb
  8. +2 −0 app/controllers/sidebar_controller.rb
  9. +2 −2 app/controllers/users_controller.rb
  10. +0 −2 app/views/info_window/tos.html.haml
  11. +3 −2 app/views/layouts/application.html.haml
  12. +12 −3 app/views/layouts/info_window.html.haml
  13. +13 −0 app/views/layouts/sidebar.html.haml
  14. +22 −20 app/views/main/index.html.haml
  15. +19 −0 app/views/main/unauthenticated.html.haml
  16. +2 −2 app/views/passwords/edit.html.haml
  17. +0 −2 app/views/sessions/_sign_in.html.haml
  18. +0 −2 app/views/sessions/_sign_out.html.haml
  19. +0 −47 app/views/sessions/new.html.haml
  20. +56 −0 app/views/sidebar/_combo_form.html.haml
  21. +15 −0 app/views/sidebar/_search.html.haml
  22. +1 −0 app/views/sidebar/combo_form.html.haml
  23. +43 −0 app/views/sidebar/edit_profile.html.haml
  24. +1 −0 app/views/sidebar/search.html.haml
  25. +2 −2 app/views/things/_abandon.html.haml
  26. +0 −3 app/views/things/_back.html.haml
  27. +2 −4 app/views/things/adopt.html.haml
  28. +0 −2 app/views/users/_edit_profile.html.haml
  29. +2 −2 app/views/users/_reminder.html.haml
  30. +0 −34 app/views/users/edit.html.haml
  31. +0 −4 app/views/users/profile.html.haml
  32. +2 −0 app/views/users/sign_in.html.haml
  33. +0 −2 app/views/users/thank_you.html.haml
  34. +6 −6 config/locales/de.yml
  35. +0 −1 config/locales/devise.en.yml
  36. +4 −4 config/locales/en.yml
  37. +5 −5 config/locales/es.yml
  38. +5 −5 config/locales/fr.yml
  39. +5 −5 config/locales/pt.yml
  40. +8 −0 config/routes.rb
  41. +1 −0 public/assets/application-1cf60dea943ea122ba3843553cae21f1.js
  42. BIN public/assets/application-1cf60dea943ea122ba3843553cae21f1.js.gz
  43. +0 −1 public/assets/application-879974b2dc732c9ad52461701c6d8221.js
  44. BIN public/assets/application-879974b2dc732c9ad52461701c6d8221.js.gz
  45. +10 −0 public/assets/application-91caf803854c601630c3e34248437991.css
  46. BIN public/assets/application-91caf803854c601630c3e34248437991.css.gz
  47. +0 −1 public/assets/application-f51fc927e2d61b28a97c412e9ccbf82c.css
  48. BIN public/assets/application-f51fc927e2d61b28a97c412e9ccbf82c.css.gz
  49. +10 −1 public/assets/application.css
  50. BIN public/assets/application.css.gz
  51. +1 −1 public/assets/application.js
  52. BIN public/assets/application.js.gz
  53. BIN public/assets/logos/boston-b28b79c935c6a90add1002991469376a.png
  54. BIN public/assets/logos/boston-ed9439a7ae565fa6132b4aadf2df8d95.png
  55. BIN public/assets/logos/boston.png
  56. BIN public/assets/logos/cfa-126f65b37b434516568f0e68134381de.png
  57. BIN public/assets/logos/cfa-e3639eeaca402a55546eafd73b9ed139.png
  58. BIN public/assets/logos/cfa.png
  59. +5 −5 public/assets/manifest.yml
  60. BIN public/assets/rails_admin/jquery.colorpicker-3e4bfd61d5898887f4e1f40d114770b0.js.gz
  61. BIN public/assets/rails_admin/jquery.colorpicker-abec8b04315eef26dca1e44d4070c4a1.css.gz
  62. BIN public/assets/rails_admin/jquery.colorpicker.css.gz
  63. BIN public/assets/rails_admin/jquery.colorpicker.js.gz
  64. +1 −1 ...ails_admin-47c8211bbe97bd0198612631ceade590.js → rails_admin-1868138b8c3bcffc259ee5a1c95a6724.js}
  65. BIN ...dmin-47c8211bbe97bd0198612631ceade590.js.gz → rails_admin-1868138b8c3bcffc259ee5a1c95a6724.js.gz}
  66. BIN public/assets/rails_admin/rails_admin-272ba55b46a4c95fcd49077f0fd50803.css.gz
  67. BIN public/assets/rails_admin/rails_admin.css.gz
  68. +1 −1 public/assets/rails_admin/rails_admin.js
  69. BIN public/assets/rails_admin/rails_admin.js.gz
  70. BIN public/favicon.ico
  71. BIN screenshot.png
  72. +2 −41 test/functional/info_window_controller_test.rb
  73. +14 −1 test/functional/main_controller_test.rb
  74. +2 −11 test/functional/sessions_controller_test.rb
  75. +3 −5 test/functional/users_controller_test.rb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3,59 +3,132 @@ html {
}
body {
- font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
height: 100%;
- margin: 0px;
- padding: 0px;
+ margin: 0;
}
-h1, h2, h3, h4, h5, h6 {
- font-family: Helvetica, Arial, sans-serif;
+h1, h2 {
+ text-align: center;
}
-h1, h2 {
+h2 {
+ font-size: 22px;
+ margin-bottom: 10px;
+}
+
+form.form-stacked {
+ padding-left: 10px;
+ margin-bottom: 0;
+}
+
+label, input {
+ white-space: nowrap;
+ text-align: left;
+}
+
+input {
+ width: 200px;
+}
+
+input, select, option, button, input[type="submit"] {
+ display: block;
+ margin-bottom: 10px;
+}
+
+input[type="radio"], input[type="checkbox"] {
+ display: inline;
+ width: auto;
+ margin: 0 10px 10px 0;
+}
+
+input#user_new {
+ margin-bottom: 0;
+}
+
+button.btn, input[type="submit"].btn {
+ display: block;
text-align: center;
+ width: 210px;
}
-#map_canvas {
- float: left;
- height: 100%;
- width: 75%;
+form label.error {
+ color: #b94a48;
+}
+
+form input.error, form textarea.error {
+ border-color: #ee5f5b;
}
-#sidebar {
- float: left;
+form input.error:focus, form textarea.error:focus {
+ border-color: #e9322d;
+ -webkit-box-shadow: 0 0 6px #f8b9b7;
+ -moz-box-shadow: 0 0 6px #f8b9b7;
+ box-shadow: 0 0 6px #f8b9b7;
+}
+
+.table {
+ display: table;
height: 100%;
- width: 25%;
- overflow: hidden;
+ width: 100%;
}
-form {
- width: 90%;
- margin: auto;
+.table-row {
+ display: table-row;
}
-#sidebar #tagline {
+.table-cell {
+ display: table-cell;
+ height: 100%;
+}
+
+.alert-message {
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
text-align: center;
- padding: 10px;
- background: #c33;
- color: #fff;
+ margin-bottom: 10px;
}
-#sidebar #logos {
+.sidebar {
+ padding-top: 20px;
+ width: 250px;
text-align: center;
}
-#sidebar #logos img {
- padding: 10px 5px 0 5px;
+.sidebar form.form-stacked {
+ padding-left: 20px;
}
-#sidebar #feedback {
+.sidebar p {
+ width: 210px;
+}
+
+.sidebar p#tagline {
+ color: #ffffff;
+ padding: 10px 20px;
+ background-color: #c43c35;
+ background-repeat: repeat-x;
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: linear-gradient(top, #ee5f5b, #c43c35);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ border-color: #c43c35 #c43c35 #882a25;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
text-align: center;
}
-#sidebar img#hydrant-in-snow {
- width: 100%;
+.sidebar #logos img {
+ margin: 10px 5px;
+}
+
+#map {
+ margin-top: 40px;
+ width: auto;
}
#error, #notice, #warning {
@@ -78,37 +151,6 @@ form {
border: 1px solid #c0bb73;
}
-label, input {
- white-space: nowrap;
- text-align: left;
-}
-
-input, select, option, button, input[type="submit"] {
- display: block;
- margin-bottom: 10px;
- font-size: 1.0em;
- width: 100%;
-}
-
-input[type="radio"], input[type="checkbox"] {
- display: inline;
- width: auto;
- margin-right: 10px;
-}
-
-button, input[type="submit"] {
- width: 100%;
- text-align: center;
-}
-
-label.error {
- color: #c33;
-}
-
-input.error {
- background-color: #ffc;
-}
-
.upcase {
text-transform: uppercase;
}
@@ -11,7 +11,7 @@ def index
if user_signed_in?
render("things/adopt")
else
- render("sessions/new")
+ render("users/sign_in")
end
end
end
@@ -1,6 +1,6 @@
class SessionsController < Devise::SessionsController
def new
- render("new", :layout => "info_window")
+ redirect_to root_path
end
def create
@@ -0,0 +1,2 @@
+class SidebarController < ApplicationController
+end
@@ -1,13 +1,13 @@
class UsersController < Devise::RegistrationsController
def edit
- render("edit", :layout => "info_window")
+ render("sidebar/edit_profile", :layout => "sidebar")
end
def update
if resource.update_with_password(params[resource_name])
sign_in(resource_name, resource, :bypass => true)
flash[:notice] = "Profile updated!"
- redirect_to(:controller => "info_window", :action => "index", :thing_id => params[:thing_id])
+ redirect_to(:controller => "sidebar", :action => "search")
else
clean_up_passwords(resource)
render(:json => {"errors" => resource.errors}, :status => 500)
@@ -241,5 +241,3 @@
The section titles in this Agreement are for convenience only and have no legal or contractual effect.
%p
Last updated August 10, 2011.
-
-= render :partial => 'things/back'
@@ -3,11 +3,12 @@
%head
%title
= t("titles.main", :thing => t("defaults.thing").titleize)
- = stylesheet_link_tag "application"
+ = stylesheet_link_tag "bootstrap"
+ = stylesheet_link_tag "screen"
= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false"
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"
- = javascript_include_tag "application"
+ = javascript_include_tag "main"
= csrf_meta_tag
%meta{:name => "viewport", :content => "initial-scale=1.0, user-scalable=no"}
%script{:type => "text/javascript"}
@@ -1,7 +1,16 @@
#loader{:style => "display: none;"}
= image_tag "ajax-loader.gif"
#info_window
- - flash.each do |key, message|
- %div{:id => key}
- = message
+ - if flash[:notice]
+ .alert-message.success
+ %p
+ = flash[:notice]
+ - if flash[:warning]
+ .alert-message.warning
+ %p
+ = flash[:warning]
+ - if flash[:error]
+ .alert-message.error
+ %p
+ = flash[:error]
= yield
@@ -0,0 +1,13 @@
+- if flash[:notice]
+ .alert-message.success
+ %p
+ = flash[:notice]
+- if flash[:warning]
+ .alert-message.warning
+ %p
+ = flash[:warning]
+- if flash[:error]
+ .alert-message.error
+ %p
+ = flash[:error]
+= yield
@@ -1,20 +1,22 @@
-#sidebar
- %h1
- = image_tag "logos/adopt-a-hydrant.png", :alt => t("titles.main", :thing => t("defaults.thing").titleize), :title => t("titles.main", :thing => t("defaults.thing").titleize)
- %p#tagline
- = t("defaults.tagline")
- = form_for :address, :html => {:id => "address_form"} do |f|
- = label_tag "city_state", t("labels.city_state"), :id => "city_state_label"
- = select_tag "city_state", "<option value=\"#{t("defaults.city")}\" selected=\"selected\">#{t("defaults.city")}</option>".html_safe
- = label_tag "address", t("labels.address"), :id => "address_label"
- = text_field_tag "address", params[:address]
- = hidden_field_tag "limit", params[:limit] || 40
- = submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize)
- #logos
- = image_tag "logos/cfa.png", :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
- = image_tag "logos/boston.png", :alt => t("sponsors.city"), :title => t("sponsors.city")
- #feedback
- %a{:href => "mailto:adoptahydrant@cityofboston.gov?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} #{t("links.feedback").titleize}"}
- = t("links.feedback")
- = image_tag "hydrant-in-snow.jpg", :id => "hydrant-in-snow"
-#map_canvas
+.table
+ .table-row
+ .table-cell.sidebar
+ %h1
+ = image_tag "logos/adopt-a-hydrant.png", :alt => t("titles.main", :thing => t("defaults.thing").titleize), :title => t("titles.main", :thing => t("defaults.thing").titleize)
+ %p.alert-message#tagline
+ = t("defaults.tagline")
+ #content
+ - if signed_in?
+ = render :partial => "sidebar/search"
+ - else
+ = render :partial => "sidebar/combo_form"
+ #logos
+ %a{:href => "http://codeforamerica.org/"}
+ = image_tag "logos/cfa.png", :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
+ %a{:href => "http://bostonbuilt.org/"}
+ = image_tag "logos/boston.png", :alt => t("sponsors.city"), :title => t("sponsors.city")
+ #feedback
+ %a{:href => URI.escape("mailto:adoptahydrant@cityofboston.gov?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} #{t("links.feedback").titleize}")}
+ = t("links.feedback")
+ .table-cell#map
+ &nbsp;
@@ -0,0 +1,19 @@
+.table
+ .table-row
+ .table-cell.sidebar
+ %h1
+ = image_tag "logos/adopt-a-hydrant.png", :alt => t("titles.main", :thing => t("defaults.thing").titleize), :title => t("titles.main", :thing => t("defaults.thing").titleize)
+ %p.alert-message#tagline
+ = t("defaults.tagline")
+ #content
+ = render :partial => "sidebar/combo_form"
+ #logos
+ %a{:href => "http://codeforamerica.org/"}
+ = image_tag "logos/cfa.png", :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
+ %a{:href => "http://bostonbuilt.org/"}
+ = image_tag "logos/boston.png", :alt => t("sponsors.city"), :title => t("sponsors.city")
+ #feedback
+ %a{:href => URI.escape("mailto:adoptahydrant@cityofboston.gov?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} #{t("links.feedback").titleize}")}
+ = t("links.feedback")
+ .table-cell#map
+ &nbsp;
@@ -1,7 +1,7 @@
-= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :method => :put} do |f|
+= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :class => "form-stacked", :method => :put} do |f|
%h2
= t("titles.edit_profile")
= f.hidden_field "reset_password_token"
= f.label "password", t("labels.password_new"), :id => "user_password_label"
= f.password_field "password"
- = f.submit t("buttons.change_password")
+ = f.submit t("buttons.change_password"), :class => "btn"
@@ -1,2 +0,0 @@
-= form_for :sign_in, :html => {:id => "sign_in_form"} do |f|
- = f.submit t("buttons.sign_in")
@@ -1,2 +0,0 @@
-= form_for :sign_out, :html => {:id => "sign_out_form"} do |f|
- = f.submit t("buttons.sign_out")
Oops, something went wrong.

0 comments on commit 23ec5c9

Please sign in to comment.