Skip to content

Commit

Permalink
Borders
Browse files Browse the repository at this point in the history
  • Loading branch information
j-norwood-young committed May 29, 2024
1 parent 3723606 commit c0a511a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 36 deletions.
4 changes: 2 additions & 2 deletions election-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Visualisations for the South African general elections.
* Requires at least: 6.1
* Requires PHP: 7.0
* Version: 0.7.0
* Version: 0.7.1
* Author: 10Layer
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -18,7 +18,7 @@
exit; // Exit if accessed directly.
}

define("ELECTIONENGINE_VERSION", '0.7.0');
define("ELECTIONENGINE_VERSION", '0.7.1');
define("ELECTIONENGINE_DIST_DIR", __DIR__ . '/packages/election-engine-wordpress-block/dist/');
define("ELECTIONENGINE_DIST_URL", plugins_url('packages/election-engine-wordpress-block/dist/', __FILE__));
define("ELECTIONENGINE_BLOCK_NAME", 'tenlayer/election-engine');
Expand Down
4 changes: 3 additions & 1 deletion packages/election-engine-wordpress-block/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
text-align: center;
}


.wp-block-tenlayer-election-engine {
height: 100%;
}
78 changes: 45 additions & 33 deletions packages/election-engine-wordpress-block/src/svelte/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,48 @@
onMount(async () => {});
</script>

{#if visualisation === "hemicycle"}
<Hemicycle
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "carto"}
<Cartogram
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "table"}
<Table
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "progress"}
<Progress {selected_year} {show_title} {show_blurb} {show_buttons} />
{/if}
<div class="electionengine-widget">
{#if visualisation === "hemicycle"}
<Hemicycle
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "carto"}
<Cartogram
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "table"}
<Table
{selected_year}
{selected_election}
{selected_region}
{show_title}
{show_blurb}
{show_buttons}
/>
{/if}
{#if visualisation === "progress"}
<Progress {selected_year} {show_title} {show_blurb} {show_buttons} />
{/if}
</div>

<style>
.electionengine-widget {
position: relative;
width: 100%;
height: 100%;
border: 1px solid #ccc;
border-radius: 6px;
}
</style>

0 comments on commit c0a511a

Please sign in to comment.