Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

feat/landing-7 #34

Merged
merged 39 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
df43a27
feat: globals/data & apolloprovider in app
oxiqod Aug 7, 2023
990c57d
feat: query in info-fragment
oxiqod Aug 8, 2023
e4b9d46
feat: query in faq-fragment
oxiqod Aug 8, 2023
f51f71a
feat: query in navigation-fragment
oxiqod Aug 9, 2023
734170c
feat: query in hero-fragment
oxiqod Aug 9, 2023
f2887ea
feat: query in runline-fragment
oxiqod Aug 9, 2023
d4178b5
feat: query in courses-fragment
oxiqod Aug 9, 2023
b6105b0
feat: query in courses-fragment
oxiqod Aug 9, 2023
84fc5da
feat: get description for cards
oxiqod Aug 10, 2023
e6a4197
feat: get image for cards & get second skills for runline
oxiqod Aug 10, 2023
5322a14
feat: query in process-fragment
oxiqod Aug 10, 2023
24ab563
fix: formatting title in faq-fragment
oxiqod Aug 10, 2023
be537c0
feat: query in navbar
oxiqod Aug 10, 2023
d1ac2e6
feat: get courses from server
oxiqod Aug 11, 2023
326083d
feat: query in process-fragment & description fro hero
oxiqod Aug 11, 2023
ed138fa
feat: query in steps-fragment
oxiqod Aug 11, 2023
0311524
feat: get mobile slides for process-fragment
oxiqod Aug 11, 2023
d53a506
fix: tsconfig
Nelfimov Aug 14, 2023
3077fd9
Merge remote-tracking branch 'origin/feat/landing-7' into feat/landing-7
Nelfimov Aug 14, 2023
f41cf17
fix: tsconfig
Nelfimov Aug 14, 2023
c18bfe7
fix: links in navigation & hero title
oxiqod Aug 14, 2023
8d6ac16
fix: focus for input in library & change parallax in hero
oxiqod Aug 14, 2023
f10679f
fix: image in cards for FullHD
oxiqod Aug 15, 2023
4291787
fix: location image in cards
oxiqod Aug 15, 2023
4d967e0
chore: return breakpoints value
oxiqod Aug 16, 2023
4a93201
feat: new query in courses
oxiqod Aug 17, 2023
b03e121
chore: change assignment keys in fragments
oxiqod Aug 17, 2023
1229630
chore: replacing intl with data request in faq & nav
oxiqod Aug 17, 2023
c679cc4
feat: get data for form from request
oxiqod Aug 17, 2023
be37fce
fix: change get navlinks
oxiqod Aug 17, 2023
b94a2e8
feat: queries for library page
oxiqod Aug 18, 2023
98bc19b
refactor: get links in ui/navbar
oxiqod Aug 28, 2023
522fe11
refactor: @ui/accordion & add condition
oxiqod Aug 29, 2023
99f2d21
chore: clean warnings in console
oxiqod Aug 29, 2023
c48ba48
feat: data assignment through id
oxiqod Sep 6, 2023
3568b43
refactor: interfaces & deps & layout
oxiqod Sep 7, 2023
260bd77
chore: rm unnecessary property
oxiqod Sep 7, 2023
1e81e0b
refactor: bind id in all project & change links
oxiqod Sep 8, 2023
74fc0c8
feat: env for hidden uri
oxiqod Sep 8, 2023
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
3,859 changes: 3,149 additions & 710 deletions .pnp.cjs

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions globals/data/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@globals/data",
"version": "0.0.1",
"main": "src/index.ts",
"devDependencies": {
"@apollo/client": "3.7.17",
"@types/react": "18.2.6",
"graphql": "16.7.1",
"react": "18.2.0"
},
"peerDependencies": {
"@apollo/client": "*",
"react": "*"
}
}
8 changes: 8 additions & 0 deletions globals/data/src/helpers/get-client.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ApolloClient } from '@apollo/client'
import { InMemoryCache } from '@apollo/client'

