Flight HTML
Flight HTML
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SkyBook India - Premium Flight Booking</title>
<script src="[Link]
<style>
@import url('[Link]
family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(-45deg, #0f172a, #1e293b, #0f172a,
#334155);
background-size: 400% 400%;
animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.seat {
transition: all 0.2s ease;
}
.seat-available:hover {
transform: scale(1.1);
background-color: #166534;
}
.seat-selected {
background-color: #16a34a;
transform: scale(1.05);
}
.seat-occupied {
background-color: #dc2626;
cursor: not-allowed;
}
.flight-card {
transition: all 0.3s ease;
background: rgba(30, 41, 59, 0.8);
backdrop-filter: blur(10px);
border: 1px solid rgba(34, 197, 94, 0.2);
}
.flight-card:hover {
transform: translateY(-4px);
box-shadow: 0 25px 50px -12px rgba(34, 197, 94, 0.25);
border-color: rgba(34, 197, 94, 0.4);
}
.tab-active {
background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
color: white;
}
.gradient-bg {
background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
}
.luxury-card {
background: rgba(30, 41, 59, 0.9);
backdrop-filter: blur(15px);
border: 1px solid rgba(34, 197, 94, 0.3);
}
.animate-fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.city-option {
transition: all 0.2s ease;
}
.city-option:hover {
background: rgba(34, 197, 94, 0.1);
border-left: 3px solid #22c55e;
}
.floating-particles {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1;
}
.particle {
position: absolute;
background: rgba(34, 197, 94, 0.1);
border-radius: 50%;
animation: float 20s infinite linear;
}
@keyframes float {
0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
</style>
</head>
<body class="text-white min-h-screen">
<!-- Floating Particles Background -->
<div class="floating-particles" id="particles"></div>
<!-- Header -->
<header class="luxury-card shadow-2xl relative z-10">
<div class="container mx-auto px-4 py-6">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-12 h-12 gradient-bg rounded-full flex items-
center justify-center shadow-lg">
<span class="text-white font-bold text-xl">✈</span>
</div>
<div>
<h1 class="text-3xl font-bold bg-gradient-to-r from-green-
400 to-green-600 bg-clip-text text-transparent">SkyBook India</h1>
<p class="text-green-400 text-sm">Premium Flight
Experience</p>
</div>
</div>
<nav class="hidden md:flex space-x-8">
<a href="#" class="hover:text-green-400 transition-colors font-
medium">Flights</a>
<a href="#" class="hover:text-green-400 transition-colors font-
medium">Hotels</a>
<a href="#" class="hover:text-green-400 transition-colors font-
medium">Cars</a>
<a href="#" class="hover:text-green-400 transition-colors font-
medium">My Trips</a>
</nav>
<button class="gradient-bg text-white px-6 py-3 rounded-xl font-
medium hover:shadow-lg transition-all">
Sign In
</button>
</div>
</div>
</header>
<div class="lg:col-span-1">
<label class="block text-sm font-medium text-green-400 mb-
3">To</label>
<div class="relative">
<input type="text" id="to-input" placeholder="Select
destination city"
class="w-full p-4 bg-gray-800 border border-gray-600
rounded-xl focus:ring-2 focus:ring-green-500 focus:border-transparent text-white
placeholder-gray-400">
<div id="to-dropdown" class="absolute z-20 w-full bg-gray-
800 border border-gray-600 rounded-xl mt-2 hidden shadow-2xl max-h-64 overflow-y-
auto">
<!-- Cities will be populated here -->
</div>
</div>
</div>
<div class="lg:col-span-1">
<label class="block text-sm font-medium text-green-400 mb-
3">Departure</label>
<input type="date" id="departure-date" class="w-full p-4 bg-
gray-800 border border-gray-600 rounded-xl focus:ring-2 focus:ring-green-500
focus:border-transparent text-white">
</div>
<div class="lg:col-span-1">
<label class="block text-sm font-medium text-green-400 mb-
3">Passengers</label>
<div class="relative">
<button onclick="togglePassengerDropdown()" class="w-full
p-4 bg-gray-800 border border-gray-600 rounded-xl text-left focus:ring-2
focus:ring-green-500 focus:border-transparent text-white">
<span id="passenger-display">1 Adult, Economy</span>
</button>
<div id="passenger-dropdown" class="absolute z-30 w-full
bg-gray-800 border border-gray-600 rounded-xl mt-2 p-6 hidden shadow-2xl">
<div class="space-y-4">
<div class="flex justify-between items-center">
<span class="text-white">Adults</span>
<div class="flex items-center space-x-3">
<button onclick="changePassenger('adults',
-1)" class="w-10 h-10 bg-gray-700 hover:bg-green-600 rounded-full text-white
transition-colors">-</button>
<span id="adults-count" class="text-white
font-medium w-8 text-center">1</span>
<button onclick="changePassenger('adults',
1)" class="w-10 h-10 gradient-bg rounded-full text-white transition-all
hover:shadow-lg">+</button>
</div>
</div>
<div class="flex justify-between items-center">
<span class="text-white">Children</span>
<div class="flex items-center space-x-3">
<button
onclick="changePassenger('children', -1)" class="w-10 h-10 bg-gray-700 hover:bg-
green-600 rounded-full text-white transition-colors">-</button>
<span id="children-count" class="text-white
font-medium w-8 text-center">0</span>
<button
onclick="changePassenger('children', 1)" class="w-10 h-10 gradient-bg rounded-full
text-white transition-all hover:shadow-lg">+</button>
</div>
</div>
<div class="border-t border-gray-600 pt-4">
<label class="block text-sm font-medium text-
green-400 mb-2">Class</label>
<select id="class-select" class="w-full p-3 bg-
gray-700 border border-gray-600 rounded-xl text-white">
<option value="economy">Economy</option>
<option value="premium">Premium
Economy</option>
<option value="business">Business</option>
<option value="first">First Class</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="p-8">
<div class="flex justify-center mb-8">
<div class="flex space-x-8 text-sm">
<div class="flex items-center">
<div class="w-5 h-5 bg-gray-600 rounded
mr-3"></div>
<span class="text-gray-300">Available</span>
</div>
<div class="flex items-center">
<div class="w-5 h-5 bg-green-500 rounded
mr-3"></div>
<span class="text-gray-300">Selected</span>
</div>
<div class="flex items-center">
<div class="w-5 h-5 bg-red-500 rounded mr-3"></div>
<span class="text-gray-300">Occupied</span>
</div>
</div>
</div>
<!-- Airplane Seat Map -->
<div class="max-w-md mx-auto">
<div class="bg-gradient-to-r from-green-800 to-green-600
rounded-t-full p-6 text-center text-white mb-6">
<span class="text-lg font-semibold">First Class</span>
</div>
<script>
// Global state
let currentTripType = 'roundtrip';
let passengers = { adults: 1, children: 0 };
let selectedClass = 'economy';
let selectedSeats = [];
let currentFlight = null;
[Link]('departure-date').value =
[Link]().split('T')[0];
[Link]('return-date').value =
[Link]().split('T')[0];
function createFloatingParticles() {
const particlesContainer = [Link]('particles');
for (let i = 0; i < 20; i++) {
const particle = [Link]('div');
[Link] = 'particle';
[Link] = [Link]() * 100 + '%';
[Link] = [Link] = [Link]() * 4 +
2 + 'px';
[Link] = [Link]() * 20 + 's';
[Link] = ([Link]() * 10 + 15) + 's';
[Link](particle);
}
}
function populateCityDropdowns() {
const fromDropdown = [Link]('from-dropdown');
const toDropdown = [Link]('to-dropdown');
[Link](type + '-tab').[Link]('tab-active');
[Link](type + '-tab').[Link]('text-gray-
300', 'hover:bg-gray-700');
// Show/hide return date
const returnContainer = [Link]('return-date-
container');
if (type === 'oneway') {
[Link] = 'none';
} else {
[Link] = 'block';
}
}
// Airport selection
function selectAirport(field, airport) {
[Link](field + '-input').value = airport;
[Link](field + '-dropdown').[Link]('hidden');
}
[Link]('to-input').addEventListener('focus', function() {
[Link]('to-dropdown').[Link]('hidden');
});
// Passenger dropdown
function togglePassengerDropdown() {
const dropdown = [Link]('passenger-dropdown');
[Link]('hidden');
}
[Link](type + '-count').textContent =
passengers[type];
updatePassengerDisplay();
}
function updatePassengerDisplay() {
selectedClass = [Link]('class-select').value;
const total = [Link] + [Link];
const classText = [Link](0).toUpperCase() +
[Link](1);
[Link]('passenger-display').textContent = text;
}
// Search flights
function searchFlights() {
const from = [Link]('from-input').value;
const to = [Link]('to-input').value;
const departure = [Link]('departure-date').value;
// Scroll to results
[Link]('search-results').scrollIntoView({ behavior:
'smooth' });
}
function generateFlightResults() {
const flightList = [Link]('flight-list');
const fromCity = [Link]('from-input').[Link]('
(')[0];
const toCity = [Link]('to-input').[Link](' (')
[0];
const flights = [
{
id: 1,
airline: 'Air India',
flightNumber: 'AI123',
departure: '08:30',
arrival: '11:45',
duration: '3h 15m',
stops: 'Non-stop',
price: 8999,
aircraft: 'Boeing 737',
logo: '🇮🇳'
},
{
id: 2,
airline: 'IndiGo',
flightNumber: '6E456',
departure: '14:20',
arrival: '17:55',
duration: '3h 35m',
stops: 'Non-stop',
price: 7499,
aircraft: 'Airbus A320',
logo: '💙'
},
{
id: 3,
airline: 'Vistara',
flightNumber: 'UK789',
departure: '19:15',
arrival: '22:30',
duration: '3h 15m',
stops: 'Non-stop',
price: 12999,
aircraft: 'Boeing 787',
logo: '✈️
'
},
{
id: 4,
airline: 'SpiceJet',
flightNumber: 'SG321',
departure: '06:45',
arrival: '12:20',
duration: '5h 35m',
stops: '1 stop in Pune',
price: 5999,
aircraft: 'Boeing 737',
logo: ''
}
];
function selectFlight(flightId) {
currentFlight = flightId;
[Link]('seat-modal').[Link]('hidden');
}
function closeSeatModal() {
[Link]('seat-modal').[Link]('hidden');
selectedSeats = [];
updateSeatDisplay();
}
function generateSeatMap() {
// Generate First Class (2 rows, 2-2 configuration)
const firstClassContainer = [Link]('first-class-
seats');
[Link] = '';
for (let row = 1; row <= 2; row++) {
const rowDiv = [Link]('div');
[Link] = 'flex justify-center space-x-6';
[Link] = `
<div class="flex space-x-2">
${generateSeat(row, 'A', 'first', 5000)}
${generateSeat(row, 'B', 'first', 5000)}
</div>
<div class="w-12"></div>
<div class="flex space-x-2">
${generateSeat(row, 'C', 'first', 5000)}
${generateSeat(row, 'D', 'first', 5000)}
</div>
`;
[Link](rowDiv);
}
return `
<button
id="seat-${seatId}"
class="${seatClassNames} w-10 h-10 bg-gray-600 rounded-lg text-
xs font-medium hover:bg-green-600 hover:text-white transition-all text-white"
onclick="toggleSeat('${seatId}', '${seatClass}', ${extraCost})"
${isOccupied ? 'disabled' : ''}
title="Seat ${seatId} - ${seatClass} ${extraCost > 0 ? '+₹' +
extraCost : ''}"
>
${seatId}
</button>
`;
}
updateSeatDisplay();
}
function updateSeatDisplay() {
const display = [Link]('selected-seats-display');
const total = [Link]('seat-total');
if ([Link] === 0) {
[Link] = 'None';
[Link] = '0';
} else {
[Link] = [Link](seat => [Link]).join(',
');
const totalCost = [Link]((sum, seat) => sum +
[Link], 0);
[Link] = [Link]('en-IN');
}
}
function confirmSeats() {
if ([Link] === 0) {
alert('Please select at least one seat.');
return;
}
function showBookingConfirmation() {
// Populate booking details
const departureDate = [Link]('departure-date').value;
const formattedDate = new Date(departureDate).toLocaleDateString('en-
IN', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
});
[Link]('booking-date').textContent = formattedDate;
[Link]('booking-route').textContent = `${fromCity} → $
{toCity}`;
[Link]('booking-passengers').textContent =
[Link]('passenger-display').textContent;
[Link]('booking-seats').textContent =
[Link](seat => [Link]).join(', ');
[Link]('booking-total').textContent =
[Link]('en-IN');
// Show modal
[Link]('booking-modal').[Link]('hidden');
}
function closeBookingModal() {
[Link]('booking-modal').[Link]('hidden');
}
function downloadTicket() {
// Create a simple text-based ticket
const ticketContent = `
SKYBOOK INDIA - E-TICKET
========================