From 56a57059c1738b6176649d6ad37ad6169ba0f214 Mon Sep 17 00:00:00 2001 From: a-ill Date: Thu, 13 Jul 2023 14:32:49 +0300 Subject: [PATCH] Update --- Server/app/svelte/public/js/communes.js | 25 +- Server/app/svelte/public/js/coops.js | 23 +- Server/app/svelte/public/js/groups.js | 137 +++-- .../svelte/public/js/libraries/serverTools.js | 9 +- Server/app/svelte/public/js/parties.js | 13 +- Server/app/svelte/public/js/partners.js | 14 +- .../public/locales/en/communes-component.json | 5 +- .../locales/en/cooperatives-component.json | 5 +- .../svelte/public/locales/en/countries.json | 16 + .../public/locales/en/groups-component.json | 12 +- .../public/locales/en/parties-component.json | 3 +- .../public/locales/ru/communes-component.json | 6 +- .../locales/ru/cooperatives-component.json | 5 +- .../svelte/public/locales/ru/countries.json | 16 + .../public/locales/ru/groups-component.json | 13 +- .../public/locales/ru/parties-component.json | 2 +- .../app/svelte/src/communes-component.svelte | 34 +- .../app/svelte/src/compass-component.svelte | 7 +- .../svelte/src/cooperatives-component.svelte | 59 +- .../svelte/src/footer/footer-component.svelte | 9 +- Server/app/svelte/src/groups-component.svelte | 39 +- .../app/svelte/src/join-us-component.svelte | 29 +- .../app/svelte/src/landing-component.svelte | 8 +- .../app/svelte/src/manifesto-component.svelte | 8 +- .../svelte/src/navbar/navbar-component.svelte | 2 +- .../app/svelte/src/parties-component.svelte | 56 +- .../app/svelte/src/partners-component.svelte | 58 +- Server/public/js/communes.js | 25 +- .../js/components/communes-component.js | 2 +- .../public/js/components/compass-component.js | 2 +- .../js/components/cooperatives-component.js | 2 +- .../public/js/components/footer-component.js | 2 +- .../public/js/components/groups-component.js | 2 +- Server/public/js/components/index-29ee6d60.js | 53 ++ Server/public/js/components/index-2e2aa7d2.js | 513 ++++++++++++++++++ Server/public/js/components/index-4664ced0.js | 53 ++ Server/public/js/components/index-d19aafba.js | 513 ++++++++++++++++++ .../public/js/components/join-us-component.js | 2 +- .../public/js/components/landing-component.js | 2 +- .../js/components/manifesto-component.js | 2 +- .../public/js/components/navbar-component.js | 2 +- .../public/js/components/parties-component.js | 2 +- .../js/components/partners-component.js | 2 +- Server/public/js/coops.js | 23 +- Server/public/js/groups.js | 137 +++-- Server/public/js/libraries/serverTools.js | 9 +- Server/public/js/parties.js | 13 +- Server/public/js/partners.js | 14 +- .../public/locales/en/communes-component.json | 5 +- .../locales/en/cooperatives-component.json | 5 +- Server/public/locales/en/countries.json | 16 + .../public/locales/en/groups-component.json | 12 +- .../public/locales/en/parties-component.json | 5 +- .../public/locales/ru/communes-component.json | 6 +- .../locales/ru/cooperatives-component.json | 5 +- Server/public/locales/ru/countries.json | 16 + .../public/locales/ru/groups-component.json | 13 +- .../public/locales/ru/parties-component.json | 2 +- 58 files changed, 1756 insertions(+), 317 deletions(-) create mode 100644 Server/app/svelte/public/locales/en/countries.json create mode 100644 Server/app/svelte/public/locales/ru/countries.json create mode 100644 Server/public/js/components/index-29ee6d60.js create mode 100644 Server/public/js/components/index-2e2aa7d2.js create mode 100644 Server/public/js/components/index-4664ced0.js create mode 100644 Server/public/js/components/index-d19aafba.js create mode 100644 Server/public/locales/en/countries.json create mode 100644 Server/public/locales/ru/countries.json diff --git a/Server/app/svelte/public/js/communes.js b/Server/app/svelte/public/js/communes.js index f842a07..6dbae51 100644 --- a/Server/app/svelte/public/js/communes.js +++ b/Server/app/svelte/public/js/communes.js @@ -1,25 +1,36 @@ export let communes = [ { - location: ["CanadaMontreal",[45.55541047232767, -73.42859611607271]], + location: [["Canada","Montreal"],[45.55541047232767, -73.42859611607271]], status: "forming", members: 2, contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["EstoniaKohtlaJarve",[59.409521829709504, 27.288415912535914]], + location: [["Estonia","KohtlaJarve"],[59.409521829709504, 27.288415912535914]], status: "forming", members: 2, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["Latvia",[56.934159375258055, 25.269099001330265]], + location: [["Latvia",""],[56.934159375258055, 25.269099001330265]], status: "forming", members: 1, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] } ] +export let communesByCountry = {} +for (let c of communes) { + let country = c.location[0][0] + if (country in communesByCountry) { + communesByCountry[country].push(c) + } + else { + communesByCountry[country] = [c] + } +} + export function addMarkersCommunes(map,content) { for (let g of communes) { let coordinates @@ -30,7 +41,9 @@ export function addMarkersCommunes(map,content) { text += fieldText + "" + content[g.contact[1]]+ "" } else if (field=="location") { - text += fieldText + content[g[field][0]]+ "
" + let location = g[field][0] + let town = location[1]=="" ? "" : ", " + content[location[1]] + text += fieldText + content[location[0]] + town + "
" coordinates = g[field][1] } else if (field=="status") { diff --git a/Server/app/svelte/public/js/coops.js b/Server/app/svelte/public/js/coops.js index 0b2fc53..6055a6c 100644 --- a/Server/app/svelte/public/js/coops.js +++ b/Server/app/svelte/public/js/coops.js @@ -2,27 +2,38 @@ export let coops = [ { logo: "chiron_logo", name: "Chiron Health", - location: ["EstoniaKohtlaJarve",[59.40338782864918, 27.286240058760324]], + location: [["Estonia","KohtlaJarve"],[59.41038769769602, 27.287802936242034]], market: "wellnessAndHealth", workers: 2, status: "inDevelopment", website: "chrn.health", - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"], + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"], description: "descriptionChironHealth" }, { logo: "kuusk_logo", name: "Kuusk", - location: ["EstoniaKohtlaJarve",[59.405466538976185, 27.289104862336302]], + location: [["Estonia","KohtlaJarve"],[59.399947051803004, 27.277159931677055]], market: "herbalTeas", workers: 1, status: "inDevelopment", website: "-", - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"], + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"], description: "kuuskDescription" } ] +export let coopsByCountry = {} +for (let g of coops) { + let country = g.location[0][0] + if (country in coopsByCountry) { + coopsByCountry[country].push(g) + } + else { + coopsByCountry[country] = [g] + } +} + export function addMarkersCoops(map,content) { for (let g of coops) { let coordinates @@ -42,7 +53,9 @@ export function addMarkersCoops(map,content) { text += fieldText + "" + g.website + "" + "
" } else if (field=="location") { - text += fieldText + content[g[field][0]] + "
" + let location = g[field][0] + let town = location[1]=="" ? "" : ", " + content[location[1]] + text += fieldText + content[location[0]] + town + "
" coordinates = g[field][1] } else if (field=="market" || field=="status" || field=="description") { diff --git a/Server/app/svelte/public/js/groups.js b/Server/app/svelte/public/js/groups.js index c4ffa36..9358261 100644 --- a/Server/app/svelte/public/js/groups.js +++ b/Server/app/svelte/public/js/groups.js @@ -1,67 +1,134 @@ export let groups = [ { - location: ["CanadaHalifax",[44.65166135030067, -63.59289968306866]], + location: [["Canada","Halifax"],[44.65166135030067, -63.59289968306866]], members: 2, contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["DenmarkCopenhagen",[55.6840661150132, 12.557133959514688]], + location: [["Denmark","Copenhagen"],[55.6840661150132, 12.557133959514688]], members: 1, contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["DenmarkKolding", [55.49261908652738, 9.470268969851743]], + location: [["Denmark","Kolding"], [55.49261908652738, 9.470268969851743]], members: 1, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["EstoniaKohtlaJarve", [59.40629447076191, 27.280605339416322]], + location: [["Estonia","KohtlaJarve"], [59.40629447076191, 27.280605339416322]], members: 3, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["GreeceAthens", [37.94877252621736, 23.677622972996158]], + location: [["Greece","Athens"], [37.94877252621736, 23.677622972996158]], members: 1, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, { - location: ["Ireland", [53.280192832733576, -7.688103518964818]], + location: [["Ireland",""], [53.280192832733576, -7.688103518964818]], members: 6, contact: ["https://discord.gg/4BUau4AZre","DiscordInviteLink"] }, { - location: ["LatviaRiga", [56.94748425529816, 24.003027136431925]], + location: [["Latvia","Riga"], [56.94748425529816, 24.003027136431925]], members: 2, - contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"] + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] }, ] +export let groupsByCountry = {} +for (let g of groups) { + let country = g.location[0][0] + if (country in groupsByCountry) { + groupsByCountry[country].push(g) + } + else { + groupsByCountry[country] = [g] + } +} + +let groupsLoaded = false +let groupsMarkersLayerOut = L.layerGroup() +let groupsMarkersLayerIn = L.layerGroup() + +let contactGeneral =["https://discord.gg/4BUau4AZre","DiscordInviteLink"] + +function addMarkerGroups(g,layer,content) { + let coordinates + let text = "" + for (let field in g) { + let fieldText = content[field] + ": " + if (field=="contact") { + text += fieldText + "" + content[g.contact[1]] + "" + } + else if (field=="location") { + let location = g[field][0] + let town = location[1]=="" ? "" : ", " + content[location[1]] + text += fieldText + content[location[0]] + town + "
" + coordinates = g[field][1] + } + else { + text += fieldText + g[field] + "
" + } + } + var markerIcon = new L.Icon({ + iconUrl: 'https://www.libsoc.org/img/common/markers/marker-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: markerIcon}) + marker.addTo(layer).bindPopup(text) +} + export function addMarkersGroups(map,content) { for (let g of groups) { - let coordinates - let text = "" - for (let field in g) { - let fieldText = content[field] + ": " - if (field=="contact") { - text += fieldText + "" + content[g.contact[1]] + "" - } - else if (field=="location") { - text += fieldText + content[g[field][0]] + "
" - coordinates = g[field][1] - } - else { - text += fieldText + g[field] + "
" - } + addMarkerGroups(g,groupsMarkersLayerIn,content) + } + for (let gs of Object.values(groupsByCountry)) { + if (gs.length==1) { + let g = {...gs[0]} + g.location[0][1] = "" + addMarkerGroups(g,groupsMarkersLayerOut,content) } - var markerIcon = new L.Icon({ - iconUrl: 'https://www.libsoc.org/img/common/markers/marker-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: markerIcon}) - marker.addTo(map).bindPopup(text) + else { + let locationName = [gs[0].location[0][0],""] + let locationCoordinates = [0,0] + let members = 0 + let contact = gs[0].contact + for (let g of gs) { + locationCoordinates[0] += g.location[1][0] + locationCoordinates[1] += g.location[1][1] + members += g.members + if (g.contact[0]!=gs[0].contact[0]) { + contact = contactGeneral + } + } + locationCoordinates[0] = locationCoordinates[0]/gs.length + locationCoordinates[1] = locationCoordinates[1]/gs.length + let gNew = { + location: [locationName,locationCoordinates], + members: members, + contact: contact + } + + addMarkerGroups(gNew,groupsMarkersLayerOut,content) + } + } + groupsMarkersLayerOut.addTo(map) + map.on("zoomend", () => onZoomEnd(map)) +} + +function onZoomEnd(map) { + let zoomLevel = map.getZoom() + if (zoomLevel==3) { + map.removeLayer(groupsMarkersLayerIn) + groupsMarkersLayerOut.addTo(map) + } + else if (zoomLevel==4) { + map.removeLayer(groupsMarkersLayerOut) + groupsMarkersLayerIn.addTo(map) } } \ No newline at end of file diff --git a/Server/app/svelte/public/js/libraries/serverTools.js b/Server/app/svelte/public/js/libraries/serverTools.js index 9977c48..76df3ab 100644 --- a/Server/app/svelte/public/js/libraries/serverTools.js +++ b/Server/app/svelte/public/js/libraries/serverTools.js @@ -96,8 +96,13 @@ export function loadLocaleContent(content,componentName,loaded,callback) { if (callback!=undefined) { callback(parsed) } - content.set(parsed) - loaded = 1 + content.update((obj) => { + Object.assign(obj,parsed) + return obj + }) + loaded.update((val) => { + return val + 1 + }) }) return locale } \ No newline at end of file diff --git a/Server/app/svelte/public/js/parties.js b/Server/app/svelte/public/js/parties.js index 1c32b68..a41269e 100644 --- a/Server/app/svelte/public/js/parties.js +++ b/Server/app/svelte/public/js/parties.js @@ -2,13 +2,24 @@ export let parties = [ { logo: "roots", name: "Roots", - location: ["ireland",[52.98479517270413, -7.649233227534782]], + location: ["Ireland",[52.98479517270413, -7.649233227534782]], //members: 6, link: "https://discord.gg/pSTMacJZsK", description: "descriptionRoots" } ] +export let partiesByCountry = {} +for (let g of parties) { + let country = g.location[0] + if (country in partiesByCountry) { + partiesByCountry[country].push(g) + } + else { + partiesByCountry[country] = [g] + } +} + export function addMarkersParties(map,content) { for (let g of parties) { let coordinates diff --git a/Server/app/svelte/public/js/partners.js b/Server/app/svelte/public/js/partners.js index fc97b23..9e03324 100644 --- a/Server/app/svelte/public/js/partners.js +++ b/Server/app/svelte/public/js/partners.js @@ -2,8 +2,20 @@ export let partners = [ { name: "Gaia's Fall", type: "typeGaiasFall", + location: [["Online",""],[0,0]], link: "https://discord.libsoc.org/invite/", description: "descriptionGaiasFall", logo: "gaias_fall" } -] \ No newline at end of file +] + +export let partnersByCountry = {} +for (let g of partners) { + let country = g.location[0][0] + if (country in partnersByCountry) { + partnersByCountry[country].push(g) + } + else { + partnersByCountry[country] = [g] + } +} \ No newline at end of file diff --git a/Server/app/svelte/public/locales/en/communes-component.json b/Server/app/svelte/public/locales/en/communes-component.json index 96f51f2..55c5ab9 100644 --- a/Server/app/svelte/public/locales/en/communes-component.json +++ b/Server/app/svelte/public/locales/en/communes-component.json @@ -7,10 +7,7 @@ "status": "Status", "members": "Members", "contact": "Contact", - "EstoniaKohtlaJarve": "Estonia, Kohtla-Järve", "forming": "forming", "WhatsAppInviteLink": "WhatsApp invite link", - "DiscordInviteLink": "Discord invite link", - "CanadaMontreal": "Canada, Montreal", - "Latvia": "Latvia" + "DiscordInviteLink": "Discord invite link" } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/en/cooperatives-component.json b/Server/app/svelte/public/locales/en/cooperatives-component.json index a20d1b4..9e43a5b 100644 --- a/Server/app/svelte/public/locales/en/cooperatives-component.json +++ b/Server/app/svelte/public/locales/en/cooperatives-component.json @@ -1,7 +1,6 @@ { "heading": "Cooperatives", - "p1": "We establish worker cooperatives, which is a business model where employees own and control the enterprise. Each worker has a voice in decision-making, and profits are distributed based on individual contributions. This participatory structure fosters ownership, motivation, and job satisfaction, creating a more fulfilling work experience as well as challenging the wealth concentration in traditional capitalist businesses.", - "p2": "By focusing on employees' needs, our cooperatives create supportive and sustainable work environments that foster social cohesion and job security. We also prioritize the interests of local communities, taking a long-term perspective. With workers making decisions, we avoid harmful short-term profit-driven strategies and instead reinvest our profits, contributing to community development and resilience.", + "p1": "We establish worker cooperatives, which is a business model where employees own and control the enterprise. Each worker has a voice in decision-making, and profits are distributed based on individual contributions. This participatory structure fosters ownership, motivation, and job satisfaction, creating a more fulfilling work experience as well as challenging the wealth concentration in traditional capitalist businesses. By focusing on employees' needs, our cooperatives create supportive and sustainable work environments that foster social cohesion and job security. We also prioritize the interests of local communities, taking a long-term perspective.", "subheading1": "Our Cooperatives", "subheading2": "Europe", "name": "Name", @@ -12,10 +11,10 @@ "contact": "Contact", "description": "Description", "website": "Website", - "EstoniaKohtlaJarve": "Estonia, Kohtla-Järve", "wellnessAndHealth": "wellness and health", "inDevelopment": "in development", "WhatsAppInviteLink": "WhatsApp invite link", + "DiscordInviteLink": "Discord invite link", "descriptionChironHealth": "Chiron Health is a health platform providing courses and services on the topics of nutrition, exercise, sleep and mental wellbeing.", "herbalTeas": "herbal teas", "kuuskDescription": "Kuusk is an online store that sells herbal teas from exclusively local wild plants, as well as an online gathering course." diff --git a/Server/app/svelte/public/locales/en/countries.json b/Server/app/svelte/public/locales/en/countries.json new file mode 100644 index 0000000..af34f85 --- /dev/null +++ b/Server/app/svelte/public/locales/en/countries.json @@ -0,0 +1,16 @@ +{ + "Online": "Online", + "Denmark": "Denmark", + "Estonia": "Estonia", + "Greece": "Greece", + "Latvia": "Latvia", + "Canada": "Canada", + "Copenhagen": "Copenhagen", + "Ireland": "Ireland", + "Montreal": "Montreal", + "Kolding": "Kolding", + "KohtlaJarve": "Kohtla-Järve", + "Athens": "Athens", + "Riga": "Riga", + "Halifax": "Halifax" +} \ No newline at end of file diff --git a/Server/app/svelte/public/locales/en/groups-component.json b/Server/app/svelte/public/locales/en/groups-component.json index 48d4ac8..b4090ef 100644 --- a/Server/app/svelte/public/locales/en/groups-component.json +++ b/Server/app/svelte/public/locales/en/groups-component.json @@ -1,19 +1,11 @@ { "heading": "Groups", - "p1": "We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. By highlighting these issues, we empower people to question the status quo and imagine fairer and more sustainable alternatives.", - "p2": "But our mission goes beyond theory. We engage in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system.", + "p1": "We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. We engage in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system.", "subheading1": "Our Groups", "subheading2": "Europe", "location": "Location", "members": "Members", "contact": "Contact", "DiscordInviteLink": "Discord invite link", - "WhatsAppInviteLink": "WhatsApp invite link", - "DenmarkCopenhagen": "Denmark, Copenhagen", - "DenmarkKolding": "Denmark, Kolding", - "EstoniaKohtlaJarve": "Estonia, Kohtla-Järve", - "GreeceAthens": "Greece, Athens", - "LatviaRiga": "Latvia, Riga", - "CanadaHalifax": "Canada, Halifax", - "Ireland": "Ireland" + "WhatsAppInviteLink": "WhatsApp invite link" } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/en/parties-component.json b/Server/app/svelte/public/locales/en/parties-component.json index e2bce26..0e142b6 100644 --- a/Server/app/svelte/public/locales/en/parties-component.json +++ b/Server/app/svelte/public/locales/en/parties-component.json @@ -1,12 +1,11 @@ { "heading": "Parties", - "p1": "We create political parties in order to push for reforms allowing us to easier further our goals, to move the Overton window as well as to gain popularity. However, we recognize that we cannot achieve libertarian socialism through institutions which act contrary to our goals.", + "p1": "We create political parties in order to push for reforms allowing us to easier further our goals, to move the Overton window as well as to gain popularity. However, we recognize that we cannot achieve libertarian socialism through institutions which act contrary to our goals. Nevertheless, we must strategically utilize any opportunity that we have in order to succeed.", "subheading1": "Our Parties", "name": "Name", "location": "Location", "members": "Members", "link": "Link", "description": "Description", - "ireland": "Ireland", "descriptionRoots": "We are a left libertarian organization based in Ireland. We have a focus on rebuilding the country's infrastructure, sense of governance, housing, agricultural industries and youth affairs." } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/communes-component.json b/Server/app/svelte/public/locales/ru/communes-component.json index 9c145bd..fd3d06a 100644 --- a/Server/app/svelte/public/locales/ru/communes-component.json +++ b/Server/app/svelte/public/locales/ru/communes-component.json @@ -2,15 +2,11 @@ "heading": "Коммуны", "p1": "Мы создаем либертарные социалистические коммуны, покупая землю, жилье и средства производства, которые затем принадлежат членам этих коммун. В коммунах нет частной собственности и, следовательно, эксплуатации и страданий, которые с ней связаны. Решения принимаются с использованием прямой демократии с упором на консенсус, гарантируя, что каждый член сообщества имеет право принимать решения, влияющие на его жизнь. Сообщества пытаются создавать свои собственные кооперативы, чтобы финансировать свое развитие, становясь финансово независимыми и устойчивыми, что позволяет им выживать и расти. В сообществах по возможности используется экономика дарения. Каждая коммуна — это маленький маяк социализма в темном капиталистическом мире, показывающий нам, насколько хорошей может быть жизнь, если мы только достигнем своей цели.", "subheading1": "Наши коммуны", - "subheading2": "Европа", "location": "Локация", "status": "Статус", "members": "Участники", "contact": "Контакт", - "EstoniaKohtlaJarve": "Эстония, Кохтла-Ярве", "forming": "формируется", "WhatsAppInviteLink": "WhatsApp ссылка", - "DiscordInviteLink": "Discord ссылка", - "CanadaMontreal": "Канада, Монреаль", - "Latvia": "Латвия" + "DiscordInviteLink": "Discord ссылка" } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/cooperatives-component.json b/Server/app/svelte/public/locales/ru/cooperatives-component.json index e64b202..afda6c7 100644 --- a/Server/app/svelte/public/locales/ru/cooperatives-component.json +++ b/Server/app/svelte/public/locales/ru/cooperatives-component.json @@ -1,7 +1,6 @@ { "heading": "Кооперативы", - "p1": "Мы создаем рабочие кооперативы, которые представляют собой бизнес-модель, в которой работники владеют предприятием. Каждый работник имеет право голоса при принятии решений, а прибыль распределяется на основе индивидуальных вкладов. Эта структура способствует мотивации и удовлетворенности работой, создавая более приятные условия труда, а также бросает вызов концентрации богатства в традиционных капиталистических предприятиях.", - "p2": "Сосредоточив внимание на потребностях сотрудников, наши кооперативы создают благоприятную и устойчивую рабочую среду, которая способствует социальной сплоченности и гарантиям занятости. Мы также уделяем первостепенное внимание интересам местных сообществ, ориентируясь на долгосрочную перспективу. Когда решения принимают работники, мы избегаем вредных краткосрочных стратегий, ориентированных на получение прибыли, и вместо этого реинвестируем нашу прибыль, способствуя развитию и устойчивости сообщества.", + "p1": "Мы создаем рабочие кооперативы, которые представляют собой бизнес-модель, в которой работники владеют предприятием. Каждый работник имеет право голоса при принятии решений, а прибыль распределяется на основе индивидуальных вкладов. Эта структура способствует мотивации и удовлетворенности работой, создавая более приятные условия труда, а также бросает вызов концентрации богатства в традиционных капиталистических предприятиях. Сосредоточив внимание на потребностях сотрудников, наши кооперативы создают благоприятную и устойчивую рабочую среду, которая способствует социальной сплоченности и гарантиям занятости. Мы также уделяем первостепенное внимание интересам местных сообществ, ориентируясь на долгосрочную перспективу.", "subheading1": "Наши кооперативы", "subheading2": "Европа", "name": "Название", @@ -12,10 +11,10 @@ "contact": "Контакт", "description": "Описание", "website": "Вебсайт", - "EstoniaKohtlaJarve": "Эстония, Кохтла-Ярве", "wellnessAndHealth": "благополучие и здоровье", "inDevelopment": "в разработке", "WhatsAppInviteLink": "WhatsApp ссылка", + "DiscordInviteLink": "Discord ссылка", "descriptionChironHealth": "Chiron Health — это платформа о здоровье, предлагающая курсы и услуги по вопросам питания, физических упражнений, сна и психического благополучия", "herbalTeas": "травяные чаи", "kuuskDescription": "Kuusk — интернет-магазин, в котором продаются травяные чаи исключительно из местных дикорастущих растений, а также онлайн-курс по собирательству." diff --git a/Server/app/svelte/public/locales/ru/countries.json b/Server/app/svelte/public/locales/ru/countries.json new file mode 100644 index 0000000..479141c --- /dev/null +++ b/Server/app/svelte/public/locales/ru/countries.json @@ -0,0 +1,16 @@ +{ + "Online": "Онлайн", + "Denmark": "Дания", + "Estonia": "Эстония", + "Greece": "Греция", + "Latvia": "Латвия", + "Canada": "Канада", + "Ireland": "Ирландия", + "Copenhagen": "Копенгаген", + "Kolding": "Колдинг", + "KohtlaJarve": "Кохтла-Ярве", + "Athens": "Афины", + "Riga": "Рига", + "Halifax": "Галифакс", + "Montreal": "Монреаль" +} \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/groups-component.json b/Server/app/svelte/public/locales/ru/groups-component.json index 8ccb83b..a63e041 100644 --- a/Server/app/svelte/public/locales/ru/groups-component.json +++ b/Server/app/svelte/public/locales/ru/groups-component.json @@ -1,19 +1,10 @@ { "heading": "Группы", - "p1": "Мы стремимся повышать осведомленность о негативном влиянии нынешних политико-экономических систем на наше благополучие. Выдвигая на первый план эти проблемы, мы даем людям возможность поставить под сомнение статус-кво и представить себе более справедливые и устойчивые альтернативы.", - "p2": "Однако, наша миссия выходит за рамки теории. Мы участвуем во взаимопомощи и коллективных действиях для решения насущных проблем. Посредством взаимопомощи мы поддерживаем друг друга, делясь ресурсами, знаниями и навыками, укрепляя солидарность и устойчивость к негодам. Будь то общественные сады, продовольственные кооперативы или сети поддержки, наша цель — сделать жизнь при капитализме более терпимой и создать очаги сопротивления и альтернативы внутри системы.", + "p1": "Мы стремимся повышать осведомленность о негативном влиянии нынешних политико-экономических систем на наше благополучие. Мы участвуем во взаимопомощи и коллективных действиях для решения насущных проблем. Посредством взаимопомощи мы поддерживаем друг друга, делясь ресурсами, знаниями и навыками, укрепляя солидарность и устойчивость к негодам. Будь то общественные сады, продовольственные кооперативы или сети поддержки, наша цель — сделать жизнь при капитализме более терпимой и создать очаги сопротивления и альтернатив внутри системы.", "subheading1": "Наши группы", - "subheading2": "Европа", "location": "Локация", "members": "Участники", "contact": "Контакт", "DiscordInviteLink": "Discord ссылка", - "WhatsAppInviteLink": "WhatsApp ссылка", - "DenmarkCopenhagen": "Дания, Копенгаген", - "DenmarkKolding": "Дания, Колдинг", - "EstoniaKohtlaJarve": "Эстония, Кохтла-Ярве", - "GreeceAthens": "Греция, Афины", - "LatviaRiga": "Латвия, Рига", - "CanadaHalifax": "Канада, Галифакс", - "Ireland": "Ирландия" + "WhatsAppInviteLink": "WhatsApp ссылка" } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/parties-component.json b/Server/app/svelte/public/locales/ru/parties-component.json index 40305ca..c4bf96b 100644 --- a/Server/app/svelte/public/locales/ru/parties-component.json +++ b/Server/app/svelte/public/locales/ru/parties-component.json @@ -1,6 +1,6 @@ { "heading": "Партии", - "p1": "Мы создаем политические партии, чтобы продвигать реформы, которые позволят легче достичь наших целей, сдвигать окно Овертона и увеличивать нашу популярность. Однако мы признаем, что мы не можем достичь либертарианского социализма с помощью институтов, действующих против наших целей.", + "p1": "Мы создаем политические партии, чтобы продвигать реформы, которые позволят легче достичь наших целей, сдвигать окно Овертона и увеличивать нашу популярность. Однако мы признаем, что мы не можем достичь либертарного социализма с помощью институтов, действующих против наших целей. Тем не менее, мы должны стратегически использовать любую возможность, которая у нас есть, чтобы добиться успеха.", "subheading1": "Наши партии", "name": "Имя", "location": "Локация", diff --git a/Server/app/svelte/src/communes-component.svelte b/Server/app/svelte/src/communes-component.svelte index 1e5125a..154726b 100644 --- a/Server/app/svelte/src/communes-component.svelte +++ b/Server/app/svelte/src/communes-component.svelte @@ -4,16 +4,17 @@ // Import statements import { onMount } from 'svelte' import { writable } from 'svelte/store'; - import { communes, addMarkersCommunes } from '/js/communes.js' + import { communesByCountry, addMarkersCommunes } from '/js/communes.js' import { loadLocaleContent } from "/js/libraries/serverTools.js" // Import components import "/js/components/map-component.js" // Main code - let loaded + let loaded = writable(0) let content = writable({}) + loadLocaleContent(content,"countries",loaded) let locale = loadLocaleContent(content,"communes-component",loaded) function mapCallbackCommunes(createMap,content) { @@ -26,8 +27,8 @@ }) -{#key loaded} - {#if Object.keys($content).length!=0} +{#key $loaded} + {#if $loaded==2}
@@ -36,15 +37,19 @@

{$content.p1}

{$content.subheading1}

mapCallbackCommunes(createMap,$content,locale)}> - {#each communes as commune} -
-

{$content.location}: {$content[commune.location[0]]}

-

{$content.status}: {$content[commune.status]}

-

{$content.members}: {commune.members}

-

{$content.contact}: {$content[commune.contact[1]]}

+ {#each Object.entries(communesByCountry) as [name,communes]} +

{$content[name]}

+
+ {#each communes as commune} +
+

{$content.location}: {$content[commune.location[0][0]] + (commune.location[0][1]=="" ? "" : ", " + $content[commune.location[0][1]])}

+

{$content.status}: {$content[commune.status]}

+

{$content.members}: {commune.members}

+

{$content.contact}: {$content[commune.contact[1]]}

+
+ {/each}
{/each} -
{/if} @@ -66,10 +71,15 @@ margin-top: 8rem; } - h4 { + .country-name { + margin-bottom: 0.5rem; + } + + .country-block { margin-bottom: 2rem; } + .location-info { position: relative; margin-bottom: 2rem; diff --git a/Server/app/svelte/src/compass-component.svelte b/Server/app/svelte/src/compass-component.svelte index a8de0b6..fc5a6aa 100644 --- a/Server/app/svelte/src/compass-component.svelte +++ b/Server/app/svelte/src/compass-component.svelte @@ -10,8 +10,9 @@ // Import components // Main code - let loaded + let loaded = writable(0) let content = writable({}) + loadLocaleContent(content,"countries",loaded) let locale = loadLocaleContent(content,"compass-component",loaded,contentCallback) let qTag = 0 @@ -52,8 +53,8 @@ /**/ -{#key loaded} - {#if Object.keys($content).length!=0} +{#key $loaded} + {#if $loaded==2}

{$content.heading}

diff --git a/Server/app/svelte/src/cooperatives-component.svelte b/Server/app/svelte/src/cooperatives-component.svelte index 6ecbe3e..0bc025c 100644 --- a/Server/app/svelte/src/cooperatives-component.svelte +++ b/Server/app/svelte/src/cooperatives-component.svelte @@ -4,16 +4,17 @@ // Import statements import { onMount } from 'svelte' import { writable } from 'svelte/store'; - import { coops, addMarkersCoops } from '/js/coops.js' + import { coopsByCountry, addMarkersCoops } from '/js/coops.js' import { loadLocaleContent } from "/js/libraries/serverTools.js" // Import components import "/js/components/map-component.js" // Main code - let loaded + let loaded = writable(0) let content = writable({}) + loadLocaleContent(content,"countries",loaded) let locale = loadLocaleContent(content,"cooperatives-component",loaded) function mapCallbackCoops(createMap,content) { @@ -26,35 +27,39 @@ }) -{#key loaded} - {#if Object.keys($content).length!=0} +{#key $loaded} + {#if $loaded==2}

{$content.heading}

coops

{$content.p1}

-

{$content.p2}

{$content.subheading1}

mapCallbackCoops(createMap,$content,locale)}> - {#each coops as coop} -
-
-
-

{$content.name}: {coop.name}

-

{$content.location}: {$content[coop.location[0]]}

-

{$content.market}: {$content[coop.market]}

-

{$content.workers}: {coop.workers}

-

{$content.status}: {$content[coop.status]}

-

{$content.website}: {coop.website}

-

{$content.contact}: {$content[coop.contact[1]]}

+ {#each Object.entries(coopsByCountry) as [name,coops]} +

{$content[name]}

+
+ {#each coops as coop} +
+
+
+

{$content.name}: {coop.name}

+

{$content.location}: {$content[coop.location[0][0]] + (coop.location[0][1]=="" ? "" : ", " + $content[coop.location[0][1]])}

+

{$content.market}: {$content[coop.market]}

+

{$content.workers}: {coop.workers}

+

{$content.status}: {$content[coop.status]}

+

{$content.website}: {coop.website}

+

{$content.contact}: {$content[coop.contact[1]]}

+
+ + + + + +
+

{$content.description}: {$content[coop.description]}

- - - - - -
-

{$content.description}: {$content[coop.description]}

+ {/each}
{/each}
@@ -98,13 +103,17 @@ max-width: 100%; } - h4 { + .country-name { + margin-bottom: 1rem; + } + + .country-block { margin-bottom: 2rem; } .location-info { position: relative; - margin-bottom: 2rem; + margin-bottom: 1rem; } .location-info p { diff --git a/Server/app/svelte/src/footer/footer-component.svelte b/Server/app/svelte/src/footer/footer-component.svelte index 31f8198..e9dd3fe 100644 --- a/Server/app/svelte/src/footer/footer-component.svelte +++ b/Server/app/svelte/src/footer/footer-component.svelte @@ -9,15 +9,16 @@ // Import components // Main code - let loaded + let loaded = writable(0) let content = writable({}) - let locale = loadLocaleContent(content,"footer-component",loaded) + loadLocaleContent(content,"countries",loaded) + loadLocaleContent(content,"footer-component",loaded) -{#key loaded} - {#if Object.keys($content).length!=0} +{#key $loaded} + {#if $loaded==2}