diff --git a/Server/app/svelte/public/js/communes.js b/Server/app/svelte/public/js/communes.js index 6dbae51..9aaf4e2 100644 --- a/Server/app/svelte/public/js/communes.js +++ b/Server/app/svelte/public/js/communes.js @@ -31,10 +31,12 @@ for (let c of communes) { } } +export let communesMarkersLayer = L.layerGroup() + export function addMarkersCommunes(map,content) { for (let g of communes) { let coordinates - let text = "" + let text = "Commune
" for (let field in g) { let fieldText = content[field] + ": " if (field=="contact") { @@ -62,6 +64,7 @@ export function addMarkersCommunes(map,content) { shadowSize: [41, 41] }); let marker = L.marker(coordinates, {icon: markerIcon}) - marker.addTo(map).bindPopup(text) + marker.addTo(communesMarkersLayer).bindPopup(text) } + communesMarkersLayer.addTo(map) } \ No newline at end of file diff --git a/Server/app/svelte/public/js/coops.js b/Server/app/svelte/public/js/coops.js index 6055a6c..5576119 100644 --- a/Server/app/svelte/public/js/coops.js +++ b/Server/app/svelte/public/js/coops.js @@ -34,10 +34,12 @@ for (let g of coops) { } } +export let coopsMarkersLayer = L.layerGroup() + export function addMarkersCoops(map,content) { for (let g of coops) { let coordinates - let text = "" + let text = "Cooperative
" for (let field in g) { let fieldText if (field!="logo") { @@ -65,6 +67,7 @@ export function addMarkersCoops(map,content) { text += fieldText + g[field] + "
" } } - L.marker(coordinates).addTo(map).bindPopup(text) + L.marker(coordinates).addTo(coopsMarkersLayer).bindPopup(text) } + coopsMarkersLayer.addTo(map) } \ No newline at end of file diff --git a/Server/app/svelte/public/js/groups.js b/Server/app/svelte/public/js/groups.js index 9358261..665c3fe 100644 --- a/Server/app/svelte/public/js/groups.js +++ b/Server/app/svelte/public/js/groups.js @@ -47,15 +47,15 @@ for (let g of groups) { } } -let groupsLoaded = false +export let groupsMarkersLayer = L.layerGroup() let groupsMarkersLayerOut = L.layerGroup() let groupsMarkersLayerIn = L.layerGroup() let contactGeneral =["https://discord.gg/4BUau4AZre","DiscordInviteLink"] -function addMarkerGroups(g,layer,content) { +function addMarkersToLayer(g,layer,content) { let coordinates - let text = "" + let text = "Group
" for (let field in g) { let fieldText = content[field] + ": " if (field=="contact") { @@ -85,13 +85,13 @@ function addMarkerGroups(g,layer,content) { export function addMarkersGroups(map,content) { for (let g of groups) { - addMarkerGroups(g,groupsMarkersLayerIn,content) + addMarkersToLayer(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) + addMarkersToLayer(g,groupsMarkersLayerOut,content) } else { let locationName = [gs[0].location[0][0],""] @@ -114,21 +114,22 @@ export function addMarkersGroups(map,content) { contact: contact } - addMarkerGroups(gNew,groupsMarkersLayerOut,content) + addMarkersToLayer(gNew,groupsMarkersLayerOut,content) } } - groupsMarkersLayerOut.addTo(map) + groupsMarkersLayerOut.addTo(groupsMarkersLayer) + groupsMarkersLayer.addTo(map) map.on("zoomend", () => onZoomEnd(map)) } function onZoomEnd(map) { let zoomLevel = map.getZoom() if (zoomLevel==3) { - map.removeLayer(groupsMarkersLayerIn) - groupsMarkersLayerOut.addTo(map) + groupsMarkersLayer.removeLayer(groupsMarkersLayerIn) + groupsMarkersLayerOut.addTo(groupsMarkersLayer) } else if (zoomLevel==4) { - map.removeLayer(groupsMarkersLayerOut) - groupsMarkersLayerIn.addTo(map) + groupsMarkersLayer.removeLayer(groupsMarkersLayerOut) + groupsMarkersLayerIn.addTo(groupsMarkersLayer) } } \ 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 a41269e..0302db1 100644 --- a/Server/app/svelte/public/js/parties.js +++ b/Server/app/svelte/public/js/parties.js @@ -20,10 +20,12 @@ for (let g of parties) { } } +export let partiesMarkersLayer = L.layerGroup() + export function addMarkersParties(map,content) { for (let g of parties) { let coordinates - let text = "" + let text = "Party
" for (let field in g) { let fieldText if (field!="logo") { @@ -58,6 +60,7 @@ export function addMarkersParties(map,content) { shadowSize: [41, 41] }); let marker = L.marker(coordinates, {icon: markerIcon}) - marker.addTo(map).bindPopup(text) + marker.addTo(partiesMarkersLayer).bindPopup(text) } + partiesMarkersLayer.addTo(map) } \ 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 55c5ab9..38004fe 100644 --- a/Server/app/svelte/public/locales/en/communes-component.json +++ b/Server/app/svelte/public/locales/en/communes-component.json @@ -1,5 +1,5 @@ { - "heading": "Communes", + "communes": "Communes", "p1": "We establish libertarian socialist communes by buying land, housing and the means of production which are then owned by the members of these communes. There is no private property within the communes and, therefore, exploitation and suffering that comes with it. Decisions are made using direct democracy with a focus on consensus, ensuring that each commune member has power over decisions that affect their life. Communes try to establish their own cooperatives in order to finance their development becoming financially independent and sustainable, which allows for their survival and growth. Within communes the gift economy is utilized whenever possible. Each commune is a small beacon of socialism within the dark capitalist world showing us how good life can be if only we achieve our goal.", "subheading1": "Our Communes", "subheading2": "Europe", diff --git a/Server/app/svelte/public/locales/en/cooperatives-component.json b/Server/app/svelte/public/locales/en/cooperatives-component.json index 9e43a5b..55cd22d 100644 --- a/Server/app/svelte/public/locales/en/cooperatives-component.json +++ b/Server/app/svelte/public/locales/en/cooperatives-component.json @@ -1,5 +1,5 @@ { - "heading": "Cooperatives", + "cooperatives": "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. 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", diff --git a/Server/app/svelte/public/locales/en/groups-component.json b/Server/app/svelte/public/locales/en/groups-component.json index b4090ef..cc3b368 100644 --- a/Server/app/svelte/public/locales/en/groups-component.json +++ b/Server/app/svelte/public/locales/en/groups-component.json @@ -1,5 +1,5 @@ { - "heading": "Groups", + "groups": "Groups", "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", diff --git a/Server/app/svelte/public/locales/en/landing-component.json b/Server/app/svelte/public/locales/en/landing-component.json index 45d9e17..b581de9 100644 --- a/Server/app/svelte/public/locales/en/landing-component.json +++ b/Server/app/svelte/public/locales/en/landing-component.json @@ -7,5 +7,9 @@ "cooperativesTitle": "COOPERATIVES", "cooperativesText": "We form worker cooperatives to finance the operations of our groups and communes. Recognizing that economic power influences political power, we consider the establishment of cooperatives to be one of the initial steps towards achieving socialism.", "partiesTitle": "PARTIES", - "partiesText": "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." + "partiesText": "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.", + "findUs": "Find Us", + "whatNow": "What Now?", + "joinUs": "Join Us", + "talkWithUs": "Talk With Us" } \ 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 0e142b6..22f9515 100644 --- a/Server/app/svelte/public/locales/en/parties-component.json +++ b/Server/app/svelte/public/locales/en/parties-component.json @@ -1,5 +1,5 @@ { - "heading": "Parties", + "parties": "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. Nevertheless, we must strategically utilize any opportunity that we have in order to succeed.", "subheading1": "Our Parties", "name": "Name", diff --git a/Server/app/svelte/public/locales/ru/communes-component.json b/Server/app/svelte/public/locales/ru/communes-component.json index fd3d06a..28b8ae9 100644 --- a/Server/app/svelte/public/locales/ru/communes-component.json +++ b/Server/app/svelte/public/locales/ru/communes-component.json @@ -1,5 +1,5 @@ { - "heading": "Коммуны", + "communes": "Коммуны", "p1": "Мы создаем либертарные социалистические коммуны, покупая землю, жилье и средства производства, которые затем принадлежат членам этих коммун. В коммунах нет частной собственности и, следовательно, эксплуатации и страданий, которые с ней связаны. Решения принимаются с использованием прямой демократии с упором на консенсус, гарантируя, что каждый член сообщества имеет право принимать решения, влияющие на его жизнь. Сообщества пытаются создавать свои собственные кооперативы, чтобы финансировать свое развитие, становясь финансово независимыми и устойчивыми, что позволяет им выживать и расти. В сообществах по возможности используется экономика дарения. Каждая коммуна — это маленький маяк социализма в темном капиталистическом мире, показывающий нам, насколько хорошей может быть жизнь, если мы только достигнем своей цели.", "subheading1": "Наши коммуны", "location": "Локация", diff --git a/Server/app/svelte/public/locales/ru/cooperatives-component.json b/Server/app/svelte/public/locales/ru/cooperatives-component.json index afda6c7..3847769 100644 --- a/Server/app/svelte/public/locales/ru/cooperatives-component.json +++ b/Server/app/svelte/public/locales/ru/cooperatives-component.json @@ -1,5 +1,5 @@ { - "heading": "Кооперативы", + "cooperatives": "Кооперативы", "p1": "Мы создаем рабочие кооперативы, которые представляют собой бизнес-модель, в которой работники владеют предприятием. Каждый работник имеет право голоса при принятии решений, а прибыль распределяется на основе индивидуальных вкладов. Эта структура способствует мотивации и удовлетворенности работой, создавая более приятные условия труда, а также бросает вызов концентрации богатства в традиционных капиталистических предприятиях. Сосредоточив внимание на потребностях сотрудников, наши кооперативы создают благоприятную и устойчивую рабочую среду, которая способствует социальной сплоченности и гарантиям занятости. Мы также уделяем первостепенное внимание интересам местных сообществ, ориентируясь на долгосрочную перспективу.", "subheading1": "Наши кооперативы", "subheading2": "Европа", diff --git a/Server/app/svelte/public/locales/ru/groups-component.json b/Server/app/svelte/public/locales/ru/groups-component.json index a63e041..2f966af 100644 --- a/Server/app/svelte/public/locales/ru/groups-component.json +++ b/Server/app/svelte/public/locales/ru/groups-component.json @@ -1,5 +1,5 @@ { - "heading": "Группы", + "groups": "Группы", "p1": "Мы стремимся повышать осведомленность о негативном влиянии нынешних политико-экономических систем на наше благополучие. Мы участвуем во взаимопомощи и коллективных действиях для решения насущных проблем. Посредством взаимопомощи мы поддерживаем друг друга, делясь ресурсами, знаниями и навыками, укрепляя солидарность и устойчивость к негодам. Будь то общественные сады, продовольственные кооперативы или сети поддержки, наша цель — сделать жизнь при капитализме более терпимой и создать очаги сопротивления и альтернатив внутри системы.", "subheading1": "Наши группы", "location": "Локация", diff --git a/Server/app/svelte/public/locales/ru/landing-component.json b/Server/app/svelte/public/locales/ru/landing-component.json index 519321a..b787caa 100644 --- a/Server/app/svelte/public/locales/ru/landing-component.json +++ b/Server/app/svelte/public/locales/ru/landing-component.json @@ -7,5 +7,9 @@ "cooperativesTitle": "КООПЕРАТИВЫ", "cooperativesText": "Мы формируем рабочие кооперативы для финансирования операций наших групп и коммун, а также формирования основы новой социалистической экономики. Признавая, что экономическая власть влияет на политическую власть, мы считаем создание кооперативов одним из первых шагов на пути к социализму.", "partiesTitle": "ПАРТИИ", - "partiesText": "Мы создаем политические партии, чтобы продвигать реформы, которые позволят легче достичь наших целей, сдвигать окно Овертона и увеличивать нашу популярность. Однако мы признаем, что мы не можем достичь либертарианского социализма с помощью институтов, действующих против наших целей." + "partiesText": "Мы создаем политические партии, чтобы продвигать реформы, которые позволят легче достичь наших целей, сдвигать окно Овертона и увеличивать нашу популярность. Однако мы признаем, что мы не можем достичь либертарианского социализма с помощью институтов, действующих против наших целей.", + "findUs": "Найди нас", + "whatNow": "Что теперь?", + "joinUs": "Присоединяйся", + "talkWithUs": "Напиши нам" } \ 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 c4bf96b..6ed9247 100644 --- a/Server/app/svelte/public/locales/ru/parties-component.json +++ b/Server/app/svelte/public/locales/ru/parties-component.json @@ -1,5 +1,5 @@ { - "heading": "Партии", + "parties": "Партии", "p1": "Мы создаем политические партии, чтобы продвигать реформы, которые позволят легче достичь наших целей, сдвигать окно Овертона и увеличивать нашу популярность. Однако мы признаем, что мы не можем достичь либертарного социализма с помощью институтов, действующих против наших целей. Тем не менее, мы должны стратегически использовать любую возможность, которая у нас есть, чтобы добиться успеха.", "subheading1": "Наши партии", "name": "Имя", diff --git a/Server/app/svelte/src/communes-component.svelte b/Server/app/svelte/src/communes-component.svelte index 154726b..40ef05b 100644 --- a/Server/app/svelte/src/communes-component.svelte +++ b/Server/app/svelte/src/communes-component.svelte @@ -32,7 +32,7 @@
-

{$content.heading}

+

{$content.communes}

commune

{$content.p1}

{$content.subheading1}

diff --git a/Server/app/svelte/src/components/map-component.svelte b/Server/app/svelte/src/components/map-component.svelte index f4f31f2..aecc12b 100644 --- a/Server/app/svelte/src/components/map-component.svelte +++ b/Server/app/svelte/src/components/map-component.svelte @@ -8,6 +8,7 @@ // Export statements export let callback = null + export let colors = null // Main code let mapContainer @@ -21,14 +22,20 @@ attribution: '© OpenStreetMap contributors', minNativeZoom: 2, minZoom: 2, - maxNativeZoom: 16, - maxZoom: 16, + maxNativeZoom: 14, + maxZoom: 14, }).addTo(map); return map } onMount(() => { callback(createMap) + if (colors!=null) { + let els = mapContainer.getElementsByClassName("leaflet-control-layers-overlays")[0].children + for (let i=0;i @@ -41,7 +48,8 @@ #map { height: var(--height); width: var(--width,100%); - margin-bottom: var(--margin-bottom,0) + margin-top: var(--margin-top,0); + margin-bottom: var(--margin-bottom,0); } \ No newline at end of file diff --git a/Server/app/svelte/src/cooperatives-component.svelte b/Server/app/svelte/src/cooperatives-component.svelte index 0bc025c..30f1f21 100644 --- a/Server/app/svelte/src/cooperatives-component.svelte +++ b/Server/app/svelte/src/cooperatives-component.svelte @@ -31,7 +31,7 @@ {#if $loaded==2}
-

{$content.heading}

+

{$content.cooperatives}

coops

{$content.p1}

{$content.subheading1}

@@ -113,7 +113,7 @@ .location-info { position: relative; - margin-bottom: 1rem; + margin-bottom: 2rem; } .location-info p { diff --git a/Server/app/svelte/src/footer/footer-component.svelte b/Server/app/svelte/src/footer/footer-component.svelte index e9dd3fe..f84728f 100644 --- a/Server/app/svelte/src/footer/footer-component.svelte +++ b/Server/app/svelte/src/footer/footer-component.svelte @@ -37,7 +37,7 @@ - +
{/if} diff --git a/Server/app/svelte/src/groups-component.svelte b/Server/app/svelte/src/groups-component.svelte index bdd322c..d050979 100644 --- a/Server/app/svelte/src/groups-component.svelte +++ b/Server/app/svelte/src/groups-component.svelte @@ -32,7 +32,7 @@
-

{$content.heading}

+

{$content.groups}

groups

{$content.p1}

{$content.subheading1}

diff --git a/Server/app/svelte/src/join-us-component.svelte b/Server/app/svelte/src/join-us-component.svelte index d304075..b307901 100644 --- a/Server/app/svelte/src/join-us-component.svelte +++ b/Server/app/svelte/src/join-us-component.svelte @@ -4,10 +4,10 @@ // Import statements import { onMount } from 'svelte' import { writable } from 'svelte/store'; - import { addMarkersGroups } from '/js/groups.js' - import { addMarkersCoops } from '/js/coops.js' - import { addMarkersCommunities } from '/js/communities.js' - import { addMarkersParties } from '/js/parties.js' + import { addMarkersGroups, groupsMarkersLayer } from '/js/groups.js' + import { addMarkersCoops, coopsMarkersLayer } from '/js/coops.js' + import { addMarkersCommunes, communesMarkersLayer } from '/js/communes.js' + import { addMarkersParties, partiesMarkersLayer } from '/js/parties.js' import { loadLocaleContent } from "/js/libraries/serverTools.js" // Import components @@ -18,7 +18,7 @@ let content = writable({}) loadLocaleContent(content,"groups-component",loaded) - loadLocaleContent(content,"communities-component",loaded) + loadLocaleContent(content,"communes-component",loaded) loadLocaleContent(content,"cooperatives-component",loaded) loadLocaleContent(content,"parties-component",loaded) loadLocaleContent(content,"countries",loaded) @@ -27,9 +27,17 @@ function mapCallback(createMap,content) { let map = createMap([22, 0],2) addMarkersGroups(map,content) - addMarkersCommunities(map,content) + addMarkersCommunes(map,content) addMarkersCoops(map,content) addMarkersParties(map,content) + + let overlayMaps = { + "Groups": groupsMarkersLayer, + "Communes": communesMarkersLayer, + "Coops": coopsMarkersLayer, + "Parties": partiesMarkersLayer, + } + L.control.layers(null, overlayMaps).addTo(map) } onMount(() => { diff --git a/Server/app/svelte/src/landing-component.svelte b/Server/app/svelte/src/landing-component.svelte index f208210..0cb1528 100644 --- a/Server/app/svelte/src/landing-component.svelte +++ b/Server/app/svelte/src/landing-component.svelte @@ -3,11 +3,15 @@ {#key $loaded} - {#if $loaded==2} + {#if $loaded==6}
@@ -46,26 +70,33 @@

{$content.top}

-

{$content.groupsTitle}

+

{$content.groupsTitle}

groups

{$content.groupsText}

-

{$content.communesTitle}

+

{$content.communesTitle}

communes

{$content.communesText}

-

{$content.cooperativesTitle}

+

{$content.cooperativesTitle}

coops

{$content.cooperativesText}

-

{$content.partiesTitle}

+

{$content.partiesTitle}

coops

{$content.partiesText}

+

{$content.findUs}

+ mapCallback(createMap,$content)} colors={["#23AC20","#CA2437","#217BC9","#FFD326"]}> +

{$content.whatNow}

+
{/if} @@ -74,7 +105,38 @@ \ No newline at end of file diff --git a/Server/app/svelte/src/navbar/navbar-component.svelte b/Server/app/svelte/src/navbar/navbar-component.svelte index 94ef01b..16fe120 100644 --- a/Server/app/svelte/src/navbar/navbar-component.svelte +++ b/Server/app/svelte/src/navbar/navbar-component.svelte @@ -13,6 +13,7 @@ let localesDropdown let loaded = writable(0) let content = writable({}) + let logoText let locale = loadLocaleContent(content,"navbar-component",loaded) @@ -50,6 +51,31 @@ location.href = loc } + function fixHeading() { + if (locale=="ru") { + let func = () => { + if (logoText==undefined) { + setTimeout(func,100) + } + else { + if (window.innerWidth < 400 && logoText.style.lineHeight!="100%") { + logoText.style.lineHeight = "120%" + logoText.style.top = "1rem" + logoText.style.width = "16rem" + } + else if (window.innerWidth > 400 && logoText.style.lineHeight!="400%") { + logoText.style.lineHeight = "400%" + logoText.style.top = "0rem" + logoText.style.width = "auto" + } + } + } + func() + addEventListener("resize", func) + } + } + + onMount(() => { }) @@ -59,6 +85,7 @@ {#key loaded} {#if Object.keys($content).length!=0} + {fixHeading()}