your personal website on atproto - mirror blento.app

small fixes

Florian d2adfa15 1b9e459c

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