feat: add color conversion and target/sets configuration for logos

- Updated Makefile to include a new target for converting logo colors format.
- Added a new script `convertColorsFormat.js` to convert colors from array to object format in `logos.json`.
- Modified `logos.json` structure to use an object for colors and added targets and sets for SVG logos.
- Updated `scanLogos.js` to set default colorConfig, targets, and sets for SVG logos.
- Enhanced Svelte components (`Grid.svelte`, `List.svelte`, `Preview.svelte`, `InlineSvg.svelte`) to support new targets, sets, and colors structure.
- Updated color theme utility functions to handle the new colors object format.
- Removed deprecated `mono_white.svg` logo file.
This commit is contained in:
sHa
2025-05-12 20:52:07 +03:00
parent 29383bb6a1
commit bd4c8dca76
11 changed files with 669 additions and 255 deletions

View File

@@ -6,7 +6,7 @@ CONTAINER_NAME = logo-gallery
DEV_PORT = 5006
# Main targets
.PHONY: all build start stop restart logs clean scan-logos dev rebuild favicon deps-favicon build-with-favicons sync-packages
.PHONY: all build start stop restart logs clean scan-logos dev rebuild favicon deps-favicon build-with-favicons sync-packages convert-colors
all: build start
@@ -50,6 +50,12 @@ scan-logos:
$(DOCKER_COMPOSE) -f compose.dev.yml run --rm slogos-dev npm run scan-logos
@echo "Logos have been updated - refresh the browser to see changes"
# Convert logo colors format from array to object
convert-colors:
@echo "Converting logo colors format in logos.json..."
$(DOCKER_COMPOSE) -f compose.dev.yml run --rm slogos-dev npm run convert-colors
@echo "Color format conversion complete"
# Clean up build artifacts and temporary files
clean:
@echo "Cleaning up build artifacts and temporary files..."