|
1 | 1 | --- |
2 | | -import { Image } from "astro:assets"; |
3 | | -import circleCheckIcon from "../../assets/circle-check-icon.svg"; |
4 | | -import crocoderIll16 from "../../assets/crocoder-ill-16-1.png"; |
| 2 | +import { Picture } from "astro:assets"; |
| 3 | +import team from "../../assets/staff-augmentation-team.jpg"; |
| 4 | +import Pill from "../../components/Pill.astro"; |
5 | 5 | import Section from "../../components/Section.astro"; |
6 | 6 | import { grid_classes } from "../../components/_grid"; |
7 | | -import { getCollection, type CollectionEntry } from "astro:content"; |
8 | | -import type { MainContent } from "./MainContent.astro"; |
| 7 | +import "../../styles/main.css"; |
| 8 | +import { getCollection } from "astro:content"; |
| 9 | +import { Image } from "astro:assets"; |
| 10 | +
|
| 11 | +const contentVariantID = String( |
| 12 | + Astro.url.searchParams.get("id") || "backfill-your-developer-gap", |
| 13 | +); |
9 | 14 |
|
10 | | -const staffContent = (await getCollection("staff_augmentation")) as { |
| 15 | +const staffAugmentation = (await getCollection("staff_augmentation")) as { |
11 | 16 | data: { |
12 | 17 | id: string; |
13 | | - main: MainContent; |
| 18 | + main: { |
| 19 | + ourEngineers: { |
| 20 | + image: string; |
| 21 | + alt: string; |
| 22 | + title: string; |
| 23 | + description: string; |
| 24 | + }[]; |
| 25 | + }; |
14 | 26 | }; |
15 | 27 | }[]; |
16 | 28 |
|
17 | | -const contentVariantId = String( |
18 | | - Astro.url.searchParams.get("id") || "backfill-your-developer-gap" |
19 | | -); |
20 | | -
|
21 | | -let content = staffContent.find((c) => c.data.id === contentVariantId); |
| 29 | +let content = staffAugmentation.find((v) => v.data.id === contentVariantID); |
22 | 30 |
|
23 | 31 | if (!content) { |
24 | | - content = staffContent[0]; |
| 32 | + content = staffAugmentation[0]; |
25 | 33 | } |
| 34 | +
|
| 35 | +const images = import.meta.glob<{ default: ImageMetadata }>( |
| 36 | + "/src/assets/*.svg", |
| 37 | +); |
26 | 38 | --- |
27 | 39 |
|
28 | | -<!-- Engineers Section --> |
29 | | -<Section className="!py-12 md:!py-20"> |
30 | | - <div class={`${grid_classes} gap-8 md:gap-20`}> |
31 | | - <div class="col-span-6 md:col-span-12 lg:col-span-6"> |
32 | | - <h2 |
33 | | - class="text-[28px] leading-[32px] md:text-[54px] md:leading-[60px] tracking-tight font-medium mb-6 md:mb-12" |
| 40 | +<Section className="!p-0" contentClassName="md:max-w-screen"> |
| 41 | + <div |
| 42 | + class="relative pt-49 pb-18 md:pb-24 min-[1920px]:pb-48 min-[1920px]:pt-98" |
| 43 | + > |
| 44 | + <Picture |
| 45 | + src={team} |
| 46 | + alt="Developers collaborating" |
| 47 | + widths={[320, 480, 578, 640, 720, 800, 940, 1200, 1412, 1920]} |
| 48 | + sizes="100vw" |
| 49 | + format="avif" |
| 50 | + loading="lazy" |
| 51 | + class="absolute inset-0 w-full h-full object-cover object-top md:object-[50%_25%] -z-10 bg-[#424c6d]" |
| 52 | + /> |
| 53 | + <div |
| 54 | + class="absolute inset-0 -z-10" |
| 55 | + style="background:linear-gradient(180deg,rgba(30, 26, 26, 0) 0%, #1E1A1A 100%)" |
| 56 | + > |
| 57 | + <!-- Overlay --> |
| 58 | + </div> |
| 59 | + <div class="mx-auto xl:px-0"> |
| 60 | + <div |
| 61 | + class={`${grid_classes} md:max-w-[var(--max-width)] px-4 md:px-7 py-0 md:mx-auto relative z-[2] min-[1281px]:px-0`} |
34 | 62 | > |
35 | | - <span class="text-secondary">Our </span><span class="text-[#607A1A]" |
36 | | - >Engineers</span |
| 63 | + <div |
| 64 | + class="row-start-1 |
| 65 | + col-start-1 |
| 66 | + col-span-6 |
| 67 | + md:col-span-10 |
| 68 | + md:col-start-2 |
| 69 | + text-white" |
37 | 70 | > |
38 | | - </h2> |
39 | | - |
40 | | - <div class="space-y-4 md:space-y-7"> |
| 71 | + <div class="flex flex-col items-center gap-2 md:gap-4 max-h-fit"> |
| 72 | + <Pill |
| 73 | + className="text-[10px] min-[340px]:text-xs min-[390px]:text-sm sm:text-base px-2 py-1 min-[390px]:px-3 min-[390px]:py-1.5 sm:px-4 sm:py-2 max-h-[36px]" |
| 74 | + >Why work with us</Pill |
| 75 | + > |
| 76 | + <h2 |
| 77 | + class="text-[18px] leading-[22px] min-[390px]:text-[24px] min-[390px]:leading-[28px] sm:text-[32px] sm:leading-[36px] md:text-[54px] md:leading-[59.4px] font-medium lg:text-[74px] lg:leading-[82px] tracking-tight text-center" |
| 78 | + > |
| 79 | + Our <span class="text-crocoder-orange">Engineers</span> |
| 80 | + </h2> |
| 81 | + <p |
| 82 | + class="font-normal text-sm leading-5 min-[390px]:text-base min-[390px]:leading-6 sm:text-lg sm:leading-7 md:text-[22px] md:leading-8 tracking-normal lg:px-32 text-center" |
| 83 | + > |
| 84 | + Our software development services helped clients big and small |
| 85 | + build solutions with a lasting impact. |
| 86 | + </p> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + <div class="bg-contrast"> |
| 93 | + <div |
| 94 | + class={`${grid_classes} |
| 95 | + md:max-w-[var(--max-width)] |
| 96 | + pl-4 md:pl-7 pr-0 lg:pr-7 py-0 |
| 97 | + md:mx-auto |
| 98 | + relative |
| 99 | + min-[1281px]:px-0 |
| 100 | + `} |
| 101 | + > |
| 102 | + <div |
| 103 | + 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" |
| 104 | + > |
41 | 105 | { |
42 | | - content.data.main.ourEngineers.map((q) => ( |
43 | | - <div class="flex gap-4 md:gap-7"> |
44 | | - <div class="w-8 h-8 md:w-12 md:h-12 flex-shrink-0"> |
45 | | - <Image |
46 | | - src={circleCheckIcon} |
47 | | - alt="Check icon" |
48 | | - width={48} |
49 | | - height={48} |
50 | | - loading="lazy" |
51 | | - class="w-full h-full" |
52 | | - /> |
53 | | - </div> |
54 | | - <div> |
55 | | - <p class="text-[16px] leading-[24px] md:text-[22px] md:leading-8 font-semibold text-secondary"> |
56 | | - {q.title} |
57 | | - </p> |
58 | | - <p class="text-[16px] leading-[24px] md:text-[22px] md:leading-8 text-secondary"> |
59 | | - {q.description} |
60 | | - </p> |
61 | | - </div> |
| 106 | + content.data.main.ourEngineers.map((c) => ( |
| 107 | + <div class="bg-white/10 p-5 rounded-2xl flex flex-col gap-5 min-w-[240px] lg:flex-1 lg:min-w-auto"> |
| 108 | + <Image |
| 109 | + src={images[c.image]()} |
| 110 | + alt={c.alt} |
| 111 | + width={48} |
| 112 | + height={48} |
| 113 | + /> |
| 114 | + <h2 class="text-[22px] text-[#FFFFFF]">{c.title}</h2> |
| 115 | + <p class="text-base leading-6 text-[#FFFFFF]">{c.description}</p> |
62 | 116 | </div> |
63 | 117 | )) |
64 | 118 | } |
65 | 119 | </div> |
66 | 120 | </div> |
67 | | - |
68 | | - <div class="hidden lg:block col-span-6 lg:col-span-6"> |
69 | | - <Image |
70 | | - src={crocoderIll16} |
71 | | - alt="CroCoder engineering team" |
72 | | - widths={[320, 480, 640, 720, 800, 940]} |
73 | | - sizes="calc(50vw - 28px)" |
74 | | - loading="lazy" |
75 | | - class="w-full h-auto" |
76 | | - /> |
77 | | - </div> |
78 | 121 | </div> |
79 | 122 | </Section> |
0 commit comments