180 lines
9.1 KiB
Bash
180 lines
9.1 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
# Generate all city-specific landing pages
|
||
|
|
|
||
|
|
# Cities per country
|
||
|
|
SWEDEN_CITIES="stockholm|Stockholm goteborg|Göteborg malmo|Malmö uppsala|Uppsala linkoping|Linköping orebro|Örebro"
|
||
|
|
GERMANY_CITIES="berlin|Berlin hamburg|Hamburg munich|München cologne|Köln frankfurt|Frankfurt stuttgart|Stuttgart"
|
||
|
|
FRANCE_CITIES="paris|Paris marseille|Marseille lyon|Lyon toulouse|Toulouse nice|Nice nantes|Nantes"
|
||
|
|
UK_CITIES="london|London manchester|Manchester birmingham|Birmingham glasgow|Glasgow liverpool|Liverpool leeds|Leeds"
|
||
|
|
NETHERLANDS_CITIES="amsterdam|Amsterdam rotterdam|Rotterdam the-hague|Den_Haag utrecht|Utrecht eindhoven|Eindhoven tilburg|Tilburg"
|
||
|
|
|
||
|
|
# Services
|
||
|
|
SERVICES=(
|
||
|
|
"bridge-inspection|Bridge Inspection|Professional bridge inspection services in {city}. {compliance} compliant."
|
||
|
|
"facade-inspection|Facade Inspection|Building facade inspection in {city}. Identify maintenance needs."
|
||
|
|
"road-condition|Road Condition|AI-assisted road surface analysis across {city}."
|
||
|
|
"street-lighting|Street Lighting|Verify street light functionality across {city}."
|
||
|
|
"construction-monitoring|Construction Monitoring|Document construction progress in {city}."
|
||
|
|
"property-verification|Property Verification|Verify property condition in {city}."
|
||
|
|
"retail-audit|Retail Audit|Document storefront conditions in {city}."
|
||
|
|
"accessibility-audit|Accessibility Audit|Verify accessibility compliance in {city}."
|
||
|
|
"environmental-monitoring|Environmental Monitoring|Track environmental conditions in {city}."
|
||
|
|
"storm-damage|Storm Damage|Rapid post-storm documentation in {city}."
|
||
|
|
)
|
||
|
|
|
||
|
|
# Flags
|
||
|
|
get_flag() {
|
||
|
|
case "$1" in
|
||
|
|
sweden) echo "🇸🇪" ;;
|
||
|
|
germany) echo "🇩🇪" ;;
|
||
|
|
france) echo "🇫🇷" ;;
|
||
|
|
uk) echo "🇬🇧" ;;
|
||
|
|
netherlands) echo "🇳🇱" ;;
|
||
|
|
esac
|
||
|
|
}
|
||
|
|
|
||
|
|
# Compliance
|
||
|
|
get_compliance() {
|
||
|
|
case "$1" in
|
||
|
|
sweden) echo "Trafikverket" ;;
|
||
|
|
germany) echo "DIN" ;;
|
||
|
|
france) echo "CEREMA" ;;
|
||
|
|
uk) echo "DfT" ;;
|
||
|
|
netherlands) echo "Rijkswaterstaat" ;;
|
||
|
|
esac
|
||
|
|
}
|
||
|
|
|
||
|
|
# Generate page
|
||
|
|
generate_page() {
|
||
|
|
local service_slug="$1"
|
||
|
|
local service_name="$2"
|
||
|
|
local service_desc="$3"
|
||
|
|
local city_slug="$4"
|
||
|
|
local city_name="$5"
|
||
|
|
local country="$6"
|
||
|
|
local flag="$7"
|
||
|
|
local compliance="$8"
|
||
|
|
|
||
|
|
local desc=$(echo "$service_desc" | sed "s/{city}/$city_name/g; s/{compliance}/$compliance/g")
|
||
|
|
|
||
|
|
# Build related services
|
||
|
|
local related=""
|
||
|
|
for svc in "${SERVICES[@]}"; do
|
||
|
|
local s_slug=$(echo "$svc" | cut -d'|' -f1)
|
||
|
|
local s_name=$(echo "$svc" | cut -d'|' -f2)
|
||
|
|
if [[ "$s_slug" != "$service_slug" ]]; then
|
||
|
|
related+="<a href=\"/$s_slug/$city_slug\" class=\"card\" style=\"text-decoration:none;color:inherit;\"><h3>$s_name</h3><p>Available in $city_name →</p></a>"
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
|
||
|
|
cat << EOF
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>$service_name in $city_name — quiXzoom</title>
|
||
|
|
<meta name="description" content="$desc">
|
||
|
|
<link rel="canonical" href="https://www.quixzoom.com/$service_slug/$city_slug">
|
||
|
|
<style>
|
||
|
|
:root{--bg:#f5f5f7;--blue:#0066FF;--text:#1d1d1f;--muted:#6e6e73;--surface:#fff;--border:rgba(0,0,0,0.09)}
|
||
|
|
*{margin:0;padding:0;box-sizing:border-box}
|
||
|
|
body{font-family:-apple-system,BlinkMacSystemFont,'Inter',sans-serif;background:var(--bg);color:var(--text);line-height:1.6}
|
||
|
|
.container{max-width:1200px;margin:0 auto;padding:0 24px}
|
||
|
|
nav{position:sticky;top:0;background:rgba(255,255,255,0.92);backdrop-filter:blur(20px);border-bottom:1px solid var(--border);z-index:300}
|
||
|
|
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
|
||
|
|
.nav-logo{font-size:1.375rem;font-weight:900;text-decoration:none;color:var(--text)}
|
||
|
|
.nav-logo span{color:var(--blue)}
|
||
|
|
.nav-links{display:flex;gap:32px}
|
||
|
|
.nav-links a{color:var(--muted);text-decoration:none;font-weight:500}
|
||
|
|
.hero{padding:80px 0 60px;text-align:center;background:var(--surface)}
|
||
|
|
.hero h1{font-size:clamp(2rem,5vw,3.5rem);font-weight:800;letter-spacing:-0.03em;margin-bottom:20px}
|
||
|
|
.hero p{font-size:1.25rem;color:var(--muted);max-width:600px;margin:0 auto}
|
||
|
|
.hero-badge{display:inline-flex;align-items:center;gap:8px;background:rgba(0,102,255,0.1);color:var(--blue);border:1px solid rgba(0,102,255,0.2);border-radius:24px;padding:7px 18px;font-size:0.8125rem;font-weight:700;margin-bottom:24px}
|
||
|
|
.section{padding:60px 0}
|
||
|
|
.section-title{text-align:center;margin-bottom:48px}
|
||
|
|
.section-title h2{font-size:2rem;font-weight:700;margin-bottom:12px}
|
||
|
|
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}
|
||
|
|
.card{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:40px;transition:all 0.2s}
|
||
|
|
.card:hover{transform:translateY(-4px);box-shadow:0 12px 40px rgba(0,0,0,0.08)}
|
||
|
|
.card h3{font-size:1.25rem;font-weight:700;margin-bottom:12px}
|
||
|
|
.card p{color:var(--muted);font-size:0.95rem}
|
||
|
|
.breadcrumb{padding:20px 0 0;font-size:0.875rem;color:var(--muted)}
|
||
|
|
.breadcrumb a{color:var(--muted);text-decoration:none}
|
||
|
|
.breadcrumb span{color:var(--text);font-weight:500}
|
||
|
|
.cta{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:60px;text-align:center;margin:40px 0}
|
||
|
|
.btn{display:inline-block;background:var(--blue);color:#fff;text-decoration:none;padding:14px 32px;border-radius:12px;font-weight:600}
|
||
|
|
.btn-secondary{display:inline-block;background:var(--surface);color:var(--blue);text-decoration:none;padding:14px 32px;border-radius:12px;font-weight:600;border:2px solid var(--blue);margin-left:12px}
|
||
|
|
footer{background:var(--surface);border-top:1px solid var(--border);padding:40px 0}
|
||
|
|
.footer-inner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}
|
||
|
|
@media(max-width:768px){.nav-links{display:none}}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<nav><div class="container"><div class="nav-inner"><a href="/" class="nav-logo">qui<span>X</span>zoom</a><div class="nav-links"><a href="/">Home</a><a href="/about">About</a><a href="/pricing">Pricing</a><a href="/features">Features</a></div></div></div></nav>
|
||
|
|
<section class="hero"><div class="container">
|
||
|
|
<div class="breadcrumb"><a href="/">Home</a> → <a href="/$service_slug">$service_name</a> → <span>$city_name</span></div>
|
||
|
|
<div class="hero-badge">$flag $city_name · $compliance Compliant</div>
|
||
|
|
<h1>$service_name in $city_name</h1>
|
||
|
|
<p>$desc</p>
|
||
|
|
</div></section>
|
||
|
|
<section class="section"><div class="container">
|
||
|
|
<div class="section-title"><h2>Why choose quiXzoom in $city_name</h2></div>
|
||
|
|
<div class="grid">
|
||
|
|
<div class="card"><h3>Local Coverage</h3><p>Zoomers available throughout $city_name. Fast response times.</p></div>
|
||
|
|
<div class="card"><h3>$compliance Compliant</h3><p>All inspections follow regulations. Digital reports ready.</p></div>
|
||
|
|
<div class="card"><h3>Rapid Deployment</h3><p>Missions deployed within hours. Same-day available.</p></div>
|
||
|
|
<div class="card"><h3>Verified Data</h3><p>AI quality control with geolocation. Court-admissible.</p></div>
|
||
|
|
<div class="card"><h3>Cost Effective</h3><p>Up to 70% cheaper. Pay per mission.</p></div>
|
||
|
|
<div class="card"><h3>Scalable</h3><p>From single to city-wide campaigns.</p></div>
|
||
|
|
</div>
|
||
|
|
</div></section>
|
||
|
|
<section class="section" style="background:var(--surface)"><div class="container">
|
||
|
|
<div class="section-title"><h2>Related services in $city_name</h2></div>
|
||
|
|
<div class="grid">
|
||
|
|
$related
|
||
|
|
<a href="/$service_slug/$country" class="card" style="text-decoration:none;color:inherit"><h3>$service_name — $(echo "$country" | sed 's/.*/\u&/')</h3><p>Nationwide coverage →</p></a>
|
||
|
|
<a href="/for-organisations" class="card" style="text-decoration:none;color:inherit"><h3>Enterprise Solutions</h3><p>Custom programs with API →</p></a>
|
||
|
|
</div>
|
||
|
|
</div></section>
|
||
|
|
<section class="section"><div class="container">
|
||
|
|
<div class="cta"><h2>Start inspecting in $city_name today</h2><p>Get a custom quote. No minimum commitment.</p><a href="/pricing" class="btn">View pricing</a><a href="mailto:sales@quixzoom.com" class="btn-secondary">Contact sales</a></div>
|
||
|
|
</div></section>
|
||
|
|
<footer><div class="container"><div class="footer-inner"><p>© 2026 quiXzoom. Operated by Landvex AB.</p></div></div></footer>
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
EOF
|
||
|
|
}
|
||
|
|
|
||
|
|
# Generate all pages
|
||
|
|
count=0
|
||
|
|
for country in sweden germany france uk netherlands; do
|
||
|
|
flag=$(get_flag "$country")
|
||
|
|
compliance=$(get_compliance "$country")
|
||
|
|
cities_var="${country^^}_CITIES"
|
||
|
|
cities="${!cities_var}"
|
||
|
|
|
||
|
|
for city_info in $cities; do
|
||
|
|
city_slug=$(echo "$city_info" | cut -d'|' -f1)
|
||
|
|
city_name=$(echo "$city_info" | cut -d'|' -f2 | tr '_' ' ')
|
||
|
|
|
||
|
|
for service in "${SERVICES[@]}"; do
|
||
|
|
svc_slug=$(echo "$service" | cut -d'|' -f1)
|
||
|
|
svc_name=$(echo "$service" | cut -d'|' -f2)
|
||
|
|
svc_desc=$(echo "$service" | cut -d'|' -f3)
|
||
|
|
|
||
|
|
echo "Generating: $svc_slug/$city_slug"
|
||
|
|
|
||
|
|
page=$(generate_page "$svc_slug" "$svc_name" "$svc_desc" "$city_slug" "$city_name" "$country" "$flag" "$compliance")
|
||
|
|
echo "$page" | aws s3 cp - "s3://quixzoom-landing-prod/$svc_slug/$city_slug.html" --content-type "text/html" --cache-control "max-age=3600"
|
||
|
|
|
||
|
|
((count++))
|
||
|
|
done
|
||
|
|
done
|
||
|
|
done
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "✅ Generated $count city-specific landing pages"
|
||
|
|
echo "Invalidating CloudFront..."
|
||
|
|
aws cloudfront create-invalidation --distribution-id EE30B9WM5ZYM7 --paths "/*" --query 'Invalidation.Id' --output text
|