Skip to content

Commit

Permalink
add dublin bitcoiners treasure hunt event
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Apr 19, 2023
1 parent 00eb555 commit 5f84ff8
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Tagger profile badges by [AndrejCibik](https://twitter.com/AndrejCibik)

<a href="https://www.flaticon.com/free-icons/satoshi-nakamoto" title="satoshi nakamoto icons">Satoshi nakamoto icons created by Vitaly Gorbachev - Flaticon</a>

Treasure Chest icon by [Bonsaiheldin](https://opengameart.org/content/treasure-chests-32x32)

---

![Untitled](https://user-images.githubusercontent.com/85003930/194117128-2f96bafd-2379-407a-a584-6c03396a42cc.png)
4 changes: 4 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ html {
background-image: url('/icons/boosted-icon-pin.svg');
}

.treasure-icon {
background-image: url('/icons/treasure-icon.png');
}

.center {
position: absolute;
top: 50%;
Expand Down
53 changes: 53 additions & 0 deletions src/routes/map/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,59 @@ ${
// eslint-disable-next-line no-unused-vars, no-undef
const layerControl = L.control.layers(baseMaps, overlayMaps).addTo(map);
// treasure hunt event
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>`
});
const treasureMarker = L.marker([53.37225, -6.17711], { icon: treasureIcon })
.bindTooltip(
`<p class='text-primary dark:text-white text-lg text-center px-1.5'>
<strong>Bitcoin Treasure Hunt</strong>
<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 {
border-right-color: #e5e7eb
}
</style>`
: ''
}`,
{ sticky: true }
)
.addTo(map);
// change default icons
// eslint-disable-next-line no-undef
changeDefaultIcons('layers', L, mapElement, DomEvent);
Expand Down
Binary file added static/icons/treasure-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5f84ff8

Please sign in to comment.