Skip to content

Commit cf789ec

Browse files
authored
Improved usability with colors
1 parent fc98dd6 commit cf789ec

File tree

3 files changed

+62
-43
lines changed

3 files changed

+62
-43
lines changed

LGBTQmap/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ <h2>Welcome to LGBTQ+map!</h2>
8484
<span class="infoIcons"><img src="icons/theater.svg" alt="theater icon"/>&nbsp;Theater</span>,
8585
<span class="infoIcons"><img src="icons/vet.svg" alt="vet icon"/>&nbsp;Veterinarian</span>,
8686
or 🏳️‍🌈&nbsp;Other.</p>
87-
<p>Little icons indicate welcomeness, from 🌈&nbsp;primarily for LGBTQ+, to 💗&nbsp;welcome, to ⛔&nbsp;prohibited. Dots indicate if there is a source for welcomeness (
87+
<p>Little icons indicate welcomeness, from 🌈&nbsp;primarily for LGBTQ+, to 💗&nbsp;welcome, to ⛔&nbsp;prohibited.
88+
<!-- Dots indicate if there is a source for welcomeness (
8889
<span class="infoIcons tinyIcons"><img src="icons/circle_blue.svg" alt="blue circle"/>&nbsp;has source</span>,
8990
<span class="infoIcons tinyIcons"><img src="icons/circle_orange.svg" alt="orange circle"/>&nbsp;no source, but check website</span>,
90-
<span class="infoIcons tinyIcons"><img src="icons/circle_red.svg" alt="red circle"/>&nbsp;no source or website</span>).
91+
<span class="infoIcons tinyIcons"><img src="icons/circle_red.svg" alt="red circle"/>&nbsp;no source or website</span>). -->
9192
</p>
9293
<p>Tap the icons to get more information or to edit a place in OpenStreetMap. </p>
9394
<p></p>

