You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
Svelte
38 lines
1.0 KiB
Svelte
<script>
|
|
import { templates } from '$lib/templates/templates';
|
|
|
|
/** @type number */ export let templateIndex;
|
|
import { address } from '$lib/stores/store';
|
|
</script>
|
|
|
|
{#if templates[templateIndex] && $address}
|
|
<div
|
|
class="address"
|
|
style="
|
|
top: {templates[templateIndex].address.top}px;
|
|
height: {templates[templateIndex].address.height}rem;
|
|
left: {templates[templateIndex].address.left}rem;
|
|
right: {templates[templateIndex].address.right}rem;
|
|
color: {templates[templateIndex].address.color};
|
|
font-size: {templates[templateIndex].address.fontSize}rem;
|
|
font-family: {templates[templateIndex].address.fontFamily};
|
|
line-height: {templates[templateIndex].address.lineHeight};
|
|
text-align: {templates[templateIndex].address.textAlign};
|
|
font-weight: {templates[templateIndex].address.fontWeight};
|
|
"
|
|
>
|
|
{$address}
|
|
</div>
|
|
{/if}
|
|
|
|
<style>
|
|
.address {
|
|
position: absolute;
|
|
display: grid;
|
|
overflow: hidden;
|
|
white-space: pre-wrap;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
</style>
|