Skip to content

Commit c072846

Browse files
committed
Merge pull request #50 from hotosm/feature/dropdowns
Feature/dropdowns
2 parents 87eebf0 + 18b0d25 commit c072846

File tree

7 files changed

+70
-15
lines changed

7 files changed

+70
-15
lines changed

app/assets/scripts/components/modals/info_modal.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ var InfoModal = React.createClass({
1313
return (
1414
<div className="prose">
1515
<h2>OpenAerialMap</h2>
16-
<p>OpenAerialMap (OAM) is a set of tools for searching, sharing, and using openly licensed satellite and unmanned aerial vehicle (UAV) imagery. Built on top of the <a href="https://github.com/openimagerynetwork">Open Imagery Network (OIN)</a>, OAM is an open service that will provide search and access to this imagery.</p>
16+
<p>OpenAerialMap (OAM) is a set of tools for searching, sharing, and using openly licensed satellite and unmanned aerial vehicle (UAV) imagery.</p>
17+
<p>Built on top of the <a href="https://github.com/openimagerynetwork" title="Visit the GitHub repository">Open Imagery Network (OIN)</a>, OAM is an open service that will provide search and access to this imagery.</p>
1718
<h2>How to use?</h2>
18-
<p>Use the map to pan and zoom to search available imagery. Available imagery can be previewed by selecting a tile and browsing the imagery in the sidebar. All imagery is publicly licensed and made available through the Humanitarian OpenStreetMap Team&#39;s Beta OIN Node.</p>
19+
<p>Use the map to pan and zoom to search available imagery. Available imagery can be previewed by selecting a tile and browsing the imagery in the sidebar.</p>
20+
<p>All imagery is publicly licensed and made available through the Humanitarian OpenStreetMap Team&#39;s Beta OIN Node.</p>
1921
<h2>Join in the Development</h2>
20-
<p>OAM is releasing a beta version to preview and test functionality. There are plenty of ways to get involved in OpenAerialMap. Check out the <a href="https://github.com/hotosm/OpenAerialMap" title="Visit the GitHub repository">GitHub repository</a> to learn more about the design and how to get involved in the project.</p>
22+
<p>OAM is releasing a beta version to preview and test functionality. There are plenty of ways to get involved in OpenAerialMap.</p>
23+
<p>Check out the <a href="https://github.com/hotosm/OpenAerialMap" title="Visit the GitHub repository">GitHub repository</a> to learn more about the design and how to get involved in the project.</p>
2124
</div>
2225
);
2326
},

app/assets/scripts/components/results_item.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ var ResultsItem = React.createClass({
3131
tmsOptions = (<ZcInput value={d.properties.tms} />);
3232
}
3333

34+
var blurImage = {
35+
backgroundImage: 'url(' + d.properties.thumbnail + ')'
36+
};
37+
3438
return (
3539
<article className={(d.properties.tms ? 'has-tms ' : '') + 'results-single'}>
3640
<header className="pane-header">
@@ -40,20 +44,21 @@ var ResultsItem = React.createClass({
4044
<div className="pane-body">
4145
<div className="pane-body-inner">
4246
<div className="single-media">
47+
<div className="blur-media" style={blurImage}></div>
4348
<img alt="Result thumbnail" src={d.properties.thumbnail || "assets/graphics/layout/img-placeholder.svg" } />
4449
</div>
4550
<div className="single-actions">
4651
{tmsOptions}
4752
<a title="Download image" className="bttn-download" target="_blank" href={d.uuid}><span>Download</span></a>
4853
</div>
4954
<dl className="single-details">
50-
<dt>Type</dt>
55+
<dt><span>Type</span></dt>
5156
<dd>{d.properties.tms ? 'Multiscene TMS' : 'Single Scene'}</dd>
52-
<dt>Date</dt>
57+
<dt><span>Date</span></dt>
5358
<dd>{d.acquisition_start.slice(0,10)}</dd>
54-
<dt>Resolution</dt>
59+
<dt><span>Resolution</span></dt>
5560
<dd>{utils.gsdToUnit(d.gsd)}</dd>
56-
<dt>Platform</dt>
61+
<dt><span>Platform</span></dt>
5762
<dd className="cap">{d.platform}</dd>
5863
</dl>
5964
</div>

app/assets/scripts/components/shared/zc_input.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ var ZcInput = React.createClass({
3737
<div className="input-group">
3838
<input className="form-control input-m" type="text" value={this.props.value} readOnly data-hook="copy:data" />
3939
<span className="input-group-bttn"><button data-title="" type="button" className="bttn-clipboard disabled" data-hook="copy:trigger"><span>Copy to clipboard</span></button></span>
40+
{/*
41+
<span className="input-group-bttn drop dropdown open center">
42+
<a href="#" title="Show options" className="bttn-uoptions" data-toggle="drop"><span>Options</span></a>
43+
<div className="drop-content">
44+
<ul className="drop-menu tms-options-menu" role="menu">
45+
<li className="has-icon-bef clipboard disabled"><a href="" target="_blank" title="Open with iD editor">Open with iD editor</a></li>
46+
<li className="has-icon-bef clipboard disabled"><a href="" target="_blank" title="Open with JOSM">Open with JOSM</a></li>
47+
<li className="has-icon-bef clipboard"><a href="" title="Copy to clipboard" data-hook="copy:trigger">Copy to clipboard</a></li>
48+
</ul>
49+
</div>
50+
</span>
51+
*/}
4052
</div>
4153
);
4254
}

app/assets/styles/_base.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ a:active{
7373
#site-title {
7474
position: absolute;
7575
top: 1rem;
76+
right: 6.5rem;
7677
z-index: 10;
77-
left: 50%;
78-
@include transform(translate(-50%, 0));
78+
@include transition(all 0.64s ease 0s);
7979
span {
8080
@extend .visually-hidden;
8181
}
@@ -94,6 +94,10 @@ a:active{
9494
line-height: 1.25rem;
9595
text-transform: uppercase;
9696
}
97+
@include media(large-up) {
98+
right: 50%;
99+
@include transform(translate(50%, 0));
100+
}
97101
}
98102

99103
.nav-block-prime,
@@ -193,8 +197,10 @@ a:active{
193197
.prose {
194198
@include columns(3);
195199
@include column-gap(2rem);
200+
margin-bottom: -0.75rem;
196201
h2 {
197-
margin-top: 0;
202+
@include heading(1.25rem); // 20
203+
margin: 0 0 1rem 0;
198204
-webkit-column-break-inside: avoid; /* Chrome, Safari, Opera */
199205
page-break-inside: avoid; /* Firefox */
200206
break-inside: avoid; /* IE 10+ */

app/assets/styles/_buttons.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ input[type=submit] {
129129
&.download:before { @extend .icon-download; }
130130
&.clipboard:before { @extend .icon-clipboard; }
131131
&.history:before { @extend .icon-history; }
132+
&.uoptions:before { @extend .icon-s-arr-down; }
132133
}
133134

134135
.bttn-notxt {
@@ -255,4 +256,8 @@ input[type=submit] {
255256

256257
.bttn-clipboard {
257258
@extend .bttn, .bttn-base-light, .bttn-m, .bttn-notxt, .clipboard;
259+
}
260+
261+
.bttn-uoptions {
262+
@extend .bttn, .bttn-base-light, .bttn-m, .bttn-notxt, .uoptions;
258263
}

app/assets/styles/_overlays.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,14 @@
9292

9393
.drop-menu {
9494
list-style: none;
95-
margin: 0 -1rem;
95+
margin: -0.5rem -1rem;
9696
padding: 0;
9797
@extend .clearfix;
9898
white-space: nowrap;
9999
font-family: $base-font-family;
100100
font-weight: $base-font-regular;
101101
font-size: 0.875rem;
102102
line-height: 1.25rem;
103-
text-transform: uppercase;
104103
.sep:not(:first-child) {
105104
box-shadow: inset 0 1px 0 0 $brdr-rgba;
106105
padding-top: 0.25rem;
@@ -150,6 +149,7 @@
150149
&.twitter a:before { @extend .icon-twitter; }
151150
&.facebook a:before { @extend .icon-facebook; }
152151
&.google-plus a:before { @extend .icon-google-plus; }
152+
&.clipboard a:before { @extend .icon-clipboard; }
153153
}
154154

155155
.drop-menu > .active > a,

app/assets/styles/_results-pane.scss

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,12 @@
137137
text-align: center;
138138
background: tint($base-color, 80%);
139139
margin: -1rem -1rem 1rem -1rem;
140-
padding: 1rem;
141140
height: 16rem;
142141
line-height: 16rem;
143142
font-size: 0;
144143
vertical-align: middle;
144+
overflow: hidden;
145+
padding: 1rem;
145146
&:after {
146147
position: absolute;
147148
bottom: 0;
@@ -150,11 +151,28 @@
150151
height: 1px;
151152
background: $brdr-rgba;
152153
content: "";
154+
z-index: 3;
153155
}
154156
img {
157+
position: relative;
158+
z-index: 2;
155159
max-width: 100%;
156160
height: 100%;
157161
display: inline-block;
162+
box-shadow: 0 2px 12px 2px $spread-shadow-rgba;
163+
border-radius: $semi-radius;
164+
}
165+
.blur-media {
166+
position: absolute;
167+
z-index: 1;
168+
top: 0;
169+
left: 0;
170+
bottom: 0;
171+
right: 0;
172+
background-size: cover;
173+
display: block;
174+
@include filter(blur(0.5rem));
175+
opacity: 0.24;
158176
}
159177
}
160178

@@ -171,10 +189,11 @@
171189
.single-actions {
172190
.input-group {
173191
float: left;
174-
width: 60%;
192+
width: calc(64% - 0.5rem);
175193
}
176194
.bttn-download {
177195
float: right;
196+
width: 36%;
178197
min-width: initial;
179198
}
180199
}
@@ -184,6 +203,8 @@
184203
margin: 0 -1rem;
185204
font-size: 0.875rem;
186205
line-height: 1.25rem;
206+
box-shadow: inset 0 1px 0 0 $brdr-rgba;
207+
@extend .clearfix;
187208
dt, dd {
188209
float: left;
189210
margin: 0;
@@ -198,7 +219,10 @@
198219
text-transform: uppercase;
199220
clear: left;
200221
padding-right: 0.5rem;
201-
opacity: 0.64;
222+
font-size: 0.775rem;
223+
span {
224+
opacity: 0.64;
225+
}
202226
}
203227
dd {
204228
width: 68%;

0 commit comments

Comments
 (0)