LGBTQmap/mapcode.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -216,77 +216,77 @@ function convertMilliseconds(ms) {
216216
if (years > 1) {
217217
if (months > 1) {
218218
if (days > 1) {
219-
return years+" years, "+months+" months, "+days+" days ago";
219+
return "<span class='years'>"+years+" years, "+months+" months, "+days+" days ago</span>";
220220
} else if (days == 1) {
221-
return years+" years, "+months+" months, "+days+" day ago";
221+
return "<span class='years'>"+years+" years, "+months+" months, "+days+" day ago</span>";
222222
} else {
223-
return years+" years, "+months+" months ago";
223+
return "<span class='years'>"+years+" years, "+months+" months ago</span>";
224224
}
225225
} else if (months == 1) {
226226
if (days > 1) {
227-
return years+" years, "+months+" month, "+days+" days ago";
227+
return "<span class='years'>"+years+" years, "+months+" month, "+days+" days ago</span>";
228228
} else if (days == 1) {
229-
return years+" years, "+months+" month, "+days+" day ago";
229+
return "<span class='years'>"+years+" years, "+months+" month, "+days+" day ago</span>";
230230
} else {
231-
return years+" years, "+months+" month ago";
231+
return "<span class='years'>"+years+" years, "+months+" month ago</span>";
232232
}
233233
} else {
234234
if (days > 1) {
235-
return years+" years, "+days+" days ago";
235+
return "<span class='years'>"+years+" years, "+days+" days ago</span>";
236236
} else if (days == 1) {
237-
return years+" years, "+days+" day ago";
237+
return "<span class='years'>"+years+" years, "+days+" day ago</span>";
238238
} else {
239-
return years+" years ago";
239+
return "<span class='years'>"+years+" years ago</span>";
240240
}
241241
}
242242
} else if (years == 1) {
243243
if (months > 1) {
244244
if (days > 1) {
245-
return years+" year, "+months+" months, "+days+" days ago";
245+
return "<span class='oneyear'>"+years+" year, "+months+" months, "+days+" days ago</span>";
246246
} else if (days == 1) {
247-
return years+" year, "+months+" months, "+days+" day ago";
247+
return "<span class='oneyear'>"+years+" year, "+months+" months, "+days+" day ago</span>";
248248
} else {
249-
return years+" year, "+months+" months ago";
249+
return "<span class='oneyear'>"+years+" year, "+months+" months ago</span>";
250250
}
251251
} else if (months == 1) {
252252
if (days > 1) {
253-
return years+" year, "+months+" month, "+days+" days ago";
253+
return "<span class='oneyear'>"+years+" year, "+months+" month, "+days+" days ago</span>";
254254
} else if (days == 1) {
255-
return years+" year, "+months+" month, "+days+" day ago";
255+
return "<span class='oneyear'>"+years+" year, "+months+" month, "+days+" day ago</span>";
256256
} else {
257-
return years+" year, "+months+" month ago";
257+
return "<span class='oneyear'>"+years+" year, "+months+" month ago</span>";
258258
}
259259
} else {
260260
if (days > 1) {
261-
return years+" year, "+days+" days ago";
261+
return "<span class='oneyear'>"+years+" year, "+days+" days ago</span>";
262262
} else if (days == 1) {
263-
return years+" year, "+days+" day ago";
263+
return "<span class='oneyear'>"+years+" year, "+days+" day ago</span>";
264264
} else {
265-
return years+" year ago";
265+
return "<span class='oneyear'>"+years+" year ago</span>";
266266
}
267267
}
268268
} else {
269269
if (months > 1) {
270270
if (days > 1) {
271-
return months+" months, "+days+" days ago";
271+
return "<span class='months'>"+months+" months, "+days+" days ago</span>";
272272
} else if (days == 1) {
273-
return months+" months, "+days+" day ago";
273+
return "<span class='months'>"+months+" months, "+days+" day ago</span>";
274274
} else {
275-
return months+" months ago";
275+
return "<span class='months'>"+months+" months ago</span>";
276276
}
277277
} else if (months == 1) {
278278
if (days > 1) {
279-
return months+" month, "+days+" days ago";
279+
return "<span class='months'>"+months+" month, "+days+" days ago</span>";
280280
} else if (days == 1) {
281-
return months+" month, "+days+" day ago";
281+
return "<span class='months'>"+months+" month, "+days+" day ago</span>";
282282
} else {
283-
return months+" month ago";
283+
return "<span class='onemonth'>"+months+" month ago</span>";
284284
}
285285
} else {
286286
if (days > 1) {
287-
return days+" days ago";
287+
return "<span class='days'>"+days+" days ago</span>";
288288
} else if (days == 1) {
289-
return days+" day ago";
289+
return "<span class='days'>"+days+" day ago</span>";
290290
}
291291
}
292292
}
@@ -487,15 +487,15 @@ function element_to_map(data) {
487487
setPoiMarker("", no_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
488488
}
489489

490-
if ('construction:amenity' in el.tags || 'disused:amenity' in el.tags || 'abandoned:amenity' in el.tags || 'construction:tourism' in el.tags || 'disused:tourism' in el.tags || 'abandoned:tourism' in el.tags || 'construction:shop' in el.tags || 'disused:shop' in el.tags || 'abandoned:shop' in el.tags || 'construction:leisure' in el.tags || 'disused:leisure' in el.tags || 'abandoned:leisure' in el.tags) {
491-
//Nothing
492-
} else if (el.tags["source:lgbtq"]) {
493-
setPoiMarker("", has_source_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
494-
} else if (el.tags.website) {
495-
setPoiMarker("", has_website_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
496-
} else {
497-
setPoiMarker("", no_source_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
498-
}
490+
// if ('construction:amenity' in el.tags || 'disused:amenity' in el.tags || 'abandoned:amenity' in el.tags || 'construction:tourism' in el.tags || 'disused:tourism' in el.tags || 'abandoned:tourism' in el.tags || 'construction:shop' in el.tags || 'disused:shop' in el.tags || 'abandoned:shop' in el.tags || 'construction:leisure' in el.tags || 'disused:leisure' in el.tags || 'abandoned:leisure' in el.tags) {
491+
// //Nothing
492+
// } else if (el.tags["source:lgbtq"]) {
493+
// setPoiMarker("", has_source_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
494+
// } else if (el.tags.website) {
495+
// setPoiMarker("", has_website_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
496+
// } else {
497+
// setPoiMarker("", no_source_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
498+
// }
499499
// } else {
500500
// setPoiMarker("", error_icon, el.lat, el.lon, el.tags, el.id, el.type, el.timestamp);
501501
// error_counter++;

LGBTQmap/style.css

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,12 @@ a, leaflet-container a {
447447
font-size: 1em;
448448
}
449449
.editdate {
450-
font-size: 0.8em;
451-
opacity: 0.3;
450+
color:#999;
451+
/* opacity: 0.7;*/
452+
font-size: 0.9em;
453+
/* opacity: 0.3;*/
452454
position: relative;
453-
top: -5px;
455+
top: -3px;
454456
}
455457

456458
.primary {
@@ -543,7 +545,7 @@ hr {
543545

544546
.linktext {
545547
margin-top: 6px;
546-
font-size: 80%;
548+
font-size: 0.9em;
547549
}
548550

549551
.linktext a {
@@ -582,7 +584,7 @@ hr {
582584
}
583585

584586
.tiny {
585-
font-size: 0.8em;
587+
font-size: 0.9em;
586588
position: relative;
587589
top: -3px;
588590
}
@@ -602,7 +604,7 @@ hr {
602604
cursor: pointer;
603605
margin: 0 !important;
604606
background-color: mediumpurple;
605-
/*background-image: linear-gradient(to right, red, orange, yellow, green, blue, purple);*/
607+
/* background-image: linear-gradient(to right, red, orange, yellow, green, blue, purple);*/
606608
padding: 10px 0 10px 0;
607609
opacity: 0.7;
608610
/*box-shadow: 0 0 10px 10px mediumpurple;*/
@@ -722,4 +724,20 @@ hr {
722724
.sourceIcon {
723725
border: 0;
724726
pointer-events: none
727+
}
728+
729+
.days {
730+
color: #91bfdb;
731+
}
732+
.onemonth {
733+
color: #e0f3f8;
734+
}
735+
.months {
736+
color: #fee090;
737+
}
738+
.oneyear {
739+
color: #fc8d59;
740+
}
741+
.years {
742+
color: #d73027;
725743
}

0 commit comments

Comments
 (0)