diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 0000000..d8c85ab --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,2 @@ +class WelcomeController < ApplicationController +end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb new file mode 100644 index 0000000..eeead45 --- /dev/null +++ b/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8074c5a..8f64de4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1,14 @@ - - AdoptAHydrant - <%= stylesheet_link_tag :all %> - <%= javascript_include_tag :defaults %> - <%= csrf_meta_tag %> - - - -<%= yield %> - - + + AdoptAHydrant + <%= stylesheet_link_tag "main" %> + <%= javascript_include_tag "maps" %> + <%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false" %> + <%= csrf_meta_tag %> + + + + <%= yield -%> + diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb new file mode 100644 index 0000000..a9874bf --- /dev/null +++ b/app/views/welcome/index.html.erb @@ -0,0 +1,3 @@ +
+ +
diff --git a/config/routes.rb b/config/routes.rb index 05ca0a0..ea8c50d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -48,7 +48,7 @@ AdoptAHydrant::Application.routes.draw do # You can have the root of your site routed with "root" # just remember to delete public/index.html. - # root :to => "welcome#index" + root :to => "welcome#index" # See how all your routes lay out with "rake routes" diff --git a/public/javascripts/maps.js b/public/javascripts/maps.js new file mode 100644 index 0000000..d3e5ccc --- /dev/null +++ b/public/javascripts/maps.js @@ -0,0 +1,9 @@ +function initialize() { + var latlng = new google.maps.LatLng(42.358431,-71.059773); + var myOptions = { + zoom: 14, + center: latlng, + mapTypeId: google.maps.MapTypeId.ROADMAP + }; + var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); +} diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css new file mode 100644 index 0000000..ad0415b --- /dev/null +++ b/public/stylesheets/main.css @@ -0,0 +1,3 @@ +html { height: 100% } +body { height: 100%; margin: 0px; padding: 0px } +#map_canvas { height: 100% } diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb new file mode 100644 index 0000000..92c7f5a --- /dev/null +++ b/test/functional/welcome_controller_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class WelcomeControllerTest < ActionController::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end diff --git a/test/unit/helpers/welcome_helper_test.rb b/test/unit/helpers/welcome_helper_test.rb new file mode 100644 index 0000000..d6ded59 --- /dev/null +++ b/test/unit/helpers/welcome_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class WelcomeHelperTest < ActionView::TestCase +end