Added favicon
3
.gitignore
vendored
@@ -51,3 +51,6 @@ Temporary Items
|
||||
.env.development
|
||||
.env.test
|
||||
.env.production
|
||||
|
||||
# Make favicon generation script executable
|
||||
chmod +x ./scripts/generateFavicons.js
|
||||
|
||||
11
Makefile
@@ -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
|
||||
.PHONY: all build start stop restart logs clean scan-logos dev rebuild favicon deps-favicon build-with-favicons
|
||||
|
||||
all: build start
|
||||
|
||||
@@ -60,3 +60,12 @@ clean:
|
||||
rebuild:
|
||||
$(DOCKER_COMPOSE) -f compose.dev.yml down -v
|
||||
$(DOCKER_COMPOSE) -f compose.dev.yml build --no-cache
|
||||
|
||||
# Generate favicons
|
||||
favicon:
|
||||
@echo "Generating favicons..."
|
||||
$(DOCKER_COMPOSE) -f compose.dev.yml run --rm slogos-dev npm run generate-favicons
|
||||
@echo "Favicons have been generated"
|
||||
|
||||
# Build with favicons
|
||||
build-with-favicons: favicon build
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"start": "sirv public --host 0.0.0.0 --dev --single",
|
||||
"scan-logos": "node scripts/scanLogos.js"
|
||||
"scan-logos": "node scripts/scanLogos.js",
|
||||
"generate-favicons": "node scripts/generateFavicons.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^17.0.0",
|
||||
@@ -20,6 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@resvg/resvg-js": "^2.0.1",
|
||||
"jimp": "^0.22.10",
|
||||
"sirv-cli": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
public/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -485,6 +485,17 @@
|
||||
],
|
||||
"brand": "Home Assistant"
|
||||
},
|
||||
{
|
||||
"name": "Honda",
|
||||
"path": "logos/honda.svg",
|
||||
"format": "SVG",
|
||||
"disable": false,
|
||||
"tags": [
|
||||
"automobile",
|
||||
"transport"
|
||||
],
|
||||
"brand": "Honda"
|
||||
},
|
||||
{
|
||||
"name": "IBKR",
|
||||
"path": "logos/ibkr.svg",
|
||||
@@ -1258,6 +1269,46 @@
|
||||
],
|
||||
"brand": "Threads"
|
||||
},
|
||||
{
|
||||
"name": "Toyota",
|
||||
"path": "logos/toyota.svg",
|
||||
"format": "SVG",
|
||||
"disable": false,
|
||||
"tags": [
|
||||
"automobile",
|
||||
"transport"
|
||||
],
|
||||
"brand": "Toyota",
|
||||
"colors": [
|
||||
{
|
||||
"label": "Red",
|
||||
"value": "#EB0A1E"
|
||||
}
|
||||
],
|
||||
"colorConfig": {
|
||||
"target": "path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Toyota Logo",
|
||||
"path": "logos/toyota_logo.svg",
|
||||
"format": "SVG",
|
||||
"disable": false,
|
||||
"tags": [
|
||||
"automobile",
|
||||
"transport"
|
||||
],
|
||||
"brand": "Toyota",
|
||||
"colors": [
|
||||
{
|
||||
"label": "Red",
|
||||
"value": "#EB0A1E"
|
||||
}
|
||||
],
|
||||
"colorConfig": {
|
||||
"target": "path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Ubuntu",
|
||||
"path": "logos/ubuntu.svg",
|
||||
@@ -1365,4 +1416,4 @@
|
||||
"tags": [],
|
||||
"brand": "Youtube"
|
||||
}
|
||||
]
|
||||
]
|
||||
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 632 B |
BIN
public/favicon.png
Normal file
|
After Width: | Height: | Size: 632 B |
13
public/favicon.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg width="100%" height="100%" viewBox="0 0 84 84" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="24" height="24" rx="4" fill="#ffc728"/>
|
||||
<rect x="30" y="0" width="24" height="24" rx="4" fill="#b01cab"/>
|
||||
<rect x="60" y="0" width="24" height="24" rx="4" fill="#00a1de"/>
|
||||
|
||||
<rect x="0" y="30" width="24" height="24" rx="4" fill="#EA4335"/>
|
||||
<rect x="30" y="30" width="24" height="24" rx="4" fill="#75bd21"/>
|
||||
<rect x="60" y="30" width="24" height="24" rx="4" fill="#ff661c"/>
|
||||
|
||||
<rect x="0" y="60" width="24" height="24" rx="4" fill="#4285F4"/>
|
||||
<rect x="30" y="60" width="24" height="24" rx="4" fill="#cf0f2b"/>
|
||||
<rect x="60" y="60" width="24" height="24" rx="4" fill="#34A853"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 712 B |
21
public/favicon_big.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<svg width="100%" height="100%" viewBox="0 0 114 114" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="24" height="24" rx="4" fill="#4285F4"/>
|
||||
<rect x="30" y="0" width="24" height="24" rx="4" fill="#EA4335"/>
|
||||
<rect x="60" y="0" width="24" height="24" rx="4" fill="#FBBC05"/>
|
||||
<rect x="90" y="0" width="24" height="24" rx="4" fill="#34A853"/>
|
||||
|
||||
<rect x="0" y="30" width="24" height="24" rx="4" fill="#34A853"/>
|
||||
<rect x="30" y="30" width="24" height="24" rx="4" fill="#4285F4"/>
|
||||
<rect x="60" y="30" width="24" height="24" rx="4" fill="#EA4335"/>
|
||||
<rect x="90" y="30" width="24" height="24" rx="4" fill="#FBBC05"/>
|
||||
|
||||
<rect x="0" y="60" width="24" height="24" rx="4" fill="#FBBC05"/>
|
||||
<rect x="30" y="60" width="24" height="24" rx="4" fill="#EA4335"/>
|
||||
<rect x="60" y="60" width="24" height="24" rx="4" fill="#34A853"/>
|
||||
<rect x="90" y="60" width="24" height="24" rx="4" fill="#4285F4"/>
|
||||
|
||||
<rect x="0" y="90" width="24" height="24" rx="4" fill="#34A853"/>
|
||||
<rect x="30" y="90" width="24" height="24" rx="4" fill="#FBBC05"/>
|
||||
<rect x="60" y="90" width="24" height="24" rx="4" fill="#4285F4"/>
|
||||
<rect x="90" y="90" width="24" height="24" rx="4" fill="#EA4335"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -6,6 +6,12 @@
|
||||
<title>Logo Gallery</title>
|
||||
<link rel="stylesheet" href="global.css">
|
||||
<link rel="stylesheet" href="build/bundle.css">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="favicon.png" sizes="32x32">
|
||||
<link rel="icon" href="favicon.ico" sizes="any">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
18
public/logos/honda.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275.3 174.5">
|
||||
<g fill="currentColor">
|
||||
<path
|
||||
d="m31.778126,146.25l4.200001,0.5c1.899998,0.199997 2.099998,1.800003 2.099998,2.800003l0,4.899994l-19.299999,0l0,-4.899994c0,-1 0.199999,-2.600006 2.099998,-2.800003l4.200001,-0.5l0,-4.199997l-25,0l0,4.199997l4.200001,0.5c1.9,0.199997 2.099998,1.800003 2.099998,2.800003l0,16.199997c0,1 -0.199999,2.600006 -2.099998,2.800003l-4.200001,0.5l0,4.199997l25,0l0,-4.199997l-4.200001,-0.5c-1.9,-0.199997 -2.099998,-1.800003 -2.099998,-2.800003l0,-4.899994l19.200001,0l0,4.899994c0,1 -0.200001,2.600006 -2.100002,2.800003l-4.200001,0.5l0,4.199997l25,0l0,-4.199997l-4.199997,-0.5c-1.900002,-0.199997 -2.100002,-1.800003 -2.100002,-2.800003l0,-16.199997c0,-1 0.200001,-2.600006 2.100002,-2.800003l4.199997,-0.5l0,-4.199997l-25,0l0,4.199997l0.100002,0z" />
|
||||
<path
|
||||
d="m198.278122,142.050003l-30.800003,0l0,4.199997l3.700012,0.399994c1.299988,0.200012 2.199997,0.700012 2.199997,2.5l0,16.5c0,1 -0.199997,2.600006 -2.100006,2.800003l-4.199997,0.5l0,4.199997l31.199997,0c11.199997,0 20.400009,-4.5 20.400009,-15.599991s-9.200012,-15.5 -20.400009,-15.5m-2.300003,25.199997l-10.5,0l0,-19.199997l10.5,0c6.199997,0 8.300003,2.899994 8.300003,9.599991c0,6.600006 -2.099991,9.600006 -8.300003,9.600006" />
|
||||
<path
|
||||
d="m271.078125,168.550003c-2,-0.199997 -2.600006,-1.5 -3.200012,-2.400009l-14.399994,-22c-1,-1.599991 -1.799988,-2.099991 -3.299988,-2.099991l-23.600006,0l0,4.199997l5.699997,0.600006c0.800003,0.099991 1.900009,1.199997 1,2.599991l-10.699997,17.300003c-0.399994,0.699997 -1,1.5 -2.199997,1.699997l-4.199997,0.5l0,4.199997l19.899994,0l0,-4.199997l-3.399994,-0.300003c-1.5,-0.199997 -2.300003,-1.199997 -1.5,-2.399994l1.599991,-2.600006l19.199997,0l1.399994,2.100006c1.300018,1.899994 -0.299988,2.699997 -1.699982,2.800003l-3.5,0.399994l0,4.199997l27,0l0,-4.199997l-4.100006,-0.399994zm-35,-10.400009l5.899994,-9.600006l6.300018,9.600006l-12.200012,0z" />
|
||||
<path
|
||||
d="m145.178131,146.25l4.199997,0.5c1.900009,0.199997 2.100006,1.800003 2.100006,2.800003l0,15.599991l-16.5,-21.799988c-0.699997,-1 -1.399994,-1.300003 -3.199997,-1.300003l-21.400002,0l0,4.199997l4.199997,0.5c1.900002,0.199997 2.099998,1.800003 2.099998,2.800003l0,16.199997c0,1 -0.199997,2.600006 -2.099998,2.800003l-4.199997,0.5l0,4.199997l19.999992,0l0,-4.199997l-4.199997,-0.5c-1.899994,-0.199997 -2.099991,-1.800003 -2.099991,-2.800003l0,-15.600006l16.5,21.700012c0.799988,1 1.399994,1.299988 3.199997,1.299988l0.199997,0l15,0l0,-23.699997c0,-1 0.199997,-2.599991 2.100006,-2.800003l4.199997,-0.5l0,-4.199997l-19.900009,0l-0.199997,4.300003l0,0z" />
|
||||
<path
|
||||
d="m83.478127,140.949997c-20.300003,0 -25.5,8.900009 -25.5,16.600006s5.199997,16.699997 25.5,16.699997c20.299995,0 25.5,-8.899994 25.5,-16.600006c0,-7.799988 -5.200005,-16.699997 -25.5,-16.699997m0,27.400009c-7.900002,0 -11.099998,-3.300003 -11.099998,-10.699997c0,-7.399994 3.299995,-10.699997 11.099998,-10.699997c7.900002,0 11.099998,3.300003 11.099998,10.699997c0,7.399994 -3.199997,10.699997 -11.099998,10.699997" />
|
||||
<path
|
||||
d="m172.178131,10.549999c-3.399994,15.299999 -4.800003,22.400002 -7.599991,33.400002c-2.700012,10.600002 -4.800003,20.499996 -8.400009,25.299999c-3.599991,4.900002 -8.5,5.900002 -11.800003,6.300003c-1.699997,0.199997 -3,0.299995 -6.699997,0.299995c-3.699997,0 -5,-0.099998 -6.699997,-0.299995c-3.300003,-0.400002 -8.199997,-1.400002 -11.800003,-6.300003c-3.599991,-4.800003 -5.699997,-14.699997 -8.299995,-25.299999c-2.800003,-11.100002 -4.199997,-18.100002 -7.599998,-33.400002c0,0 -3.400002,0.1 -4.900002,0.200001c-2.099998,0.1 -3.699997,0.299999 -5.400002,0.5c0,0 2,31.5 2.900002,44.900002c0.900002,14 2.599998,37.699997 4.099998,55.599998c0,0 2.900002,0.5 7.700005,0.699997c5,0.300003 7.299995,0.300003 7.299995,0.300003c2.100006,-7.900002 4.600006,-18.800003 7.5,-23.5c2.399994,-3.800003 6,-4.199997 8.100006,-4.5c3.199997,-0.400002 6,-0.5 7.199997,-0.5l0,0l0,0c1.300003,0 4,0 7.199997,0.5c2.100006,0.300003 5.699997,0.699997 8.100006,4.5c2.899994,4.699997 5.5,15.599998 7.5,23.5c0,0 2.199997,0 7.199997,-0.300003c4.800003,-0.299995 7.699997,-0.699997 7.699997,-0.699997c1.5,-17.900002 3.199997,-41.5 4.100006,-55.599998c0.899994,-13.300003 2.899994,-44.900002 2.899994,-44.900002c-1.699997,-0.200001 -3.399994,-0.4 -5.399994,-0.5c-1.500015,-0.1 -4.900009,-0.200001 -4.900009,-0.200001" />
|
||||
<path
|
||||
d="m211.878128,29.150002c-2,-20.000002 -15.400009,-24.200001 -27.100006,-26.200002c-5.899994,-1 -16.399994,-1.8 -23.099991,-2.099999c-5.900009,-0.400001 -19.700012,-0.6 -23.900009,-0.6s-18,0.2 -23.899994,0.6c-6.700005,0.299999 -17.200005,1.099999 -23.100006,2.099999c-11.699997,2.000001 -25.099998,6.2 -27.099998,26.200002c-0.599998,5.5 -0.699997,12.599998 -0.599998,20.199997c0.199997,12.700005 1.300003,21.200005 1.900002,27.200005c0.400002,4.099998 2.099998,16.299995 4.299995,22.599998c3,8.699997 5.700005,11.199997 8.900002,13.799995c5.800003,4.699997 15.400002,6.199997 17.400002,6.600006c10.800003,1.899994 32.600006,2.300003 42.300003,2.300003c9.599991,0 31.5,-0.300003 42.300003,-2.300003c2,-0.400009 11.599991,-1.800003 17.399994,-6.600006c3.199997,-2.599998 5.899994,-5.099998 8.899994,-13.799995c2.200012,-6.300003 3.900009,-18.599998 4.300003,-22.599998c0.600006,-5.900002 1.699997,-14.5 1.900009,-27.200005c-0.100006,-7.699997 -0.300003,-14.799999 -0.800003,-20.199997m-7.400009,33.599998c-1.199997,16 -2.600006,25.599998 -4.600006,32.5c-1.800003,6.099998 -4,10.099998 -7.199997,13c-5.399994,4.900002 -12.800003,5.900002 -17.199997,6.599998c-9.400009,1.400002 -25.300003,1.900002 -37.699997,1.900002c-12.5,0 -28.300011,-0.5 -37.700005,-1.900002c-4.400002,-0.699997 -11.800003,-1.699997 -17.200005,-6.599998c-3.199997,-2.900002 -5.400002,-7 -7.199997,-13c-2,-6.900002 -3.5,-16.5 -4.599998,-32.5c-0.700005,-9.599998 -0.600006,-25.200001 0.5,-33.599998c1.500008,-12.600002 7.700005,-18.900002 21.000008,-21.200001c6.199997,-1.1 14.599998,-1.900002 22.5,-2.300001c6.399994,-0.4 16.800003,-0.6 22.699997,-0.6c5.800003,-0.099998 16.300003,0.200001 22.600006,0.6c7.899994,0.4 16.300003,1.200001 22.5,2.300001c13.300003,2.4 19.5,8.699999 21.099991,21.200001c1.100006,8.299999 1.200012,23.900002 0.5,33.599998" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
4
public/logos/toyota.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 251.35 41.55">
|
||||
<path fill="currentColor"
|
||||
d="M99.2 5.96H73.74v5.63h9.4v24h6.67v-24h9.4V5.96m24.89 19.57a8.17 8.17 0 0 1-6.16 5.03 8.96 8.96 0 0 1-1.54.14c-.53 0-1.05-.05-1.55-.14a8.15 8.15 0 0 1-6.15-5.03 13 13 0 0 1-.9-4.76 13 13 0 0 1 .9-4.75 8.16 8.16 0 0 1 6.15-5.04 8.52 8.52 0 0 1 3.1 0 8.16 8.16 0 0 1 6.15 5.03 13.1 13.1 0 0 1 0 9.52m-7.7-20.46a15.7 15.7 0 1 0 0 31.41 15.7 15.7 0 0 0 0-31.41zm15.8.9h7.86l7.33 12.73 7.33-12.74h7.85l-11.85 18.67v10.96h-6.66V24.63L132.2 5.96m46.2 24.74c.52 0 1.04-.05 1.54-.14a8.15 8.15 0 0 0 6.15-5.03 13 13 0 0 0 0-9.51 8.15 8.15 0 0 0-6.15-5.03 8.78 8.78 0 0 0-3.1 0 8.15 8.15 0 0 0-6.14 5.03 12.99 12.99 0 0 0-.9 4.75c0 1.68.32 3.29.9 4.76a8.14 8.14 0 0 0 6.15 5.03 8.84 8.84 0 0 0 1.55.14m-15.7-9.93a15.7 15.7 0 1 1 31.4 0 15.7 15.7 0 0 1-31.4 0zm76.87 3.1-4.36-11.71-4.37 11.7h8.73m1.93 5.19h-12.6l-2.43 6.52h-7.42l12-29.63h8.3l12 29.63h-7.4zM221.01 5.96h-25.46v5.63h9.4v24h6.67v-24H221V5.96M46.54 2.04A47.5 47.5 0 0 0 32.22 0 47.5 47.5 0 0 0 17.9 2.04C7.3 5.45 0 12.53 0 20.69c0 11.49 14.4 20.86 32.22 20.86 17.78 0 32.22-9.33 32.22-20.86 0-8.16-7.28-15.24-17.9-18.65zM32.22 32.6c-2.66 0-4.83-5.2-4.95-11.79 1.58.17 3.24.21 4.95.21 1.7 0 3.37-.08 4.96-.2-.13 6.57-2.3 11.78-4.96 11.78ZM27.6 15.7c.7-4.63 2.5-7.87 4.62-7.87 2.08 0 3.87 3.24 4.62 7.86a52.52 52.52 0 0 1-9.24.01zm12.07-.38c-1.08-7.2-4-12.4-7.45-12.4s-6.37 5.16-7.45 12.4c-6.54-1.04-11.12-3.33-11.12-6.04 0-3.66 8.33-6.62 18.57-6.62S50.8 5.62 50.8 9.28c0 2.7-4.58 5.04-11.12 6.04zM4.7 19.94c0-3.54 1.38-6.83 3.75-9.7-.04.2-.04.42-.04.58 0 4.46 6.66 8.2 15.94 9.62v1c0 8.24 2.3 15.24 5.46 17.65-14.07-.83-25.1-9.08-25.1-19.15zm29.94 19.2c3.16-2.42 5.45-9.42 5.45-17.66v-1c9.28-1.37 15.94-5.16 15.94-9.61 0-.21 0-.42-.04-.59a15.06 15.06 0 0 1 3.75 9.7c0 10.03-11.03 18.28-25.1 19.15z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
4
public/logos/toyota_logo.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 251.354 181.587">
|
||||
<path fill="currentColor"
|
||||
d="M36.029 138.397H0v7.965h13.298v33.964h9.434v-33.964H36.03v-7.965m35.23 27.695a11.555 11.555 0 0 1-8.71 7.123 12.674 12.674 0 0 1-2.189.194c-.743 0-1.475-.07-2.182-.194a11.538 11.538 0 0 1-8.706-7.123 18.407 18.407 0 0 1-1.27-6.73c0-2.375.452-4.65 1.27-6.734a11.547 11.547 0 0 1 8.706-7.122 12.054 12.054 0 0 1 4.37 0 11.55 11.55 0 0 1 8.71 7.12 18.526 18.526 0 0 1 0 13.466m-10.9-28.955c-12.268 0-22.224 9.95-22.224 22.225 0 12.267 9.956 22.219 22.225 22.219 12.277 0 22.225-9.952 22.225-22.218 0-12.276-9.948-22.226-22.225-22.226zm22.375 1.26h11.112l10.377 18.027 10.377-18.027h11.108l-16.769 26.417v15.512h-9.432v-15.512l-16.773-26.417m65.375 35.016c.741 0 1.477-.075 2.182-.198a11.531 11.531 0 0 0 8.707-7.12 18.39 18.39 0 0 0 0-13.463 11.538 11.538 0 0 0-8.707-7.124 12.427 12.427 0 0 0-4.376 0 11.531 11.531 0 0 0-8.702 7.122 18.381 18.381 0 0 0-1.274 6.73c0 2.377.452 4.646 1.274 6.734a11.522 11.522 0 0 0 8.702 7.12 12.512 12.512 0 0 0 2.194.199M125.88 159.36c0-12.274 9.946-22.228 22.228-22.228 12.268 0 22.224 9.95 22.224 22.228-.001 12.266-9.956 22.226-22.224 22.226-12.282 0-22.228-9.96-22.228-22.226zm108.797 4.37-6.174-16.566-6.182 16.566h12.356m2.737 7.336h-17.847l-3.433 9.233h-10.496l16.986-41.933h11.738l16.992 41.933h-10.483zm-29.004-32.67h-36.028v7.966h13.304l-.004 33.963h9.438l-.004-33.963h13.294v-7.966M166.976 5.883C155.451 2.16 141.164 0 125.677 0 110.19 0 95.903 2.161 84.378 5.883c-30.614 9.844-51.624 30.254-51.624 53.784 0 33.136 41.54 60.148 92.923 60.148 51.264 0 92.923-26.892 92.923-60.148 0-23.53-21.01-43.94-51.624-53.784zm-41.299 88.12c-7.683 0-13.926-15.007-14.286-33.975 4.562.48 9.364.6 14.286.6 4.922 0 9.725-.24 14.287-.6-.36 18.968-6.603 33.975-14.287 33.975Zm-13.326-48.742c2.04-13.326 7.203-22.69 13.326-22.69 6.003 0 11.165 9.364 13.326 22.69-4.202.36-8.764.6-13.326.6-4.562 0-9.004-.24-13.326-.6zm34.816-1.08c-3.121-20.77-11.525-35.777-21.49-35.777-9.964 0-18.368 14.887-21.49 35.776-18.848-3.001-32.055-9.604-32.055-17.408 0-10.565 24.012-19.088 53.545-19.088 29.534 0 53.545 8.523 53.545 19.088 0 7.804-13.206 14.527-32.055 17.408zM46.321 57.505c0-10.204 3.961-19.689 10.805-27.972-.12.6-.12 1.2-.12 1.68 0 12.846 19.208 23.651 45.98 27.733v2.881c0 23.771 6.604 43.94 15.728 50.904C78.135 110.33 46.32 86.56 46.32 57.506zm86.32 55.346c9.123-6.963 15.727-27.133 15.727-50.904v-2.88c26.772-3.963 45.98-14.888 45.98-27.734 0-.6 0-1.2-.12-1.68 6.844 8.163 10.806 17.768 10.806 27.973 0 28.933-31.815 52.704-72.394 55.225z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
68
scripts/generateFavicons.js
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { Resvg } = require('@resvg/resvg-js');
|
||||
const jimp = require('jimp');
|
||||
|
||||
// Paths
|
||||
const srcSvgPath = path.join(__dirname, '../public/favicon.svg');
|
||||
const pngOutputPath = path.join(__dirname, '../public/apple-touch-icon.png');
|
||||
const icoOutputPath = path.join(__dirname, '../public/favicon.ico');
|
||||
const faviconPngPath = path.join(__dirname, '../public/favicon.png');
|
||||
|
||||
// Ensure the favicon.svg file exists
|
||||
if (!fs.existsSync(srcSvgPath)) {
|
||||
console.error('Error: favicon.svg not found in public directory.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log('Generating favicons from SVG...');
|
||||
|
||||
async function generateFavicons() {
|
||||
try {
|
||||
// Read the SVG file
|
||||
const svgData = fs.readFileSync(srcSvgPath, 'utf8');
|
||||
|
||||
// Render SVG to PNG using Resvg - maintain transparency
|
||||
const opts = {
|
||||
// No background specified to maintain transparency
|
||||
fitTo: {
|
||||
mode: 'width',
|
||||
value: 1024
|
||||
}
|
||||
};
|
||||
const resvg = new Resvg(svgData, opts);
|
||||
const pngData = resvg.render();
|
||||
const pngBuffer = pngData.asPng();
|
||||
|
||||
// Save a temporary high-resolution PNG
|
||||
const tempPngPath = path.join(__dirname, '../public/temp-favicon.png');
|
||||
fs.writeFileSync(tempPngPath, pngBuffer);
|
||||
|
||||
// Generate apple-touch-icon.png (180x180) using jimp
|
||||
const appleIconImg = await jimp.read(tempPngPath);
|
||||
await appleIconImg.resize(180, 180).writeAsync(pngOutputPath);
|
||||
console.log(`Created ${pngOutputPath}`);
|
||||
|
||||
// Create favicon.png (32x32) for browsers that support PNG favicons
|
||||
const faviconPng = await jimp.read(tempPngPath);
|
||||
await faviconPng.resize(32, 32).writeAsync(faviconPngPath);
|
||||
console.log(`Created ${faviconPngPath}`);
|
||||
|
||||
// For favicon.ico, we'll just use the 32x32 PNG since we don't have ico-encoder
|
||||
// Most modern browsers will use the PNG or SVG anyway
|
||||
fs.copyFileSync(faviconPngPath, icoOutputPath);
|
||||
console.log(`Created ${icoOutputPath} (Note: This is actually a PNG file renamed to .ico)`);
|
||||
|
||||
// Clean up temporary file
|
||||
fs.unlinkSync(tempPngPath);
|
||||
|
||||
console.log('Favicon generation completed successfully!');
|
||||
} catch (error) {
|
||||
console.error('Error generating favicons:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
generateFavicons();
|
||||
@@ -51,17 +51,23 @@ function cleanDir(dir) {
|
||||
}
|
||||
}
|
||||
|
||||
// Convert SVG to PNG
|
||||
// Convert SVG to PNG with transparency
|
||||
function svgToPng(svgBuffer, width, height) {
|
||||
const resvg = new Resvg(svgBuffer, { fitTo: { mode: 'width', value: width || 256 } });
|
||||
// No background specified to maintain transparency
|
||||
const resvg = new Resvg(svgBuffer, {
|
||||
fitTo: { mode: 'width', value: width || 256 }
|
||||
});
|
||||
const pngData = resvg.render().asPng();
|
||||
return pngData;
|
||||
}
|
||||
|
||||
// Convert SVG to JPG
|
||||
function svgToJpg(svgBuffer, width, height) {
|
||||
const resvg = new Resvg(svgBuffer, { fitTo: { mode: 'width', value: width || 256 } });
|
||||
// Convert PNG buffer to JPEG using a pure JS lib, or just save as PNG (JPEG is optional)
|
||||
// For JPGs we need a white background since JPG doesn't support transparency
|
||||
const resvg = new Resvg(svgBuffer, {
|
||||
background: 'white',
|
||||
fitTo: { mode: 'width', value: width || 256 }
|
||||
});
|
||||
const pngData = resvg.render().asPng();
|
||||
return pngData;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,12 @@
|
||||
|
||||
<header class="main-header">
|
||||
<div class="header-row">
|
||||
<h1>Logo Gallery</h1>
|
||||
<div class="header-title">
|
||||
<div class="header-icon">
|
||||
<img src="favicon.svg" alt="Logo Gallery icon" />
|
||||
</div>
|
||||
<h1>Logo Gallery</h1>
|
||||
</div>
|
||||
<span class="logo-count">
|
||||
{#if displayLogos && logos && displayLogos.length === logos.length}
|
||||
{logos.length} images in gallery
|
||||
@@ -290,6 +295,23 @@
|
||||
</header>
|
||||
|
||||
<style>
|
||||
.header-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||