Skip to content

Commit e5eff2b

Browse files
authored
chore: Update welcome page (#5555)
1 parent 36bd114 commit e5eff2b

7 files changed

Lines changed: 39 additions & 20 deletions

File tree

frontend/web/components/onboarding/GettingStartedResource.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import React, { FC } from 'react'
2+
import { Resource } from './data/onboarding.data'
23

3-
type ResourceLinkType = {
4-
image: string
5-
url: string
6-
title: string
7-
description: string
8-
}
9-
10-
const GettingStartedResource: FC<ResourceLinkType> = ({
4+
const GettingStartedResource: FC<Resource> = ({
115
description,
126
image,
137
title,
@@ -23,18 +17,18 @@ const GettingStartedResource: FC<ResourceLinkType> = ({
2317
aspectRatio: '155 / 200',
2418
height: 150,
2519
objectFit: 'cover',
26-
objectPosition: 'center',
20+
objectPosition: 'top',
2721
}}
2822
className=' rounded'
29-
src={image}
23+
{...image}
3024
/>
3125
</div>
3226
<div className='h-100 d-flex flex-column justify-content-center p-3'>
3327
<h6 className={`d-flex align-items-center gap-1`}>{title}</h6>
3428

35-
<h6 className='fw-normal d-flex text-muted flex-1'>
29+
<span className='fw-normal fs-small text-muted '>
3630
{description}
37-
</h6>
31+
</span>
3832
</div>
3933
</div>
4034
</div>

frontend/web/components/onboarding/data/onboarding.data.tsx

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { ImgHTMLAttributes } from 'react'
2+
13
export type Resource = {
24
description: string
3-
image: string
5+
image: Partial<ImgHTMLAttributes<any>>
46
title: string
57
url: string
68
}
@@ -13,17 +15,34 @@ type LinkItem = {
1315
export const resources: Resource[] = [
1416
{
1517
'description':
16-
'A hands-on guide covering best practices, use cases and more.',
17-
'image': '/static/images/welcome/featured1.png',
18-
'title': 'eBook | Unlock Modern Software Development with Feature Flags',
19-
url: 'https://www.flagsmith.com/ebook/flip-the-switch-on-modern-software-development-with-feature-flags?utm_source=app',
18+
'Move faster while improving safety, fight vendor lock-in, and how global organisations like eBay use feature flags at scale.',
19+
'image': {
20+
src: 'https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/682f63f56c99f14170876b92_Cover.png',
21+
srcSet:
22+
'https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/682f63f56c99f14170876b92_Cover-p-500.png 500w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/682f63f56c99f14170876b92_Cover-p-800.png 800w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/682f63f56c99f14170876b92_Cover-p-1080.png 1080w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/682f63f56c99f14170876b92_Cover.png 1224w',
23+
},
24+
'title': 'eBook | Scaling Feature Flags',
25+
url: 'https://www.flagsmith.com/ebook/scaling-feature-flags-a-roadmap?utm_source=app',
2026
},
2127
{
2228
'description': 'Set yourself up for success with these best practices.',
23-
'image': '/static/images/welcome/featured2.png',
29+
'image': {
30+
src: 'https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header.png',
31+
srcSet:
32+
'https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header-p-500.png 500w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header-p-800.png 800w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header-p-1080.png 1080w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header-p-1600.png 1600w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header-p-2000.png 2000w, https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/67fff41c071081c1a18d7102_Feature%20Flags%20Best%20Practices%20Article%20Header.png 2400w',
33+
},
2434
'title': 'Blog Post | Feature Flag best practices',
2535
url: 'https://www.flagsmith.com/blog/feature-flags-best-practices?utm_source=app',
2636
},
37+
{
38+
'description':
39+
'A hands-on guide covering best practices, use cases and more.',
40+
'image': {
41+
src: 'https://cdn.prod.website-files.com/645258eae17c724fb2ca4915/673b280d0c8c9a9b1d58ee63_modern-software-development.webp',
42+
},
43+
'title': 'eBook | Unlock Modern Software Development with Feature Flags',
44+
url: 'https://www.flagsmith.com/ebook/flip-the-switch-on-modern-software-development-with-feature-flags?utm_source=app',
45+
},
2746
]
2847

2948
export const links: LinkItem[] = [

frontend/web/components/pages/GettingStartedPage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const GettingStartedPage: FC = () => {
142142
</PageTitle>
143143
<div className='row row-gap-4'>
144144
<div className='col-xxl-9 col-xl-8'>
145-
<div className='card bg-card py-3 shadow rounded'>
145+
<div className='card h-100 bg-card py-3 shadow rounded'>
146146
<h5 className='mb-3 px-3'>Getting Started</h5>
147147
<hr className='mt-0 py-0' />
148148
<div className='row px-3 row-gap-4'>
@@ -168,7 +168,10 @@ const GettingStartedPage: FC = () => {
168168
<hr className='mt-0 py-0' />
169169
<h5 className='mb-3 px-3'>Resources</h5>
170170
<hr className='mt-0 py-0' />
171-
<div className='d-flex flex-column gap-4'>
171+
<div
172+
style={{ maxHeight: 450 }}
173+
className='overflow-y-auto custom-scroll d-flex flex-column gap-4'
174+
>
172175
{resources.map((v) => (
173176
<GettingStartedResource key={v.url} {...v} />
174177
))}
-219 KB
Binary file not shown.
-7.37 KB
Binary file not shown.

frontend/web/styles/project/_modals.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ $side-width: 750px;
113113
overflow-y: hidden;
114114
}
115115
&.overflow-y-auto {
116+
overflow-y: hidden;
116117
.modal-body {
117118
overflow-y: auto;
118119
}

frontend/web/styles/project/_utils.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@
223223
filter: blur(5px);
224224
}
225225

226+
.overflow-y-auto{ overflow-y: auto}
227+
226228
.user-select-none {
227229
user-select: none;
228230
}

0 commit comments

Comments
 (0)