mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
Merge branch 'main' into hack-the-box-logo
This commit is contained in:
+18
-1
@@ -3,4 +3,21 @@ import { svgs } from './svgs';
|
||||
|
||||
export const svgsData = svgs.map((svg: iSVG, index: number) => {
|
||||
return { id: index, ...svg };
|
||||
});
|
||||
});
|
||||
|
||||
export const getCategories = () => {
|
||||
const categories = svgs
|
||||
.flatMap((svg) => (Array.isArray(svg.category) ? svg.category : [svg.category]))
|
||||
.filter((category, index, array) => array.indexOf(category) === index);
|
||||
return categories;
|
||||
};
|
||||
|
||||
export const getCategoriesForDirectory = () => {
|
||||
const categories = svgs
|
||||
.flatMap((svg) => (Array.isArray(svg.category) ? svg.category : [svg.category]))
|
||||
.filter((category, index, array) => array.indexOf(category) === index)
|
||||
.map((category) => ({
|
||||
slug: category.toLowerCase()
|
||||
}));
|
||||
return categories;
|
||||
};
|
||||
|
||||
+54
-20
@@ -2,14 +2,10 @@ import type { iSVG } from '../types/svg';
|
||||
|
||||
export const svgs: iSVG[] = [
|
||||
{
|
||||
title: 'Hack The Box',
|
||||
category: 'Cybersecurity',
|
||||
route: '/library/hack-the-box.svg',
|
||||
wordmark: {
|
||||
light: '/library/hack-the-box-wordmark-light.svg',
|
||||
dark: '/library/hack-the-box-wordmark-dark.svg'
|
||||
},
|
||||
url: 'https://www.hackthebox.com/'
|
||||
title: 'Google Drive',
|
||||
category: 'Google',
|
||||
route: '/library/drive.svg',
|
||||
url: 'https://www.google.com/drive/'
|
||||
},
|
||||
{
|
||||
title: 'Milanote',
|
||||
@@ -289,12 +285,6 @@ export const svgs: iSVG[] = [
|
||||
route: '/library/bootstrap.svg',
|
||||
url: 'https://getbootstrap.com/'
|
||||
},
|
||||
{
|
||||
title: 'Vite.js',
|
||||
category: 'Compiler',
|
||||
route: '/library/vitejs.svg',
|
||||
url: 'https://vitejs.dev'
|
||||
},
|
||||
{
|
||||
title: 'Facebook',
|
||||
category: 'Social',
|
||||
@@ -462,12 +452,6 @@ export const svgs: iSVG[] = [
|
||||
route: '/library/kotlin.svg',
|
||||
url: 'https://kotlinlang.org/'
|
||||
},
|
||||
{
|
||||
title: 'Vitest',
|
||||
category: 'Framework',
|
||||
route: '/library/vitest.svg',
|
||||
url: 'https://vitest.dev/'
|
||||
},
|
||||
{
|
||||
title: 'Storybook',
|
||||
category: 'Software',
|
||||
@@ -2236,6 +2220,16 @@ export const svgs: iSVG[] = [
|
||||
},
|
||||
url: 'https://raycast.com/'
|
||||
},
|
||||
{
|
||||
title: 'Hack The Box',
|
||||
category: 'Cybersecurity',
|
||||
route: '/library/hack-the-box.svg',
|
||||
wordmark: {
|
||||
light: '/library/hack-the-box-wordmark-light.svg',
|
||||
dark: '/library/hack-the-box-wordmark-dark.svg'
|
||||
},
|
||||
url: 'https://www.hackthebox.com/'
|
||||
},
|
||||
{
|
||||
title: 'Procure',
|
||||
category: 'Marketplace',
|
||||
@@ -2937,5 +2931,45 @@ export const svgs: iSVG[] = [
|
||||
category: ['Hardware', 'Software'],
|
||||
route: '/library/raspberry_pi.svg',
|
||||
url: 'https://www.raspberrypi.com/'
|
||||
},
|
||||
{
|
||||
title: 'Vite',
|
||||
category: ['Devtool', 'void(0)'],
|
||||
route: '/library/vitejs.svg',
|
||||
url: 'https://vitejs.dev'
|
||||
},
|
||||
{
|
||||
title: 'Vitest',
|
||||
category: ['Framework', 'void(0)'],
|
||||
route: '/library/vitest.svg',
|
||||
url: 'https://vitest.dev/'
|
||||
},
|
||||
{
|
||||
title: 'Oxc',
|
||||
category: ['Devtool', 'void(0)'],
|
||||
route: '/library/oxc.svg',
|
||||
url: 'https://oxc.rs/'
|
||||
},
|
||||
{
|
||||
title: 'Rolldown',
|
||||
category: ['Compiler', 'void(0)'],
|
||||
route: '/library/rolldown.svg',
|
||||
url: 'https://rolldown.rs/'
|
||||
},
|
||||
{
|
||||
title: 'ManzDev',
|
||||
category: ['Community'],
|
||||
route: '/library/manzdev.svg',
|
||||
url: 'https://manz.dev/'
|
||||
},
|
||||
{
|
||||
title: 'MediaWiki',
|
||||
category: ['Software', 'CMS'],
|
||||
"route": "/library/mediawiki.svg",
|
||||
"wordmark": {
|
||||
"light": "/library/mediawiki-wordmark-light.svg",
|
||||
"dark": "/library/mediawiki-wordmark-dark.svg"
|
||||
},
|
||||
"url": "https://www.mediawiki.org/"
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user