Skip to content

Commit a3d928b

Browse files
authored
Fix service worker registration path and improve testimonials formatting (#73)
## Summary This PR fixes website deployment issues and improves code formatting in the JavaScript files. ## Changes Made ### Service Worker Fix - **Fixed service worker registration path** from `/sw.js` to `/struct/sw.js` - This ensures proper functionality when the site is deployed to GitHub Pages under the `/struct/` path ### Code Formatting Improvements - **Improved testimonials formatting** with better line breaks and readability - **Standardized quote usage** for consistency across the testimonials data - **Updated arrow function syntax** for better code consistency ## Files Modified - `site/js/advanced.js` - Service worker registration path fix - `site/js/phase3.js` - Testimonials formatting improvements ## Testing - [x] Service worker path fix addresses GitHub Pages deployment issues - [x] Code formatting improvements maintain functionality while improving readability - [x] No breaking changes introduced ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Code style/formatting improvement - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Checklist - [x] Code follows the project's style guidelines - [x] Self-review of code completed - [x] Changes have been tested locally - [x] No new warnings or errors introduced - [x] Commit messages are clear and descriptive
1 parent 249cd93 commit a3d928b

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

site/js/advanced.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ class StructSite {
413413

414414
// Initialize service worker if supported
415415
if ('serviceWorker' in navigator) {
416-
navigator.serviceWorker.register('/sw.js').catch(err => {
416+
navigator.serviceWorker.register('/struct/sw.js').catch((err) => {
417417
console.log('ServiceWorker registration failed:', err);
418418
});
419419
}

site/js/phase3.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -757,23 +757,29 @@ variables:
757757
createTestimonials() {
758758
const testimonials = [
759759
{
760-
content: "STRUCT has completely transformed how we scaffold new projects. What used to take hours of manual setup now takes minutes. The YAML configuration is intuitive and the template system is incredibly powerful.",
761-
author: "Sarah Chen",
762-
role: "Senior DevOps Engineer",
763-
avatar: "https://images.unsplash.com/photo-1494790108755-2616b612b5bc?w=100&h=100&fit=crop&crop=face"
760+
content:
761+
'STRUCT has completely transformed how we scaffold new projects. What used to take hours of manual setup now takes minutes. The YAML configuration is intuitive and the template system is incredibly powerful.',
762+
author: 'Sarah Chen',
763+
role: 'Senior DevOps Engineer',
764+
avatar:
765+
'https://images.unsplash.com/photo-1531746020798-e6953c6e8e04?w=100&h=100&fit=crop&crop=face',
764766
},
765767
{
766-
content: "The best project structure generator I've used. The ability to fetch content from remote sources and the Jinja2 templating makes it perfect for creating consistent, enterprise-ready project layouts.",
767-
author: "Marcus Rodriguez",
768-
role: "Platform Architect",
769-
avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop&crop=face"
768+
content:
769+
"The best project structure generator I've used. The ability to fetch content from remote sources and the Jinja2 templating makes it perfect for creating consistent, enterprise-ready project layouts.",
770+
author: 'Marcus Rodriguez',
771+
role: 'Platform Architect',
772+
avatar:
773+
'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop&crop=face',
770774
},
771775
{
772-
content: "STRUCT's flexibility is unmatched. We use it for everything from microservices to Terraform modules. The hook system allows us to integrate it perfectly into our CI/CD pipeline.",
773-
author: "Alex Thompson",
774-
role: "Lead Developer",
775-
avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop&crop=face"
776-
}
776+
content:
777+
"STRUCT's flexibility is unmatched. We use it for everything from microservices to Terraform modules. The hook system allows us to integrate it perfectly into our CI/CD pipeline.",
778+
author: 'Alex Thompson',
779+
role: 'Lead Developer',
780+
avatar:
781+
'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop&crop=face',
782+
},
777783
];
778784

779785
const testimonialsGrid = document.querySelector('#testimonials .testimonials-grid');

0 commit comments

Comments
 (0)