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}