diff --git a/_includes/overview.html b/_includes/overview.html index 39aa47f1d29101c96acdf653eaacc4ed1d18db4a..69c92d833e128521a3ec79e8b9c39a27a50aedb5 100644 --- a/_includes/overview.html +++ b/_includes/overview.html @@ -26,7 +26,7 @@ <div class="orderlist-title"> <a href="{{ o.git-repo }}/blob/master/{{ o.order-title }}" target="git-order"><u>{{ o.headline | truncate: 32 }}</u></a> <a href="{{ o.git-profile }}" target="git-profile"><span class="feather-icon icon-user"></span></a> <a href="{{ o.git-repo }}/issues/new?issue[title]={{ o.order-title }}" target="git-contact"><span class="feather-icon icon-mail"></span></a><br> - <small><lang><span class="feather-icon icon-tag"></span>{{ o.ln }}</lang> <used><span class="feather-icon icon-tag"></span>{{ o.condition }}</used> <tags><span class="feather-icon icon-tag"></span>{{ o.tags }}</tags> <span class="d-none distance-data">{{ o.latitude }},{{ o.longitude }}</span> <span class="distance"></span></small><br> + <small><lang><span class="feather-icon icon-tag"></span>{{ o.language-code }}</lang> <span class="d-none distance-data">{{ o.latitude }},{{ o.longitude }},{{ o.country-code }}</span> <span class="distance"></span> <used><span class="feather-icon icon-tag"></span>{{ o.condition }}</used> <tags><span class="feather-icon icon-tag"></span>{{ o.tags }}</tags></small><br> <div><small>{{ o.description }}</small></div> </div> diff --git a/assets/js/script.js b/assets/js/script.js index 404f4f560561d2ba565cf4d37eb0c29eb878d68c..5bf15e17ed83bd4b1c84df9642f64eb3986546bc 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -35,15 +35,16 @@ function get_distances(){ if( lat == null || long == null ){ lat=-100; } + var calc_distance=false; if( lat >= -90 && lat <= 90 && long >=-180 && long <= 180 ){ - } else { - return; + calc_distance=true; } $.each( $('.distance'), function(i,v){ var geo=$( $(v).context.previousElementSibling ).text(); var llat=geo.split(/,/g)[0]; var llong=geo.split(/,/g)[1]; - $(v).html('<span class="feather-icon icon-map-pin"></span> ' + Math.round( getDistanceFromLatLonInKm (lat, long, llat, llong ) )+'km' ); + var lcountry=geo.split(/,/g)[2]; + $(v).html('<span class="feather-icon icon-map-pin"></span> ' + lcountry + ' ' + (( calc_distance ) ? '( ' + Math.round( getDistanceFromLatLonInKm (lat, long, llat, llong ) )+'km ) ' : '' ) ); } ); } diff --git a/css/main.scss b/css/main.scss index 8b861b12dc15f4ff8db79284ce3a1ed1278cb424..0e1688ba3f58d0ef96b6ff2059c70bbe756bf734 100644 --- a/css/main.scss +++ b/css/main.scss @@ -181,7 +181,7 @@ used { } lang { - color:midnightblue; + color:darkmagenta; } tags { @@ -192,3 +192,7 @@ tags { font-size:1rem; color: goldenrod; } + +.distance { + color:midnightblue; +} diff --git a/script/get_orders.py b/script/get_orders.py index 44279c874d2f034d1d4a8305d5b86b5e1040309d..96d56bf25e090aaf412d6485ed08fe7c46f68102 100644 --- a/script/get_orders.py +++ b/script/get_orders.py @@ -52,6 +52,7 @@ for source in Sources: file.write('order-title: '+furl+'\n' ) file.write('latitude: '+str( O['latitude'] )+'\n' ) file.write('longitude: '+str( O['longitude'] )+'\n' ) + file.write('country-code: '+ O['country-code'] +'\n' ) file.write(contents.decode("utf-8")) file.write('\n---') file.close()