Skip to content

Commit

Permalink
add date to remove treasure
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Apr 20, 2023
1 parent eb03f62 commit 8cd4aba
Showing 1 changed file with 52 additions and 50 deletions.
102 changes: 52 additions & 50 deletions src/routes/map/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -828,59 +828,61 @@ ${
const layerControl = L.control.layers(baseMaps, overlayMaps).addTo(map);
// treasure hunt event
// eslint-disable-next-line no-undef
const treasureIcon = L.divIcon({
className: 'treasure-icon',
iconSize: [24, 24],
html: `<span class="relative flex h-6 w-6">
<span
class="animate-ping absolute inline-flex h-full w-full rounded-full bg-bitcoin opacity-75"
/>
<span
class="relative inline-flex h-6 w-6 rounded-full bg-bitcoin"
/>
</span>`
});
if (Date.now() < new Date('April 30, 2023 00:00:00')) {
// eslint-disable-next-line no-undef
const treasureIcon = L.divIcon({
className: 'treasure-icon',
iconSize: [24, 24],
html: `<span class="relative flex h-6 w-6">
<span
class="animate-ping absolute inline-flex h-full w-full rounded-full bg-bitcoin opacity-75"
/>
<span
class="relative inline-flex h-6 w-6 rounded-full bg-bitcoin"
/>
</span>`
});
// eslint-disable-next-line no-undef
L.marker([53.37225, -6.17711], { icon: treasureIcon })
.bindTooltip(
`<p class='text-primary dark:text-white text-lg text-center p-2'>
<i class="fa-solid fa-coins text-bitcoin"></i> <strong>Bitcoin Treasure Hunt</strong> <i class="fa-solid fa-coins text-bitcoin"></i>
<br/>
April 29th, 2023 @ 1PM
<br/>
Hosted by <strong>Dublin Bitcoiners</strong>
<br/>
dublinbitcoiners.com/treasure-hunt
<br/>
Everyone welcome!
</p>
// eslint-disable-next-line no-undef
L.marker([53.37225, -6.17711], { icon: treasureIcon })
.bindTooltip(
`<p class='text-primary dark:text-white text-lg text-center p-2'>
<i class="fa-solid fa-coins text-bitcoin"></i> <strong>Bitcoin Treasure Hunt</strong> <i class="fa-solid fa-coins text-bitcoin"></i>
<br/>
April 29th, 2023 @ 1PM
<br/>
Hosted by <strong>Dublin Bitcoiners</strong>
<br/>
dublinbitcoiners.com/treasure-hunt
<br/>
Everyone welcome!
</p>
${
theme === 'dark'
? `
<style>
.leaflet-tooltip {
background-color: #06171C;
border: 1px solid #e5e7eb
}
.leaflet-tooltip-left::before {
border-left-color: #e5e7eb
}
.leaflet-tooltip-right::before {
${
theme === 'dark'
? `
<style>
.leaflet-tooltip {
background-color: #06171C;
border: 1px solid #e5e7eb
}
.leaflet-tooltip-left::before {
border-right-color: #e5e7eb
}
</style>`
: ''
}`,
{ sticky: true }
)
.addTo(map);
border-left-color: #e5e7eb
}
.leaflet-tooltip-right::before {
border-right-color: #e5e7eb
}
</style>`
: ''
}`,
{ sticky: true }
)
.addTo(map);
}
// change default icons
// eslint-disable-next-line no-undef
Expand Down

0 comments on commit 8cd4aba

Please sign in to comment.