Skip to content

Commit 87368bd

Browse files
committed
fix the tablet size layout, fix the bacground image position
1 parent 1e2e804 commit 87368bd

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

src/components/FAQ.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,17 @@ export function FAQ({ animated = false }: { animated?: boolean }) {
143143
}, []);
144144

145145
const content = (
146-
<div className="relative w-full pb-5">
146+
<div className="relative min-h-[82rem] w-full pb-5">
147147
{!isLoading && (
148148
<>
149-
<div className="absolute inset-0 -z-10 bg-[url('/FAQ-background.webp')] bg-cover bg-top bg-no-repeat dark:bg-[url('/FAQ-background-dark.webp')]" />
149+
<div className="absolute inset-0 -z-10 bg-[url('/FAQ-background.webp')] bg-cover bg-right bg-no-repeat dark:bg-[url('/FAQ-background-dark.webp')]" />
150150
<div className="absolute inset-0 -z-10 bg-gradient-to-b from-white via-white/10 via-[20rem] to-transparent dark:from-gray-900/10 dark:via-gray-900/10 dark:via-[50%] dark:to-gray-900" />
151151

152-
<div className="mx-auto max-w-5xl px-4 pb-16 pt-5 sm:pt-16">
152+
<div className="mx-auto max-w-2xl px-4 pb-16 pt-5 sm:pt-16 lg:max-w-5xl">
153153
<motion.h2
154154
initial={{ opacity: 0 }}
155155
animate={{ opacity: 1 }}
156-
className="mb-6 ml-4 text-left text-2xl font-bold sm:mb-10 sm:text-center md:text-3xl"
156+
className="mb-6 ml-4 text-left text-2xl font-bold sm:mb-10 sm:text-center sm:text-3xl"
157157
>
158158
<span className="block sm:inline">Frequently </span>
159159
<span className="block sm:inline">Asked Questions</span>

src/components/FlightSearch.tsx

+24-24
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,8 @@ export function FlightSearch({ className }: FlightSearchProps) {
10441044

10451045
return (
10461046
<>
1047-
<div className="z-20 text-center">
1048-
<h1 className="mb-6 ml-8 mt-24 text-left text-2xl font-bold md:mb-10 md:mt-32 md:text-center md:text-3xl">
1047+
<div className="z-20 mt-24 text-center lg:mt-32">
1048+
<h1 className="mx-auto mb-6 max-w-xl px-4 text-left text-2xl font-bold lg:mb-10 lg:max-w-6xl lg:text-center lg:text-3xl">
10491049
Find the best Ryanair deals!
10501050
</h1>
10511051
</div>
@@ -1054,22 +1054,22 @@ export function FlightSearch({ className }: FlightSearchProps) {
10541054
e.preventDefault();
10551055
handleSubmit();
10561056
}}
1057-
className="mx-auto max-w-6xl px-4"
1057+
className="mx-auto max-w-xl px-4 lg:max-w-6xl"
10581058
role="search"
10591059
aria-label="Flight search form"
10601060
>
1061-
<div className="items-left flex flex-col gap-4 text-base leading-relaxed md:items-center md:gap-6 md:text-lg">
1061+
<div className="items-left flex flex-col gap-4 text-base leading-relaxed lg:items-center lg:gap-6 lg:text-lg">
10621062
{/* Trip Type Question */}
10631063
{animationStates.tripType.question && (
10641064
<PopMotion
10651065
key="mode-section"
1066-
className="flex flex-col gap-x-2 gap-y-2 md:flex-row md:items-center md:gap-y-4"
1066+
className="flex flex-col gap-x-2 gap-y-2 lg:flex-row lg:items-center lg:gap-y-4"
10671067
aria-label="trip-type-group"
10681068
>
10691069
<QuestionBubble
10701070
question="What type of the trip you want?"
10711071
isAnswered={answeredQuestions.tripType}
1072-
className="self-start md:self-auto"
1072+
className="self-start lg:self-auto"
10731073
/>
10741074
{shouldShowValue("tripType") && (
10751075
<BaseModal
@@ -1083,7 +1083,7 @@ export function FlightSearch({ className }: FlightSearchProps) {
10831083
onChange={(value) => updateFormForTripType(value as TripType)}
10841084
placeholder="Select flight type"
10851085
aria-label="Select trip type"
1086-
className="self-end md:self-auto"
1086+
className="self-end lg:self-auto"
10871087
/>
10881088
)}
10891089
</PopMotion>
@@ -1093,15 +1093,15 @@ export function FlightSearch({ className }: FlightSearchProps) {
10931093
{shouldShowQuestion("passengers") && (
10941094
<PopMotion
10951095
key="passenger-section"
1096-
className="flex flex-col gap-x-2 gap-y-2 md:flex-row md:items-center md:gap-y-4"
1096+
className="flex flex-col gap-x-2 gap-y-2 lg:flex-row lg:items-center lg:gap-y-4"
10971097
>
10981098
<QuestionBubble
10991099
question="How many passengers?"
11001100
isAnswered={answeredQuestions.passengers}
1101-
className="min-w-[200px] self-start md:self-auto"
1101+
className="min-w-[200px] self-start lg:self-auto"
11021102
/>
11031103
{shouldShowValue("passengers") && (
1104-
<div className="self-end md:self-auto">
1104+
<div className="self-end lg:self-auto">
11051105
<PassengerModal
11061106
passengers={passengers}
11071107
onChange={handlePassengersChange}
@@ -1117,17 +1117,17 @@ export function FlightSearch({ className }: FlightSearchProps) {
11171117
{shouldShowQuestion("locations") && (
11181118
<PopMotion
11191119
key="locations-section"
1120-
className="flex flex-col gap-2 md:flex-row md:items-center"
1120+
className="flex flex-col gap-2 lg:flex-row lg:items-center"
11211121
>
11221122
<QuestionBubble
11231123
question="From where to fly?"
11241124
isAnswered={answeredQuestions.locations}
1125-
className="min-w-[200px] self-start md:self-auto"
1125+
className="min-w-[200px] self-start lg:self-auto"
11261126
/>
11271127
{shouldShowValue("locations") && (
1128-
<div className="flex flex-col items-end gap-2 self-end md:flex-row md:items-center md:self-auto">
1128+
<div className="flex flex-col items-end gap-2 self-end lg:flex-row lg:items-center lg:self-auto">
11291129
<div className="flex flex-wrap items-center justify-end gap-2">
1130-
<div className="flex items-center gap-1 md:gap-2">
1130+
<div className="flex items-center gap-1 lg:gap-2">
11311131
<span className="text-bubble-color dark:text-bubble-color"></span>
11321132
<span className="inline-block transition-all">
11331133
<MultiCombobox
@@ -1146,7 +1146,7 @@ export function FlightSearch({ className }: FlightSearchProps) {
11461146
/>
11471147
</span>
11481148
</div>
1149-
<div className="ml-1 flex items-center gap-1 md:gap-2">
1149+
<div className="ml-1 flex items-center gap-1 lg:gap-2">
11501150
<span className="text-bubble-color dark:text-bubble-color"></span>
11511151
<span className="inline-block transition-all">
11521152
<MultiCombobox
@@ -1179,15 +1179,15 @@ export function FlightSearch({ className }: FlightSearchProps) {
11791179
{shouldShowQuestion("dates") && (
11801180
<PopMotion
11811181
key="dates-section"
1182-
className="flex flex-col gap-2 md:flex-row md:items-center"
1182+
className="flex flex-col gap-2 lg:flex-row lg:items-center"
11831183
>
11841184
<QuestionBubble
11851185
question="What is your search window?"
11861186
isAnswered={answeredQuestions.dates}
1187-
className="min-w-[200px] self-start md:self-auto"
1187+
className="min-w-[200px] self-start lg:self-auto"
11881188
/>
11891189
{shouldShowValue("dates") && (
1190-
<div className="self-end md:self-auto">
1190+
<div className="self-end lg:self-auto">
11911191
{tripType === "weekend" || tripType === "longWeekend" ? (
11921192
<NumberModal
11931193
value={weekendCount}
@@ -1216,15 +1216,15 @@ export function FlightSearch({ className }: FlightSearchProps) {
12161216
{tripType === "return" && shouldShowQuestion("duration") && (
12171217
<PopMotion
12181218
key="duration-section"
1219-
className="flex flex-col gap-2 md:flex-row md:items-center"
1219+
className="flex flex-col gap-2 lg:flex-row lg:items-center"
12201220
>
12211221
<QuestionBubble
12221222
question="How long is the trip?"
12231223
isAnswered={answeredQuestions.duration}
1224-
className="min-w-[200px] self-start md:self-auto"
1224+
className="min-w-[200px] self-start lg:self-auto"
12251225
/>
12261226
{shouldShowValue("duration") && (
1227-
<div className="flex items-center gap-2 self-end md:self-auto">
1227+
<div className="flex items-center gap-2 self-end lg:self-auto">
12281228
<NumberModal
12291229
value={minDays}
12301230
onChange={(value) => handleDurationChange(value, maxDays)}
@@ -1257,15 +1257,15 @@ export function FlightSearch({ className }: FlightSearchProps) {
12571257
{shouldShowQuestion("budget") && (
12581258
<PopMotion
12591259
key="budget-section"
1260-
className="flex flex-col gap-2 md:flex-row md:items-center"
1260+
className="flex flex-col gap-2 lg:flex-row lg:items-center"
12611261
>
12621262
<QuestionBubble
12631263
question="What is the trip budget?"
12641264
isAnswered={answeredQuestions.budget}
1265-
className="min-w-[200px] self-start md:self-auto"
1265+
className="min-w-[200px] self-start lg:self-auto"
12661266
/>
12671267
{shouldShowValue("budget") && (
1268-
<div className="self-end md:self-auto">
1268+
<div className="self-end lg:self-auto">
12691269
<PriceModal
12701270
value={maxPrice}
12711271
onChange={handleBudgetChange}

0 commit comments

Comments
 (0)