Merge branch 'main' into main

This commit is contained in:
Pablo Hdez 2024-01-18 23:29:55 +00:00 committed by GitHub
commit 504b8cf0c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 17 deletions

View File

@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
let div: HTMLDivElement; let domElement: HTMLElement;
let focused = false; let focused = false;
let position = { x: 0, y: 0 }; let position = { x: 0, y: 0 };
let opacity = 0; let opacity = 0;
const handleMouseMove = (e: MouseEvent) => { const handleMouseMove = (e: MouseEvent) => {
if (!div || focused) return; if (!domElement || focused) return;
const rect = div.getBoundingClientRect(); const rect = domElement.getBoundingClientRect();
position = { position = {
x: e.clientX - rect.left, x: e.clientX - rect.left,
@ -34,9 +34,8 @@
}; };
</script> </script>
<div <article
aria-hidden="true" bind:this={domElement}
bind:this={div}
on:mousemove={handleMouseMove} on:mousemove={handleMouseMove}
on:focus={handleFocus} on:focus={handleFocus}
on:blur={handleBlur} on:blur={handleBlur}
@ -52,4 +51,4 @@
`} `}
/> />
<slot /> <slot />
</div> </article>

View File

@ -27,13 +27,15 @@
name: 'Extensions', name: 'Extensions',
url: 'https://github.com/pheralb/svgl?tab=readme-ov-file#-extensions', url: 'https://github.com/pheralb/svgl?tab=readme-ov-file#-extensions',
icon: ArrowUpRight, icon: ArrowUpRight,
external: true external: true,
label: "Go to the SVGL's extensions section"
}, },
{ {
name: 'Submit logo', name: 'Submit logo',
url: 'https://github.com/pheralb/svgl#-getting-started', url: 'https://github.com/pheralb/svgl#-getting-started',
icon: ArrowUpRight, icon: ArrowUpRight,
external: true external: true,
label: "Go to the SVGL's getting started section"
} }
]; ];
</script> </script>
@ -48,7 +50,7 @@
> >
<div class="flex items-center justify-between mx-auto"> <div class="flex items-center justify-between mx-auto">
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-2">
<a href="/"> <a href="/" aria-label="Back to the SVGL home page">
<div class="flex items-center space-x-2 hover:opacity-80 transition-opacity"> <div class="flex items-center space-x-2 hover:opacity-80 transition-opacity">
<svelte:component this={Logo} /> <svelte:component this={Logo} />
<span class="text-[19px] font-medium tracking-wide hidden md:block">svgl</span> <span class="text-[19px] font-medium tracking-wide hidden md:block">svgl</span>
@ -64,6 +66,7 @@
<a <a
href={link.url} href={link.url}
target={link.external ? '_blank' : ''} target={link.external ? '_blank' : ''}
aria-label={link.label ?? link.name}
class={cn( class={cn(
'flex items-center hover:opacity-80 transition-opacity text-[15px] pl-2 md:pl-3 group', 'flex items-center hover:opacity-80 transition-opacity text-[15px] pl-2 md:pl-3 group',
currentPath === link.url && currentPath === link.url &&

View File

@ -179,7 +179,7 @@
</p> </p>
<a <a
href={`/directory/${svgInfo.category.toLowerCase()}`} href={`/directory/${svgInfo.category.toLowerCase()}`}
class="text-sm lowercase text-neutral-500 hover:underline font-mono">{svgInfo.category}</a class="text-sm lowercase text-neutral-400 hover:underline font-mono">{svgInfo.category}</a
> >
</div> </div>
<!-- Actions --> <!-- Actions -->

View File

@ -2214,6 +2214,15 @@ export const svgs: iSVG[] = [
}, },
url: 'https://1password.com' url: 'https://1password.com'
}, },
{
title: 'Flask',
category: 'Framework',
route: {
light: '/library/flask-light.svg',
dark: '/library/flask-dark.svg'
},
url: 'https://flask.palletsprojects.com/'
},
{ {
title: 'Alacritty', title: 'Alacritty',
category: 'Software', category: 'Software',
@ -2314,12 +2323,9 @@ export const svgs: iSVG[] = [
url: 'https://litecoin.org/' url: 'https://litecoin.org/'
}, },
{ {
title: 'Flask', title: 'ElysiaJS',
category: 'Framework', category: 'Framework',
route: { route: '/library/elysiajs.svg',
light: '/library/flask-light.svg', url: 'https://elysiajs.com/'
dark: '/library/flask-dark.svg'
},
url: 'https://flask.palletsprojects.com/'
} }
]; ];

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB