refactor(assets): convert badge templates to svg

- Fixed incorrect svg rendering.

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2025-12-11 19:44:58 +08:00
committed by Asai Neko
parent f31c29da84
commit 26cec0e2a8
7 changed files with 8 additions and 78 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,13 +1,14 @@
--- ---
import NormalBadgeTemplate from '@assets/badges/normal.svg'; import { Image } from 'astro:assets';
import RainbowBadgeTemplate from '@assets/badges/rainbow.svg'; import NormalBadgeTemplate from '@assets/badges/normal.webp';
import TransBadgeTemplate from '@assets/badges/trans.svg'; import RainbowBadgeTemplate from '@assets/badges/rainbow.webp';
import TransBadgeTemplate from '@assets/badges/trans.webp';
--- ---
<div class="badge-row"> <div class="badge-row">
<NormalBadgeTemplate class="badge" /> <Image class="badge" src={NormalBadgeTemplate} alt="NormalBadgeTemplate" />
<RainbowBadgeTemplate class="badge" /> <Image class="badge" src={RainbowBadgeTemplate} alt="RainbowBadgeTemplate" />
<TransBadgeTemplate class="badge" /> <Image class="badge" src={TransBadgeTemplate} alt="TransBadgeTemplate" />
</div> </div>
<style> <style>
@@ -19,6 +20,7 @@ import TransBadgeTemplate from '@assets/badges/trans.svg';
.badge { .badge {
margin-top: 0; margin-top: 0;
min-width: 0;
width: clamp(180px, 24vw, 240px); width: clamp(180px, 24vw, 240px);
height: auto; height: auto;
} }