styleee
BIN
app/assets/images/.DS_Store
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
app/assets/images/map_control_sprite.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.9 KiB |
BIN
app/assets/images/newmap_sprite.png
Normal file
After Width: | Height: | Size: 667 B |
Before Width: | Height: | Size: 514 B |
BIN
app/assets/images/starmap_sprite.png
Normal file
After Width: | Height: | Size: 739 B |
|
@ -161,6 +161,7 @@ Metamaps.Map = {
|
||||||
$.post('/maps/' + Metamaps.Active.Map.id + '/star')
|
$.post('/maps/' + Metamaps.Active.Map.id + '/star')
|
||||||
Metamaps.Stars.push({ user_id: Metamaps.Active.Mapper.id, map_id: Metamaps.Active.Map.id })
|
Metamaps.Stars.push({ user_id: Metamaps.Active.Mapper.id, map_id: Metamaps.Active.Map.id })
|
||||||
Metamaps.Maps.Starred.add(Metamaps.Active.Map)
|
Metamaps.Maps.Starred.add(Metamaps.Active.Map)
|
||||||
|
Metamaps.GlobalUI.notifyUser('Map is now starred')
|
||||||
self.updateStar()
|
self.updateStar()
|
||||||
},
|
},
|
||||||
unstar: function () {
|
unstar: function () {
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
// all this only for the logged in home page
|
// all this only for the logged in home page
|
||||||
if (Metamaps.Active.Mapper) {
|
if (Metamaps.Active.Mapper) {
|
||||||
|
$('.homeButton a').attr('href', '/')
|
||||||
Metamaps.GlobalUI.hideDiv('#yield')
|
Metamaps.GlobalUI.hideDiv('#yield')
|
||||||
|
|
||||||
Metamaps.GlobalUI.showDiv('#explore')
|
Metamaps.GlobalUI.showDiv('#explore')
|
||||||
|
@ -89,6 +90,7 @@
|
||||||
document.title = 'Explore My Maps | Metamaps'
|
document.title = 'Explore My Maps | Metamaps'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Metamaps.Active.Mapper) $('.homeButton a').attr('href', '/explore/' + section + (id ? '/' + id : ''))
|
||||||
$('.wrapper').removeClass('homePage mapPage topicPage')
|
$('.wrapper').removeClass('homePage mapPage topicPage')
|
||||||
$('.wrapper').addClass('explorePage')
|
$('.wrapper').addClass('explorePage')
|
||||||
|
|
||||||
|
|
|
@ -947,15 +947,51 @@ font-family: 'din-regular', helvetica, sans-serif;
|
||||||
.map {
|
.map {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width:220px;
|
width:220px;
|
||||||
height:340px;
|
height:340px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
background: #424242;
|
background: #e8e8e8;
|
||||||
border-radius:2px;
|
border-radius:2px;
|
||||||
margin:16px 16px 16px 19px;
|
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);
|
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 {
|
.mapCard {
|
||||||
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||||
|
@ -974,7 +1010,7 @@ font-family: 'din-regular', helvetica, sans-serif;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:308px;
|
height:308px;
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
color:#F5F5F5;
|
color: #424242;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mapCard .title {
|
.mapCard .title {
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
}
|
}
|
||||||
.homeButton a {
|
.homeButton a {
|
||||||
display:block;
|
display:block;
|
||||||
color: #9E9E9E;
|
color: #747474;
|
||||||
font-family: "vinyl", sans-serif;
|
font-family: "vinyl", sans-serif;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
@ -135,6 +135,9 @@
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
.homeButton a:hover {
|
||||||
|
color: #616161;
|
||||||
|
}
|
||||||
|
|
||||||
/* end upperLeftUI */
|
/* end upperLeftUI */
|
||||||
|
|
||||||
|
@ -377,13 +380,16 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
.starMap {
|
.starMap {
|
||||||
background-image: url(<%= asset_data_uri('star.png') %>);
|
background-image: url(<%= asset_data_uri('starmap_sprite.png') %>);
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
}
|
}
|
||||||
.starMap:hover, .starMap.starred {
|
.starMap:hover {
|
||||||
background-position: 0 -32px;
|
background-position: 0 -32px !important;
|
||||||
|
}
|
||||||
|
.starMap.starred {
|
||||||
|
background-position: 0 -64px;
|
||||||
}
|
}
|
||||||
.starMap.starred:hover {
|
.starMap.starred:hover {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
|
@ -670,7 +676,7 @@
|
||||||
font-family: 'din-medium';
|
font-family: 'din-medium';
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
padding: 14px 16px 12px 40px;
|
padding: 14px 8px 12px 40px;
|
||||||
border-bottom: 2px solid rgba(0,0,0,0);
|
border-bottom: 2px solid rgba(0,0,0,0);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -709,38 +715,38 @@
|
||||||
}
|
}
|
||||||
.exploreMapsCenter .myMaps .exploreMapsIcon {
|
.exploreMapsCenter .myMaps .exploreMapsIcon {
|
||||||
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
||||||
background-position: 0 0;
|
background-position: -32px 0;
|
||||||
}
|
}
|
||||||
.exploreMapsCenter .sharedMaps .exploreMapsIcon {
|
.exploreMapsCenter .sharedMaps .exploreMapsIcon {
|
||||||
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
||||||
background-position: -96px 0;
|
background-position: -128px 0;
|
||||||
}
|
}
|
||||||
.exploreMapsCenter .activeMaps .exploreMapsIcon {
|
.exploreMapsCenter .activeMaps .exploreMapsIcon {
|
||||||
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
||||||
background-position: -32px 0;
|
background-position: 0 0;
|
||||||
}
|
}
|
||||||
.exploreMapsCenter .featuredMaps .exploreMapsIcon {
|
.exploreMapsCenter .featuredMaps .exploreMapsIcon {
|
||||||
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
||||||
background-position: -64px 0;
|
background-position: -96px 0;
|
||||||
}
|
}
|
||||||
.exploreMapsCenter .starredMaps .exploreMapsIcon {
|
.exploreMapsCenter .starredMaps .exploreMapsIcon {
|
||||||
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
background-image: url(<%= asset_data_uri 'exploremaps_sprite.png' %>);
|
||||||
background-position: -64px 0;
|
background-position: -96px 0;
|
||||||
}
|
}
|
||||||
.myMaps:hover .exploreMapsIcon, .myMaps.active .exploreMapsIcon {
|
.myMaps:hover .exploreMapsIcon, .myMaps.active .exploreMapsIcon {
|
||||||
background-position: 0 -32px;
|
|
||||||
}
|
|
||||||
.activeMaps:hover .exploreMapsIcon, .activeMaps.active .exploreMapsIcon {
|
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
|
.activeMaps:hover .exploreMapsIcon, .activeMaps.active .exploreMapsIcon {
|
||||||
|
background-position: 0 -32px;
|
||||||
|
}
|
||||||
.featuredMaps:hover .exploreMapsIcon, .featuredMaps.active .exploreMapsIcon {
|
.featuredMaps:hover .exploreMapsIcon, .featuredMaps.active .exploreMapsIcon {
|
||||||
background-position: -64px -32px;
|
background-position: -96px -32px;
|
||||||
}
|
}
|
||||||
.starredMaps:hover .exploreMapsIcon, .starredMaps.active .exploreMapsIcon {
|
.starredMaps:hover .exploreMapsIcon, .starredMaps.active .exploreMapsIcon {
|
||||||
background-position: -64px -32px;
|
background-position: -96px -32px;
|
||||||
}
|
}
|
||||||
.sharedMaps:hover .exploreMapsIcon, .sharedMaps.active .exploreMapsIcon {
|
.sharedMaps:hover .exploreMapsIcon, .sharedMaps.active .exploreMapsIcon {
|
||||||
background-position: -96px -32px;
|
background-position: -128px -32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mapsWrapper {
|
.mapsWrapper {
|
||||||
|
|
|
@ -73,6 +73,33 @@
|
||||||
#exploreMaps > div {
|
#exploreMaps > div {
|
||||||
margin-top: 70px;
|
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) ----------- */
|
/* Smartphones (portrait) ----------- */
|
|
@ -19,7 +19,7 @@ class Map < ActiveRecord::Base
|
||||||
thumb: ['188x126#', :png]
|
thumb: ['188x126#', :png]
|
||||||
#:full => ['940x630#', :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 :name, presence: true
|
||||||
validates :arranged, inclusion: { in: [true, false] }
|
validates :arranged, inclusion: { in: [true, false] }
|
||||||
|
|
|
@ -25,9 +25,12 @@
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "Shared With Me", explore_shared_path, :data => { :router => 'true'} %>
|
<%= link_to "Shared With Me", explore_shared_path, :data => { :router => 'true'} %>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to "Starred By Me", explore_starred_path, :data => { :router => 'true'} %>
|
||||||
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "Recently Active", explore_active_path, :data => { :router => 'true'} %>
|
<%= link_to "Global Maps", explore_active_path, :data => { :router => 'true'} %>
|
||||||
</li>
|
</li>
|
||||||
<% if not current_user %>
|
<% if not current_user %>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Header extends Component {
|
||||||
href={signedIn ? "/" : "/explore/active"}
|
href={signedIn ? "/" : "/explore/active"}
|
||||||
linkClass={activeClass("active")}
|
linkClass={activeClass("active")}
|
||||||
data-router="true"
|
data-router="true"
|
||||||
text="Recently Active"
|
text="Global"
|
||||||
/>
|
/>
|
||||||
<MapLink show={!signedIn && explore}
|
<MapLink show={!signedIn && explore}
|
||||||
href="/explore/featured"
|
href="/explore/featured"
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Maps extends Component {
|
||||||
<div id='exploreMaps'>
|
<div id='exploreMaps'>
|
||||||
<div>
|
<div>
|
||||||
{ user ? <MapperCard user={ user } /> : null }
|
{ user ? <MapperCard user={ user } /> : null }
|
||||||
|
{ currentUser && !user ? <div className="map newMap"><a href="/maps/new"><div className="newMapImage"></div><span>Create new map...</span></a></div> : null }
|
||||||
{ mapElements }
|
{ mapElements }
|
||||||
<div className='clearfloat'></div>
|
<div className='clearfloat'></div>
|
||||||
{ moreToLoad ?
|
{ moreToLoad ?
|
||||||
|
|