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

feat/landing-seventh-step #21

Merged
merged 41 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d7aa3f9
feat: add @globals workspace
Mirved64 Oct 2, 2023
f00027e
feat: add @apollo/client in landing/entrypoints
Mirved64 Oct 2, 2023
bc78a03
feat: get data from server in technology component
Mirved64 Oct 2, 2023
04a0c16
Merge branch 'feat/landing-sixth-step' into feat/landing-seventh-step
Mirved64 Oct 3, 2023
672ba2c
fix: resolve errors in project
Mirved64 Oct 3, 2023
b4e2aa4
feat: get data from server in hero component
Mirved64 Oct 3, 2023
75714ad
feat: get data from server in about component
Mirved64 Oct 3, 2023
05ec3ea
feat: get data from server in steps component
Mirved64 Oct 3, 2023
6424717
feat: get data from server in process component
Mirved64 Oct 3, 2023
7fd9d56
chore: fix layout in process section, tune parallax
Mirved64 Oct 3, 2023
e2c3b84
Merge branch 'feat/landing-sixth-step' into feat/landing-seventh-step
Mirved64 Oct 4, 2023
1872038
feat: get data from server in faq section
Mirved64 Oct 4, 2023
63fb6d8
feat: get data from server in form component
Mirved64 Oct 4, 2023
fb7dc06
chore: remove needless data from ru.json
Mirved64 Oct 4, 2023
54dcf91
chore: rework queries in process section
Mirved64 Oct 4, 2023
197b62d
feat: get data from server in courses component
Mirved64 Oct 5, 2023
8767d21
feat: get data from server in library component
Mirved64 Oct 5, 2023
3465da7
feat: get data from server in navigation and header components
Mirved64 Oct 5, 2023
a789f1c
feat: get data from server in navbar component
Mirved64 Oct 5, 2023
6c76b3f
refactor: rework query in courses component
Mirved64 Oct 5, 2023
fd93773
feat: get data from server in header component
Mirved64 Oct 5, 2023
2c96fb0
feat: get data from server in navigation component
Mirved64 Oct 5, 2023
75e8349
chore: fix ru.json, rework query in courses component
Mirved64 Oct 5, 2023
b23d8a9
refactor: add animate on timer, rework ui/slider
Mirved64 Oct 6, 2023
8816fc5
chore: add types, stylize code
Mirved64 Oct 6, 2023
909e677
fix: tune parallax, tune animation on load, add setTimeout in useDivH…
Mirved64 Oct 6, 2023
6103738
feat: hide uri in .env
Mirved64 Oct 7, 2023
bc8fdc3
chore: rework query, add nodeId in ui/form
Mirved64 Oct 7, 2023
e51a708
chore: rework query, add nodeId in faq component
Mirved64 Oct 7, 2023
d05036d
chore: rework ui/navbar, add nodeId
Mirved64 Oct 7, 2023
cbf342c
chore: rework ui/navlinks-block, add nodeId
Mirved64 Oct 7, 2023
ae180aa
refactor: queries, add buttons text and modal title
Mirved64 Oct 8, 2023
4d4f179
chore: tune parallax in courses section, remove needless react-intl
Mirved64 Oct 9, 2023
56973f7
chore: add nodeIdList
Mirved64 Oct 9, 2023
89d495d
feat: get data from server in mobile drawer
Mirved64 Oct 9, 2023
bcfb077
chore: rename GQL variable
Mirved64 Oct 9, 2023
e7e5cb0
chore: add fallback in getClient
Mirved64 Oct 10, 2023
4214597
Merge branch 'feat/landing-sixth-step' into feat/landing-seventh-step
Mirved64 Oct 11, 2023
669bad5
chore: remove empty files
Mirved64 Oct 11, 2023
796806c
Merge branch 'master' into feat/landing-seventh-step
TorinAsakura Oct 15, 2023
0d525c2
fix: resolve conflicts
Mirved64 Oct 16, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ dist/
.idea

.next
.env*.local
.env
1,993 changes: 1,368 additions & 625 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.8.4",
"@types/react": "18.2.6",
"graphql": "16.8.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.NEXT_PUBLIC_ENV_LOCAL_GQL_URI ?? 'https://wp.api.atls.academy/graphql',
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'
72 changes: 0 additions & 72 deletions landing/entrypoints/renderer/locales/ru.json
Nelfimov marked this conversation as resolved.
Outdated
Show resolved Hide resolved

This file was deleted.

