From ab722a0c4998de5cafd5cc12f248c8c26eb91f44 Mon Sep 17 00:00:00 2001 From: a-ill Date: Sat, 24 Jun 2023 16:44:16 +0300 Subject: [PATCH] Update --- Server/app/resources/basic/BasicController.jl | 10 +- Server/app/svelte/public/js/communities.js | 39 ++ Server/app/svelte/public/js/coops.js | 51 ++ Server/app/svelte/public/js/groups.js | 37 ++ Server/app/svelte/rollup.config.js | 1 + .../svelte/src/communities-component.svelte | 83 ++- .../src/components/map-component.svelte | 43 ++ .../svelte/src/cooperatives-component.svelte | 115 +++- .../svelte/src/footer/footer-component.svelte | 2 +- Server/app/svelte/src/groups-component.svelte | 77 ++- .../app/svelte/src/join-us-component.svelte | 111 +++- .../app/svelte/src/landing-component.svelte | 63 +- .../app/svelte/src/manifesto-component.svelte | 103 ++- .../svelte/src/navbar/navbar-component.svelte | 2 +- Server/lib/TemplateEditor.jl | 2 + Server/public/assets/manifesto.txt | 100 +++ Server/public/img/coops/chiron_logo.png | Bin 0 -> 23302 bytes Server/public/img/coops/chiron_logo.webp | Bin 0 -> 8282 bytes Server/public/img/coops/kuusk_logo.png | Bin 0 -> 18749 bytes Server/public/img/coops/kuusk_logo.webp | Bin 0 -> 6162 bytes Server/public/img/crowd.png | Bin 0 -> 45539 bytes Server/public/img/crowd.webp | Bin 0 -> 25042 bytes Server/public/js/communities.js | 39 ++ .../js/components/communities-component.js | 234 ++++++- Server/public/js/components/cookies-dialog.js | 2 +- .../js/components/cooperatives-component.js | 350 +++++++++- .../public/js/components/footer-component.js | 15 +- .../public/js/components/groups-component.js | 245 ++++++- Server/public/js/components/index-3e97afc8.js | 494 ++++++++++++++ Server/public/js/components/index-4df1625a.js | 494 ++++++++++++++ Server/public/js/components/index-87e2062f.js | 445 +++++++++++++ Server/public/js/components/index-a3443bd2.js | 486 ++++++++++++++ Server/public/js/components/index-d69c198b.js | 494 ++++++++++++++ .../public/js/components/join-us-component.js | 228 ++++++- .../public/js/components/landing-component.js | 98 ++- .../public/js/components/legend-component.js | 2 +- .../js/components/loadscreen-component.js | 2 +- .../js/components/manifesto-component.js | 609 +++++++++++++++++- Server/public/js/components/map-component.js | 152 +++++ .../public/js/components/navbar-component.js | 41 +- Server/public/js/components/pane-aligner.js | 2 +- .../public/js/components/select-component.js | 2 +- .../public/js/components/switch-component.js | 2 +- Server/public/js/coops.js | 51 ++ Server/public/js/groups.js | 37 ++ 45 files changed, 5255 insertions(+), 108 deletions(-) create mode 100644 Server/app/svelte/public/js/communities.js create mode 100644 Server/app/svelte/public/js/coops.js create mode 100644 Server/app/svelte/public/js/groups.js create mode 100644 Server/app/svelte/src/components/map-component.svelte create mode 100644 Server/public/assets/manifesto.txt create mode 100644 Server/public/img/coops/chiron_logo.png create mode 100644 Server/public/img/coops/chiron_logo.webp create mode 100644 Server/public/img/coops/kuusk_logo.png create mode 100644 Server/public/img/coops/kuusk_logo.webp create mode 100644 Server/public/img/crowd.png create mode 100644 Server/public/img/crowd.webp create mode 100644 Server/public/js/communities.js create mode 100644 Server/public/js/components/index-3e97afc8.js create mode 100644 Server/public/js/components/index-4df1625a.js create mode 100644 Server/public/js/components/index-87e2062f.js create mode 100644 Server/public/js/components/index-a3443bd2.js create mode 100644 Server/public/js/components/index-d69c198b.js create mode 100644 Server/public/js/components/map-component.js create mode 100644 Server/public/js/coops.js create mode 100644 Server/public/js/groups.js diff --git a/Server/app/resources/basic/BasicController.jl b/Server/app/resources/basic/BasicController.jl index 88918a5..6aa34e4 100644 --- a/Server/app/resources/basic/BasicController.jl +++ b/Server/app/resources/basic/BasicController.jl @@ -7,12 +7,12 @@ using Server.DatabaseSupport, Server.TemplateEditor controller = "basic" dict_layouts = Dict( - :landing => generate_layout_html("main",controller,"landing",css=["landing"]), + :landing => generate_layout_html("main",controller,"landing",css=["landing"],libraries=["Leaflet"]), :manifesto => generate_layout_html("main",controller,"manifesto"), - :join_us => generate_layout_html("main",controller,"join_us"), - :groups => generate_layout_html("main",controller,"groups"), - :cooperatives => generate_layout_html("main",controller,"cooperatives"), - :communities => generate_layout_html("main",controller,"communities"), + :join_us => generate_layout_html("main",controller,"join_us",libraries=["Leaflet"]), + :groups => generate_layout_html("main",controller,"groups",libraries=["Leaflet"]), + :cooperatives => generate_layout_html("main",controller,"cooperatives",libraries=["Leaflet"]), + :communities => generate_layout_html("main",controller,"communities",libraries=["Leaflet"]), ) #---General----------------------------------------------------- diff --git a/Server/app/svelte/public/js/communities.js b/Server/app/svelte/public/js/communities.js new file mode 100644 index 0000000..b8897be --- /dev/null +++ b/Server/app/svelte/public/js/communities.js @@ -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 + "" + g.contact[1] + "" + } + else if (field=="location") { + text += fieldText + g[field][0] + "
" + coordinates = g[field][1] + } + else { + text += fieldText + g[field] + "
" + } + } + 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) + } +} \ No newline at end of file diff --git a/Server/app/svelte/public/js/coops.js b/Server/app/svelte/public/js/coops.js new file mode 100644 index 0000000..e437090 --- /dev/null +++ b/Server/app/svelte/public/js/coops.js @@ -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 = "" + field[0].toUpperCase() + field.slice(1) + ": " + "" + if (field=="logo") { + text += "logo" + "
" + } + else if (field=="contact") { + text += fieldText + "" + g.contact[1] + "" + "
" + } + else if (field=="website") { + text += fieldText + "" + g.website + "" + "
" + } + else if (field=="location") { + text += fieldText + g[field][0] + "
" + coordinates = g[field][1] + } + else { + text += fieldText + g[field] + "
" + } + } + L.marker(coordinates).addTo(map).bindPopup(text) + } +} \ No newline at end of file diff --git a/Server/app/svelte/public/js/groups.js b/Server/app/svelte/public/js/groups.js new file mode 100644 index 0000000..517c2fb --- /dev/null +++ b/Server/app/svelte/public/js/groups.js @@ -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 + "" + g.contact[1] + "" + } + else if (field=="location") { + text += fieldText + g[field][0] + "
" + coordinates = g[field][1] + } + else { + text += fieldText + g[field] + "
" + } + } + 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) + } +} \ No newline at end of file diff --git a/Server/app/svelte/rollup.config.js b/Server/app/svelte/rollup.config.js index 72c9b3c..c32a982 100644 --- a/Server/app/svelte/rollup.config.js +++ b/Server/app/svelte/rollup.config.js @@ -10,6 +10,7 @@ import watch from "rollup-plugin-watch"; const production = !process.env.ROLLUP_WATCH; + function serve() { let server; diff --git a/Server/app/svelte/src/communities-component.svelte b/Server/app/svelte/src/communities-component.svelte index 1de1de2..981dc23 100644 --- a/Server/app/svelte/src/communities-component.svelte +++ b/Server/app/svelte/src/communities-component.svelte @@ -3,22 +3,99 @@ - +
+ +
+

