mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-12-23 22:58:17 -05:00
fix: update marker colors based on visit status for countries, regions, and cities
This commit is contained in:
@@ -142,7 +142,13 @@
|
||||
{#if country.latitude && country.longitude}
|
||||
<Marker
|
||||
lngLat={[country.longitude, country.latitude]}
|
||||
class="grid px-2 py-1 place-items-center rounded-full border border-gray-200 bg-green-200 text-black focus:outline-6 focus:outline-black"
|
||||
class={`grid px-2 py-1 place-items-center rounded-full border border-gray-200 ${
|
||||
country.num_visits === 0
|
||||
? 'bg-red-200'
|
||||
: country.num_visits === country.num_regions
|
||||
? 'bg-green-200'
|
||||
: 'bg-blue-200'
|
||||
} text-black focus:outline-6 focus:outline-black`}
|
||||
on:click={() => goto(`/worldtravel/${country.country_code}`)}
|
||||
>
|
||||
<span class="text-xs">
|
||||
|
||||
@@ -173,8 +173,8 @@
|
||||
class="grid px-2 py-1 place-items-center rounded-full border border-gray-200 {visitedRegions.some(
|
||||
(visitedRegion) => visitedRegion.region === region.id
|
||||
)
|
||||
? 'bg-red-300'
|
||||
: 'bg-blue-300'} text-black focus:outline-6 focus:outline-black"
|
||||
? 'bg-green-200'
|
||||
: 'bg-red-200'} text-black focus:outline-6 focus:outline-black"
|
||||
on:click={togleVisited(region)}
|
||||
>
|
||||
<span class="text-xs">
|
||||
|
||||
@@ -117,8 +117,8 @@
|
||||
class="grid px-2 py-1 place-items-center rounded-full border border-gray-200 {visitedCities.some(
|
||||
(visitedCity) => visitedCity.city === city.id
|
||||
)
|
||||
? 'bg-red-300'
|
||||
: 'bg-blue-300'} text-black focus:outline-6 focus:outline-black"
|
||||
? 'bg-green-200'
|
||||
: 'bg-red-200'} text-black focus:outline-6 focus:outline-black"
|
||||
on:click={togleVisited(city)}
|
||||
>
|
||||
<span class="text-xs">
|
||||
|
||||
Reference in New Issue
Block a user