feat: implement CSS sprite system for image optimization

Reduces HTTP requests from 44+ individual images to 3 sprite sheets
(~93% reduction). Includes Go sprite generator tool, CSS classes,
template integration, and E2E tests.

- Add cmd/sprites/main.go for sprite generation (60x60px + 120x120px @2x)
- Add _sprites.css with responsive sizing and retina support
- Update templates to use sprites with logoIndex fallback
- Add Makefile targets: sprites, sprites-clean
- Add 9-test E2E suite for sprite functionality
- Add doc/22-SPRITES.md with usage documentation
This commit is contained in:
juanatsap
2025-12-04 11:38:36 +00:00
parent 7727405c25
commit b5a50ca3ef
25 changed files with 2194 additions and 76 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

+184
View File
@@ -0,0 +1,184 @@
{
"companies": [
{
"index": 0,
"name": "accenture.png"
},
{
"index": 1,
"name": "aena-long.png"
},
{
"index": 2,
"name": "aena.png"
},
{
"index": 3,
"name": "clicplan-short.png"
},
{
"index": 4,
"name": "clicplan.png"
},
{
"index": 5,
"name": "drolosoft.png"
},
{
"index": 6,
"name": "drosoloft-plain.png"
},
{
"index": 7,
"name": "ebantic.png"
},
{
"index": 8,
"name": "emailing-network.png"
},
{
"index": 9,
"name": "everis.png"
},
{
"index": 10,
"name": "gigya.png"
},
{
"index": 11,
"name": "indra.png"
},
{
"index": 12,
"name": "insa.png"
},
{
"index": 13,
"name": "livgolf.png"
},
{
"index": 14,
"name": "megabanner.png"
},
{
"index": 15,
"name": "olympic-broadcasting.png"
},
{
"index": 16,
"name": "pentamsi-long.png"
},
{
"index": 17,
"name": "pentamsi.png"
},
{
"index": 18,
"name": "sap.png"
},
{
"index": 19,
"name": "twentic.png"
},
{
"index": 20,
"name": "uex.png"
},
{
"index": 21,
"name": "webratio.png"
},
{
"index": 22,
"name": "webratioa.png"
}
],
"projects": [
{
"index": 0,
"name": "HERRUMBRE_NEGATIVO VER 2@4x.png"
},
{
"index": 1,
"name": "deliverybikes.png"
},
{
"index": 2,
"name": "herrumbre-vivo.png"
},
{
"index": 3,
"name": "jorpack.png"
},
{
"index": 4,
"name": "laporra-doc.png"
},
{
"index": 5,
"name": "laporra.png"
},
{
"index": 6,
"name": "lidering.png"
},
{
"index": 7,
"name": "ola-logo-squared-blue.png"
},
{
"index": 8,
"name": "sap.png"
},
{
"index": 9,
"name": "somosunaola#.png"
},
{
"index": 10,
"name": "somosunaola.png"
},
{
"index": 11,
"name": "twentic.png"
}
],
"courses": [
{
"index": 0,
"name": "camaracomercio.png"
},
{
"index": 1,
"name": "codecademy.png"
},
{
"index": 2,
"name": "forem.png"
},
{
"index": 3,
"name": "linkedin-blue.png"
},
{
"index": 4,
"name": "linkedin.png"
},
{
"index": 5,
"name": "servoy-logo.png"
},
{
"index": 6,
"name": "servoy.png"
},
{
"index": 7,
"name": "udemy.png"
},
{
"index": 8,
"name": "uex.png"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB