Rocky_Mountain_Vending/modify_service_areas.py
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

74 lines
4 KiB
Python

import re
import os
# Process the main service areas page
with open('app/service-areas/page.tsx', 'r') as f:
content = f.read()
# Add ArrowRight import if missing
if 'ArrowRight' not in content:
content = content.replace('import Link from \'next/link\';', 'import Link from \'next/link\';\nimport { ArrowRight } from \'lucide-react\';')
# Create a Services section for service areas
services_section = '''
{/* Our Services Section */}
<section className="py-20 md:py-28 bg-muted/30">
<div className="container mx-auto px-4 max-w-6xl">
<div className="text-center mb-12 md:mb-16">
<h2 className="text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl mb-4 text-balance">Our Vending Machine Services</h2>
<p className="text-lg text-muted-foreground max-w-2xl mx-auto text-pretty leading-relaxed mb-8">
Serving {state} with comprehensive vending machine solutions
</p>
</div>
<div className="grid gap-8 md:grid-cols-3">
<Card className="border-border/50 hover:border-secondary/50 transition-colors">
<CardContent className="pt-8 text-center">
<Wrench className="h-12 w-12 text-primary mx-auto mb-4" />
<h3 className="text-xl font-semibold mb-3">Vending Machine <Link href="/services/repairs" className="text-primary hover:underline font-semibold">Repairs</Link></h3>
<p className="text-muted-foreground mb-6">
Expert repair and maintenance services for all vending machine types
</p>
<Link href="/services/repairs" className="inline-flex items-center gap-2 text-primary hover:underline font-medium">
Learn More <ArrowRight className="h-4 w-4" />
</Link>
</CardContent>
</Card>
<Card className="border-border/50 hover:border-secondary/50 transition-colors">
<CardContent className="pt-8 text-center">
<MapPin className="h-12 w-12 text-primary mx-auto mb-4" />
<h3 className="text-xl font-semibold mb-3">Vending Machine <Link href="/services/parts" className="text-primary hover:underline font-semibold">Parts</Link></h3>
<p className="text-muted-foreground mb-6">
Quality replacement parts for all major vending machine brands
</p>
<Link href="/services/parts" className="inline-flex items-center gap-2 text-primary hover:underline font-medium">
Shop Parts <ArrowRight className="h-4 w-4" />
</Link>
</CardContent>
</Card>
<Card className="border-border/50 hover:border-secondary/50 transition-colors">
<CardContent className="pt-8 text-center">
<Clock className="h-12 w-12 text-primary mx-auto mb-4" />
<h3 className="text-xl font-semibold mb-3">Vending Machine <Link href="/services/moving" className="text-primary hover:underline font-semibold">Moving</Link></h3>
<p className="text-muted-foreground mb-6">
Professional vending machine relocation services in {state}
</p>
<Link href="/services/moving" className="inline-flex items-center gap-2 text-primary hover:underline font-medium">
Moving Services <ArrowRight className="h-4 w-4" />
</Link>
</CardContent>
</Card>
</div>
</div>
</section>
'''
# Insert before any existing section (look for first section)
first_section_pattern = r'<section.*?>'
if re.search(first_section_pattern, content):
content = re.sub(first_section_pattern, services_section + '\n\n <section', content, count=1)
# Write the modified content
with open('app/service-areas/page.tsx', 'w') as f:
f.write(content)
print("✅ Successfully added internal links to Service Areas page!")