aotds-docks/src/routes/export/print/PrintShip/index.svelte

61 lines
1.2 KiB
Svelte
Raw Normal View History

2023-04-25 18:50:15 +00:00
<div>Printing this page will only prints the ship sheet.</div>
<div class="print-output">
2023-04-26 13:53:22 +00:00
<Identification {...identification} />
2023-04-25 18:50:15 +00:00
2023-04-27 16:17:08 +00:00
<div class="grid">
<div class="s6">
<Armor layers={structure?.armor?.layers} />
<Hull
shipMass={identification.reqs.mass}
advanced={false}
rating={structure.hull?.rating}
/>
</div>
<div class="s6">
<Screens {...screens} />
</div>
</div>
2023-04-26 13:35:46 +00:00
2023-04-26 13:53:22 +00:00
<MainSystems {...propulsion} />
2023-04-25 18:50:15 +00:00
</div>
<script>
2023-04-26 13:53:22 +00:00
import Identification from "./Identification.svelte";
import MainSystems from "./MainSystems/index.svelte";
2023-04-26 20:11:49 +00:00
import Hull from "./Hull/index.svelte";
2023-04-27 16:17:08 +00:00
import Armor from "./Armor/index.svelte";
import Screens from "./Screens/index.svelte";
2023-04-25 18:50:15 +00:00
export let identification = {};
export let propulsion = {};
2023-04-26 20:11:49 +00:00
export let structure = {};
2023-04-27 16:17:08 +00:00
$: screens = structure?.screens ?? {};
2023-04-25 18:50:15 +00:00
</script>
<style>
.print-output {
width: 4.25in;
height: 5.5in;
border: 1px solid black;
padding: 1em;
margin: 0px auto;
}
2023-04-26 13:53:22 +00:00
@media print {
:global(body > *) {
visibility: hidden;
}
2023-04-25 18:50:15 +00:00
2023-04-26 13:53:22 +00:00
.print-output {
visibility: visible;
}
}
2023-04-27 16:17:08 +00:00
.s6 {
display: flex;
flex-direction: column;
align-items: center;
}
2023-04-25 18:50:15 +00:00
</style>