Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/footer #21

Merged
merged 45 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2cbde8b
feat: update start here, tutorials and devportal icons
aliceoq Dec 12, 2023
2ce3140
feat: update landing page documentation section messages
aliceoq Dec 12, 2023
b3109db
feat: update documentation section with new cards
aliceoq Dec 13, 2023
3225053
feat: update graph, paper and warning icons
aliceoq Dec 14, 2023
5c0263c
feat: create faq section messages
aliceoq Dec 14, 2023
c6405d7
feat: create faq data element
aliceoq Dec 15, 2023
c125b0a
feat: create faq section
aliceoq Dec 15, 2023
9752ee0
feat(icons): add health check icon
aliceoq Dec 18, 2023
36a81c1
feat(support): create support data and messages
aliceoq Dec 18, 2023
d35589c
feat(support): create support section
aliceoq Dec 18, 2023
59eb959
style: fix font size in documentation and faq sections
aliceoq Dec 18, 2023
26bde4b
feat: update messages related to the news section
aliceoq Dec 18, 2023
07ef4f8
feat: create announcements section
aliceoq Dec 18, 2023
ac35382
feat: add announcement section icons
aliceoq Dec 18, 2023
cd7ce83
feat: add announcement section
aliceoq Dec 18, 2023
88c0928
fix: add announcement functions
aliceoq Dec 18, 2023
197fbfc
feat(announcement): add see all news button
aliceoq Dec 20, 2023
702ca6f
feat: update education section
aliceoq Dec 20, 2023
c6b515e
feat: adds new social media icon
Pvcunha Dec 21, 2023
c2eae70
feat: language switcher component for footer
Pvcunha Dec 21, 2023
8be47be
feat: adds footer messages social media urls and footer components
Pvcunha Dec 21, 2023
956f49d
fix: remove deleted method
Pvcunha Dec 21, 2023
81371b0
fix: changes site map placeholder
Pvcunha Dec 21, 2023
7563117
fix: not clipping language selector
Pvcunha Dec 21, 2023
b6c2b47
feat: add landing page messages
aliceoq Dec 21, 2023
84b03bd
feat: update homepage first section
aliceoq Dec 21, 2023
bdd0fc5
fix(messages): fix message id in spanish
aliceoq Dec 21, 2023
4825a46
fix: reduce size of homepage image
aliceoq Dec 22, 2023
3285d79
feat: adds hover effect on icons
Pvcunha Jan 2, 2024
0166fde
fix: close language selector after click
Pvcunha Jan 2, 2024
8d20678
fix(landing): add alt prop to image
aliceoq Jan 3, 2024
d01da6a
fix(landing): add key to announcement timeline items
aliceoq Jan 3, 2024
214dfbb
fix(icons): use camelCase in prop names
aliceoq Jan 3, 2024
28bedfe
Merge pull request #20 from vtexdocs/feat/homepage-documentation
aliceoq Jan 3, 2024
74b131f
refactor: removing test style
Pvcunha Jan 3, 2024
488de35
feat: adds new social media icon
Pvcunha Dec 21, 2023
5b703d4
feat: language switcher component for footer
Pvcunha Dec 21, 2023
67e7ee2
feat: adds footer messages social media urls and footer components
Pvcunha Dec 21, 2023
0c1f180
fix: remove deleted method
Pvcunha Dec 21, 2023
9576202
fix: changes site map placeholder
Pvcunha Dec 21, 2023
6136f08
fix: not clipping language selector
Pvcunha Dec 21, 2023
96603f6
feat: adds hover effect on icons
Pvcunha Jan 2, 2024
5721ca6
fix: close language selector after click
Pvcunha Jan 2, 2024
916d13a
refactor: removing test style
Pvcunha Jan 3, 2024
a378cfe
Merge branch 'feat/footer' of github.com:vtexdocs/helpcenter into fea…
Pvcunha Jan 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/images/landing-product.png
Binary file not shown.
Binary file added public/images/landing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions src/components/announcement-card/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import Link from 'next/link'
import { Box, Flex, Text, Timeline } from '@vtex/brand-ui'

import { getDaysElapsed } from '../../utils/get-days-elapsed'
import { useIntl } from 'react-intl'

