Skip to content

Commit 52f9d0c

Browse files
committed
chore: update some css thingy for landing page
1 parent 79adf86 commit 52f9d0c

File tree

10 files changed

+73
-73
lines changed

10 files changed

+73
-73
lines changed
-144 KB
Loading
-29.4 KB
Loading
2.5 KB
Loading
38.6 KB
Loading

packages/frontend/src/pages/Landing/UseCases.tsx

Lines changed: 47 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2-
AspectRatio,
32
Box,
43
Container,
4+
Flex,
55
Heading,
66
HStack,
77
Image,
@@ -23,7 +23,6 @@ const posts = [
2323
description: ' ',
2424
imageUrl: AgcLogo,
2525
agency: "Attorney-General's Chambers",
26-
ariaLabel: 'Human Resource',
2726
},
2827
{
2928
title:
@@ -32,7 +31,6 @@ const posts = [
3231
description: ' ',
3332
imageUrl: CaasLogo,
3433
agency: 'Civil Aviation Authority of Singapore',
35-
ariaLabel: 'Operations',
3634
},
3735
{
3836
title:
@@ -41,7 +39,6 @@ const posts = [
4139
description: ' ',
4240
imageUrl: GovTechLogo,
4341
agency: 'Government Technology Agency',
44-
ariaLabel: 'Customer Support',
4542
},
4643
]
4744

@@ -83,90 +80,68 @@ export default function UseCases() {
8380
<VStack
8481
mt={{ base: 16, lg: 20 }}
8582
spacing={{ base: 20, lg: 20 }}
86-
align="stretch"
83+
align="center"
8784
>
8885
{posts.map((post, index) => (
89-
<Box
86+
<Flex
9087
key={index}
91-
as="article"
92-
position="relative"
93-
display="flex"
94-
flexDirection={{ base: 'column', lg: 'row' }}
9588
gap={8}
89+
alignItems={{ base: 'stretch', md: 'center' }}
90+
flexDirection={{ base: 'column', md: 'row' }}
9691
>
97-
<Box
98-
position="relative"
99-
width={{ lg: '64' }}
100-
flexShrink={{ lg: 0 }}
92+
<Link
93+
href={post.href}
94+
w={{ base: '100%', md: '30vw' }}
95+
maxW={{ base: '100%', md: 48 }}
96+
px={8}
97+
bg="#f4f2f0"
98+
borderRadius="2xl"
99+
display="flex"
100+
justifyContent="center"
101+
alignItems="center"
102+
aspectRatio={{ base: undefined, md: 1 }}
103+
role="group"
101104
>
102-
<AspectRatio ratio={{ base: 16 / 9, sm: 2 / 1, lg: 1 }}>
103-
<Box position="relative">
104-
<Image
105-
src={post.imageUrl}
106-
alt=""
107-
position="absolute"
108-
inset={0}
109-
w="full"
110-
h="full"
111-
p={8}
112-
borderRadius="2xl"
113-
bg="#f4f2f0"
114-
objectFit="contain"
115-
/>
116-
<Box
117-
position="absolute"
118-
inset={0}
119-
borderRadius="2xl"
120-
border="1px solid"
121-
borderColor="whiteAlpha.200"
122-
opacity={0.1}
123-
/>
124-
</Box>
125-
</AspectRatio>
126-
</Box>
105+
<Image
106+
src={post.imageUrl}
107+
aspectRatio="1"
108+
maxW={{ base: 48, md: '100%' }}
109+
transition="transform 0.2s"
110+
objectFit="contain"
111+
_groupHover={{
112+
transform: 'scale(1.1)',
113+
}}
114+
/>
115+
</Link>
127116

128117
<Box flex={1} alignContent="center">
129118
<HStack spacing={4} fontSize="m">
130119
<Text color="gray.500">{post.agency}</Text>
131120
</HStack>
132121

133-
<Box
134-
position="relative"
135-
maxW="xl"
136-
role="group"
137-
_hover={{ '& h3': { color: 'gray.600' } }}
122+
<Heading
123+
as="h3"
124+
mt={3}
125+
fontSize="lg"
126+
lineHeight="6"
127+
fontWeight="500"
128+
letterSpacing="tighter"
129+
transition="color 0.2s"
138130
>
139-
<Heading
140-
as="h3"
141-
mt={3}
142-
fontSize="lg"
143-
lineHeight="6"
144-
fontWeight="500"
145-
letterSpacing="tighter"
131+
<Link
132+
href={post.href}
133+
textDecoration="none"
146134
color="gray.900"
147-
transition="color 0.2s"
135+
_hover={{
136+
textDecoration: 'none',
137+
color: 'primary.500',
138+
}}
148139
>
149-
<Link
150-
href={post.href}
151-
textDecoration="none"
152-
color="gray.900"
153-
_hover={{
154-
textDecoration: 'none',
155-
color: 'primary.500',
156-
}}
157-
aria-label={post.ariaLabel}
158-
>
159-
<Box position="absolute" inset={0} />
160-
{post.title}
161-
</Link>
162-
</Heading>
163-
164-
<Text mt={5} fontSize="sm" lineHeight="6" color="gray.600">
165-
{post.description}
166-
</Text>
167-
</Box>
140+
{post.title}
141+
</Link>
142+
</Heading>
168143
</Box>
169-
</Box>
144+
</Flex>
170145
))}
171146
</VStack>
172147
</Box>

packages/frontend/src/pages/Landing/UseCasesPages/CampaignManagement.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import dedent from 'dedent'
22

3+
import NptdLogo from '@/assets/landing/nptd.png'
34
import MarkdownRenderer from '@/components/MarkdownRenderer'
45

56
import ContentBox, { CommonMdComponents } from './components/ContentBox'
@@ -46,6 +47,7 @@ export default function HumanResource() {
4647
<UseCaseLanding>
4748
<SummarySection
4849
category="Campaign Management"
50+
image={NptdLogo}
4951
title="How the National Population and Talent Division Implemented the SG60 Baby Gift Initiative with Digital Solutions"
5052
description="To commemorate Singapore's 60th year of independence, all Singapore Citizen babies born in 2025 receive the SG60 Baby Gift — a nationwide initiative requiring coordination across multiple government agencies and community partners"
5153
benefits={[

packages/frontend/src/pages/Landing/UseCasesPages/CustomerSupport.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Text } from '@chakra-ui/react'
22

3+
import GovTechLogo from '@/assets/landing/GOVTECH.png'
4+
35
import ContentBox from './components/ContentBox'
46
import ContentSection from './components/ContentSection'
57
import Quote from './components/Quote'
@@ -71,6 +73,7 @@ export default function CustomerSupport() {
7173
<UseCaseLanding>
7274
<SummarySection
7375
category="Customer Support"
76+
image={GovTechLogo}
7477
title="How GovTech automates employee support tickets to stay on top of queries and better serve employees"
7578
description="Managing enquiries from current and former GovTech staff through email systems lacked tracking capabilities, making it impossible to measure performance, monitor workload, or identify common staff concerns"
7679
benefits={[

packages/frontend/src/pages/Landing/UseCasesPages/HumanResource.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Text } from '@chakra-ui/react'
22

3+
import AgcLogo from '@/assets/landing/AgcLogo.png'
4+
35
import ContentBox from './components/ContentBox'
46
import ContentSection from './components/ContentSection'
57
import SummarySection from './components/SummarySection'
@@ -64,6 +66,7 @@ export default function HumanResource() {
6466
<UseCaseLanding>
6567
<SummarySection
6668
category="Human Resource"
69+
image={AgcLogo}
6770
title="How Attorney-General's Chambers reduced 50% of time spent on administrative onboarding processes"
6871
description="Administrative work to onboard a new joiner on their first day of work typically took around 2 hours cumulatively, and was prone to human error"
6972
benefits={[

packages/frontend/src/pages/Landing/UseCasesPages/Operations.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Text } from '@chakra-ui/react'
22

3+
import CaasLogo from '@/assets/landing/CaasLogo.png'
4+
35
import ContentBox from './components/ContentBox'
46
import ContentSection from './components/ContentSection'
57
import Quote from './components/Quote'
@@ -73,6 +75,7 @@ export default function Operations() {
7375
<UseCaseLanding>
7476
<SummarySection
7577
category="Operations"
78+
image={CaasLogo}
7679
title="How Civil Aviation Authority of Singapore simplified event management for their webinars"
7780
description="Webinars occur frequently with hundreds of participants each time. Managing these events manually became extremely time-consuming for the team"
7881
benefits={[

packages/frontend/src/pages/Landing/UseCasesPages/components/SummarySection.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Box,
44
Flex,
55
Heading,
6+
Image,
67
List,
78
ListIcon,
89
ListItem,
@@ -19,10 +20,11 @@ interface SummarySectionProps {
1920
title: string
2021
description: string
2122
benefits: string[]
23+
image?: string
2224
}
2325

2426
export default function SummarySection(props: SummarySectionProps) {
25-
const { category, title, description, benefits } = props
27+
const { category, title, description, benefits, image } = props
2628
return (
2729
<Box position="relative" overflow="hidden">
2830
<BackgroundPattern />
@@ -36,6 +38,18 @@ export default function SummarySection(props: SummarySectionProps) {
3638
{category}
3739
</Text>
3840

41+
{image && (
42+
<Image
43+
src={image}
44+
minH={24}
45+
maxW={48}
46+
alt={title}
47+
objectFit="contain"
48+
filter="grayscale(100%)"
49+
opacity={0.7}
50+
/>
51+
)}
52+
3953
<Heading
4054
as="h1"
4155
letterSpacing="tighter"

0 commit comments

Comments
 (0)