Skip to content

Commit 6087039

Browse files
committed
fix: remove snap from desktop and add to mobile
1 parent 8229005 commit 6087039

File tree

3 files changed

+17
-23
lines changed

3 files changed

+17
-23
lines changed

apps/website/src/components/vibe-code-mvp/HowItWorks.astro

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ const images = import.meta.glob<{ default: ImageMetadata }>(
2828
---
2929

3030
<Section
31-
className="!py-18 md:!py-31 overflow-unset !px-0 "
31+
className="!py-18 md:!py-31 overflow-unset !px-0"
3232
contentClassName={classnames(
3333
grid_classes,
3434
"!gap-y-7 items-start pl-4.5 md:pl-7 lg:px-7",
3535
)}
3636
>
37-
<div class="col-span-6 md:col-span-12 lg:col-span-6 lg:sticky">
37+
<div class="col-span-6 md:col-span-12 lg:col-span-6 lg:sticky lg:top-24">
3838
<div class="flex flex-col gap-4">
3939
<Pill
4040
className="text-sm sm:text-base md:text-lg px-2 py-1 min-[390px]:px-3 min-[390px]:py-1.5 sm:px-4 sm:py-2 max-h-[36px]"
@@ -115,18 +115,13 @@ const images = import.meta.glob<{ default: ImageMetadata }>(
115115
lg:col-start-7
116116
lg:flex-col
117117
lg:gap-8
118-
lg:pr-0
119-
lg:overflow-y-auto
120-
lg:snap-mandatory
121-
lg:scroll-smooth
122-
lg:snap-y
123-
lg:h-[400px]"
118+
lg:pr-0"
124119
>
125120
{
126121
steps.map((s, idx) => (
127122
<div
128123
class={classnames(
129-
"snap-center p-8 md:p-12 rounded-2xl text-white flex flex-col gap-5 min-w-[calc(100%-32px)] lg:snap-start",
124+
"snap-center p-8 md:p-12 rounded-2xl text-white flex flex-col gap-5 min-w-[calc(100%-32px)]",
130125
s.data.bgColor,
131126
)}
132127
>

apps/website/src/components/vibe-code-mvp/WhyWorkWithUs.astro

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
import { Picture } from "astro:assets";
2+
import { Image, Picture } from "astro:assets";
3+
import { getCollection } from "astro:content";
34
import team from "../../assets/team.jpg";
45
import Pill from "../../components/Pill.astro";
56
import Section from "../../components/Section.astro";
67
import { grid_classes } from "../../components/_grid";
78
import "../../styles/main.css";
8-
import { getCollection } from "astro:content";
9-
import { Image } from "astro:assets";
109
1110
const reasons = (await getCollection("vibe_code_mvp_why_work_with_us")) as {
1211
data: {
@@ -17,7 +16,7 @@ const reasons = (await getCollection("vibe_code_mvp_why_work_with_us")) as {
1716
}[];
1817
1918
const images = import.meta.glob<{ default: ImageMetadata }>(
20-
"/src/assets/*.svg"
19+
"/src/assets/*.svg",
2120
);
2221
---
2322

@@ -85,11 +84,11 @@ const images = import.meta.glob<{ default: ImageMetadata }>(
8584
`}
8685
>
8786
<div
88-
class="col-span-6 md:col-span-12 flex gap-2 overflow-x-auto no-scrollbar pr-4 md:pr-7 lg:px-0 lg:overflow-hidden"
87+
class="col-span-6 md:col-span-12 flex gap-2 overflow-x-auto no-scrollbar pr-4 md:pr-7 lg:px-0 lg:overflow-hidden snap-mandatory snap-x"
8988
>
9089
{
9190
reasons.map((r) => (
92-
<div class="bg-white/10 p-5 rounded-2xl flex flex-col gap-5 min-w-[240px] lg:flex-1 lg:min-w-auto">
91+
<div class="bg-white/10 p-5 rounded-2xl flex flex-col gap-5 min-w-[240px] lg:flex-1 lg:min-w-auto snap-center">
9392
<Image
9493
src={images[r.data.image]()}
9594
alt={r.data.imageAlt}

apps/website/src/components/vibe-code-mvp/WorkWithUsDesktop.astro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2+
import { Picture } from "astro:assets";
23
import { getCollection } from "astro:content";
3-
import Section from "../Section.astro";
44
import classnames from "classnames";
55
import Pill from "../Pill.astro";
6+
import Section from "../Section.astro";
7+
import { grid_classes } from "../_grid";
68
import CircleCheck from "../icons/CircleCheck.astro";
79
import CircleX from "../icons/CircleX.astro";
8-
import { grid_classes } from "../_grid";
9-
import { Picture } from "astro:assets";
1010
1111
const phases = (await getCollection("vibe_code_mvp_phases")) as {
1212
data: {
@@ -22,7 +22,7 @@ const phases = (await getCollection("vibe_code_mvp_phases")) as {
2222
}[];
2323
2424
const images = import.meta.glob<{ default: ImageMetadata }>(
25-
"/src/assets/*.png"
25+
"/src/assets/*.png",
2626
);
2727
2828
const listItemClasses = "flex items-center gap-2.5 text-[22px] leading-8";
@@ -33,7 +33,7 @@ const listItemClasses = "flex items-center gap-2.5 text-[22px] leading-8";
3333
contentClassName={classnames(grid_classes, "!gap-y-7 items-start")}
3434
idx="work-with-us"
3535
>
36-
<div class="col-span-6 sticky">
36+
<div class="col-span-6 sticky top-31">
3737
<div class="relative h-[700px]">
3838
{
3939
phases.map((p, idx) => (
@@ -56,7 +56,7 @@ const listItemClasses = "flex items-center gap-2.5 text-[22px] leading-8";
5656
p.data.imageBgColor,
5757
{
5858
"opacity-100": !idx,
59-
}
59+
},
6060
)}
6161
>
6262
<Picture
@@ -74,12 +74,12 @@ const listItemClasses = "flex items-center gap-2.5 text-[22px] leading-8";
7474
}
7575
</div>
7676
</div>
77-
<div class="col-span-6 col-start-7 flex flex-col gap-8 snap-mandatory snap-y overflow-y-auto h-[700px] no-scrollbar">
77+
<div class="col-span-6 col-start-7 flex flex-col gap-8">
7878
{
7979
phases.map((p, idx) => (
8080
<div
8181
data-index={idx}
82-
class="phase snap-start flex flex-col justify-center px-[80px] min-h-[700px]"
82+
class="phase flex flex-col justify-center px-[80px] min-h-[700px]"
8383
>
8484
<Pill className="text-sm sm:text-base px-4 py-2 mb-4">
8585
{p.data.pill}

0 commit comments

Comments
 (0)