-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackwebb.html
180 lines (161 loc) · 5.75 KB
/
backwebb.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="again.js"></script>
<title>Your Trip Plan</title>
<style>
body {
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 40px;
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
min-height: 100vh;
color: #2c3e50;
}
.trip-plan {
max-width: 900px;
margin: 0 auto;
padding: 40px;
background-color: rgba(255, 255, 255, 0.95);
border-radius: 20px;
box-shadow: 0 15px 30px rgba(0,0,0,0.2);
backdrop-filter: blur(10px);
}
.header {
text-align: center;
margin-bottom: 40px;
}
.header h1 {
font-family: 'Playfair Display', serif;
font-size: 48px;
color: #1a2a6c;
margin: 0;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.trip-details {
background: linear-gradient(to right, #f8f9fa, #e9ecef);
padding: 30px;
border-radius: 15px;
margin: 25px 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
transition: transform 0.3s ease;
}
.trip-details:hover {
transform: translateY(-5px);
}
.day-section {
margin: 30px 0;
padding: 20px;
background: white;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.activity-card {
padding: 15px;
margin: 10px 0;
background: #f8f9fa;
border-left: 4px solid #1a2a6c;
border-radius: 4px;
}
.activity-time {
font-weight: bold;
color: #1a2a6c;
}
.budget-info {
background: linear-gradient(45deg, #2193b0, #6dd5ed);
color: white;
padding: 20px;
border-radius: 10px;
margin-top: 20px;
}
.print-btn {
background: linear-gradient(45deg, #fdbb2d, #f4b942);
color: white;
padding: 15px 30px;
border: none;
border-radius: 50px;
cursor: pointer;
margin-top: 30px;
font-size: 1.1em;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(244,185,66,0.3);
}
@media (max-width: 768px) {
body {
padding: 20px;
}
.trip-plan {
padding: 20px;
}
}
</style>
</head>
<body>
<div class="trip-plan">
<div class="header">
<h1>Your Trip Plan</h1>
</div>
<div id="tripDetails" class="trip-details">
<!-- Trip details will be populated here -->
</div>
<div id="activities">
<!-- Activities will be populated here -->
</div>
<button onclick="window.print()" class="print-btn">Print Trip Plan</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Get trip plan from session storage
const tripPlan = JSON.parse(sessionStorage.getItem('finalTripPlan'));
if (tripPlan) {
// Populate trip details
document.getElementById('tripDetails').innerHTML = `
<h2>Trip Overview</h2>
<p><strong>Main Contact:</strong> ${tripPlan.mainContact}</p>
<p><strong>Destination:</strong> ${tripPlan.destinations}</p>
<p><strong>Start Date:</strong> ${tripPlan.startDate}</p>
<p><strong>Duration:</strong> ${tripPlan.duration} days</p>
<p><strong>Number of Travelers:</strong> ${tripPlan.numTravelers}</p>
<div class="budget-info">
<h3>Budget Information</h3>
<p>Total Budget: $${tripPlan.budget}</p>
</div>
`;
// Populate activities
const activitiesContainer = document.getElementById('activities');
tripPlan.activities.forEach(day => {
const daySection = document.createElement('div');
daySection.className = 'day-section';
daySection.innerHTML = `
<h3>Day ${day.day}</h3>
<div class="activity-card">
<span class="activity-time">Morning:</span>
<p>${day.morning}</p>
</div>
<div class="activity-card">
<span class="activity-time">Afternoon:</span>
<p>${day.afternoon}</p>
</div>
<div class="activity-card">
<span class="activity-time">Evening:</span>
<p>${day.evening}</p>
</div>
<p><strong>Estimated Daily Cost:</strong> $${day.estimatedCost.toFixed(2)}</p>
`;
activitiesContainer.appendChild(daySection);
});
} else {
document.querySelector('.trip-plan').innerHTML = `
<div class="header">
<h1>No Trip Plan Found</h1>
<p>Please create a new trip plan.</p>
</div>
`;
}
});
</script>
</body>
</html>