diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 855b115..37f0410 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -17,7 +17,7 @@
-
+
@@ -35,36 +35,33 @@
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -74,17 +71,17 @@
-
+
-
-
+
+
-
+
@@ -94,17 +91,27 @@
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -122,21 +129,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
@@ -150,20 +147,24 @@
-
-
-
-
+
+
+
+
+
+
+
+
@@ -182,8 +183,8 @@
-
-
+
+
@@ -242,6 +243,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -308,6 +331,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -661,25 +736,25 @@
-
+
-
+
+
-
-
+
+
+
+
-
-
-
@@ -720,7 +795,7 @@
-
+
@@ -768,7 +843,7 @@
-
+
@@ -802,7 +877,7 @@
-
+
@@ -842,7 +917,7 @@
-
+
@@ -888,6 +963,7 @@
+
@@ -911,6 +987,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -918,65 +1027,78 @@
+
-
+
+
-
+
+
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
-
+
@@ -984,23 +1106,23 @@
-
+
-
+
-
-
+
+
-
+
-
+
@@ -1015,34 +1137,50 @@
-
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
diff --git a/app/assets/javascripts/map/geocode.js b/app/assets/javascripts/map/geocode.js
index 2889dd4..a15c579 100644
--- a/app/assets/javascripts/map/geocode.js
+++ b/app/assets/javascripts/map/geocode.js
@@ -17,20 +17,13 @@ function initialize() {
var marker = new google.maps.Marker({
map: map,
- position: pos,
- });
-
- map.setCenter(pos);
+ position: pos
- google.maps.event.addListener(marker, 'click', function(event) {
- var lat = marker.getPosition().lat();
- var lng = marker.getPosition().lng();
-
- $('#lat').val(lat);
- $('#lng').val(lng);
});
+ map.setCenter(pos);
+
}, function() {
handleNoGeolocation(true);
diff --git a/app/assets/javascripts/map/gmap.js b/app/assets/javascripts/map/gmap.js
index 6e869b1..489a0e5 100644
--- a/app/assets/javascripts/map/gmap.js
+++ b/app/assets/javascripts/map/gmap.js
@@ -1,17 +1,9 @@
var huggles = huggles || {}
function loadScript() {
- //var script = document.createElement('script');
- //script.type = 'text/javascript';
- //script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp' +
- // '&signed_in=false&callback=initialize';
- //document.body.appendChild(script);
- //$.getScript('https://maps.googleapis.com/maps/api/js?v=3.exp')
- // .done(function() {
- $(huggles.after_google).each(function(i, f) {
- f()
+ $(huggles.after_google).each(function(i, f) {
+ f()
})
- //})
}
window.onload = loadScript;
\ No newline at end of file
diff --git a/app/assets/javascripts/map/marker_location.js b/app/assets/javascripts/map/marker_location.js
index be6fb1f..c248ea6 100644
--- a/app/assets/javascripts/map/marker_location.js
+++ b/app/assets/javascripts/map/marker_location.js
@@ -3,7 +3,8 @@ huggles.after_google = huggles.after_google || []
huggles.after_google.push(
function () {
- google.maps.event.addListener(map, "rightclick", function(event) {
+
+ google.maps.event.addListener(map, 'click', function(event) {
var lat = event.latLng.lat();
var lng = event.latLng.lng();
// populate yor box/field with lat, lng
diff --git a/app/assets/stylesheets/_google_maps.css b/app/assets/stylesheets/_google_maps.css
new file mode 100644
index 0000000..99b0352
--- /dev/null
+++ b/app/assets/stylesheets/_google_maps.css
@@ -0,0 +1,13 @@
+#map-container {
+ height: 400px;
+ border-radius: 16px 16px;
+ border-color: #fff;
+ border-style: solid;
+ box-shadow: 2px 2px 10px #B1B1B1;
+ margin-top: 25px;
+ border-width: 7px;
+}
+#map-canvas {
+ height: 384px;
+ width: 100%;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index abccfca..e666736 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -1,2 +1,3 @@
@import "bootstrap-sprockets";
-@import "bootstrap";
\ No newline at end of file
+@import "bootstrap";
+@import "google_maps";
\ No newline at end of file
diff --git a/app/controllers/profile_controller.rb b/app/controllers/profile_controller.rb
index 9507dc8..d4a5cf1 100644
--- a/app/controllers/profile_controller.rb
+++ b/app/controllers/profile_controller.rb
@@ -1,6 +1,7 @@
class ProfileController < ApplicationController
def new
+
end
def index
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index b261cfd..c6a9164 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -22,5 +22,3 @@
<%= f.submit "Log in" %>
<% end %>
-
-<%= render "devise/shared/links" %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 6154418..62f07ba 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -2,14 +2,17 @@
Huggles
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
+<%= render "shared/navbar" %>
+
<%= yield %>
+
+
diff --git a/app/views/profile/_index.html.erb b/app/views/profile/_index.html.erb
new file mode 100644
index 0000000..279f293
--- /dev/null
+++ b/app/views/profile/_index.html.erb
@@ -0,0 +1,8 @@
+Profile
+
+Potential Huggles
+
+
\ No newline at end of file
diff --git a/app/views/profile/index.html.erb b/app/views/profile/index.html.erb
index 219ec00..a9f9073 100644
--- a/app/views/profile/index.html.erb
+++ b/app/views/profile/index.html.erb
@@ -1,13 +1 @@
-Profile
-
-Potential Huggles
-
-
-
-
\ No newline at end of file
+<%= render 'index' %>
\ No newline at end of file
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb
new file mode 100644
index 0000000..06c814c
--- /dev/null
+++ b/app/views/shared/_navbar.html.erb
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+ <%= link_to "Home", authenticated_root_path %>
+
+ <% if user_signed_in? %>
+
+ <%= link_to 'Logout', destroy_user_session_path, method: :delete %>
+
+ <% else %>
+
+ <%= link_to 'Login', new_user_session_path %>
+
+ <% end %>
+
+ <% if user_signed_in? %>
+
+ <%= link_to 'Edit User', edit_user_registration_path %>
+
+ <% else %>
+
+ <%= link_to 'Sign Up', new_user_registration_path %>
+
+ <% end %>
+
+
+
+
\ No newline at end of file