mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
📚一个拥有 SVG 徽标的美丽图书馆。使用 Sveltekit 与 Tailwind CSS 构建。
https://svgl.app/
data | ||
public | ||
src | ||
.eslintrc.json | ||
.gitignore | ||
LICENSE | ||
next-env.d.ts | ||
next.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
vitest.config.ts |
📦 Packages:
- ⚡️ Nextjs - The React Framework for Production.
- ⚒️ React 18 - A JavaScript library for building user interfaces.
- 💙 Typescript - A superset of JavaScript.
- ✅ Vitest - A blazing fast unit test framework.
- 💅 Chakra UI - Create accessible React apps with speed.
- 💥 Framer Motion - Production-ready motion library.
- 💖 Phosphor Icons - A flexible icon family for everyone.
- ⬇️ Next-PWA - Zero config PWA plugin for Next.js, with workbox.
🚀 Getting started:
You need:
- Clone the repository:
git@github.com:pheralb/svgl.git
- Install dependencies:
npm install
# or
yarn install
- Run:
npm run dev
# or
yarn dev
- Test & Build:
npm run ready
# or
yarn ready
Open localhost:3000 with your browser to see the result.
🤔 Can I add my logo?
Yes! Here is a guide for you 🥳:
-
Clone the forked repository:
git@github.com:YOUR_USERNAME/svgl.git
-
Add the .svg logo here:
/public/library
. -
Add your logo information here following the structure:
/data/svgs.json
.
{
"id": your_logo_id,
"slug": "/library/your_logo.svg",
"title": "Logo Title",
"category": "Logo Category",
"url": "Your Website / app url"
}
- Create a commit and push:
git add .
git commit -m "🥰 Added my logo"
git push origin main
- Create a pull request with your changes and 🥳 ready.
🚂 Api endpoints:
- /api/all: returns all the logos.
- /api/search?id=2: returns the logo with id 2.
- /api/search?q=logo: returns the logo with query.
⚒️ Shortcuts:
- ⭐ SVG Library: /public/library/.
- ✍️ SVG JSON logos: /data/.
🔑 License:
- MIT.