e / index.html
RebelofSleep's picture
Add the following to improve the design and functionality of the the app: 🎨 Interface Design (UI/UX) 1. Onboarding (Registration & Login) Components: Sign-up/sign-in form (email + social login with Google/Facebook). Visual validation (✅, red border for invalid). Toggle for password visibility. User Flow: Upon sign-in, direct users based on their role: resident: Dashboard for reporting/tracking. official: Admin interface. 2. User Dashboard (Residents) Cards for quick actions: Report Issue, View My Reports Issue Timeline View: Chips: 🟡 Pending → 🔵 In Progress → ✅ Resolved Filters: Category, Urgency, Status Search Bar for filtering issues Heatmap Button: Redirects to Map View 3. Report Issue Page Fields: Category: Dropdown (Infrastructure, Utilities, Safety) Location: Auto via Geolocation + manual pin on Mapbox Urgency Level: Low (green), Medium (orange), High (red) Media Upload: Drag-and-drop + file preview Text Description Tooltips: Help users describe the issue clearly 4. Map View / Heatmap Live overlay using Mapbox/OpenStreetMap Show: Incident pins by category/status Heatmap mode toggle Click on pin → Popup with issue details 5. Admin Dashboard (Officials) Views: Incoming reports table with filters Assign technician dropdown Update status with comment Activity log panel per issue 6. Notifications & Messaging In-App Alerts: Toasts/snackbars Inbox UI: For conversations between users and officials Push Notifications: With Twilio integration - Initial Deployment
fa99bc6 verified
Raw History Blame Contribute Delete
51.2 kB
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Report and track municipal issues in South Africa">
<title>QuickFixSA | Civic Engagement Platform</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="manifest" href="/manifest.json">
<style>
:root {
--primary: #2A5C82;
--secondary: #4CAF50;
--alert: #E74C3C;
}
body {
font-family: 'Open Sans', sans-serif;
}
h1, h2, h3, h4 {
font-family: 'Roboto', sans-serif;
}
.map-container {
height: 400px;
background: linear-gradient(135deg, #6a93cb 0%, #a4bfef 100%);
}
.status-pending { background-color: #F39C12; }
.status-in-progress { background-color: #3498DB; }
.status-resolved { background-color: #2ECC71; }
.priority-low { background-color: #2ECC71; }
.priority-medium { background-color: #F39C12; }
.priority-high { background-color: #E74C3C; }
.dark-mode {
background-color: #1a202c;
color: #e2e8f0;
}
.dark-mode .card {
background-color: #2d3748;
border-color: #4a5568;
}
.dark-mode .navbar {
background-color: #1a202c;
}
.drop-area {
border: 2px dashed #cbd5e0;
border-radius: 0.5rem;
transition: all 0.3s ease;
}
.drop-area.active {
border-color: var(--primary);
background-color: rgba(42, 92, 130, 0.05);
}
.scroll-shrink {
transition: all 0.3s ease;
}
.scroll-shrink.shrink {
padding: 0.5rem 0;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.issue-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
.dark-mode-toggle .light-icon { display: none; }
.dark-mode-toggle .dark-icon { display: inline-block; }
}
@media (prefers-color-scheme: light) {
.dark-mode-toggle .light-icon { display: inline-block; }
.dark-mode-toggle .dark-icon { display: none; }
}
</style>
</head>
<body class="bg-gray-50 text-gray-800">
<!-- Navigation Bar -->
<nav id="navbar" class="navbar scroll-shrink fixed w-full bg-white py-4 px-4 md:px-8 z-50">
<div class="max-w-7xl mx-auto flex justify-between items-center">
<div class="flex items-center">
<div class="bg-[#2A5C82] text-white font-bold text-xl py-2 px-3 rounded-lg mr-3">QF</div>
<span class="text-xl font-bold text-[#2A5C82]">QuickFixSA</span>
</div>
<div class="hidden md:flex items-center space-x-8">
<a href="#home" class="text-gray-700 hover:text-[#2A5C82] font-medium">Home</a>
<a href="#features" class="text-gray-700 hover:text-[#2A5C82] font-medium">Features</a>
<a href="#how-it-works" class="text-gray-700 hover:text-[#2A5C82] font-medium">How It Works</a>
<a href="#dashboard" class="text-gray-700 hover:text-[#2A5C82] font-medium">Dashboard</a>
</div>
<div class="flex items-center space-x-4">
<button id="dark-mode-toggle" class="dark-mode-toggle p-2 rounded-full hover:bg-gray-100">
<i class="fas fa-sun light-icon"></i>
<i class="fas fa-moon dark-icon"></i>
</button>
<button id="login-btn" class="bg-[#2A5C82] hover:bg-[#1d4565] text-white font-medium py-2 px-4 rounded-lg transition">
Sign In
</button>
<button class="md:hidden" id="mobile-menu-btn">
<i class="fas fa-bars text-2xl text-gray-700"></i>
</button>
</div>
</div>
<!-- Mobile Menu -->
<div id="mobile-menu" class="md:hidden hidden absolute top-full left-0 w-full bg-white shadow-lg py-4 px-4">
<a href="#home" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Home</a>
<a href="#features" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Features</a>
<a href="#how-it-works" class="block py-2 text-gray-700 hover:text-[#2A5C82]">How It Works</a>
<a href="#dashboard" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Dashboard</a>
</div>
</nav>
<!-- Hero Section -->
<section id="home" class="pt-24 pb-16 px-4 md:px-8 bg-gradient-to-r from-[#2A5C82] to-[#3a7cb3] text-white">
<div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 gap-12 items-center">
<div>
<h1 class="text-4xl md:text-5xl font-bold mb-6">Making Civic Engagement Simple</h1>
<p class="text-xl mb-8 opacity-90">Report & Track Municipal Issues in Real-Time Across South Africa</p>
<div class="flex flex-wrap gap-4">
<button id="report-btn" class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-bold py-3 px-8 rounded-lg text-lg transition transform hover:scale-105">
Report an Issue
</button>
<button class="bg-white text-[#2A5C82] hover:bg-gray-100 font-bold py-3 px-8 rounded-lg text-lg transition">
How It Works
</button>
</div>
</div>
<div class="flex justify-center">
<div class="relative">
<div class="bg-white rounded-2xl shadow-xl p-6 w-80 h-80 relative z-10">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-full"></div>
</div>
<div class="absolute -bottom-6 -right-6 bg-[#4CAF50] rounded-2xl shadow-xl p-6 w-64 h-64">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-full"></div>
</div>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="py-16 px-4 md:px-8 bg-white">
<div class="max-w-7xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">Powerful Features</h2>
<p class="text-center text-gray-600 mb-16 max-w-3xl mx-auto">QuickFixSA empowers citizens and municipal officials to collaborate on improving community services</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Feature 1 -->
<div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
<div class="w-16 h-16 rounded-full bg-[#2A5C82] flex items-center justify-center mb-6">
<i class="fas fa-map-marker-alt text-white text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Real-Time Issue Tracking</h3>
<p class="text-gray-600">Report municipal issues with precise location mapping and track their resolution progress in real-time.</p>
</div>
<!-- Feature 2 -->
<div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
<div class="w-16 h-16 rounded-full bg-[#4CAF50] flex items-center justify-center mb-6">
<i class="fas fa-users text-white text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Community Collaboration</h3>
<p class="text-gray-600">Engage with neighbors and municipal officials through comments, upvotes, and status updates.</p>
</div>
<!-- Feature 3 -->
<div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
<div class="w-16 h-16 rounded-full bg-[#E74C3C] flex items-center justify-center mb-6">
<i class="fas fa-bell text-white text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Instant Notifications</h3>
<p class="text-gray-600">Receive SMS, email, and in-app alerts when your reported issues are updated or resolved.</p>
</div>
</div>
</div>
</section>
<!-- How It Works Section -->
<section id="how-it-works" class="py-16 px-4 md:px-8 bg-gray-50">
<div class="max-w-7xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">How QuickFixSA Works</h2>
<p class="text-center text-gray-600 mb-16 max-w-3xl mx-auto">A simple three-step process to report and resolve municipal issues</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Step 1 -->
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 rounded-full bg-white border-4 border-[#2A5C82] flex items-center justify-center mb-6 text-[#2A5C82] text-3xl font-bold">1</div>
<h3 class="text-xl font-bold mb-3">Report an Issue</h3>
<p class="text-gray-600">Use our mobile app or website to report infrastructure issues with photos and location details.</p>
</div>
<!-- Step 2 -->
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 rounded-full bg-white border-4 border-[#4CAF50] flex items-center justify-center mb-6 text-[#4CAF50] text-3xl font-bold">2</div>
<h3 class="text-xl font-bold mb-3">Municipal Response</h3>
<p class="text-gray-600">Municipal officials review and assign your report to the appropriate department.</p>
</div>
<!-- Step 3 -->
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 rounded-full bg-white border-4 border-[#E74C3C] flex items-center justify-center mb-6 text-[#E74C3C] text-3xl font-bold">3</div>
<h3 class="text-xl font-bold mb-3">Track Resolution</h3>
<p class="text-gray-600">Monitor progress in real-time and receive notifications when your issue is resolved.</p>
</div>
</div>
</div>
</section>
<!-- Dashboard Preview -->
<section id="dashboard" class="py-16 px-4 md:px-8 bg-white">
<div class="max-w-7xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">Your Personal Dashboard</h2>
<p class="text-center text-gray-600 mb-12 max-w-3xl mx-auto">Track all your reported issues in one place with real-time updates</p>
<div class="bg-gray-50 rounded-2xl shadow-lg overflow-hidden">
<!-- Dashboard Header -->
<div class="bg-[#2A5C82] text-white p-6">
<div class="flex justify-between items-center">
<h3 class="text-xl font-bold">Welcome, Thabo!</h3>
<button class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-medium py-2 px-4 rounded-lg">
Report New Issue
</button>
</div>
</div>
<!-- Dashboard Filters -->
<div class="p-6 border-b">
<!-- Quick Actions -->
<div class="grid grid-cols-2 gap-4 mb-6">
<button class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-medium py-4 px-6 rounded-lg flex items-center transition">
<i class="fas fa-plus-circle text-xl mr-3"></i>
<span>Report New Issue</span>
</button>
<button class="bg-[#2A5C82] hover:bg-[#1d4565] text-white font-medium py-4 px-6 rounded-lg flex items-center transition">
<i class="fas fa-history text-xl mr-3"></i>
<span>View My Reports</span>
</button>
</div>
<!-- Search & Filters -->
<div class="flex flex-wrap gap-4 mb-4 items-end">
<div class="flex-1 min-w-[300px]">
<label class="block text-gray-700 font-medium mb-1">Search</label>
<div class="relative">
<input type="text" placeholder="Search my reports..." class="w-full border border-gray-300 rounded-lg px-4 py-2 pl-10">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<button class="bg-white border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 flex items-center">
<i class="fas fa-map-marked-alt mr-2 text-[#2A5C82]"></i>
<span>View Heatmap</span>
</button>
</div>
<div class="flex flex-wrap gap-4">
<select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
<option>All Categories</option>
<option>Electrical</option>
<option>Water & Sewer</option>
<option>Roads</option>
<option>Safety</option>
</select>
<select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
<option>All Statuses</option>
<option>Pending</option>
<option>In Progress</option>
<option>Resolved</option>
</select>
<select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
<option>All Priorities</option>
<option>Low</option>
<option>Medium</option>
<option>High</option>
</select>
<button class="bg-white border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50">
<i class="fas fa-sync-alt mr-2"></i> Refresh
</button>
</div>
</div>
<!-- Issues List -->
<div class="p-6">
<div class="grid grid-cols-1 gap-6">
<!-- Issue Card 1 -->
<div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#E74C3C] transition">
<div class="flex flex-wrap justify-between items-start gap-4">
<div>
<div class="priority-high text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">High Priority</div>
<h4 class="text-lg font-bold mb-1">Pothole on Main Road</h4>
<p class="text-gray-600 mb-3">Large pothole causing traffic hazards near Mandela Square</p>
<div class="flex flex-wrap gap-3">
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-map-marker-alt mr-2"></i> Johannesburg, Region B
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-calendar mr-2"></i> Reported: 15 Oct 2023
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-tag mr-2"></i> Roads
</div>
</div>
</div>
<div class="text-right">
<div class="status-in-progress text-white text-sm font-bold py-1 px-3 rounded-full mb-3">In Progress</div>
<div class="text-sm text-gray-500">Job Card: #QF-23015</div>
<div class="text-sm text-gray-500">Assigned to: Roads Dept</div>
</div>
</div>
</div>
<!-- Issue Card 2 -->
<div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#F39C12] transition">
<div class="flex flex-wrap justify-between items-start gap-4">
<div>
<div class="priority-medium text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">Medium Priority</div>
<h4 class="text-lg font-bold mb-1">Street Light Outage</h4>
<p class="text-gray-600 mb-3">Entire block without street lighting on Vilakazi Street</p>
<div class="flex flex-wrap gap-3">
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-map-marker-alt mr-2"></i> Soweto, Region D
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-calendar mr-2"></i> Reported: 12 Oct 2023
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-tag mr-2"></i> Electrical
</div>
</div>
</div>
<div class="text-right">
<div class="status-pending text-white text-sm font-bold py-1 px-3 rounded-full mb-3">Pending</div>
<div class="text-sm text-gray-500">Job Card: #QF-23012</div>
<div class="text-sm text-gray-500">Awaiting assignment</div>
</div>
</div>
</div>
<!-- Issue Card 3 -->
<div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#2ECC71] transition">
<div class="flex flex-wrap justify-between items-start gap-4">
<div>
<div class="priority-low text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">Low Priority</div>
<h4 class="text-lg font-bold mb-1">Water Leak in Park</h4>
<p class="text-gray-600 mb-3">Constant water leak near playground in Freedom Park</p>
<div class="flex flex-wrap gap-3">
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-map-marker-alt mr-2"></i> Pretoria, Region 3
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-calendar mr-2"></i> Reported: 5 Oct 2023
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-tag mr-2"></i> Water & Sewer
</div>
</div>
</div>
<div class="text-right">
<div class="status-resolved text-white text-sm font-bold py-1 px-3 rounded-full mb-3">Resolved</div>
<div class="text-sm text-gray-500">Job Card: #QF-23005</div>
<div class="text-sm text-gray-500">Resolved: 10 Oct 2023</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Report Modal -->
<div id="report-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden items-center justify-center p-4">
<div class="bg-white rounded-2xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto">
<div class="sticky top-0 bg-white p-6 border-b flex justify-between items-center">
<h3 class="text-xl font-bold text-[#2A5C82]">Report New Issue</h3>
<button id="close-modal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times text-2xl"></i>
</button>
</div>
<div class="p-6">
<form id="issue-form">
<!-- Category -->
<div class="mb-6">
<label class="block text-gray-700 font-medium mb-2">Category</label>
<div class="grid grid-cols-2 md:grid-cols-4 gap-3">
<button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="electrical">
<i class="fas fa-bolt text-2xl text-yellow-500 mb-2"></i>
<div>Electrical</div>
</button>
<button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="water">
<i class="fas fa-faucet text-2xl text-blue-500 mb-2"></i>
<div>Water & Sewer</div>
</button>
<button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="roads">
<i class="fas fa-road text-2xl text-gray-700 mb-2"></i>
<div>Roads</div>
</button>
<button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="safety">
<i class="fas fa-shield-alt text-2xl text-red-500 mb-2"></i>
<div>Safety</div>
</button>
</div>
<input type="hidden" name="category" id="category-input">
</div>
<!-- Location -->
<div class="mb-6">
<label class="block text-gray-700 font-medium mb-2">Location</label>
<div class="map-container rounded-lg mb-3 relative">
<div class="absolute top-4 right-4 bg-white rounded-lg shadow-md p-2">
<button type="button" class="px-3 py-1 text-sm">
<i class="fas fa-location-arrow mr-1"></i> Use Current Location
</button>
</div>
</div>
<div class="text-sm text-gray-600 mb-3">Drag the marker to adjust location</div>
<input type="text" placeholder="Address or landmark" class="w-full border border-gray-300 rounded-lg px-4 py-2">
</div>
<!-- Description -->
<div class="mb-6">
<div class="flex items-center justify-between mb-2">
<label class="block text-gray-700 font-medium">Description</label>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-question-circle mr-1"></i>
<span>Tip: Include specific location details</span>
</div>
</div>
<textarea
placeholder="Describe the issue in detail (e.g. 'Large pothole near entrance of Mandela Park')..."
rows="3"
class="w-full border border-gray-300 rounded-lg px-4 py-2"
data-tooltip="Be specific about the location and size of the issue"
></textarea>
</div>
<!-- Media Upload -->
<div class="mb-6">
<label class="block text-gray-700 font-medium mb-2">Add Photos or Videos</label>
<div id="drop-area" class="drop-area border-dashed rounded-lg p-8 text-center cursor-pointer">
<i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i>
<p class="text-gray-500">Drag & drop files here or click to browse</p>
<p class="text-sm text-gray-400 mt-2">Supports JPG, PNG, MP4 (max 20MB each)</p>
</div>
<div id="file-list" class="mt-4 grid grid-cols-3 gap-3"></div>
</div>
<!-- Priority -->
<div class="mb-6">
<label class="block text-gray-700 font-medium mb-2">Priority Level</label>
<div class="grid grid-cols-3 gap-3">
<button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="low">
<div class="priority-low text-white text-xs font-bold py-1 px-3 rounded-full mb-2">Low</div>
<div>Not urgent</div>
</button>
<button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="medium">
<div class="priority-medium text-white text-xs font-bold py-1 px-3 rounded-full mb-2">Medium</div>
<div>Needs attention</div>
</button>
<button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="high">
<div class="priority-high text-white text-xs font-bold py-1 px-3 rounded-full mb-2">High</div>
<div>Urgent/Safety risk</div>
</button>
</div>
<input type="hidden" name="priority" id="priority-input">
</div>
<!-- Submit Button -->
<div class="mt-8">
<button type="submit" class="w-full bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-bold py-3 px-4 rounded-lg text-lg transition">
Submit Report
</button>
</div>
</form>
</div>
</div>
</div>
<!-- Login Modal -->
<div id="login-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden items-center justify-center p-4">
<div class="bg-white rounded-2xl shadow-xl max-w-md w-full">
<div class="p-8">
<div class="text-center mb-8">
<div class="bg-[#2A5C82] text-white font-bold text-2xl py-3 px-4 rounded-lg inline-block mb-4">QF</div>
<h3 class="text-2xl font-bold text-gray-800">Sign In to QuickFixSA</h3>
<p class="text-gray-600 mt-2">Access your civic engagement dashboard</p>
</div>
<form id="login-form">
<div class="mb-5">
<label class="block text-gray-700 font-medium mb-2">Email Address</label>
<input type="email" placeholder="you@example.com" class="w-full border border-gray-300 rounded-lg px-4 py-3">
</div>
<div class="mb-5 relative">
<label class="block text-gray-700 font-medium mb-2">Password</label>
<input type="password" id="password-input" placeholder="••••••••" class="w-full border border-gray-300 rounded-lg px-4 py-3 pr-10">
<button type="button" id="toggle-password" class="absolute right-3 top-10 text-gray-500 hover:text-gray-700">
<i class="far fa-eye"></i>
</button>
<div id="password-strength" class="h-1 mt-2 bg-gray-200 rounded-full overflow-hidden hidden">
<div class="h-full w-0" id="strength-meter"></div>
</div>
</div>
<div class="flex justify-between items-center mb-6">
<div class="flex items-center">
<input type="checkbox" id="remember" class="mr-2">
<label for="remember" class="text-gray-600">Remember me</label>
</div>
<a href="#" class="text-[#2A5C82] hover:underline">Forgot password?</a>
</div>
<button type="submit" class="w-full bg-[#2A5C82] hover:bg-[#1d4565] text-white font-bold py-3 px-4 rounded-lg text-lg mb-4 transition">
Sign In
</button>
<div class="text-center text-gray-600 mb-4">or continue with</div>
<div class="grid grid-cols-2 gap-3 mb-6">
<button class="flex items-center justify-center bg-gray-100 hover:bg-gray-200 py-3 rounded-lg transition">
<i class="fab fa-google text-red-500 mr-2"></i> Google
</button>
<button class="flex items-center justify-center bg-gray-100 hover:bg-gray-200 py-3 rounded-lg transition">
<i class="fab fa-facebook text-blue-600 mr-2"></i> Facebook
</button>
</div>
<div class="text-center text-gray-600">
Don't have an account? <a href="#" class="text-[#2A5C82] font-medium hover:underline">Sign Up</a>
</div>
</form>
</div>
</div>
</div>
<!-- Admin Dashboard (Officials) -->
<section id="admin-dashboard" class="py-16 px-4 md:px-8 bg-gray-100">
<div class="max-w-7xl mx-auto">
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold text-[#2A5C82]">Municipal Admin Dashboard</h2>
<div class="flex gap-4">
<select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
<option>All Departments</option>
<option>Roads</option>
<option>Electricity</option>
<option>Water</option>
</select>
</div>
</div>
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<!-- Report Table -->
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50">
<tr>
<th class="p-4 text-left font-medium">Job ID</th>
<th class="p-4 text-left font-medium">Category</th>
<th class="p-4 text-left font-medium">Description</th>
<th class="p-4 text-left font-medium">Reporter</th>
<th class="p-4 text-left font-medium">Priority</th>
<th class="p-4 text-left font-medium">Status</th>
<th class="p-4 text-left font-medium">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<!-- Sample Row -->
<tr>
<td class="p-4">#QF-23015</td>
<td class="p-4">
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">Roads</span>
</td>
<td class="p-4">Large pothole on Main Road</td>
<td class="p-4">Thabo M.</td>
<td class="p-4">
<span class="priority-high text-white text-xs font-bold py-1 px-2 rounded-full">High</span>
</td>
<td class="p-4">
<span class="status-in-progress text-white text-xs font-bold py-1 px-2 rounded-full">In Progress</span>
</td>
<td class="p-4">
<button class="text-[#2A5C82] hover:text-[#1d4565] mr-2">
<i class="fas fa-edit"></i>
</button>
<button class="text-[#4CAF50] hover:text-[#3d8b40]">
<i class="fas fa-check"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Activity Log -->
<div class="p-6 border-t">
<h3 class="text-xl font-bold mb-4 text-[#2A5C82]">Activity Log</h3>
<div class="space-y-4">
<div class="flex items-start">
<div class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3 mt-1">
<i class="fas fa-user-shield"></i>
</div>
<div>
<p class="font-medium">Assigned to Roads Department</p>
<p class="text-sm text-gray-500">Today at 09:24 AM by Officer Mkhize</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-[#2A5C82] text-white py-12 px-4 md:px-8">
<div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<div class="flex items-center mb-4">
<div class="bg-white text-[#2A5C82] font-bold text-xl py-2 px-3 rounded-lg mr-3">QF</div>
<span class="text-xl font-bold">QuickFixSA</span>
</div>
<p class="text-gray-300 mb-4">Empowering communities through civic engagement.</p>
<div class="flex space-x-4">
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-instagram"></i></a>
</div>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Quick Links</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-300 hover:text-white">Home</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">Report Issue</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">My Dashboard</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">How It Works</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Resources</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-300 hover:text-white">Help Center</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">Municipal Contacts</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">Community Guidelines</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">FAQ</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Contact Us</h4>
<ul class="space-y-2">
<li class="flex items-start">
<i class="fas fa-envelope mt-1 mr-3 text-gray-300"></i>
<span>support@quickfixsa.co.za</span>
</li>
<li class="flex items-start">
<i class="fas fa-phone mt-1 mr-3 text-gray-300"></i>
<span>+27 11 123 4567</span>
</li>
<li class="flex items-start">
<i class="fas fa-map-marker-alt mt-1 mr-3 text-gray-300"></i>
<span>Johannesburg, South Africa</span>
</li>
</ul>
</div>
</div>
<div class="max-w-7xl mx-auto mt-12 pt-6 border-t border-gray-700 text-center text-gray-400">
<p>&copy; 2023 QuickFixSA. All rights reserved. | Privacy Policy | Terms of Service</p>
</div>
</footer>
<script>
// Mobile Menu Toggle
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
const mobileMenu = document.getElementById('mobile-menu');
mobileMenuBtn.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
// Scroll Shrink Navigation
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
navbar.classList.add('shrink');
} else {
navbar.classList.remove('shrink');
}
});
// Dark Mode Toggle
const darkModeToggle = document.getElementById('dark-mode-toggle');
darkModeToggle.addEventListener('click', () => {
document.body.classList.toggle('dark-mode');
});
// Report Modal
const reportBtn = document.getElementById('report-btn');
const reportModal = document.getElementById('report-modal');
const closeModal = document.getElementById('close-modal');
reportBtn.addEventListener('click', () => {
reportModal.classList.remove('hidden');
reportModal.classList.add('flex');
});
closeModal.addEventListener('click', () => {
reportModal.classList.add('hidden');
reportModal.classList.remove('flex');
});
// Login Modal
const loginBtn = document.getElementById('login-btn');
const loginModal = document.getElementById('login-modal');
loginBtn.addEventListener('click', () => {
loginModal.classList.remove('hidden');
loginModal.classList.add('flex');
});
// Close modals when clicking outside
window.addEventListener('click', (e) => {
if (e.target === reportModal) {
reportModal.classList.add('hidden');
reportModal.classList.remove('flex');
}
if (e.target === loginModal) {
loginModal.classList.add('hidden');
loginModal.classList.remove('flex');
}
});
// Category Selection
const categoryBtns = document.querySelectorAll('.category-btn');
const categoryInput = document.getElementById('category-input');
categoryBtns.forEach(btn => {
btn.addEventListener('click', () => {
// Remove active class from all buttons
categoryBtns.forEach(b => b.classList.remove('bg-[#2A5C82]', 'text-white'));
// Add active class to clicked button
btn.classList.add('bg-[#2A5C82]', 'text-white');
// Set the hidden input value
categoryInput.value = btn.dataset.category;
});
});
// Priority Selection
const priorityBtns = document.querySelectorAll('.priority-btn');
const priorityInput = document.getElementById('priority-input');
priorityBtns.forEach(btn => {
btn.addEventListener('click', () => {
// Remove active class from all buttons
priorityBtns.forEach(b => b.classList.remove('ring-2', 'ring-[#2A5C82]'));
// Add active class to clicked button
btn.classList.add('ring-2', 'ring-[#2A5C82]');
// Set the hidden input value
priorityInput.value = btn.dataset.priority;
});
});
// Drag and drop file upload
const dropArea = document.getElementById('drop-area');
const fileList = document.getElementById('file-list');
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
dropArea.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, unhighlight, false);
});
function highlight() {
dropArea.classList.add('active');
}
function unhighlight() {
dropArea.classList.remove('active');
}
dropArea.addEventListener('drop', handleDrop, false);
function handleDrop(e) {
const dt = e.dataTransfer;
const files = dt.files;
handleFiles(files);
}
function handleFiles(files) {
for (let i = 0; i < files.length; i++) {
const file = files[i];
if (file.type.startsWith('image/') || file.type.startsWith('video/')) {
previewFile(file);
}
}
}
function previewFile(file) {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onloadend = function() {
const preview = document.createElement('div');
preview.className = 'relative';
if (file.type.startsWith('image/')) {
preview.innerHTML = `
<img src="${reader.result}" alt="Preview" class="w-full h-32 object-cover rounded-lg">
<button class="absolute top-1 right-1 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center">
<i class="fas fa-times text-xs"></i>
</button>
`;
} else {
preview.innerHTML = `
<video controls class="w-full h-32 object-cover rounded-lg">
<source src="${reader.result}" type="${file.type}">
</video>
<button class="absolute top-1 right-1 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center">
<i class="fas fa-times text-xs"></i>
</button>
`;
}
fileList.appendChild(preview);
// Add remove functionality
const removeBtn = preview.querySelector('button');
removeBtn.addEventListener('click', () => {
preview.remove();
});
};
}
// Password visibility toggle
const togglePassword = document.getElementById('toggle-password');
const passwordInput = document.getElementById('password-input');
togglePassword.addEventListener('click', () => {
const isPassword = passwordInput.type === 'password';
passwordInput.type = isPassword ? 'text' : 'password';
togglePassword.innerHTML = isPassword ? '<i class="far fa-eye-slash"></i>' : '<i class="far fa-eye"></i>';
});
// Password strength meter
passwordInput.addEventListener('input', () => {
const strengthMeter = document.getElementById('password-strength');
const meter = document.getElementById('strength-meter');
if(passwordInput.value.length > 0) {
strengthMeter.classList.remove('hidden');
// Simple strength calculation
const strength = Math.min(100, passwordInput.value.length * 5);
meter.style.width = `${strength}%`;
if(strength < 40) {
meter.className = 'h-full bg-red-500';
} else if(strength < 70) {
meter.className = 'h-full bg-yellow-500';
} else {
meter.className = 'h-full bg-green-500';
}
} else {
strengthMeter.classList.add('hidden');
}
});
// Form validation
const forms = document.querySelectorAll('form');
forms.forEach(form => {
form.addEventListener('submit', function(e) {
let isValid = true;
// Check required fields
this.querySelectorAll('[required]').forEach(field => {
if(!field.value.trim()) {
field.classList.add('border-red-500');
isValid = false;
} else {
field.classList.remove('border-red-500');
// Email validation
if(field.type === 'email' && !/^\S+@\S+\.\S+$/.test(field.value)) {
field.classList.add('border-red-500');
isValid = false;
}
}
});
if(!isValid) {
e.preventDefault();
alert('Please fill in all required fields correctly.');
}
});
});
// Form submission
const issueForm = document.getElementById('issue-form');
issueForm.addEventListener('submit', (e) => {
e.preventDefault();
alert('Issue report submitted successfully!');
reportModal.classList.add('hidden');
reportModal.classList.remove('flex');
issueForm.reset();
fileList.innerHTML = '';
});
const loginForm = document.getElementById('login-form');
loginForm.addEventListener('submit', (e) => {
e.preventDefault();
alert('Login successful! Redirecting to dashboard...');
loginModal.classList.add('hidden');
loginModal.classList.remove('flex');
});
// Initialize scroll behavior
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=RebelofSleep/e" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>