export const getClient = () =>
new ApolloClient({
uri: 'https://wp.api.atls.academy/graphql',
TorinAsakura marked this conversation as resolved.
Show resolved Hide resolved
cache: new InMemoryCache(),
})
1 change: 1 addition & 0 deletions globals/data/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './get-client.helper'
1 change: 1 addition & 0 deletions globals/data/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './helpers'
24 changes: 12 additions & 12 deletions landing/entrypoints/renderer/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@
"propcess.how-going": "как он протекает",
"process.hard-when": "сложным, когда",
"process.slider.formation-of-system-of-basic-fragments": "Формирование системы базовых фрагментов и компонентов",
"questions.questions-and-answel": "Вопросы и ответы",
"questions.ask-question": "Задать вопрос",
"questions.profession-right-for-me": "Подойдёт ли мне профессия?",
"questions.ask-us-question": "Задай вопрос",
"questions.accordion.how-do-it": "Как это сделать подскажет Наставник или сотрудник поддержки. Ещё при таком переходе произойдёт зачет некоторых темам по дисциплинам.",
"questions.from.send-message": "Отправить сообщение",
"questions.form.pushing-the-button": "Нажимая на кнопку «Оставить заявку», вы принимаете",
"questions.form.processing-agreement": "«Соглашение об обработке персональных данных»",
"questions.form.we-got-your-question": "Мы получили твой вопрос, вернёмся с ответом asap.",
"questions.form.input.placeholder.message": "Сообщение",
"questions.form.input.placeholder.name": "Имя",
"questions.form.input.placeholder.phone": "Телефон",
"faq.questions-and-answel": "Вопросы и ответы",
"faq.ask-question": "Задать вопрос",
"faq.profession-right-for-me": "Подойдёт ли мне профессия?",
"faq.ask-us-question": "Задай вопрос",
"faq.accordion.how-do-it": "Как это сделать подскажет Наставник или сотрудник поддержки. Ещё при таком переходе произойдёт зачет некоторых темам по дисциплинам.",
"faq.from.send-message": "Отправить сообщение",
"faq.form.pushing-the-button": "Нажимая на кнопку «Оставить заявку», вы принимаете",
"faq.form.processing-agreement": "«Соглашение об обработке персональных данных»",
"faq.form.we-got-your-question": "Мы получили твой вопрос, вернёмся с ответом asap.",
"faq.form.input.placeholder.message": "Сообщение",
"faq.form.input.placeholder.name": "Имя",
"faq.form.input.placeholder.phone": "Телефон",
"library.our-library": "Наша библиотека",
"library.here-are-collected-materials-and-articles": "Здесь собраны материалы и статьи, которые пригодятся в процессе обучения. Сюда стоит пойти за ответом на любой возникший вопрос.",
"library.title.design-figma-math": "Дизайн, Figma, Математика",
Expand Down
3 changes: 3 additions & 0 deletions landing/entrypoints/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@
"start": "yarn next start src"
},
"dependencies": {
"@apollo/client": "3.7.17",
"@emotion/css": "11.11.0",
"@emotion/react": "11.11.0",
"@emotion/styled": "11.11.0",
"express": "4.17.1",
"graphql": "16.7.1",
"next": "12.3.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intl": "6.4.2",
"styled-system": "5.1.5"
},
"devDependencies": {
"@globals/data": "workspace:0.0.1",
"@landing/index-page": "workspace:0.0.1",
"@landing/library-page": "workspace:0.0.1",
"@types/express": "4.17.17",
Expand Down
31 changes: 20 additions & 11 deletions landing/entrypoints/renderer/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import * as messages from '../../locales/ru.json'
import * as messages from '../../locales/ru.json'

import React from 'react'
import { IntlProvider } from 'react-intl'
import { ApolloProvider } from '@apollo/client'

import { ThemeProvider } from '@ui/theme'
import React from 'react'
import { IntlProvider } from 'react-intl'

const App = ({ Component, pageProps, props }) => (
<IntlProvider messages={messages} locale='ru' defaultLocale='ru'>
<ThemeProvider>
<Component {...props} {...pageProps} />
</ThemeProvider>
</IntlProvider>
)
import { ThemeProvider } from '@ui/theme'
import { getClient } from '@globals/data'

const App = ({ Component, pageProps, props }) => {
const client = getClient()

return (
<ApolloProvider client={client}>
<IntlProvider messages={messages} locale='ru' defaultLocale='ru'>
<ThemeProvider>
<Component {...props} {...pageProps} />
</ThemeProvider>
</IntlProvider>
</ApolloProvider>
)
}

export default App
3 changes: 3 additions & 0 deletions landing/fragments/landing-courses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.1",
"main": "src/index.ts",
"devDependencies": {
"@apollo/client": "3.7.17",
"@ui/background": "workspce:0.0.1",
"@ui/button": "workspace:0.0.1",
"@ui/card": "workspace:0.0.1",
Expand All @@ -19,6 +20,8 @@
"react-scroll": "1.8.9"
},
"peerDependencies": {
"@apollo/client": "*",
"graphql": "*",
"react": "*",
"react-dom": "*",
"react-intl": "*"
Expand Down
240 changes: 47 additions & 193 deletions landing/fragments/landing-courses/src/cards/cards.component.tsx
Original file line number Diff line number Diff line change
@@ -1,214 +1,68 @@
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { Link } from 'react-scroll'
import { useIntl } from 'react-intl'

import { Background } from '@ui/background'
import { Button } from '@ui/button'
import { Card } from '@ui/card'
import { ScrollIcon } from '@ui/icon'
import { ArrowPointerIcon } from '@ui/icon'
import { Image } from '@ui/image'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Row } from '@ui/layout'
import { NextLink } from '@ui/link'
import { Text } from '@ui/text'
import { useHover } from '@ui/utils'

import { Details } from './details'
import { WideScreenCards } from './wideScreen'
import { TransitionCard } from './wideScreen'
import { useCourses } from '../data'
import { getGap } from './helpers'
import { getWidthCategory } from './helpers'

export const Cards = () => {
const intl = useIntl()
const [hover, hoverProps] = useHover()
const card = useCourses()

const getCards = card?.data?.courses.nodes.map((element) => ({
label: element.course.label[0].title,
title: element.course.title,
description: element.course.description,
image: element.course.image?.sourceUrl,
}))

const reversedCards = getCards?.reverse()
return (
<Box flexDirection={['column', 'row']}>
<Column width='100%' order={[1, 0]}>
<Box
flexDirection={{ _: 'column', standard: 'column', wide: 'row', ultra: 'row' }}
order={[1, 0]}
width='100%'
>
<Card
widthCategory={{ _: 80, standard: 104, ultra: 148 }}
сategory={intl.formatMessage({ id: 'courses.card.education' })}
gap={{ _: 104, standard: 214, wide: 356, ultra: 222 }}
image='/waves.png'
widthContent={{ _: 303, standard: 694, ultra: 945 }}
title={intl.formatMessage({ id: 'courses.card.frontend-engineer' })}
description={intl.formatMessage({
id: 'courses.card.desktop.you-will-learn-fundamental-knowledge-in-IT',
})}
/>
<Layout flexBasis={[20, 40]} flexShrink='0' />
<Card
widthCategory={{ _: 87, standard: 112, ultra: 160 }}
сategory={intl.formatMessage({ id: 'courses.card.mini-cours' })}
gap={{ _: 49, standard: 56, wide: 356, ultra: 222 }}
image='/waves.png'
widthContent={{ _: 303, standard: 694, ultra: 945 }}
title={intl.formatMessage({ id: 'courses.card.basics-development' })}
description={intl.formatMessage({
id: 'courses.card.desktop.you-will-learn-fundamental-knowledge-in-IT',
})}
/>
<Layout flexBasis={[20, 0]} />
</Box>
<Layout flexBasis={[0, 40]} />
<Box display={{ _: 'none', standard: 'flex', wide: 'none', ultra: 'none' }} width='100%'>
<Card
widthCategory={180}
сategory={intl.formatMessage({ id: 'courses.card.education-material' })}
gap={110}
title={intl.formatMessage({ id: 'courses.card.use-library' })}
/>
<Layout flexBasis={40} flexShrink='0' />
<Card
widthCategory={180}
сategory={intl.formatMessage({ id: 'courses.card.education-material' })}
gap={110}
title={intl.formatMessage({ id: 'courses.card.design-figma-math' })}
/>
</Box>
<Row order={[1, 0]} flexWrap='wrap'>
{reversedCards?.slice(0, 4).map((element, index) => (
<Box
display={
index > 1 ? { _: 'none', standard: 'flex', wide: 'none', ultra: 'none' } : 'flex'
}
flexGrow='1'
key={element.title}
>
<Column width={index < 2 ? '100%' : 560} flexGrow='1'>
<Card
widthCategory={getWidthCategory(index)}
сategory={element.label}
image={element.image}
gap={getGap(index)}
widthContent={{ _: 303, standard: 694, ultra: 945 }}
title={element.title}
description={element.description}
/>
<Layout flexBasis={{ _: 20, standard: 40 }} />
</Column>
<Layout
flexBasis={index === reversedCards.length - 2 || index === 0 || index === 1 ? 0 : 40}
/>
<Layout
flexBasis={index === 1 ? 0 : 40}
display={{ _: 'none', standard: 'none', wide: 'flex', ultra: 'flex' }}
/>
</Box>
))}
<Row display={{ _: 'none', standard: 'none', wide: 'flex', ultra: 'flex' }} flexWrap='wrap'>
<WideScreenCards />
<NextLink path='/library'>
<Background
width={{ wide: 572, ultra: 668 }}
height={{ wide: 320, ultra: 326 }}
backgroundColor={hover ? 'lilacGradient' : 'purpleGradient'}
borderRadius='big'
{...hoverProps}
>
<Column>
<Layout flexBasis={{ wide: 232, ultra: 207 }} />
<Row alignItems='center'>
<Layout flexBasis={{ wide: 40, ultra: 40 }} />
<Text fontSize={{ wide: 'large', ultra: 'enormous' }} color='text.white'>
<FormattedMessage id='courses.all-materials' />
</Text>
<Layout flexBasis={{ wide: 15, ultra: 20 }} />
<ArrowPointerIcon width={50} height={50} />
</Row>
</Column>
</Background>
</NextLink>
<TransitionCard />
</Row>
</Column>

</Row>
<Layout flexBasis={[0, 40]} />
<Column order={[0, 1]}>
<Background
backgroundColor='grayGradient'
borderRadius={['medium', 'big']}
border='lightGray'
width={{ _: 335, standard: 410, ultra: 470 }}
height={{ _: 212, standard: 660, ultra: 840 }}
display='flex'
>
<Layout flexBasis={[16, 32]} />
<Column>
<Layout flexBasis={[16, 32]} />
<Box width={{ _: 302, standard: 346, ultra: 406 }}>
<Text
fontSize={{ _: 'medium', standard: 'middle', ultra: 'enlarged' }}
lineHeight={['medium', 'large']}
>
{intl.formatMessage({
id: 'courses.card.you-learn-fundamental-knowledge-field-it',
})}
</Text>
</Box>
<Layout flexBasis={{ _: 0, standard: 74, ultra: 68 }} />
<Box display={['none', 'flex']} justifyContent='center'>
<Image src='/sphere-white.png' width={240} />
</Box>
<Layout flexBasis={{ _: 16, standard: 62, ultra: 68 }} />
<Box
height={[64, 116]}
flexDirection={['row', 'column']}
alignItems={['center', 'start']}
>
<Box>
<Text
fontSize={{ _: 'solid', standard: 'massive', ultra: 'huge' }}
lineHeight='small'
color='text.accent'
>
{intl.formatMessage({ id: 'courses.card.five' })}
</Text>
</Box>
<Layout flexBasis={[12, 8]} />
<Box width={{ _: 125, standard: 188, ultra: 282 }}>
<Text
fontSize={{ _: 'little', standard: 'medium', ultra: 'regular' }}
lineHeight={['interim', 'large']}
>
{intl.formatMessage({
id: 'courses.card.student-education-one-group',
})}
</Text>
</Box>
<Layout flexBasis={[70, 0]} />
<Box display={['flex', 'none']} justifyContent='center'>
<Image src='/sphere-white.png' width={64} />
</Box>
</Box>
<Layout flexBasis={[16, 32]} />
</Column>
<Layout flexBasis={[16, 32]} />
</Background>
<Layout flexBasis={[0, 20]} />
<Link to='Education' spy smooth duration={1000}>
<Box
width={[410]}
display={{ _: 'none', standard: 'flex', ultra: 'none' }}
alignItems='center'
flexShrink='0'
>
<Button
variant='primary'
size='bigSizeNormalPadding'
gap={121}
icon={<ScrollIcon width={12} height={18} />}
widthIcon={48}
heightIcon={48}
backgroundIcon='background.white'
radiusIcon='medium'
fill
>
<Text fontSize='regular' lineHeight='regular' color='text.white'>
<FormattedMessage id='courses.button.process' />
</Text>
</Button>
</Box>
</Link>
<Link to='Education' spy smooth duration={1000}>
<Box
display={{ _: 'none', standard: 'none', wide: 'none', ultra: 'flex' }}
width={[470]}
flexShrink='0'
>
<Button
variant='primary'
size='largeSizeNormalPadding'
gap={54}
icon={<ScrollIcon width={18} height={27} />}
widthIcon={72}
heightIcon={72}
backgroundIcon='background.white'
radiusIcon='big'
fill
>
<Text fontSize='major' lineHeight='regular' color='text.white'>
<FormattedMessage id='courses.button.process' />
</Text>
</Button>
</Box>
</Link>
</Column>
<Details />
<Layout flexBasis={[40, 0]} />
</Box>
)
Expand Down
Loading