import styles from './styles'
import MegaphoneIcon from 'components/icons/megaphone-icon'
import NewIcon from 'components/icons/new-icon'

export interface CardProps {
title: string
description: string
date: Date
first?: boolean
}

const AnnouncementTimelineItem = ({
title,
date,
first = false,
}: CardProps) => {
const intl = useIntl()

return (
<Flex sx={styles.releaseContainer}>
<Timeline.Event
sx={styles.timeLineBar}
title={
first ? (
<Text sx={styles.newTitle}>New</Text>
) : (
<Box sx={styles.placeholder}></Box>
)
}
icon={first ? <NewIcon sx={styles.icon} /> : null}
>
<Text sx={styles.timelineTitle}>{title}</Text>
<Text sx={styles.content}>
{`${getDaysElapsed(date)} ${intl.formatMessage({
id: 'relese-note-days-elapsed',
})}`}
</Text>
</Timeline.Event>
</Flex>
)
}

interface Props {
announcements: CardProps[]
}

const AnnouncementCard = ({ announcements }: Props) => {
const intl = useIntl()
return (
<Link href={'/announcements'} legacyBehavior>
<Flex sx={styles.cardContainer}>
<Box>
<Flex sx={styles.title}>
<MegaphoneIcon />
<Text>
{intl.formatMessage({
id: 'landing_page_announcements.title',
})}
</Text>
</Flex>
<Text sx={styles.description}>
{intl.formatMessage({
id: 'landing_page_announcements.description',
})}
</Text>
</Box>
<Box sx={styles.timelineContainer}>
{announcements.map((announcement, index) => {
return index === 0 ? (
<AnnouncementTimelineItem
key={index}
{...{ ...announcement, first: true }}
/>
) : (
<AnnouncementTimelineItem key={index} {...announcement} />
)
})}
</Box>
</Flex>
</Link>
)
}

export default AnnouncementCard
123 changes: 123 additions & 0 deletions src/components/announcement-card/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
import { SxStyleProp } from '@vtex/brand-ui'

const cardContainer: SxStyleProp = {
mt: ['16px', '24px', '24px', '32px'],
px: ['16px', '24px', '24px', '96px'],
py: ['16px', '64px', '64px'],
justifyContent: 'center',
backgroundColor: 'white',
borderRadius: '8px',
border: '1px solid #E7E9EE',
transition: 'all 0.3s ease-out',
color: '#5E6E84',
columnGap: '50px',
rowGap: '64px',
flexWrap: 'wrap',

':active, :hover': {
cursor: 'pointer',
borderColor: '#CCCED8',
transition: 'all 0.3s ease-out',
},

':active': {
boxShadow: '0px 0px 0px 1px #FFFFFF, 0px 0px 0px 3px #96B2F2',
},

':hover': {
boxShadow: '0px 0px 16px rgba(0, 0, 0, 0.1)',
},
}

const title: SxStyleProp = {
fontSize: '22px',
fontWeight: '400',
lineHeight: '22px',
gap: '10px',
textAlign: 'top',
}

const description: SxStyleProp = {
color: 'muted.1',
fontSize: '16px',
lineHeight: '22px',
ml: '34px',
mt: '4px',
}

const icon: SxStyleProp = {
height: '18px',
width: '18px',
minWidth: '18px',
minHeight: '18px',
}

const releaseContainer: SxStyleProp = {
width: '100%',
}

const timelineContainer: SxStyleProp = {
display: ['none', 'block', 'block', 'block', 'block', 'block'],
}

const timeLineBar: SxStyleProp = {
'& > :first-of-type': {
'& > :first-of-type': {
'& > :first-of-type': {
height: '16px',
width: '16px',
},
mb: '4px',
},
'& > :nth-of-type(2)': {
width: '1px',
borderRadius: '0.5rem',
},
mr: '8px',
},

'& > :nth-of-type(2)': {
padding: '0',
'& > :nth-of-type(2)': {
mt: '10px',
},
},
}

const timelineTitle: SxStyleProp = {
fontSize: '18px',
color: 'muted.0',
}

const content: SxStyleProp = {
color: 'muted.1',
fontSize: '16px',
lineHeight: '22px',
flexDirection: 'column',
}

const newTitle: SxStyleProp = {
margin: '0',
color: '#F71963',
fontSize: '16px',
lineHeight: '18px',
}

