This commit is contained in:
a-ill
2023-06-24 16:44:16 +03:00
parent 6cfb2bada8
commit ab722a0c49
45 changed files with 5255 additions and 108 deletions

View File

@@ -0,0 +1,39 @@
export let communities = [
{
location: ["Estonia, Kohtla-Järve",[59.409521829709504, 27.288415912535914]],
status: "forming",
members: 2,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersCommunities(map) {
for (let g of communities) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}

View File

@@ -0,0 +1,51 @@
export let coops = [
{
logo: "chiron_logo",
name: "Chiron Health",
location: ["Estonia, Kohtla-Järve",[59.40338782864918, 27.286240058760324]],
market: "wellness and health",
workers: 2,
status: "launch in 2 months",
website: "chrn.health",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Chiron Health is a health platform providing courses and services on the topics of nutrition, exercise, sleep and mental wellbeing.",
},
{
logo: "kuusk_logo",
name: "Kuusk",
location: ["Estonia, Kohtla-Järve",[59.405466538976185, 27.289104862336302]],
market: "herbal teas",
workers: 1,
status: "launch in TBD months",
website: "-",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Kuusk is an online store that sells herbal teas from exclusively local wild plants, as well as an online gathering course.",
}
]
export function addMarkersCoops(map) {
for (let g of coops) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = "<b>" + field[0].toUpperCase() + field.slice(1) + ": " + "</b>"
if (field=="logo") {
text += "<picture><source srcset=" + "/img/coops/" + g.logo + ".webp><source srcset='/img/coops/" + g.logo + ".png'><img alt='logo' style='position: relative; max-height: 5rem; max-width: 100%; margin: auto;'></picture>" + "<br>"
}
else if (field=="contact") {
text += fieldText + "<a href='https://www." + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>" + "<br>"
}
else if (field=="website") {
text += fieldText + "<a href='" + g.website + "' target='_blank' rel=noreferrer>" + g.website + "</a>" + "<br>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
L.marker(coordinates).addTo(map).bindPopup(text)
}
}

View File

@@ -0,0 +1,37 @@
export let groups = [
{
location: ["Estonia, Kohtla-Järve",[59.40629447076191, 27.280605339416322]],
members: 3,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersGroups(map) {
for (let g of groups) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}