aotds-docks/src/lib/components/Output/Print/MainSystems/index.svelte

76 lines
1.3 KiB
Svelte
Raw Normal View History

2020-07-29 20:39:20 +00:00
<div class="main_systems">
2022-03-01 17:42:33 +00:00
{#if ftl !== "none"}
<img
bind:this={targetFTL}
class="ftl"
src="{base}/icons/ftl-drive.svg"
alt="ftl drive"
/>
{#if movable}
<Movable target={targetFTL} />
{/if}
2020-07-29 20:39:20 +00:00
{/if}
{#if engine > 0}
<div
bind:this={targetEngine}
class="thrust"
style="background-image: url({base}/icons/standard-drive.svg);"
>
{engine}
</div>
{#if movable}
<Movable target={targetEngine} />
{/if}
2020-07-29 20:39:20 +00:00
{/if}
2022-03-01 17:42:33 +00:00
<img
class="internal"
2022-04-05 23:58:32 +00:00
src="{base}/icons/internal-systems.svg"
2022-03-01 17:42:33 +00:00
alt="internal systems"
bind:this={targetInternal}
2022-03-01 17:42:33 +00:00
/>
{#if movable}
<Movable target={targetInternal} />
{/if}
2022-03-01 17:42:33 +00:00
</div>
2020-07-29 20:39:20 +00:00
<script>
import { base } from "$app/paths";
import Movable from "./Movable.svelte";
2022-04-05 23:58:32 +00:00
2022-03-01 17:42:33 +00:00
export let ftl = "none";
2020-07-29 20:39:20 +00:00
export let engine = 0;
export let movable = false;
let targetFTL;
let targetInternal;
let targetEngine;
2020-07-29 20:39:20 +00:00
</script>
<style>
.thrust {
width: 2em;
background-size: 2em;
background-repeat: no-repeat;
height: 2em;
line-height: 2em;
text-align: center;
}
2022-03-01 17:42:33 +00:00
.main_systems {
display: flex;
align-items: center;
gap: 1em;
justify-content: space-evenly;
margin-top: 1em;
}
img.ftl {
height: 2em;
}
2020-07-29 20:39:20 +00:00
img.internal {
height: 2em;
}
</style>