const placeholder: SxStyleProp = {
height: '18px',
width: '1px',
}

export default {
cardContainer,
title,
description,
icon,
releaseContainer,
timeLineBar,
timelineTitle,
newTitle,
content,
placeholder,
timelineContainer,
}
59 changes: 59 additions & 0 deletions src/components/announcement-section/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Box, Button, Flex, Text } from '@vtex/brand-ui'

import { CardProps } from '../announcement-card'
import { useIntl } from 'react-intl'

import styles from './styles'
import AnnouncementCard from '../announcement-card'

const lastAnnouncements: CardProps[] = [
{
title: 'Black Week: VTEX Dashboards Analysis Strategies',
description: 'Deprecation of apps-graphql@2.x',
date: new Date('03/02/2023'),
},
{
title: 'Black Week: VTEX Dashboards Analysis Strategies',
description: 'Deprecation of apps-graphql@2.x',
date: new Date('03/02/2023'),
},
{
title: 'Black Week: VTEX Dashboards Analysis Strategies',
description: 'Deprecation of apps-graphql@2.x',
date: new Date('03/02/2023'),
},
{
title: 'Black Week: VTEX Dashboards Analysis Strategies',
description: 'Deprecation of apps-graphql@2.x',
date: new Date('03/02/2023'),
},
{
title: 'Black Week: VTEX Dashboards Analysis Strategies',
description: 'Deprecation of apps-graphql@2.x',
date: new Date('03/02/2023'),
},
]

const AnnouncementSection = () => {
const intl = useIntl()

return (
<Flex sx={styles.sectionContainer}>
<Flex>
<Text sx={styles.title}>
{intl.formatMessage({
id: 'landing_page_announcements.title',
})}
</Text>
</Flex>
<Box sx={styles.cardsContainer}>
<AnnouncementCard announcements={lastAnnouncements} />
</Box>
<Button sx={styles.button}>
{intl.formatMessage({ id: 'landing_page_announcements.button' })}
</Button>
</Flex>
)
}

export default AnnouncementSection
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const sectionContainer: SxStyleProp = {
px: ['18px', '32px'],
py: ['32px', '64px'],
backgroundColor: 'muted.4',
textAlign: ['center', 'center', 'initial'],
alignItems: 'center',
flexDirection: 'column',
}

const title: SxStyleProp = {
Expand All @@ -23,8 +24,15 @@ const cardsContainer: SxStyleProp = {
width: ['auto', 'auto', '100%'],
}

const button: SxStyleProp = {
mt: ['31px', '60px', '60px', '54px', '69px', '58px'],
display: ['block', 'block', 'block', 'block', 'block', 'none'],
transition: 'all 0.3s ease-out',
}

export default {
cardsContainer,
sectionContainer,
title,
button,
}
23 changes: 18 additions & 5 deletions src/components/documentation-section-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import Tooltip from 'components/tooltip'
import styles from './styles'
import { useEffect, useRef, useState } from 'react'
import { useIntl } from 'react-intl'
import LongArrowIcon from 'components/icons/long-arrow-icon'

const DocumentationSectionCard = ({
Icon,
title,
description,
link,
isExternalLink = false,
}: DocDataElement) => {
const intl = useIntl()
const [tooltipState, setTooltipState] = useState(false)
Expand Down Expand Up @@ -56,11 +58,22 @@ const DocumentationSectionCard = ({
className="quickStartedContainer"
sx={styles.quickStartedContainer}
>
<Text className="learnMoreText" sx={styles.learnMoreText}>
{intl.formatMessage({
id: 'landing_page_documentation_documentation_card.learnMoreText',
})}
</Text>
{!isExternalLink ? (
<Text className="learnMoreText" sx={styles.learnMoreText}>
{intl.formatMessage({
id: 'landing_page_documentation_card.learnMoreText',
})}
</Text>
) : (
<Flex sx={styles.accessPortal}>
<Text className="accessPortal" sx={styles.learnMoreText}>
{intl.formatMessage({
id: 'landing_page_documentation_card.accessPortal',
})}
</Text>
<LongArrowIcon size={18} />
</Flex>
)}
</Flex>
</Flex>
</Link>
Expand Down
Loading
Loading