Skip to content

Commit 2d37739

Browse files
Merge pull request #20 from PrimeBuild-pc/elegant-haslett
fix: SEO, security headers, accessibility and analytics improvements
2 parents 19f892a + 5d01fb7 commit 2d37739

16 files changed

Lines changed: 116 additions & 156 deletions

.claude/settings.local.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm run build:*)",
5+
"Bash(npm install)",
6+
"Bash(git add:*)"
7+
],
8+
"deny": [],
9+
"ask": []
10+
}
11+
}

client/public/_headers

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
# Security Headers
3+
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
4+
X-Frame-Options: SAMEORIGIN
5+
X-Content-Type-Options: nosniff
6+
X-XSS-Protection: 1; mode=block
7+
Referrer-Policy: strict-origin-when-cross-origin
8+
Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()
9+
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: https: blob:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://www.google-analytics.com https://analytics.google.com https://website-6al.pages.dev; frame-ancestors 'self'; base-uri 'self'; form-action 'self' https://website-6al.pages.dev
10+
11+
# Ensure ads.txt has correct content-type
12+
/ads.txt
13+
Content-Type: text/plain; charset=utf-8

client/public/_redirects

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Redirect www to non-www (canonical)
2+
https://www.primebuild.website/* https://primebuild.website/:splat 301
3+
4+
# SPA fallback - all routes go to index.html
5+
/* /index.html 200

client/public/ads.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ads.txt for primebuild.website
2+
# This site does not run any advertising
3+
# placeholder file to prevent 404 errors

client/public/sitemap.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<priority>1.0</priority>
88
</url>
99
<url>
10-
<loc>https://primebuild.website/#servizi</loc>
10+
<loc>https://primebuild.website/#services</loc>
1111
<lastmod>2025-12-07</lastmod>
1212
<changefreq>monthly</changefreq>
1313
<priority>0.8</priority>
@@ -18,20 +18,14 @@
1818
<changefreq>monthly</changefreq>
1919
<priority>0.8</priority>
2020
</url>
21-
<url>
22-
<loc>https://primebuild.website/#componenti</loc>
23-
<lastmod>2025-12-07</lastmod>
24-
<changefreq>monthly</changefreq>
25-
<priority>0.7</priority>
26-
</url>
2721
<url>
2822
<loc>https://primebuild.website/#apps</loc>
2923
<lastmod>2025-12-07</lastmod>
3024
<changefreq>monthly</changefreq>
3125
<priority>0.7</priority>
3226
</url>
3327
<url>
34-
<loc>https://primebuild.website/#contatti</loc>
28+
<loc>https://primebuild.website/#contact</loc>
3529
<lastmod>2025-12-07</lastmod>
3630
<changefreq>monthly</changefreq>
3731
<priority>0.9</priority>
@@ -40,6 +34,6 @@
4034
<loc>https://primebuild.website/privacy</loc>
4135
<lastmod>2025-12-07</lastmod>
4236
<changefreq>yearly</changefreq>
43-
<priority>0.3</priority>
37+
<priority>0.5</priority>
4438
</url>
4539
</urlset>

client/src/components/AppsSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const AppsSection = () => {
120120
rel="noopener noreferrer"
121121
onClick={() => handleDownloadClick(app.name, app.url)}
122122
aria-label={`Scarica ${app.name}`}
123-
className="absolute right-4 bottom10 inline-flex items-center gap-2 bg-[#ff7514] hover:bg-opacity-90 text-white px-4 py-1.5 rounded-md min-h-[32px] text-sm transition-transform hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#ff7514] focus-visible:ring-offset-2 focus-visible:ring-offset-neutral-900"
123+
className="absolute right-4 bottom10 inline-flex items-center gap-2 bg-[#ff7514] hover:bg-[#e06500] text-black font-semibold px-4 py-1.5 rounded-md min-h-[32px] text-sm transition-transform hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#ff7514] focus-visible:ring-offset-2 focus-visible:ring-offset-neutral-900"
124124
>
125125
<FaDownload className="inline mr-2" aria-hidden="true" /> Download
126126
</a>

client/src/components/BuildsSection.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const BuildsSection = () => {
170170
href="https://docs.google.com/forms/d/e/1FAIpQLSfXO6-BVQ3x1WLDlxpp7B534U8xIxymD7QbP8MId0fcf_9Yqw/viewform?usp=sharing"
171171
target="_blank"
172172
rel="noopener noreferrer"
173-
className="inline-block bg-[#ff7514] hover:bg-opacity-90 text-white font-medium py-3 px-8 rounded-md transition-all transform hover:scale-105"
173+
className="inline-block bg-[#ff7514] hover:bg-[#e06500] text-black font-semibold py-3 px-8 rounded-md transition-all transform hover:scale-105"
174174
>
175175
Richiedi Preventivo
176176
</a>
@@ -183,11 +183,13 @@ const BuildsSection = () => {
183183
<ImageWithFallback
184184
src={build.image}
185185
alt={build.name}
186+
width={600}
187+
height={384}
186188
className="w-full h-96 object-cover"
187189
/>
188190
<div className="absolute inset-0 bg-gradient-to-t from-black via-black/70 to-transparent flex items-end p-6 opacity-0 group-hover:opacity-100 transition-opacity duration-300">
189191
<div>
190-
<span className="inline-block bg-[#ff7514] text-white text-xs px-3 py-1 rounded-full mb-3">
192+
<span className="inline-block bg-[#ff7514] text-black text-xs font-semibold px-3 py-1 rounded-full mb-3">
191193
{build.level}
192194
</span>
193195
<h3 className="text-2xl font-bold font-montserrat">

client/src/components/ComponentsSection.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ const ComponentsSection = () => {
219219
<ImageWithFallback
220220
src={component.image}
221221
alt={component.title}
222+
width={64}
223+
height={64}
222224
className="w-16 h-16 object-cover mx-auto mb-4 rounded-lg"
223225
/>
224226
<h3 className="font-medium text-[#ff7514]">{component.title}</h3>
@@ -282,6 +284,8 @@ const ComponentsSection = () => {
282284
<ImageWithFallback
283285
src={component.image}
284286
alt={component.title}
287+
width={64}
288+
height={64}
285289
className="w-14 h-14 md:w-16 md:h-16 object-cover mx-auto mb-4 rounded-lg"
286290
/>
287291
<h3 className="font-medium text-[#ff7514]">{component.title}</h3>

client/src/components/ContactSection.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,25 @@ const ContactSection = () => {
7676
}
7777
};
7878

79+
// Obfuscate email to prevent spam harvesters
80+
const getEmail = () => {
81+
const user = "primebuild.official";
82+
const domain = "gmail.com";
83+
return `${user}@${domain}`;
84+
};
85+
7986
const contactInfo = [
8087
{
8188
icon: <FaEnvelope className="text-[#ff7514]" />,
8289
title: "Email",
83-
value: "primebuild.official@gmail.com"
90+
value: getEmail(),
91+
isEmail: true
8492
},
8593
{
8694
icon: <FaMapMarkerAlt className="text-[#ff7514]" />,
8795
title: "Sede",
88-
value: "Padova, Italia"
96+
value: "Padova, Italia",
97+
isEmail: false
8998
}
9099
];
91100

@@ -188,7 +197,7 @@ const ContactSection = () => {
188197
disabled={isSubmitting}
189198
whileHover={{ scale: isSubmitting ? 1 : 1.05 }}
190199
whileTap={{ scale: isSubmitting ? 1 : 0.95 }}
191-
className="bg-[#ff7514] hover:bg-opacity-90 text-white font-medium py-3 px-8 rounded-md transition-all disabled:opacity-50 disabled:cursor-not-allowed"
200+
className="bg-[#ff7514] hover:bg-[#e06500] text-black font-semibold py-3 px-8 rounded-md transition-all disabled:opacity-50 disabled:cursor-not-allowed"
192201
>
193202
{isSubmitting ? "Invio in corso..." : "Invia Messaggio"}
194203
</motion.button>

client/src/components/CookieBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const CookieBanner = () => {
6666
</button>
6767
<button
6868
onClick={handleAccept}
69-
className="px-6 py-2.5 text-sm font-medium text-white bg-[#ff7514] hover:bg-[#e56812] rounded-lg transition-colors"
69+
className="px-6 py-2.5 text-sm font-semibold text-black bg-[#ff7514] hover:bg-[#e06500] rounded-lg transition-colors"
7070
>
7171
Accetta
7272
</button>

0 commit comments

Comments
 (0)