From b4c75649bab1a809cb0a697815f0890a05be5a56 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Fri, 12 Aug 2016 04:04:18 +0000 Subject: [PATCH] all teh mobile things --- app/assets/images/menu-alt-256.png | Bin 0 -> 2030 bytes app/assets/javascripts/application.js | 1 + app/assets/javascripts/src/Metamaps.Header.js | 2 +- app/assets/javascripts/src/Metamaps.Map.js | 3 + app/assets/javascripts/src/Metamaps.Mobile.js | 24 +++++ app/assets/javascripts/src/Metamaps.Topic.js | 3 + app/assets/stylesheets/application.css.erb | 2 +- app/assets/stylesheets/clean.css.erb | 1 + app/assets/stylesheets/mobile.css.erb | 97 ++++++++++++++++++ app/views/layouts/_head.html.erb | 2 +- app/views/layouts/_mobilemenu.html.erb | 51 +++++++++ app/views/layouts/application.html.erb | 8 +- app/views/layouts/doorkeeper.html.erb | 9 +- app/views/main/home.html.erb | 1 + app/views/main/requestinvite.html.erb | 3 +- app/views/maps/activemaps.html.erb | 1 + app/views/maps/featuredmaps.html.erb | 1 + app/views/maps/mymaps.html.erb | 1 + app/views/maps/sharedmaps.html.erb | 1 + app/views/maps/show.html.erb | 1 + app/views/maps/usermaps.html.erb | 1 + app/views/users/edit.html.erb | 1 + app/views/users/passwords/edit.html.erb | 1 + app/views/users/passwords/new.html.erb | 1 + app/views/users/registrations/new.html.erb | 1 + app/views/users/sessions/new.html.erb | 1 + frontend/src/components/Header.js | 86 ++++++++-------- 27 files changed, 253 insertions(+), 51 deletions(-) create mode 100644 app/assets/images/menu-alt-256.png create mode 100644 app/assets/javascripts/src/Metamaps.Mobile.js create mode 100644 app/assets/stylesheets/mobile.css.erb create mode 100644 app/views/layouts/_mobilemenu.html.erb diff --git a/app/assets/images/menu-alt-256.png b/app/assets/images/menu-alt-256.png new file mode 100644 index 0000000000000000000000000000000000000000..e8d9912bfdf6f5d48e1a93b4d605854ff2318333 GIT binary patch literal 2030 zcmb8wc~nzZ9tZFj0tu)gS}ZDSwNtD`mH|q+tc4U_uPB`xaXeV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o2w)GEU$KXld|O*5O0G)bd2T}#Ohwom9p znTdLkU~!FXx|YncvL6QwiM04<__=dE>`qPgzIkCu*>rb!w?h?nUC|G@L$gLPVUAoQ zXbe*LWP<|5PZkU%NjU2Cy-Qn42*31U1^t|^W>eKtB<^lS)99+3=C87k;7ln9i&|6GW28* zp3<_)V7e`|z_ra-ZjhWgZrHWx12&<(dl-_BvzXe4@&xiT@-FxL*1Wl=`P%MZbT{B6 zb)Z`2D}QwYtmly<3~hCPr7~SCa&E3N@(wH%A#vn{s!ErzuRkx!oRe>531?ovSYiyF z|L{7A!E1UDR*?tF#ui2HljEcmUNf?`Cms1J>?Do+z*M;c=GhX2IA~C?%<;KPyQ3d-Q-ULag0x^4{hIn QP') no-repeat center center; + background-size: 30px; +} + +#header_content { + position: absolute; + width: 100%; + overflow-x: scroll; + padding-left: 60px; + font-size: 24px; + line-height: 50px; +} + +#mobile_menu { + display: none; + background: #EEE; + position: fixed; + top: 50px; + border-top: 1px solid #DDD; + padding: 10px; + width: 200px; + box-shadow: 3px 3px 3px rgba(0,0,0,0.23), 3px 3px 3px rgba(0,0,0,0.16); +} + +#mobile_menu li { + padding: 10px; +} \ No newline at end of file diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 3f0d506d..23a24c4a 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -12,7 +12,7 @@ - <%=h yield(:title) %> + <%= yield(:title) %> <%= csrf_meta_tags %> diff --git a/app/views/layouts/_mobilemenu.html.erb b/app/views/layouts/_mobilemenu.html.erb new file mode 100644 index 00000000..cba31af0 --- /dev/null +++ b/app/views/layouts/_mobilemenu.html.erb @@ -0,0 +1,51 @@ +
+
+ <%= yield(:mobile_title) %> +
+ +
+
+
    + <% if not current_user %> +
  • + <%= link_to "Home", root_path, :data => { :bypass => 'true'} %> +
  • + <% end %> + <% if current_user %> + +
  • + Signed in as: <%= current_user.name %> +
  • +
  • + <%= link_to "My Maps", explore_mine_path %> +
  • +
  • + <%= link_to "Shared With Me", explore_shared_path %> +
  • + <% end %> +
  • + <%= link_to "Recently Active", explore_active_path %> +
  • + <% if not current_user %> +
  • + <%= link_to "Featured Maps", explore_featured_path %> +
  • + <% end %> + <% if not current_user %> +
  • + <%= link_to "Request Invite", request_path, :data => { :bypass => 'true'} %> +
  • +
  • + <%= link_to "Login", new_user_session_path, :data => { :bypass => 'true'} %> +
  • + <% end %> + <% if current_user %> +
  • + <%= link_to "Account", edit_user_url(current_user), :data => { :bypass => 'true'} %> +
  • +
  • + <%= link_to "Sign Out", "/logout", id: "Logout", :data => { :bypass => 'true'} %> +
  • + <% end %> +
