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.
39 lines
1.1 KiB
Svelte
39 lines
1.1 KiB
Svelte
<script>
|
|
import { templates } from '$lib/templates/templates';
|
|
|
|
/** @type number */ export let templateIndex;
|
|
import { subtitle, multiplier } from '$lib/stores/store';
|
|
console.log($multiplier);
|
|
</script>
|
|
|
|
{#if templates[templateIndex] && $subtitle}
|
|
<div
|
|
class="subtitle"
|
|
style="
|
|
top: {templates[templateIndex].subtitle.top}px;
|
|
height: {templates[templateIndex].subtitle.height}px;
|
|
left: {templates[templateIndex].subtitle.left}px;
|
|
right: {templates[templateIndex].subtitle.right}px;
|
|
color: {templates[templateIndex].subtitle.color};
|
|
font-size: {templates[templateIndex].subtitle.fontSize * $multiplier}px;
|
|
font-family: {templates[templateIndex].subtitle.fontFamily};
|
|
text-align: {templates[templateIndex].subtitle.textAlign};
|
|
font-weight: {templates[templateIndex].subtitle.fontWeight};
|
|
line-height: {templates[templateIndex].subtitle.lineHeight}px;
|
|
"
|
|
>
|
|
{$subtitle}
|
|
</div>
|
|
{/if}
|
|
|
|
<style>
|
|
.subtitle {
|
|
position: absolute;
|
|
font-variant: small-caps;
|
|
overflow: hidden;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: start;
|
|
}
|
|
</style>
|