index.html
Copy Code
<!--
SYNTAXIS_CHALLENGE
slug: real-estate-platform
title: Real Estate Property Platform
difficulty: ADVANCED
technologies: HTML, CSS, JavaScript
suggested_tier: PRO
description: Create a premium real estate marketplace with Buy/Rent mode toggle, dynamic bedroom and price range filters, architectural property cards, interactive inspection modal, and simulated property map grid.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>Syntaxis Challenge 44: Real Estate Property Platform</title>
<link href="css/styles.css" rel="stylesheet"/></head>
<body>
<!-- Top Navigation -->
<header class="nav-header">
<div class="nav-inner">
<a class="logo-group" href="#">
<div class="logo-box">
<svg fill="none" height="22" stroke="currentColor" stroke-width="2" viewbox="0 0 24 24" width="22"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
</div>
<div class="logo-text">
<h1>TERRA & STONE</h1>
<span>Architectural Estates</span>
</div>
</a>
<ul class="nav-links">
<li><a class="active" href="#">Discover</a></li>
<li><a href="#">Featured Developments</a></li>
<li><a href="#">Private Market</a></li>
<li><a href="#">Advisory</a></li>
</ul>
<a class="user-cta-btn" href="#contact">List Property</a>
</div>
</header>
<!-- Main Marketplace Workspace -->
<main class="page-container">
<!-- Hero Search & Dynamic Controls -->
<section class="search-card">
<div class="search-top-row">
<div class="mode-toggle-group">
<button class="mode-toggle-btn active" id="buyBtn">Buy Property</button>
<button class="mode-toggle-btn" id="rentBtn">Rent Residence</button>
</div>
<div class="quick-stats" id="resultsCount">Showing 6 verified architectural residences</div>
</div>
<div class="filter-grid">
<div class="filter-field">
<label for="cityInput">Location / District</label>
<input id="cityInput" placeholder="e.g. Aspen, Pacific Palisades, Sedona" type="text" value=""/>
</div>
<div class="filter-field">
<label for="propertyTypeSelect">Property Type</label>
<select id="propertyTypeSelect">
<option value="all">All Architectural Types</option>
<option value="Villa">Modernist Villa</option>
<option value="Penthouse">Panoramic Penthouse</option>
<option value="Chalet">Alpine Chalet</option>
<option value="Estate">Desert Sanctuary</option>
</select>
</div>
<div class="filter-field">
<label for="bedroomSelect">Bedrooms</label>
<select id="bedroomSelect">
<option value="any">Any Capacity</option>
<option value="2">2+ Bedrooms</option>
<option value="3">3+ Bedrooms</option>
<option value="4">4+ Bedrooms</option>
<option value="5">5+ Bedrooms</option>
</select>
</div>
<div class="filter-field">
<label for="maxPriceSelect">Max Price</label>
<select id="maxPriceSelect">
<option value="any">No Limit</option>
<option value="3000000">$3,000,000</option>
<option value="6000000">$6,000,000</option>
<option value="10000000">$10,000,000</option>
</select>
</div>
<button class="filter-submit-btn">
<svg fill="none" height="16" stroke="currentColor" stroke-width="2" viewbox="0 0 24 24" width="16"><circle cx="11" cy="11" r="8"></circle><path d="M21 21l-4.35-4.35"></path></svg>
Search
</button>
</div>
</section>
<!-- Marketplace Layout: Listings + Map -->
<div class="marketplace-layout">
<!-- Listings Grid Column -->
<section class="listings-column">
<div class="listings-heading-row">
<h2 id="modeHeadingTitle">Curated Properties for Sale</h2>
<span>Verified Architect Portfolios</span>
</div>
<div class="property-grid" id="propertyGrid">
<!-- Property Cards Rendered by JS -->
</div>
</section>
<!-- Map Visual Simulation Column -->
<aside class="map-sidebar-panel">
<div class="map-header">
<h3>Geographic Map View</h3>
<span>Live Pins</span>
</div>
<div class="map-visual-box" id="mapVisual">
<!-- Stylized Isometric / Topo SVG Map with pins -->
<svg height="100%" preserveaspectratio="none" viewbox="0 0 380 500" width="100%">
<!-- Background Topography Grids -->
<rect fill="#EBF4FB" height="500" width="380"></rect>
<path d="M-20 120 Q 90 80 200 130 T 400 90" fill="none" stroke="#D1E5F7" stroke-width="28"></path>
<path d="M-10 280 Q 120 220 220 300 T 410 240" fill="none" stroke="#C3DDF3" stroke-width="36"></path>
<path d="M-30 420 Q 80 380 260 440 T 420 380" fill="none" stroke="#D1E5F7" stroke-width="22"></path>
<!-- Road Networks -->
<path d="M90 -10 L 120 520" stroke="#FFFFFF" stroke-width="6"></path>
<path d="M-10 180 L 400 210" stroke="#FFFFFF" stroke-width="6"></path>
<path d="M260 -10 L 290 520" stroke="#FFFFFF" stroke-width="4"></path>
<!-- Property Map Pins -->
<g cursor="pointer" transform="translate(140, 110)">
<rect fill="#0F172A" height="24" rx="12" width="70" x="-35" y="-14"></rect>
<text fill="white" font-family="sans-serif" font-size="11" font-weight="700" text-anchor="middle" x="0" y="2">$4.85M</text>
</g>
<g cursor="pointer" transform="translate(240, 190)">
<rect fill="#0284C7" height="24" rx="12" width="70" x="-35" y="-14"></rect>
<text fill="white" font-family="sans-serif" font-size="11" font-weight="700" text-anchor="middle" x="0" y="2">$3.20M</text>
</g>
<g cursor="pointer" transform="translate(80, 260)">
<rect fill="#0F172A" height="24" rx="12" width="70" x="-35" y="-14"></rect>
<text fill="white" font-family="sans-serif" font-size="11" font-weight="700" text-anchor="middle" x="0" y="2">$6.75M</text>
</g>
<g cursor="pointer" transform="translate(190, 340)">
<rect fill="#0F172A" height="24" rx="12" width="70" x="-35" y="-14"></rect>
<text fill="white" font-family="sans-serif" font-size="11" font-weight="700" text-anchor="middle" x="0" y="2">$5.10M</text>
</g>
</svg>
</div>
</aside>
</div>
</main>
<!-- Interactive Property Modal -->
<div class="modal-overlay" id="propertyModal">
<div class="modal-card">
<button class="modal-close-btn">×</button>
<div class="modal-hero-artwork" id="modalArtwork"></div>
<div class="modal-content-body">
<div class="property-address" id="modalAddress">Location Details</div>
<h3 class="modal-title" id="modalTitle">Residence Title</h3>
<div class="modal-price" id="modalPrice">$0.00</div>
<div class="property-specs" id="modalSpecs"></div>
<p id="modalDesc"></p>
<button>Schedule Private Viewing</button>
</div>
</div>
</div>
<!-- JavaScript Implementation -->
<script src="js/script.js"></script></body>
</html>
css/styles.css
Copy Code
/* Syntaxis starter styles for: Real Estate Property Platform
Recreate the supplied Stitch reference design.
The completed Stitch CSS is intentionally excluded from this learner starter.
*/
:root {
--brand-navy: #0F172A;
--brand-accent: #0284C7;
--brand-accent-hover: #0369A1;
--text-primary: #1E293B;
--text-muted: #64748B;
--bg-main: #F8FAFC;
--bg-card: #FFFFFF;
--border-subtle: #E2E8F0;
--radius-base: 12px;
--shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.06);
--shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.12);
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* {
box-sizing: border-box;
}
html, body {
margin: 0;
min-height: 100%;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* TODO:
- Match the supplied reference design.
- Build responsive desktop and mobile states.
- Implement focus/hover/active/open/error/success states where required.
*/
js/script.js
Copy Code
// Syntaxis learner starter: real-estate-platform
// Create a premium real estate marketplace with Buy/Rent mode toggle, dynamic bedroom and price range filters, architectural property cards, interactive inspection modal, and simulated property map grid.
document.addEventListener('DOMContentLoaded', () => {
console.info('Starter ready: real-estate-platform');
// TODO:
// Implement the interactions visible in the supplied Stitch reference
// using vanilla JavaScript.
});