This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
generated from atls-academy/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from atls-academy/feat/landing-7
feat/landing-7
- Loading branch information
Showing
179 changed files
with
5,429 additions
and
1,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,6 @@ dist/ | |
|
||
# JetBrains folder | ||
.idea | ||
|
||
# Not public | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './get-client.helper' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './helpers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
landing/fragments/landing-courses/src/about/about.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './about.component' |
Oops, something went wrong.