Communities

+

We build libertarian socialist communities by buying land, housing and the means of production which are then owned by the members of these communities. There is no private property within the communities and, therefore, exploitation and suffering that comes with it. Decisions are made through direct democracy with a focus on consensus ensuring that each community member has power over decisions that affect their life. Communities 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 communities the gift economy is utilized whenever possible. Each community is a small beacon of socialism within the dark capitalist world showing us how good life can be if only we achieve our goal.

+

Our communities

+ +

Europe

+ {#each communities as community} +
+

Location: {community.location[0]}

+

Status: {community.status}

+

Members: {community.members}

+

Contact: {community.contact[1]}

+
+ {/each} + +
+
\ No newline at end of file diff --git a/Server/app/svelte/src/components/map-component.svelte b/Server/app/svelte/src/components/map-component.svelte new file mode 100644 index 0000000..ea2bb4e --- /dev/null +++ b/Server/app/svelte/src/components/map-component.svelte @@ -0,0 +1,43 @@ + + + + +
+ + + \ 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 5c00464..d9b7876 100644 --- a/Server/app/svelte/src/cooperatives-component.svelte +++ b/Server/app/svelte/src/cooperatives-component.svelte @@ -3,22 +3,131 @@ - +
+ +
+

Cooperatives

+

We create worker cooperatives that embody a transformative business model in which the workers themselves own and democratically control the enterprise. In these cooperatives, each employee has a say in decision-making, and profits are shared based on individual contributions. This participatory structure fosters a sense of ownership, motivation, and job satisfaction among workers, resulting in a more fulfilling and empowering work experience. Moreover, worker cooperatives promote economic equity by distributing profits more equitably among all workers, challenging the concentration of wealth seen in traditional capitalist enterprises.

+

Worker cooperatives prioritize the well-being of their workers, striving for fair wages, safe working conditions, and a healthy work-life balance. By placing the needs of workers at the forefront, these cooperatives create supportive and sustainable work environments that promote social cohesion and job security. Furthermore, worker cooperatives adopt long-term perspectives and prioritize the interests of their local communities. With decision-making power vested in the workers themselves, cooperatives are less inclined to pursue short-term profit-maximization strategies that harm workers and communities. Instead, they reinvest their profits locally, contributing to the development and resilience of their communities.

+

Our cooperatives

+ +

Europe

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

Name: {coop.name}

+

Location: {coop.lcoation}

+

Market: {coop.market}

+

Workers: {coop.workers}

+

Status: {coop.status}

+

Website: {coop.website}

+

Contact: {coop.contact[1]}

+
+ + + + + +
+

Description: {coop.description}

+
+ {/each} +
+
\ No newline at end of file diff --git a/Server/app/svelte/src/footer/footer-component.svelte b/Server/app/svelte/src/footer/footer-component.svelte index 1668703..8a08682 100644 --- a/Server/app/svelte/src/footer/footer-component.svelte +++ b/Server/app/svelte/src/footer/footer-component.svelte @@ -16,7 +16,7 @@

CONTACT US

-

WhatsApp: group invite link

+

WhatsApp: group invite link