+
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c36b412b..8c86eb22 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -45,8 +45,14 @@ <%= render :partial => 'layouts/lowermapelements' %>
-
+
+
+
+
+
+
+ <%= render :partial => 'layouts/mobilemenu' %>
Double-click to
add a topic! diff --git a/app/views/layouts/doorkeeper.html.erb b/app/views/layouts/doorkeeper.html.erb index 378ada04..16feb69d 100644 --- a/app/views/layouts/doorkeeper.html.erb +++ b/app/views/layouts/doorkeeper.html.erb @@ -33,7 +33,14 @@ <% end %> <%= render :partial => 'layouts/lowermapelements' %> -
+
+
+
+
+
+
+
+
diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index 3b083dab..3fc06f4f 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -6,6 +6,7 @@ %> <% content_for :title, "Home | Metamaps" %> +<% content_for :mobile_title, "Home" %>
Make Sense with Metamaps
diff --git a/app/views/main/requestinvite.html.erb b/app/views/main/requestinvite.html.erb index 2b147db0..88a4977c 100644 --- a/app/views/main/requestinvite.html.erb +++ b/app/views/main/requestinvite.html.erb @@ -4,7 +4,8 @@ # Shows a form where people can request an invite #%> -<% content_for :title, "Request Invite | Metamaps" %> +<% content_for :title, "Request Invite | Metamaps" %> +<% content_for :mobile_title, "Request Invite" %>
diff --git a/app/views/maps/activemaps.html.erb b/app/views/maps/activemaps.html.erb index cfcbce27..a70cdcae 100644 --- a/app/views/maps/activemaps.html.erb +++ b/app/views/maps/activemaps.html.erb @@ -8,6 +8,7 @@ Metamaps.Maps.Active = <%= @maps.to_json.html_safe %>; Metamaps.currentPage = "active"; <% content_for :title, "Explore Active Maps | Metamaps" %> + <% content_for :mobile_title, "Recently Active" %> Metamaps.currentSection = "explore"; Metamaps.GlobalUI.Search.open(); diff --git a/app/views/maps/featuredmaps.html.erb b/app/views/maps/featuredmaps.html.erb index 2c438b49..cfe4a627 100644 --- a/app/views/maps/featuredmaps.html.erb +++ b/app/views/maps/featuredmaps.html.erb @@ -8,6 +8,7 @@ Metamaps.Maps.Featured = <%= @maps.to_json.html_safe %>; Metamaps.currentPage = "featured"; <% content_for :title, "Explore Featured Maps | Metamaps" %> + <% content_for :mobile_title, "Featured Maps" %> Metamaps.currentSection = "explore"; Metamaps.GlobalUI.Search.open(); diff --git a/app/views/maps/mymaps.html.erb b/app/views/maps/mymaps.html.erb index 60c69f68..17f715f9 100644 --- a/app/views/maps/mymaps.html.erb +++ b/app/views/maps/mymaps.html.erb @@ -8,6 +8,7 @@ Metamaps.Maps.Mine = <%= @maps.to_json.html_safe %>; Metamaps.currentPage = "mine"; <% content_for :title, "Explore My Maps | Metamaps" %> + <% content_for :mobile_title, "My Maps" %> Metamaps.currentSection = "explore"; Metamaps.GlobalUI.Search.open(); diff --git a/app/views/maps/sharedmaps.html.erb b/app/views/maps/sharedmaps.html.erb index 99c41828..fd02c810 100644 --- a/app/views/maps/sharedmaps.html.erb +++ b/app/views/maps/sharedmaps.html.erb @@ -8,6 +8,7 @@ Metamaps.Maps.Shared = <%= @maps.to_json.html_safe %>; Metamaps.currentPage = "shared"; <% content_for :title, "Explore Shared Maps | Metamaps" %> + <% content_for :mobile_title, "Shared With Me" %> Metamaps.currentSection = "explore"; Metamaps.GlobalUI.Search.open(); diff --git a/app/views/maps/show.html.erb b/app/views/maps/show.html.erb index 9a74b337..70c1189e 100644 --- a/app/views/maps/show.html.erb +++ b/app/views/maps/show.html.erb @@ -5,6 +5,7 @@ #%> <% content_for :title, @map.name + " | Metamaps" %> +<% content_for :mobile_title, @map.name %>