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:
@@ -48,6 +48,7 @@ type Experience struct {
|
||||
CompanyID string `json:"companyID,omitempty"` // Unique ID for scrolling/navigation
|
||||
CompanyURL string `json:"companyURL,omitempty"` // Optional URL for company website
|
||||
CompanyLogo string `json:"companyLogo"`
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
Location string `json:"location"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
@@ -95,6 +96,7 @@ type Project struct {
|
||||
ProjectID string `json:"projectID,omitempty"` // Unique ID for scrolling/navigation
|
||||
URL string `json:"url"`
|
||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
||||
Location string `json:"location"`
|
||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||
@@ -131,6 +133,7 @@ type Course struct {
|
||||
Institution string `json:"institution"`
|
||||
CourseID string `json:"courseID,omitempty"` // Unique ID for scrolling/navigation
|
||||
CourseLogo string `json:"courseLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
Location string `json:"location"`
|
||||
Date string `json:"date"`
|
||||
Duration string `json:"duration"`
|
||||
|
||||
@@ -55,6 +55,7 @@ type Experience struct {
|
||||
CompanyID string `json:"companyID,omitempty"` // Unique ID for scrolling/navigation
|
||||
CompanyURL string `json:"companyURL,omitempty"` // Optional URL for company website
|
||||
CompanyLogo string `json:"companyLogo"`
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
Location string `json:"location"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
@@ -102,6 +103,7 @@ type Project struct {
|
||||
ProjectID string `json:"projectID,omitempty"` // Unique ID for scrolling/navigation
|
||||
URL string `json:"url"`
|
||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
||||
Location string `json:"location"`
|
||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||
@@ -138,6 +140,7 @@ type Course struct {
|
||||
Institution string `json:"institution"`
|
||||
CourseID string `json:"courseID,omitempty"` // Unique ID for scrolling/navigation
|
||||
CourseLogo string `json:"courseLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
Location string `json:"location"`
|
||||
Date string `json:"date"`
|
||||
Duration string `json:"duration"`
|
||||
|
||||
Reference in New Issue
Block a user