diff --git a/app/assets/images/.DS_Store b/app/assets/images/.DS_Store index 5dbe43d0..faa17423 100644 Binary files a/app/assets/images/.DS_Store and b/app/assets/images/.DS_Store differ diff --git a/app/assets/images/exploremaps_sprite.png b/app/assets/images/exploremaps_sprite.png index 492daaa8..624d67e6 100644 Binary files a/app/assets/images/exploremaps_sprite.png and b/app/assets/images/exploremaps_sprite.png differ diff --git a/app/assets/images/map_control_sprite.png b/app/assets/images/map_control_sprite.png new file mode 100644 index 00000000..1fff9547 Binary files /dev/null and b/app/assets/images/map_control_sprite.png differ diff --git a/app/assets/images/missing-map.png b/app/assets/images/missing-map.png index 54cbd843..1230ae2b 100644 Binary files a/app/assets/images/missing-map.png and b/app/assets/images/missing-map.png differ diff --git a/app/assets/images/newmap_sprite.png b/app/assets/images/newmap_sprite.png new file mode 100644 index 00000000..812fc7a5 Binary files /dev/null and b/app/assets/images/newmap_sprite.png differ diff --git a/app/assets/images/star.png b/app/assets/images/star.png deleted file mode 100644 index 217f58f4..00000000 Binary files a/app/assets/images/star.png and /dev/null differ diff --git a/app/assets/images/starmap_sprite.png b/app/assets/images/starmap_sprite.png new file mode 100644 index 00000000..f882edd8 Binary files /dev/null and b/app/assets/images/starmap_sprite.png differ diff --git a/app/assets/javascripts/src/Metamaps.Map.js b/app/assets/javascripts/src/Metamaps.Map.js index c5a5adf2..0964ef51 100644 --- a/app/assets/javascripts/src/Metamaps.Map.js +++ b/app/assets/javascripts/src/Metamaps.Map.js @@ -161,6 +161,7 @@ Metamaps.Map = { $.post('/maps/' + Metamaps.Active.Map.id + '/star') Metamaps.Stars.push({ user_id: Metamaps.Active.Mapper.id, map_id: Metamaps.Active.Map.id }) Metamaps.Maps.Starred.add(Metamaps.Active.Map) + Metamaps.GlobalUI.notifyUser('Map is now starred') self.updateStar() }, unstar: function () { diff --git a/app/assets/javascripts/src/Metamaps.Router.js b/app/assets/javascripts/src/Metamaps.Router.js index 511577ba..f76bdcc7 100644 --- a/app/assets/javascripts/src/Metamaps.Router.js +++ b/app/assets/javascripts/src/Metamaps.Router.js @@ -44,6 +44,7 @@ // all this only for the logged in home page if (Metamaps.Active.Mapper) { + $('.homeButton a').attr('href', '/') Metamaps.GlobalUI.hideDiv('#yield') Metamaps.GlobalUI.showDiv('#explore') @@ -89,6 +90,7 @@ document.title = 'Explore My Maps | Metamaps' } + if (Metamaps.Active.Mapper) $('.homeButton a').attr('href', '/explore/' + section + (id ? '/' + id : '')) $('.wrapper').removeClass('homePage mapPage topicPage') $('.wrapper').addClass('explorePage') diff --git a/app/assets/stylesheets/base.css.erb b/app/assets/stylesheets/base.css.erb index 6be8579a..5b0fcf84 100644 --- a/app/assets/stylesheets/base.css.erb +++ b/app/assets/stylesheets/base.css.erb @@ -947,15 +947,51 @@ font-family: 'din-regular', helvetica, sans-serif; .map { display:inline-block; width:220px; - height:340px; + height:340px; font-size: 12px; text-align: left; overflow: visible; - background: #424242; + background: #e8e8e8; border-radius:2px; margin:16px 16px 16px 19px; box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16); } +.map:hover { + background: #dcdcdc; +} +.map.newMap { + float: left; + position: relative; +} +.map.newMap a { + height: 340px; + display: block; + position: relative; +} +.newMap .newMapImage { + display: block; + width: 72px; + height: 72px; + background-image: url("<%= asset_data_uri('newmap_sprite.png') %>"); + background-repeat: no-repeat; + background-position: 0 0; + position: absolute; + left: 50%; + margin-left: -36px; + top: 50%; + margin-top: -36px; +} +.map:hover .newMapImage { + background-position: 0 -72px; +} +.newMap span { + font-family: 'din-regular', sans-serif; + font-size: 18px; + line-height: 22px; + text-align: center; + display: block; + padding-top: 220px; +} .mapCard { display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */ @@ -974,7 +1010,7 @@ font-family: 'din-regular', helvetica, sans-serif; width:100%; height:308px; padding: 16px 0; - color:#F5F5F5; + color: #424242; } .mapCard .title { diff --git a/app/assets/stylesheets/clean.css.erb b/app/assets/stylesheets/clean.css.erb index 140ee8db..4ff31f7e 100644 --- a/app/assets/stylesheets/clean.css.erb +++ b/app/assets/stylesheets/clean.css.erb @@ -127,7 +127,7 @@ } .homeButton a { display:block; - color: #9E9E9E; + color: #747474; font-family: "vinyl", sans-serif; font-style: italic; text-transform: uppercase; @@ -135,6 +135,9 @@ font-size: 30px; line-height: 38px; } +.homeButton a:hover { + color: #616161; +} /* end upperLeftUI */ @@ -377,13 +380,16 @@ top: 0; } .starMap { - background-image: url(<%= asset_data_uri('star.png') %>); + background-image: url(<%= asset_data_uri('starmap_sprite.png') %>); background-position: 0 0; background-repeat: no-repeat; width: 32px; } -.starMap:hover, .starMap.starred { - background-position: 0 -32px; +.starMap:hover { + background-position: 0 -32px !important; +} + .starMap.starred { + background-position: 0 -64px; } .starMap.starred:hover { background-position: 0 0; @@ -670,7 +676,7 @@ font-family: 'din-medium'; font-size: 14px; height: 14px; - padding: 14px 16px 12px 40px; + padding: 14px 8px 12px 40px; border-bottom: 2px solid rgba(0,0,0,0); display: inline-block; cursor: pointer; @@ -709,38 +715,38 @@ } .exploreMapsCenter .myMaps .exploreMapsIcon { background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>); - background-position: 0 0; + background-position: -32px 0; } .exploreMapsCenter .sharedMaps .exploreMapsIcon { background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>); - background-position: -96px 0; + background-position: -128px 0; } .exploreMapsCenter .activeMaps .exploreMapsIcon { background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>); - background-position: -32px 0; + background-position: 0 0; } .exploreMapsCenter .featuredMaps .exploreMapsIcon { background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>); - background-position: -64px 0; + background-position: -96px 0; } .exploreMapsCenter .starredMaps .exploreMapsIcon { background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>); - background-position: -64px 0; + background-position: -96px 0; } .myMaps:hover .exploreMapsIcon, .myMaps.active .exploreMapsIcon { - background-position: 0 -32px; -} -.activeMaps:hover .exploreMapsIcon, .activeMaps.active .exploreMapsIcon { background-position: -32px -32px; } +.activeMaps:hover .exploreMapsIcon, .activeMaps.active .exploreMapsIcon { + background-position: 0 -32px; +} .featuredMaps:hover .exploreMapsIcon, .featuredMaps.active .exploreMapsIcon { - background-position: -64px -32px; + background-position: -96px -32px; } .starredMaps:hover .exploreMapsIcon, .starredMaps.active .exploreMapsIcon { - background-position: -64px -32px; + background-position: -96px -32px; } .sharedMaps:hover .exploreMapsIcon, .sharedMaps.active .exploreMapsIcon { - background-position: -96px -32px; + background-position: -128px -32px; } .mapsWrapper { diff --git a/app/assets/stylesheets/mobile.css.erb b/app/assets/stylesheets/mobile.scss.erb similarity index 85% rename from app/assets/stylesheets/mobile.css.erb rename to app/assets/stylesheets/mobile.scss.erb index c46ef3ff..cf416e37 100644 --- a/app/assets/stylesheets/mobile.css.erb +++ b/app/assets/stylesheets/mobile.scss.erb @@ -73,6 +73,33 @@ #exploreMaps > div { margin-top: 70px; } + + .map.newMap { + a { + height: auto; + } + + .newMapImage { + position: relative; + display: inline-block; + height: 40px; + width: 40px; + left: auto; + top: auto; + margin: 0 0 0 8px; + background-size: 40px 80px; + vertical-align: middle; + } + + span { + vertical-align: middle; + padding: 16px; + display: inline-block; + } + } + .map.newMap:hover .newMapImage { + background-position: 0 -40px; + } } /* Smartphones (portrait) ----------- */ @@ -151,4 +178,4 @@ li.mobileMenuUser { vertical-align: middle; margin-right: 10px; border-radius: 16px; -} \ No newline at end of file +} diff --git a/app/models/map.rb b/app/models/map.rb index cb5c286e..bf5757d3 100644 --- a/app/models/map.rb +++ b/app/models/map.rb @@ -19,7 +19,7 @@ class Map < ActiveRecord::Base thumb: ['188x126#', :png] #:full => ['940x630#', :png] }, - default_url: 'https://s3.amazonaws.com/metamaps-assets/site/missing-map.png' + default_url: 'https://s3.amazonaws.com/metamaps-assets/site/missing-map-white.png' validates :name, presence: true validates :arranged, inclusion: { in: [true, false] } diff --git a/app/views/layouts/_mobilemenu.html.erb b/app/views/layouts/_mobilemenu.html.erb index f3313d01..e2b14253 100644 --- a/app/views/layouts/_mobilemenu.html.erb +++ b/app/views/layouts/_mobilemenu.html.erb @@ -25,9 +25,12 @@
  • <%= link_to "Shared With Me", explore_shared_path, :data => { :router => 'true'} %>
  • +
  • + <%= link_to "Starred By Me", explore_starred_path, :data => { :router => 'true'} %> +
  • <% end %>
  • - <%= link_to "Recently Active", explore_active_path, :data => { :router => 'true'} %> + <%= link_to "Global Maps", explore_active_path, :data => { :router => 'true'} %>
  • <% if not current_user %>
  • @@ -51,4 +54,4 @@
  • <% end %> - \ No newline at end of file + diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js index f42a137f..c8c67619 100644 --- a/frontend/src/components/Header.js +++ b/frontend/src/components/Header.js @@ -58,7 +58,7 @@ class Header extends Component { href={signedIn ? "/" : "/explore/active"} linkClass={activeClass("active")} data-router="true" - text="Recently Active" + text="Global" />
    { user ? : null } + { currentUser && !user ?
    Create new map...
    : null } { mapElements }
    { moreToLoad ?