your personal website on atproto - mirror blento.app

small fixes

Florian d2adfa15 1b9e459c

+11 -5
+1 -2
src/lib/cards/LinkCard/LinkCard.svelte
··· 74 74 rel="noopener noreferrer" 75 75 use:qrOverlay={{ 76 76 context: { 77 - title: item.cardData.title, 78 - favicon: item.cardData.favicon 77 + title: item.cardData.title 79 78 } 80 79 }} 81 80 >
+6
src/lib/cards/helper.ts
··· 5 5 return getComputedStyle(document.body).getPropertyValue(variable).trim(); 6 6 } 7 7 8 + 9 + export function getHexCSSVar(variable: string) { 10 + return convertCSSToHex(getCSSVar(variable)); 11 + } 12 + 13 + 8 14 /** 9 15 * Converts a CSS color string to a hue value in the 0-1 range 10 16 */
+3 -2
src/lib/components/qr/QRCodeDisplay.svelte
··· 1 1 <script lang="ts"> 2 + import { getHexCSSVar } from '$lib/cards/helper'; 2 3 import { onMount } from 'svelte'; 3 4 4 5 let { ··· 33 34 onMount(async () => { 34 35 if (!container) return; 35 36 36 - // Use iconColor or default accent, ensure # prefix 37 - const rawColor = iconColor || 'f6339a'; 37 + // Use iconColor or accent color, ensure # prefix 38 + const rawColor = iconColor || getHexCSSVar('--color-accent-600'); 38 39 const dotColor = rawColor.startsWith('#') ? rawColor : `#${rawColor}`; 39 40 40 41 const module = await import('qr-code-styling');
+1 -1
src/lib/components/qr/QRCodeModal.svelte
··· 22 22 <Modal bind:open closeButton={true} class="max-w-[90vw]! sm:max-w-sm! md:max-w-md!"> 23 23 <div class="flex flex-col items-center justify-center gap-4 p-4"> 24 24 {#if context.title} 25 - <div class="text-base-900 dark:text-base-100 text-center text-xl font-semibold"> 25 + <div class="text-base-900 dark:text-base-100 text-center text-3xl font-semibold"> 26 26 {context.title} 27 27 </div> 28 28 {/if}