11 changes: 8 additions & 3 deletions landing/entrypoints/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,35 @@
"license": "BSD-3-Clause",
"files": [
"dist/",
"next.config.js"
"src/next.config.js"
],
"scripts": {
"build": "yarn next build src --no-lint",
"build": "yarn next build src --no-lint ",
"dev": "yarn next dev src",
"extract": "formatjs extract",
"start": "yarn next start src"
},
"dependencies": {
"@apollo/client": "3.8.4",
"@emotion/css": "11.9.0",
"@emotion/react": "11.9.3",
"@emotion/styled": "11.9.3",
"@next/env": "12.3.4",
"@ui/animate": "workspace:0.0.1",
"express": "4.18.1",
"graphql": "16.8.1",
"next": "12.3.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intl": "6.0.8",
"react-scroll-parallax": "3.3.2"
},
"devDependencies": {
"@formatjs/cli": "6.1.3",
"@formatjs/ts-transformer": "3.13.3",
"@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",
"@types/node": "18",
"@types/react": "18.2.9",
"@types/react-dom": "18.2.4",
Expand Down
22 changes: 22 additions & 0 deletions landing/entrypoints/renderer/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import express from 'express'
import next from 'next'
import path from 'path'

const bootstrap = async () => {
const app = next({
dev: process.env.NODE_ENV !== 'production',
dir: process.env.NODE_ENV !== 'production' ? path.join(__dirname, '../src') : __dirname,
})

const handle = app.getRequestHandler()

await app.prepare()

const server = express()

server.get('*', (req, res) => handle(req, res))

server.listen(process.env.PORT || 3000)
}

bootstrap()
26 changes: 15 additions & 11 deletions landing/entrypoints/renderer/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import * as messages from '../../locales/ru.json'
import { ApolloProvider } from '@apollo/client'

import React from 'react'
import { IntlProvider } from 'react-intl'
import { ParallaxProvider } from 'react-scroll-parallax'

import { ThemeProvider } from '@ui/theme'
import { getClient } from '@globals/data'

const App = ({ Component, pageProps, ...props }) => (
<IntlProvider messages={messages} locale='ru' defaultLocale='ru'>
<ThemeProvider>
<ParallaxProvider>
<Component {...pageProps} {...props} />
</ParallaxProvider>
</ThemeProvider>
</IntlProvider>
)
const App = ({ Component, pageProps, ...props }) => {
const client = getClient()

return (
<ApolloProvider client={client}>
<ThemeProvider>
<ParallaxProvider>
<Component {...pageProps} {...props} />
</ParallaxProvider>
</ThemeProvider>
</ApolloProvider>
)
}

export default App
9 changes: 5 additions & 4 deletions landing/fragments/landing-about/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
"@ui/text": "workspace: 0.0.1"
},
"devDependencies": {
"@apollo/client": "3.8.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intl": "6.0.8"
"react-dom": "18.2.0"
},
"peerDependencies": {
"@apollo/client": "*",
"graphql": "*",
"react": "*",
"react-dom": "*",
"react-intl": "*"
"react-dom": "*"
}
}
92 changes: 40 additions & 52 deletions landing/fragments/landing-about/src/about.component.tsx
Original file line number Diff line number Diff line change
@@ -1,73 +1,61 @@
import React from 'react'

import { Delimiter } from '@ui/delimiter'
import { Box } from '@ui/layout'
import { Row } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Column } from '@ui/layout'
import { Space } from '@ui/text'
import { Text } from '@ui/text'

import { DesktopTextBlock } from './text-block'
import { MobileTextBlock } from './text-block'
import { useAbout } from './data'

export const About = () => (
<Column flexGrow='1'>
<Layout flexBasis={[64, 160]} />
export const About = () => {
const about = useAbout()

<Row>
<Layout flexBasis={[20, 230]} />
const problemMobile: string = about?.data?.section.content.split('\n')[1]
const sloganMobile: string = about?.data?.section.content.split('\n')[2]
const problemDesktop: string[] = problemMobile?.split('.').slice(0, 2)
const sloganDesktop: string = sloganMobile?.slice(0, -1)

<Column flexBasis={[335, 1460]} flexGrow='1' flexShrink='0'>
<Box display={['none', 'inline']}>
<DesktopTextBlock id='about.intro-desktop' />
return (
<Column flexGrow='1'>
<Layout flexBasis={[64, 160]} />

<Space count='6' />
<Row>
<Layout flexBasis={[20, 230]} />

<Delimiter />

<Space count='6' />

<DesktopTextBlock id='about.problem-desktop' />

<Space count='6' />

<Delimiter />
</Box>

<Column display={['flex', 'none']}>
<MobileTextBlock id='about.intro-digital-mobile' />

<MobileTextBlock id='about.intro-not-decrease-mobile' />

<MobileTextBlock id='about.intro-for-your-decisions-mobile' />

<Layout flexBasis={28} />

<MobileTextBlock id='about.central-idea-atlantis-teach-mobile' />

<MobileTextBlock id='about.central-idea-make-engineers-mobile' />

<MobileTextBlock id='about.central-idea-architects-mobile' />
<Column flexBasis={[335, 1460]} flexGrow='1' flexShrink='0'>
<Box display={['none', 'inline']}>
{problemDesktop?.map((el) => (
<DesktopTextBlock key={el[0]} text={el.trim()} />
))}
</Box>

<MobileTextBlock id='about.central-idea-not-programmers-mobile' />
</Column>
<Column display={['flex', 'none']}>
<Text color='text.white' fontSize='small' lineHeight='huge'>
{problemMobile}
</Text>

<Layout flexBasis={[0, 40]} />
<Layout flexBasis={28} />

<Box display={['none', 'inline']}>
<Box display='inline'>
<DesktopTextBlock id='about.central-idea-desktop' />
<Text color='text.white' fontSize='small' lineHeight='huge'>
{sloganMobile}
</Text>
</Column>

<Space count='6' />
<Layout flexBasis={[0, 40]} />

<Delimiter />
<Box display={['none', 'inline']}>
<Box display='inline'>
<DesktopTextBlock text={sloganDesktop} />
</Box>
</Box>
</Box>
</Column>
</Column>

<Layout flexBasis={[20, 230]} />
</Row>
<Layout flexBasis={[20, 230]} />
</Row>

<Layout flexBasis={[128, 240]} />
</Column>
)
<Layout flexBasis={[128, 240]} />
</Column>
)
}
1 change: 1 addition & 0 deletions landing/fragments/landing-about/src/data/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './queries'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { gql } from '@apollo/client'

export const GET_ABOUT = gql`
query About {
section(id: "cG9zdDoyMjY=") {
content
}
}
`
1 change: 1 addition & 0 deletions landing/fragments/landing-about/src/data/queries/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './useAbout'
5 changes: 5 additions & 0 deletions landing/fragments/landing-about/src/data/queries/useAbout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { useQuery } from '@apollo/client'

import { GET_ABOUT } from './about.query'

export const useAbout = () => useQuery(GET_ABOUT)
Loading