Add welcome page with Google Map
This commit is contained in:
parent
c749f63b1f
commit
6d04f19366
|
@ -0,0 +1,2 @@
|
||||||
|
class WelcomeController < ApplicationController
|
||||||
|
end
|
|
@ -0,0 +1,2 @@
|
||||||
|
module WelcomeHelper
|
||||||
|
end
|
|
@ -1,14 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>AdoptAHydrant</title>
|
<title>AdoptAHydrant</title>
|
||||||
<%= stylesheet_link_tag :all %>
|
<%= stylesheet_link_tag "main" %>
|
||||||
<%= javascript_include_tag :defaults %>
|
<%= javascript_include_tag "maps" %>
|
||||||
<%= csrf_meta_tag %>
|
<%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false" %>
|
||||||
</head>
|
<%= csrf_meta_tag %>
|
||||||
<body>
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||||
|
</head>
|
||||||
<%= yield %>
|
<body onload="initialize()">
|
||||||
|
<%= yield -%>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div id="map_canvas" style="width:100%; height:100%">
|
||||||
|
|
||||||
|
</div>
|
|
@ -48,7 +48,7 @@ AdoptAHydrant::Application.routes.draw do
|
||||||
|
|
||||||
# You can have the root of your site routed with "root"
|
# You can have the root of your site routed with "root"
|
||||||
# just remember to delete public/index.html.
|
# 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"
|
# See how all your routes lay out with "rake routes"
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
html { height: 100% }
|
||||||
|
body { height: 100%; margin: 0px; padding: 0px }
|
||||||
|
#map_canvas { height: 100% }
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class WelcomeHelperTest < ActionView::TestCase
|
||||||
|
end
|
Loading…
Reference in New Issue