blob: 362ced197217a59fa87d7b1727c59740160d5ee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<!--
The back of a monster ability card (the reference
`MonsterAbilityCardRear`): the card artwork with the draw-pile size in
the bottom-right corner (hidden when `size` is negative).
-->
<script lang="ts">
let {
fh = true,
size = -1,
scale = 1
}: {
fh?: boolean;
/** The draw-pile count shown bottom-right; negative hides it. */
size?: number;
scale?: number;
} = $props();
const width = 142.4 * scale;
const height = 94.4 * scale;
</script>
<div
class="acback"
style="width: {width}px; height: {height}px"
>
<img
class="acback__bg"
src={fh ? '/images/psd/MonsterAbility-back_fh.png' : '/images/psd/MonsterAbility-back.png'}
alt=""
draggable="false"
/>
{#if size >= 0}
<div class="acback__size" style="font-size: {12.8 * scale}px">{size}</div>
{/if}
</div>
<style>
.acback {
position: relative;
border-radius: 4px;
flex-shrink: 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.acback__bg {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border-radius: 4px;
object-fit: fill;
}
.acback__size {
position: absolute;
right: 4.8px;
bottom: 0;
font-family: system-ui, sans-serif;
color: #fff;
text-shadow: 0.8px 0.8px 1px #000;
}
</style>
|