mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
Merge branch 'main' into main
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@
|
||||
</head>
|
||||
<body
|
||||
data-sveltekit-preload-data="hover"
|
||||
class="min-h-screen bg-light font-sans text-mini dark:bg-dark dark:text-white"
|
||||
class="min-h-screen bg-light font-sans text-mini dark:bg-dark dark:text-white antialiased"
|
||||
>
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
|
||||
@@ -41,7 +41,16 @@
|
||||
|
||||
<CardSpotlight>
|
||||
<div class="flex flex-col items-center justify-center rounded-md p-4">
|
||||
<img src={svgInfo.route} alt={svgInfo.title} class="mb-4 mt-2 h-10" />
|
||||
<img
|
||||
class="hidden dark:block mb-4 mt-2 h-10"
|
||||
src={typeof svgInfo.route !== 'string' ? svgInfo.route.dark : svgInfo.route}
|
||||
alt={svgInfo.title}
|
||||
/>
|
||||
<img
|
||||
class="block dark:hidden mb-4 mt-2 h-10"
|
||||
src={typeof svgInfo.route !== 'string' ? svgInfo.route.light : svgInfo.route}
|
||||
alt={svgInfo.title}
|
||||
/>
|
||||
<div class="mb-3 flex flex-col items-center justify-center">
|
||||
<p class="truncate text-[15px] font-medium">{svgInfo.title}</p>
|
||||
<a
|
||||
@@ -53,7 +62,26 @@
|
||||
<button
|
||||
title="Copy to clipboard"
|
||||
on:click={() => {
|
||||
copyToClipboard(svgInfo.route);
|
||||
const svgHasTheme = typeof svgInfo.route !== 'string';
|
||||
|
||||
if (!svgHasTheme) {
|
||||
copyToClipboard(
|
||||
typeof svgInfo.route === 'string'
|
||||
? svgInfo.route
|
||||
: "Something went wrong. Couldn't copy the SVG."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const dark = document.documentElement.classList.contains('dark');
|
||||
|
||||
copyToClipboard(
|
||||
typeof svgInfo.route !== 'string'
|
||||
? dark
|
||||
? svgInfo.route.dark
|
||||
: svgInfo.route.light
|
||||
: svgInfo.route
|
||||
);
|
||||
}}
|
||||
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40"
|
||||
>
|
||||
@@ -62,7 +90,26 @@
|
||||
<button
|
||||
title="Download"
|
||||
on:click={() => {
|
||||
downloadSvg(svgInfo.route);
|
||||
const svgHasTheme = typeof svgInfo.route !== 'string';
|
||||
|
||||
if (!svgHasTheme) {
|
||||
downloadSvg(
|
||||
typeof svgInfo.route === 'string'
|
||||
? svgInfo.route
|
||||
: "Something went wrong. Couldn't copy the SVG."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const dark = document.documentElement.classList.contains('dark');
|
||||
|
||||
downloadSvg(
|
||||
typeof svgInfo.route !== 'string'
|
||||
? dark
|
||||
? svgInfo.route.dark
|
||||
: svgInfo.route.light
|
||||
: svgInfo.route
|
||||
);
|
||||
}}
|
||||
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40"
|
||||
>
|
||||
|
||||
+97
-3
@@ -1592,6 +1592,13 @@ export const svgs: iSVG[] = [
|
||||
},
|
||||
{
|
||||
id: 228,
|
||||
title: 'Salesforce',
|
||||
category: 'Software',
|
||||
route: '/library/salesforce.svg',
|
||||
url: 'https://www.salesforce.com'
|
||||
},
|
||||
{
|
||||
id: 4929293,
|
||||
title: 'Unreal Engine',
|
||||
category: 'Software',
|
||||
route: '/library/unreal_engine.svg',
|
||||
@@ -1618,6 +1625,13 @@ export const svgs: iSVG[] = [
|
||||
route: '/library/randevum.svg',
|
||||
url: 'https://www.randevum.co'
|
||||
},
|
||||
{
|
||||
"id": 232,
|
||||
"title": "Beacon",
|
||||
"category": "Software",
|
||||
"route": "/library/Beacon-Logo.svg",
|
||||
"url": "https://www.beacon.com"
|
||||
},
|
||||
{
|
||||
id: 95775,
|
||||
title: 'Affinity Designer',
|
||||
@@ -1654,7 +1668,7 @@ export const svgs: iSVG[] = [
|
||||
url: 'https://stately.ai/'
|
||||
},
|
||||
{
|
||||
id: 68068,
|
||||
id: 233,
|
||||
title: 'XState',
|
||||
category: 'Library',
|
||||
route: '/library/xstate.svg',
|
||||
@@ -1668,14 +1682,14 @@ export const svgs: iSVG[] = [
|
||||
url: 'https://hashnode.com'
|
||||
},
|
||||
{
|
||||
id: 69114,
|
||||
id: 235,
|
||||
title: 'Rowy',
|
||||
category: 'CMS',
|
||||
route: '/library/rowy.svg',
|
||||
url: 'https://www.rowy.io/'
|
||||
},
|
||||
{
|
||||
id: 12251,
|
||||
id: 236,
|
||||
title: 'BuildShip',
|
||||
category: 'AI',
|
||||
route: '/library/buildship.svg',
|
||||
@@ -1688,6 +1702,62 @@ export const svgs: iSVG[] = [
|
||||
route: '/library/cal.svg',
|
||||
url: 'https://cal.com'
|
||||
},
|
||||
{
|
||||
id: 238,
|
||||
title: 'Cursor AI',
|
||||
category: 'Software',
|
||||
route: '/library/cursor.svg',
|
||||
url: 'https://cursor.sh/'
|
||||
},
|
||||
{
|
||||
id: 239,
|
||||
title: 'Calendly',
|
||||
category: 'Software',
|
||||
route: '/library/calendly.svg',
|
||||
url: 'https://calendly.com/'
|
||||
},
|
||||
{
|
||||
id: 240,
|
||||
title: 'Mintlify',
|
||||
category: 'Software',
|
||||
route: '/library/mintlify.svg',
|
||||
url: 'https://mintlify.com/'
|
||||
},
|
||||
{
|
||||
id: 241,
|
||||
title: 'Patreon',
|
||||
category: 'Software',
|
||||
route: '/library/patreon.svg',
|
||||
url: 'https://www.patreon.com/'
|
||||
},
|
||||
{
|
||||
id: 242,
|
||||
title: 'Peerlist',
|
||||
category: 'Social',
|
||||
route: '/library/peerlist.svg',
|
||||
url: 'https://www.peerlist.io/'
|
||||
},
|
||||
{
|
||||
id: 243,
|
||||
title: 'Product Hunt',
|
||||
category: 'Software',
|
||||
route: '/library/producthunt.svg',
|
||||
url: 'https://www.producthunt.com/'
|
||||
},
|
||||
{
|
||||
id: 244,
|
||||
title: 'Remotion',
|
||||
category: 'Framework',
|
||||
route: '/library/remotion.svg',
|
||||
url: 'https://www.remotion.dev/'
|
||||
},
|
||||
{
|
||||
id: 245,
|
||||
title: 'Warp',
|
||||
category: 'Software',
|
||||
route: '/library/warp.svg',
|
||||
url: 'https://www.warp.dev/'
|
||||
},
|
||||
{
|
||||
id: 706747866206488963651,
|
||||
title: 'SST',
|
||||
@@ -1722,5 +1792,29 @@ export const svgs: iSVG[] = [
|
||||
category: 'Crypto',
|
||||
route: '/library/monero.svg',
|
||||
url: 'https://www.getmonero.org/'
|
||||
},
|
||||
{
|
||||
id: 775133760594,
|
||||
title: 'Axiom',
|
||||
category: 'Software',
|
||||
route: {
|
||||
dark: '/library/axiom-dark.svg',
|
||||
light: '/library/axiom-light.svg'
|
||||
},
|
||||
url: 'https://axiom.co/'
|
||||
},
|
||||
{
|
||||
id: 382900874177765,
|
||||
title: 'ArtisanLabs',
|
||||
category: 'Software',
|
||||
route: '/library/ArtisanLabs.svg',
|
||||
url: 'https://artisanlabs.io'
|
||||
},
|
||||
{
|
||||
id: 14839,
|
||||
title: 'Django',
|
||||
category: 'Framework',
|
||||
route: '/library/django.svg',
|
||||
url: 'https://www.djangoproject.com/'
|
||||
}
|
||||
];
|
||||
|
||||
+6
-1
@@ -4,6 +4,11 @@ export interface iSVG {
|
||||
id: number;
|
||||
title: string;
|
||||
category: tCategory;
|
||||
route: string;
|
||||
route:
|
||||
| string // for backwards compat of when theme support was not added
|
||||
| {
|
||||
dark: string;
|
||||
light: string;
|
||||
};
|
||||
url: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user