Skip to content

Commit f58c7d0

Browse files
committed
Revert "use SvelteUI Lottie over DotLottieSvelte"
This reverts commit 3c7945e.
1 parent a8fd905 commit f58c7d0

5 files changed

Lines changed: 38 additions & 423 deletions

File tree

package-lock.json

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"indexl10n": "node scripts/programatic-langs.js && node scripts/translation-index.js"
1212
},
1313
"dependencies": {
14+
"@lottiefiles/dotlottie-svelte": "^0.10.6",
1415
"penguinmod": "github:PenguinMod/PenguinMod-ApiModule",
1516
"PenguinMod-MarkDown": "github:PenguinMod/PenguinMod-MarkDownNew",
1617
"PenguinMod-SvelteUI": "github:PenguinMod/PenguinMod-SvelteUI"
Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<script>
2-
// components
3-
import { Lottie } from "PenguinMod-SvelteUI";
4-
import Icon from "$lib/components/Icon/Component.svelte";
2+
import { DotLottieSvelte } from '@lottiefiles/dotlottie-svelte';
53
</script>
64

5+
<h1>DotLottieSvelte</h1>
6+
<h2>@lottiefiles/dotlottie-svelte</h2>
7+
78
<h3>hoverdevice</h3>
89
<p>
910
<span><b>{"/asset/penguin/animated/lottie/hoverdevice.json"}</b></span>
@@ -12,42 +13,15 @@
1213
</p>
1314
<div class="row">
1415
<div class="card">
15-
<Lottie
16+
<DotLottieSvelte
1617
src="/asset/penguin/animated/lottie/hoverdevice.json"
17-
autoplay
18-
>
19-
<div class="card-lottie-placeholder">
20-
<Icon style="font-size:48px;">downloading</Icon>
21-
</div>
22-
</Lottie>
23-
</div>
24-
<div class="card">
25-
<img
26-
src="/asset/penguin/animated/svg/hoverdevice.svg"
27-
alt="Penguin"
18+
autoplay={true}
19+
loop={true}
2820
/>
2921
</div>
30-
</div>
31-
<h3>test</h3>
32-
<p>
33-
<span><b>{"/asset/penguin/animated/lottie/test.json"}</b></span>
34-
<span>vs.</span>
35-
<span><b>{"/asset/penguin/animated/svg/test.svg"}</b></span>
36-
</p>
37-
<div class="row">
38-
<div class="card">
39-
<Lottie
40-
src="/asset/penguin/animated/lottie/test.json"
41-
autoplay
42-
>
43-
<div class="card-lottie-placeholder">
44-
<Icon style="font-size:48px;">downloading</Icon>
45-
</div>
46-
</Lottie>
47-
</div>
4822
<div class="card">
4923
<img
50-
src="/asset/penguin/animated/svg/test.svg"
24+
src="/asset/penguin/animated/svg/hoverdevice.svg"
5125
alt="Penguin"
5226
/>
5327
</div>
@@ -65,27 +39,11 @@
6539
width: 480px;
6640
height: 480px;
6741
}
68-
.card :global(div[data-penguinmodsvelteui-lottie-placeholder="true"]) {
69-
left: 0;
70-
top: 0;
71-
width: 100%;
72-
height: 100%;
73-
}
74-
.card-lottie-placeholder {
75-
width: 100%;
76-
height: 100%;
7742
78-
display: flex;
79-
flex-direction: column;
80-
align-items: center;
81-
justify-content: center;
82-
}
83-
.card :global(div[data-penguinmodsvelteui-lottie="true"]),
84-
.card img {
43+
img {
8544
width: 100%;
8645
height: 100%;
87-
}
88-
.card img {
46+
8947
object-fit: contain;
9048
}
9149
</style>

static/asset/penguin/animated/lottie/test.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)