diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..79ca6b5 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,172 @@ +/* + * Verified Local Directory - Custom Stylesheet + * Palette: + * - Primary Accent: #2E7D32 + * - Secondary Accent: #4CAF50 + * - Background: #1B262C + * - Surface: #223038 + * - Text: #F0F0F0 + */ + +body { + background-color: #1B262C; + color: #F0F0F0; + font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif; +} + +a { + color: #4CAF50; +} + +a:hover { + color: #66bb6a; +} + +.navbar { + background-color: #223038; +} + +.hero-section { + padding: 100px 0; + text-align: center; + background: linear-gradient(rgba(46, 125, 50, 0.1), transparent); +} + +.hero-section h1 { + font-size: 3.5rem; + font-weight: 700; + margin-bottom: 30px; +} + +.search-bar { + max-width: 600px; + margin: auto; +} + +.search-bar .form-control { + height: 58px; + border-radius: 30px; + padding-left: 25px; + border: none; +} + +.search-bar .btn { + height: 58px; + border-radius: 30px; + padding: 0 30px; + background-color: #2E7D32; + color: #fff; + border: none; +} + +.search-bar .btn:hover { + background-color: #388e3c; +} + +.categories-section { + padding: 60px 0; +} + +.category-card { + background-color: #223038; + border-radius: 8px; + text-align: center; + padding: 30px 20px; + transition: transform 0.3s ease, box-shadow 0.3s ease; + border: 1px solid transparent; +} + +.category-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 20px rgba(0,0,0,0.2); + border-color: #2E7D32; +} + +.category-card .icon { + font-size: 3rem; + color: #4CAF50; + margin-bottom: 15px; +} + +.category-card h5 { + font-size: 1.25rem; + margin: 0; + color: #F0F0F0; +} + +.footer { + padding: 20px 0; + background-color: #223038; + text-align: center; + margin-top: 40px; +} + +/* Search Results Page */ +.search-results-section { + padding: 60px 0; + background-color: #1B262C; + color: #F0F0F0; + min-height: 80vh; +} + +.listing-card { + background-color: #223038; + border: 1px solid #3c4d58; + border-radius: 8px; + transition: transform 0.3s, box-shadow 0.3s; + height: 100%; + display: flex; + flex-direction: column; +} + +.listing-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); +} + +.listing-card .card-body { + padding: 1.5rem; + flex-grow: 1; +} + +.listing-card .card-title { + color: #F0F0F0; + font-weight: 700; +} + +.listing-card .card-subtitle { + color: #a0b3c1; +} + +.listing-card ul { + padding-left: 0; + list-style: none; + margin-top: 1rem; +} + +.listing-card ul li { + margin-bottom: 0.5rem; + color: #a0b3c1; + display: flex; + align-items: center; +} + +.listing-card ul i { + color: #4CAF50; + margin-right: 0.75rem; + font-size: 1.2rem; +} + +.listing-card a { + color: #66bb6a; + text-decoration: none; + transition: color 0.3s; +} + +.listing-card a:hover { + color: #ffffff; +} \ No newline at end of file diff --git a/assets/images/no_results.svg b/assets/images/no_results.svg new file mode 100644 index 0000000..082065a --- /dev/null +++ b/assets/images/no_results.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/db/migrations/001_create_listings_table.sql b/db/migrations/001_create_listings_table.sql new file mode 100644 index 0000000..76541c3 --- /dev/null +++ b/db/migrations/001_create_listings_table.sql @@ -0,0 +1,21 @@ + +CREATE TABLE IF NOT EXISTS listings ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + description TEXT, + category VARCHAR(100), + address VARCHAR(255), + phone VARCHAR(20), + website VARCHAR(255), + is_verified BOOLEAN DEFAULT FALSE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +-- Insert sample data +INSERT INTO listings (name, description, category, address, phone, website, is_verified) VALUES +('Green Leaf Cafe', 'A cozy cafe with organic coffee and homemade pastries.', 'Restaurants', '123 Main St, Anytown, USA', '555-1234', 'http://greenleafcafe.com', TRUE), +('QuickFix Plumbers', '24/7 emergency plumbing services.', 'Plumbers', '456 Oak Ave, Anytown, USA', '555-5678', 'http://quickfixplumbers.com', TRUE), +('The Cutting Edge', 'Modern hair salon for men and women.', 'Salons', '789 Pine Ln, Anytown, USA', '555-9012', 'http://thecuttingedge.com', FALSE), +('AutoCare Experts', 'Complete auto repair and maintenance services.', 'Auto Repair', '101 Maple Dr, Anytown, USA', '555-3456', 'http://autocareexperts.com', TRUE), +('Paws & Claws', 'Veterinary clinic and pet supply store.', 'Veterinarians', '212 Birch Rd, Anytown, USA', '555-7890', 'http://pawsandclaws.com', TRUE), +('Builder Bros.', 'Residential and commercial construction services.', 'Construction', '333 Elm St, Anytown, USA', '555-2345', 'http://builderbros.com', FALSE); diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..c371265 --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..02bbbb3 --- /dev/null +++ b/includes/header.php @@ -0,0 +1,50 @@ + + + + + + + <?php echo $projectName; ?> - Find Trusted Local Businesses + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.php b/index.php index 7205f3d..ccab51f 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,52 @@ - -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); -?> - - - - - - New Style - - - - - - - - - - - - - - - - - - - - - -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- - - + +
+
+
+
+

Find Trusted Local Services

+

Your one-stop directory for vetted and verified local businesses.

+ +
+
+
+
+ + +
+
+

Browse Categories

+
+ 'Restaurants', 'icon' => 'bi-cup-hot-fill'], + ['name' => 'Plumbers', 'icon' => 'bi-wrench-adjustable-circle-fill'], + ['name' => 'Salons', 'icon' => 'bi-scissors'], + ['name' => 'Auto Repair', 'icon' => 'bi-car-front-fill'], + ['name' => 'Home Services', 'icon' => 'bi-house-heart-fill'], + ['name' => 'Pet Grooming', 'icon' => 'bi-heart-pulse-fill'], // Using a different icon as a placeholder + ]; + foreach ($categories as $category): + ?> + + +
+
+
+ + \ No newline at end of file diff --git a/search.php b/search.php new file mode 100644 index 0000000..43cbd8d --- /dev/null +++ b/search.php @@ -0,0 +1,86 @@ +prepare( + 'SELECT * FROM listings WHERE (name LIKE :query OR description LIKE :query OR category LIKE :query) AND is_verified = 1' + ); + $stmt->bindValue(':query', '%' . $query . '%'); + $stmt->execute(); + $results = $stmt->fetchAll(); + } catch (PDOException $e) { + // In a real application, log this error instead of displaying it. + error_log('Search query failed: ' . $e->getMessage()); + // Optionally, set a user-friendly error message. + $error_message = "Sorry, we couldn't perform the search at this time. Please try again later."; + } +} +?> + +
+
+

Search Results

+ +
+
+ +
+
+ + +
+ +
+ + 0): ?> +

Found verified listing(s) matching your search.

+
+ +
+
+
+
+
+

+ +
+
+
+ +
+ +
+ No Results Found +

No Verified Listings Found

+

We couldn't find any verified businesses matching "".

+

Try searching for something else or browse our categories.

+
+ + +
+
+ +