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

Commit

Permalink
Merge pull request #34 from atls-academy/feat/landing-7
Browse files Browse the repository at this point in the history
feat/landing-7
  • Loading branch information
TorinAsakura authored Sep 10, 2023
2 parents 2429e0e + 74fc0c8 commit 8725531
Show file tree
Hide file tree
Showing 179 changed files with 5,429 additions and 1,949 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ dist/

# JetBrains folder
.idea

# Not public
.env
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: process.env.GQL_URI,
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
3 changes: 3 additions & 0 deletions landing/entrypoints/renderer/src/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
env: {
GQL_URI: process.env.GQL_URI,
},
experimental: {
externalDir: true,
swcFileReading: false,
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
98 changes: 98 additions & 0 deletions landing/fragments/landing-courses/src/about/about.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import React from 'react'

import { Box } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Text } from '@ui/text'
import { Space } from '@ui/text'

import { useCourses } from '../data'

export const About = () => {
const courses = useCourses()

const getIdSections = (id) => courses?.data?.sections.nodes.find((obj) => obj.id === id)

const atlantisInfo = getIdSections('cG9zdDoyMjc=')?.content.split('.')[0].split(' ')
const educationInfo = getIdSections('cG9zdDoyMjc=')?.content.split('.')[1].split(' ')

return (
<Box flexDirection={['column', 'row']}>
<Box maxWidth={{ _: 335, standard: 710, ultra: 1065 }} display='inline' flexWrap='wrap'>
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
>
{atlantisInfo?.slice(0, 3).join(' ')}
</Text>
<Space count={2} />
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
color='text.accent'
>
{atlantisInfo?.slice(3, 4).join(' ')}
</Text>
<Space count={2} />
<Text
display='inline'
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
>
{atlantisInfo?.slice(4, 7).join(' ')}
</Text>
<Space count={2} />
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
color='text.accent'
>
{atlantisInfo?.slice(7, 9).join(' ')}
</Text>
<Box display={['none', 'inline']}>
<Space count={2} />
</Box>
<Text
display='inline'
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
>
{atlantisInfo?.slice(9, 13).join(' ')}
</Text>
<Space count={2} />
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
color='text.accent'
>
{atlantisInfo?.slice(13, 15).join(' ')}
</Text>
</Box>
<Layout flexBasis={{ _: 20, standard: 341, wide: 980, ultra: 696 }} />
<Box maxWidth={{ _: 335, standard: 559, ultra: 838 }} display='inline'>
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
display='inline'
>
{educationInfo?.slice(0, 5).join(' ')}
</Text>
<Space count={2} />
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
color='text.accent'
>
{educationInfo?.slice(5, 6).join(' ')}
</Text>
<Space count={2} />
<Text
fontSize={{ _: 'regular', standard: 'normal', ultra: 'secondary' }}
lineHeight='medium'
display='inline'
>
{educationInfo?.slice(6, 9).join(' ')}
</Text>
</Box>
</Box>
)
}
1 change: 1 addition & 0 deletions landing/fragments/landing-courses/src/about/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './about.component'
Loading

0 comments on commit 8725531

Please sign in to comment.