From 3515603e93443681600e0655385433065b73b974 Mon Sep 17 00:00:00 2001 From: a-ill Date: Tue, 4 Jul 2023 19:21:15 +0300 Subject: [PATCH] Update --- Manifest.toml | 7 - Server/app/resources/basic/BasicController.jl | 20 + .../app/resources/basic/views/compass.jl.html | 1 + .../public/locales/en/compass-component.json | 120 ++++ .../public/locales/ru/compass-component.json | 3 + .../app/svelte/src/compass-component.svelte | 203 +++++++ .../svelte/src/footer/footer-component.svelte | 10 +- Server/bin/repl | 2 - Server/bin/repl.bat | 1 - Server/bin/runtask | 2 - Server/bin/runtask.bat | 1 - Server/public/img/common/compass.svg | 1 + .../js/components/communities-component.js | 2 +- .../public/js/components/compass-component.js | 1 + Server/public/js/components/cookies-dialog.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-1b62632d.js | 53 ++ Server/public/js/components/index-42a25c61.js | 513 ++++++++++++++++++ Server/public/js/components/index-4348483d.js | 1 + Server/public/js/components/index-5e6510e7.js | 513 ++++++++++++++++++ Server/public/js/components/index-68a48afb.js | 513 ++++++++++++++++++ Server/public/js/components/index-71440b21.js | 1 + Server/public/js/components/index-86921d75.js | 53 ++ Server/public/js/components/index-a1c185ea.js | 53 ++ Server/public/js/components/index-d08fd9c0.js | 513 ++++++++++++++++++ Server/public/js/components/index-dfcd3ec9.js | 53 ++ .../public/js/components/join-us-component.js | 2 +- .../public/js/components/landing-component.js | 2 +- .../public/js/components/legend-component.js | 2 +- .../js/components/loadscreen-component.js | 2 +- .../js/components/manifesto-component.js | 2 +- Server/public/js/components/map-component.js | 2 +- .../public/js/components/navbar-component.js | 2 +- Server/public/js/components/pane-aligner.js | 2 +- .../js/components/partners-component.js | 2 +- .../public/js/components/select-component.js | 2 +- .../public/js/components/switch-component.js | 2 +- .../public/locales/en/compass-component.json | 120 ++++ .../public/locales/ru/compass-component.json | 3 + Server/public/sitemap.txt | 14 +- Server/routes.jl | 9 +- Server/startup.jl | 1 + 44 files changed, 2769 insertions(+), 48 deletions(-) delete mode 100644 Manifest.toml create mode 100644 Server/app/resources/basic/views/compass.jl.html create mode 100644 Server/app/svelte/public/locales/en/compass-component.json create mode 100644 Server/app/svelte/public/locales/ru/compass-component.json create mode 100644 Server/app/svelte/src/compass-component.svelte delete mode 100644 Server/bin/repl delete mode 100644 Server/bin/repl.bat delete mode 100644 Server/bin/runtask delete mode 100644 Server/bin/runtask.bat create mode 100644 Server/public/img/common/compass.svg create mode 100644 Server/public/js/components/compass-component.js create mode 100644 Server/public/js/components/index-1b62632d.js create mode 100644 Server/public/js/components/index-42a25c61.js create mode 100644 Server/public/js/components/index-4348483d.js create mode 100644 Server/public/js/components/index-5e6510e7.js create mode 100644 Server/public/js/components/index-68a48afb.js create mode 100644 Server/public/js/components/index-71440b21.js create mode 100644 Server/public/js/components/index-86921d75.js create mode 100644 Server/public/js/components/index-a1c185ea.js create mode 100644 Server/public/js/components/index-d08fd9c0.js create mode 100644 Server/public/js/components/index-dfcd3ec9.js create mode 100644 Server/public/locales/en/compass-component.json create mode 100644 Server/public/locales/ru/compass-component.json diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 9ed5ab9..0000000 --- a/Manifest.toml +++ /dev/null @@ -1,7 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.9.0" -manifest_format = "2.0" -project_hash = "da39a3ee5e6b4b0d3255bfef95601890afd80709" - -[deps] diff --git a/Server/app/resources/basic/BasicController.jl b/Server/app/resources/basic/BasicController.jl index 0ac06b1..074cf43 100644 --- a/Server/app/resources/basic/BasicController.jl +++ b/Server/app/resources/basic/BasicController.jl @@ -14,6 +14,7 @@ dict_layouts = Dict( :cooperatives => generate_layout_html("main",controller,"cooperatives",libraries=["Leaflet"]), :communities => generate_layout_html("main",controller,"communities",libraries=["Leaflet"]), :partners => generate_layout_html("main",controller,"partners",libraries=["Leaflet"]), + :compass => generate_layout_html("main",controller,"compass"), ) #---Page info----------------------------------------------------- @@ -95,6 +96,17 @@ const partners_info = Dict( ) ) +const compass_info = Dict( + "en" => Dict( + :title => "LibSoc - Political Compass", + :description => "" + ), + "ru" => Dict( + :title => "LibSoc - Политический компас", + :description => "" + ) +) + function get_locale() data = payload() if :locale in keys(data) @@ -162,4 +174,12 @@ function partners() ) end +function political_compass() + locale = get_locale() + html(:basic,:compass, layout = dict_layouts[:compass], context = @__MODULE__, + title = compass_info[locale][:title], + description = compass_info[locale][:description] + ) +end + end \ No newline at end of file diff --git a/Server/app/resources/basic/views/compass.jl.html b/Server/app/resources/basic/views/compass.jl.html new file mode 100644 index 0000000..3db02f1 --- /dev/null +++ b/Server/app/resources/basic/views/compass.jl.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Server/app/svelte/public/locales/en/compass-component.json b/Server/app/svelte/public/locales/en/compass-component.json new file mode 100644 index 0000000..aebd810 --- /dev/null +++ b/Server/app/svelte/public/locales/en/compass-component.json @@ -0,0 +1,120 @@ +{ + "heading": "Political compass", + "qs": [ + { + "q": "Production should be driven by ... ", + "as": [ + ["individual entrepreneurial initiative and wealth",["C"]], + ["the directives and plans set by the people in charge",["V"]], + ["collective decision-making and agreement",["LS"]] + ] + }, + { + "q": "Decision-making power at work should belong to ...", + "as": [ + ["those who own the place due to having wealth or political power",["C"]], + ["those who work there",["LS"]] + ] + }, + { + "q": "Distribution of work should be based on ...", + "as": [ + ["opportunities in the job market and wealth",["C"]], + ["the directives and assignments given by the people in charge",["V"]], + ["collective planning and equitable allocation according to societal needs",["LS"]] + ] + }, + { + "q": "The means of production should be owned and controlled by ...", + "as": [ + ["wealthy individuals",["C"]], + ["the people in charge of the state apparatus",["V"]], + ["the community as a whole",["LS"]] + ] + }, + { + "q": "The production process should prioritize ...", + "as": [ + ["cost-effectiveness",["C"]], + ["whatever the people in charge say",["V"]], + ["needs and sustainability",["LS"]] + ] + }, + { + "q": "Infinite growth of production leads to ...", + "as": [ + ["all the good stuff",["C","V"]], + ["destruction of our planet",["LS"]] + ] + }, + { + "q": "Distribution should happen based on ...", + "as": [ + ["wealth",["C"]], + ["whatever the people in charge say",["V"]], + ["collective agreement",["LS"]] + ] + }, + { + "q": "Social safety nets should be ...", + "as": [ + ["minimized to encourage individual self-reliance",["C"]], + ["controlled and distributed by the people in charge",["V"]], + ["comprehensive and provided as a collective responsibility",["LS"]] + ] + }, + { + "q": "Access to education should be ...", + "as": [ + ["dependent on financial means",["C"]], + ["regulated and controlled by the people in charge to shape societal values",["V"]], + ["guaranteed as a universal right",["LS"]] + ] + }, + { + "q": "Most people are ...", + "as": [ + ["incapable of making good decisions and have to be led like sheep",["C","V"]], + ["capable of making good decision if given an opportunity and independence",["LS"]] + ] + }, + { + "q": "Power corrupts ...", + "as": [ + ["sometimes, which is why we have several groups of people in power that give power to each other from time to time based on who had a better PR campaign",["C"]], + ["everyone but our supreme benevolent dictators",["V"]], + ["everyone",["LS"]] + ] + }, + { + "q": "Decisions should happen based on ...", + "as": [ + ["whatever the people in charge say",["C","V"]], + ["collective agreement",["LS"]] + ] + }, + { + "q": "Use of violence is ...", + "as": [ + ["justified to allow the people in charge to stay in power",["C","V"]], + ["unacceptable",["LS"]] + ] + }, + { + "q": "Innovation and technological development should be driven by ...", + "as": [ + ["market competition and individual incentives",["C"]], + ["objectives set by the people in charge",["V"]], + ["collective research and shared knowledge",["LS"]] + ] + }, + { + "q": "Ownership of intellectual property rights should belong to ...", + "as": [ + ["the individual inventors or their employers",["C"]], + ["the people in charge who regulate and control intellectual property",["V"]], + ["the community and shared knowledge",["LS"]] + ] + } + ] +} \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/compass-component.json b/Server/app/svelte/public/locales/ru/compass-component.json new file mode 100644 index 0000000..603544a --- /dev/null +++ b/Server/app/svelte/public/locales/ru/compass-component.json @@ -0,0 +1,3 @@ +{ + "heading": "Политический компас" +} \ No newline at end of file diff --git a/Server/app/svelte/src/compass-component.svelte b/Server/app/svelte/src/compass-component.svelte new file mode 100644 index 0000000..119ba04 --- /dev/null +++ b/Server/app/svelte/src/compass-component.svelte @@ -0,0 +1,203 @@ + + + + +{#key loaded} + {#if Object.keys($content).length!=0} +
+
+

{$content.heading}

+ compass + {#key qTag} + {#if qTag!=$content.qs.length} +

{$content.qs[qTag].q}

+
+ {#each $content.qs[qTag].as as a,i} +
+ + +
+ {/each} +
+ + {:else} +

You are compatible with ...

+
    +
  • capitalism by {capitalismScore}%
  • +
  • vanguardism by {vanguardismScore}%
  • +
  • libertarian socialism by {socialismScore}%
  • +
+ + {/if} + {/key} +
+
+ {/if} +{/key} + + \ 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 3d4895f..5f46c72 100644 --- a/Server/app/svelte/src/footer/footer-component.svelte +++ b/Server/app/svelte/src/footer/footer-component.svelte @@ -25,7 +25,7 @@

{$content.contactUs}

WhatsApp: {$content.inviteLink}

-

Discord: {$content.inviteLink}

+

Discord: {$content.inviteLink}