Overview
Ficha Dubai is built with a mobile-first responsive design strategy, ensuring optimal viewing and interaction across all device sizes from smartphones to large desktop displays.Viewport Configuration
The application uses proper viewport meta tags for mobile optimization:index.html:5
This meta tag ensures the layout scales correctly on mobile devices and prevents unwanted zooming.
Responsive Thumbnail System
The gallery dynamically adjusts the number of thumbnails displayed based on screen width:app.js:31-33
Mobile (< 768px)
4 thumbnails per page
Desktop (≥ 768px)
8 thumbnails per page
Handling Window Resize
The application listens for window resize events and adjusts the gallery:app.js:380-387
Tailwind CSS Breakpoints
The project uses Tailwind CSS’s responsive utilities with these breakpoints:| Breakpoint | Min Width | Prefix |
|---|---|---|
| Mobile | < 640px | (default) |
| Small | 640px | sm: |
| Medium | 768px | md: |
| Large | 1024px | lg: |
| Extra Large | 1280px | xl: |
| 2X Large | 1536px | 2xl: |
Responsive Grid Layouts
Main Content Grid
The page uses a responsive two-column layout:index.html:96-228
Layout behavior:
- Mobile/Tablet (
< 1024px): Single column, sidebar appears below content - Desktop (
≥ 1024px): 8/4 column split with sticky sidebar
Gallery Thumbnails Grid
index.html:129
Grid columns:
- Mobile: 4 columns
- Desktop (
md:): 8 columns
Details Grid
index.html:140
Layout:
- Mobile: Stacked vertically
- Tablet/Desktop (
md:): Two-column side-by-side
Responsive Typography
Typography scales with viewport size using Tailwind utilities:Property Title
index.html:78
- Mobile:
text-4xl(2.25rem / 36px) - Desktop:
text-5xl(3rem / 48px)
Price Display
index.html:87
Consistent size across all devices for prominence
Responsive Components
Header Layout
index.html:75-90
Behavior:
- Mobile: Vertical stack
- Desktop: Horizontal flex with space-between
Lightbox Controls
index.html:248-250
Sizing:
- Mobile:
p-3,text-2xlicons - Desktop:
p-4,text-3xlicons
Lightbox Image
index.html:254-256
Max heights:
- Mobile: 65vh/70vh container
- Desktop: 70vh/75vh container
Lightbox Thumbnails
app.js:118
Thumbnail size:
- Mobile: 48×48px (
w-12 h-12) - Desktop: 56×56px (
w-14 h-14)
Container Constraints
The main content container limits maximum width:index.html:95
Horizontal padding:
- Mobile/Tablet:
px-6(1.5rem) - Desktop:
px-12(3rem)
7xl = 80rem (1280px)
Responsive Images
Gallery Main Image
index.html:101-102
Aspect ratio: Fixed 16:9 ratio maintains consistent gallery height
Object fit: object-cover ensures images fill the container without distortion
Thumbnail Images
app.js:300
Aspect ratio: Square (1:1) for uniform thumbnail grid
Responsive Spacing
The application uses consistent spacing scales:Mobile-First CSS
Custom styles instyles.css follow mobile-first principles:
styles.css:27-329
Base styles apply to all devices, with media queries adding complexity for larger screens.
Touch Optimization
Interactive elements use appropriate sizing for touch targets:Gallery Navigation Buttons
index.html:126-128
Touch target: Icon + padding creates minimum 44×44px touch area (accessibility guideline)
Performance Considerations
Lazy Loading
Lazy Loading
The map iframe uses Code location:
loading="lazy" to defer loading until needed:app.js:558Deferred Scripts
Deferred Scripts
JavaScript loads with Code location:
defer attribute for non-blocking page rendering:index.html:277Optimized Images
Optimized Images
All images use
object-cover or object-contain for efficient rendering without layout shifts.Responsive Design Patterns
Testing Breakpoints
Test the application at these key widths:| Device Type | Width | Key Changes |
|---|---|---|
| Mobile | 375px | 4 thumbnails, single column layout |
| Mobile Large | 414px | Same as mobile |
| Tablet | 768px | 8 thumbnails, larger icons |
| Desktop | 1024px | Two-column layout with sticky sidebar |
| Large Desktop | 1280px | Maximum content width reached |
Related Features
- Image Gallery - Responsive thumbnail pagination
- Lightbox - Adaptive full-screen viewer
- Dark Mode - Theme switching across all breakpoints