-
-
-
- {#if avatar}
-
- {:else}
-
- {/if}
-
- {name || 'BTC Map Community'}
-
- {#if org}
-
- {/if}
- {#if sponsor}
-
- {/if}
- {#if continent}
-
- {continent.replace('-', ' ')}
-
-
- {:else}
-
- {/if}
- {#if data.id}
-
View on community map
- {/if}
-
-
- {#if dataInitialized}
-
- {:else}
-
-
- {#each Array(3) as skeleton}
-
- {/each}
-
- {/if}
-
- {#if lightning}
-
- {/if}
-
-
-
-
- {name || 'BTC Map Community'} Map
-
- {#if dataInitialized}
-
-
- {#each Array(grade) as star}
-
- {/each}
-
-
-
-
- {#each Array(5 - grade) as star}
-
- {/each}
-
- {:else}
-
-
- {#each Array(5) as star}
-
- {/each}
-
- {/if}
-
-
-
-
-
-
-
- {#if !mapLoaded}
-
- {/if}
-
-
-
-
-
-
-
0 ? upToDatePercent : undefined}
- border="border-b xl:border-b-0 xl:border-r border-statBorder"
- tooltip="Locations that have been verified within one year."
- />
- 0 ? outdatedPercent : undefined}
- border="border-b md:border-b-0 md:border-r border-statBorder"
- />
- 0 ? legacyPercent : undefined}
- tooltip="Locations with a payment:bitcoin tag instead of the
- currency:XBT tag."
- />
-
-
-
- {#if chartsLoading}
-
-
-
- {/if}
-
-
-
-
-
-
-
-
- {name || 'BTC Map Community'} Supertaggers
-
-
-
-
-
-
-
-
- {name || 'BTC Map Community'} Activity
-
-
-
-
-
-
-
-
-
-
-
-
- {name || 'BTC Map Community'} Tickets
- {#if tickets && !ticketError}
- ({totalTickets})
- {/if}
-
-
-
- {#each ticketTypes as type}
-
- {/each}
-
-
- {#if tickets && !ticketError}
- {#if showType === 'Add'}
- {#if add.length}
- {#each add as ticket}
-
- {/each}
- {:else}
-
- No open add tickets.
-
- {/if}
- {:else if showType === 'Verify'}
- {#if verify.length}
- {#each verify as ticket}
-
- {/each}
- {:else}
-
- No open verify tickets.
-
- {/if}
- {/if}
-
- {#if tickets?.length === 100}
-
- View all open tickets directly on GitHub.
-
- {/if}
- {:else}
-
- Error fetching tickets.
-
- {/if}
-
-
-
-
-
-
- {name || 'BTC Map Community'} Charts
-
-
-
- {#if chartsLoading}
-
-
-
- {/if}
-
-
-
- *Locations with a survey:date, check_date, or
- check_date:currency:XBT tag less than one year old.
-
-
-
-
-
- {#if chartsLoading}
-
-
-
- {/if}
-
-
-
- *Locations accepting any bitcoin payment method.
-
-
-
-
-
- {#if chartsLoading}
-
-
-
- {/if}
-
-
-
- *Locations with a payment:bitcoin tag instead of the
- currency:XBT tag.
-
-
-
-
-
- {#if chartsLoading}
-
-
-
- {/if}
-
-
-
- *Locations with payment:onchain, payment:lightning and
- payment:lightning_contactless tags.
-
-
-
-
-
-
- *More information on bitcoin mapping tags can be found here.
-
- *Chart data updated once every 24 hours.
-
-
+
diff --git a/src/routes/countries/+page.svelte b/src/routes/countries/+page.svelte
new file mode 100644
index 00000000..94ddc806
--- /dev/null
+++ b/src/routes/countries/+page.svelte
@@ -0,0 +1,174 @@
+
+
+
+ BTC Map - Countries
+
+
+
+
+
+
+
+
+
+ {#if typeof window !== 'undefined'}
+
+ Bitcoin adoption by countries.
+
+ {:else}
+
+ {/if}
+
+
+ Your country? Your map!
+
+
+
+
+
+
+ {#if section}
+
+
+
+ {/if}
+
+
+ {#each countrySections as item}
+ {#if section === item.section}
+
+ {/if}
+ {/each}
+
+
+
+
+
+
+
+{#if typeof window !== 'undefined'}
+ {#if detectTheme() === 'dark' || $theme === 'dark'}
+
+ {/if}
+{/if}
diff --git a/src/routes/countries/leaderboard/+page.svelte b/src/routes/countries/leaderboard/+page.svelte
new file mode 100644
index 00000000..d661e79b
--- /dev/null
+++ b/src/routes/countries/leaderboard/+page.svelte
@@ -0,0 +1,48 @@
+
+
+
+ BTC Map - Countries Leaderboard
+
+
+
+
+
+
+
+
+
+
+ {#if typeof window !== 'undefined'}
+
+ Top Countries
+
+ {:else}
+
+ {/if}
+
+
+ Insights into bitcoin adoption worldwide!
+
+
+
+
+
+
+
+
+
+
diff --git a/src/routes/country/[area]/+page.server.ts b/src/routes/country/[area]/+page.server.ts
new file mode 100644
index 00000000..559dd5ed
--- /dev/null
+++ b/src/routes/country/[area]/+page.server.ts
@@ -0,0 +1,42 @@
+import { GITHUB_API_KEY } from '$env/static/private';
+import { error } from '@sveltejs/kit';
+import axios from 'axios';
+import axiosRetry from 'axios-retry';
+import type { PageServerLoad } from './$types';
+
+axiosRetry(axios, { retries: 3, retryDelay: axiosRetry.exponentialDelay });
+
+export const load: PageServerLoad = async ({ params }) => {
+ const { area } = params;
+ try {
+ const response = await axios.get(`https://api.btcmap.org/v2/areas/${area}`);
+
+ const data = response.data;
+
+ if (data && data.id && data.tags && data.tags.name) {
+ const headers = {
+ Authorization: `Bearer ${GITHUB_API_KEY}`,
+ Accept: 'application/vnd.github+json'
+ };
+
+ const issues = await axios
+ .get(
+ `https://api.github.com/repos/teambtcmap/btcmap-data/issues?per_page=100&labels=${data.tags.name}`,
+ { headers }
+ )
+ .then(function (response) {
+ // handle success
+ return response.data;
+ })
+ .catch(function (error) {
+ // handle error
+ console.log(error);
+ return 'error';
+ });
+
+ return { id: data.id, name: data.tags.name, tickets: issues };
+ }
+ } catch (err) {
+ error(404, 'Country Not Found');
+ }
+};
diff --git a/src/routes/country/[area]/+page.svelte b/src/routes/country/[area]/+page.svelte
new file mode 100644
index 00000000..3b8b0c27
--- /dev/null
+++ b/src/routes/country/[area]/+page.svelte
@@ -0,0 +1,24 @@
+
+
+
+ {name ? name + ' - ' : ''}BTC Map Country
+
+
+
+
+
+
diff --git a/src/routes/media/+page.svelte b/src/routes/media/+page.svelte
index 01e03062..43c0d67e 100644
--- a/src/routes/media/+page.svelte
+++ b/src/routes/media/+page.svelte
@@ -15,6 +15,7 @@
{ link: '/images/og/add-community.png', name: 'Add Community' },
{ link: '/images/og/add.png', name: 'Add Location' },
{ link: '/images/og/communities.png', name: 'Communities' },
+ { link: '/images/og/countries.png', name: 'Countries' },
{ link: '/images/og/apps.png', name: 'Download Apps' },
{ link: '/images/og/badges.png', name: 'Earn Badges' },
{ link: '/images/og/home.png', name: 'Main' },
@@ -25,6 +26,7 @@
{ link: '/images/og/supertagger.png', name: 'Supertagger Profile' },
{ link: '/images/og/support.png', name: 'Support Us' },
{ link: '/images/og/top-communities.png', name: 'Top Communities' },
+ { link: '/images/og/top-countries.png', name: 'Top Countries' },
{ link: '/images/og/verify.png', name: 'Verify Locations' }
];
diff --git a/src/routes/merchant/[id]/+page.svelte b/src/routes/merchant/[id]/+page.svelte
index e85fbb17..15dac309 100644
--- a/src/routes/merchant/[id]/+page.svelte
+++ b/src/routes/merchant/[id]/+page.svelte
@@ -853,7 +853,7 @@
alt="logo"
class="mx-auto h-20 w-20 rounded-full object-cover"
on:error={function () {
- this.src = '/images/communities/bitcoin.svg';
+ this.src = '/images/bitcoin.svg';
}}
/>
diff --git a/static/btcmap.webmanifest b/static/btcmap.webmanifest
index cc9a3e18..4774a3db 100644
--- a/static/btcmap.webmanifest
+++ b/static/btcmap.webmanifest
@@ -634,6 +634,20 @@
}
]
},
+ {
+ "name": "Countries",
+ "short_name": "Countries",
+ "description": "Bitcoin adoption by countries",
+ "url": "/countries",
+ "icons": [
+ {
+ "src": "/icons/pwa/maskable/maskable_icon_x96.png",
+ "sizes": "96x96",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ]
+ },
{
"name": "Support Us",
"short_name": "Support",
diff --git a/static/icons/mobile-nav/spritesheet.svg b/static/icons/mobile-nav/spritesheet.svg
index c70212c5..1b996453 100644
--- a/static/icons/mobile-nav/spritesheet.svg
+++ b/static/icons/mobile-nav/spritesheet.svg
@@ -13,6 +13,12 @@
+
+
+
+
+
+
@@ -24,14 +30,14 @@
-
-
-
+
+
+
diff --git a/static/images/communities/bitcoin.svg b/static/images/bitcoin.svg
similarity index 100%
rename from static/images/communities/bitcoin.svg
rename to static/images/bitcoin.svg
diff --git a/static/images/og/countries.png b/static/images/og/countries.png
new file mode 100644
index 00000000..28c4e7c2
Binary files /dev/null and b/static/images/og/countries.png differ
diff --git a/static/images/og/top-countries.png b/static/images/og/top-countries.png
new file mode 100644
index 00000000..136547b9
Binary files /dev/null and b/static/images/og/top-countries.png differ