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/554 poc ssg nextjs #602

Merged
merged 65 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2657b54
feat: 554 - move to nextjs
YulikK Oct 7, 2024
aa38858
refactor: 554 - delete tests file
YulikK Oct 8, 2024
b27b116
feat: 554 - add env
YulikK Oct 8, 2024
a9a2c02
refactor: 554 - revert test deletion
Quiddlee Oct 14, 2024
a98ae99
fix: 554 - vitest config
Quiddlee Oct 14, 2024
3824edb
refactor: 554 - remove unused files
Quiddlee Oct 14, 2024
12a4464
fix: 554 - mocked image error
Quiddlee Oct 14, 2024
7ff0189
fix: 554 - school menu tests
Quiddlee Oct 14, 2024
9738f79
fix: 554 - image test
Quiddlee Oct 14, 2024
40890ce
fix: 554 - image to transform to nextjs object
Quiddlee Oct 14, 2024
94e6c33
refactor: 554 - get rid of useWindowSize hook
Quiddlee Oct 14, 2024
58e3467
fix: 554 - course-card test
Quiddlee Oct 14, 2024
1e4d3ef
fix: 554 - hero page tests
Quiddlee Oct 14, 2024
d8e9a70
fix: 554 - course item test
Quiddlee Oct 14, 2024
bfd95db
fix: 554 - breadcrumbs test
Quiddlee Oct 14, 2024
eb1b0a4
fix: 554 - breadcrumbs test
Quiddlee Oct 14, 2024
6d05cef
fix: 554 - test env issues
Quiddlee Oct 14, 2024
dd3161d
fix: 554 - study path mocks
Quiddlee Oct 14, 2024
0946ee8
fix: 554 - required tests because of course name changes
Quiddlee Oct 14, 2024
4a62cf1
fix: 554 - data lang images mocks
Quiddlee Oct 14, 2024
2be9dfd
fix: 554 - course main mocks
Quiddlee Oct 14, 2024
f4b18bf
fix: 554 - base layout mocks
Quiddlee Oct 14, 2024
d0e6f48
fix: 554 - restore scroll-to-hash tests
Quiddlee Oct 15, 2024
7fc45a8
fix: 554 - restore about component tests
Quiddlee Oct 15, 2024
e2e804b
fix: 554 - restore courses component tests
Quiddlee Oct 15, 2024
8a36a2f
fix: 554 - restore training program component tests
Quiddlee Oct 15, 2024
68ce04e
feat: 554 - update course const and types
YulikK Oct 16, 2024
15a37b4
refactor: 554 - change interface to type
YulikK Oct 16, 2024
a1f64b1
refactor: 554 - delete comments
YulikK Oct 16, 2024
7d81bb2
refactor: 554 - move variables to props
YulikK Oct 17, 2024
4ca6bb5
refactor: 554 - make helper method for page title
YulikK Oct 17, 2024
0668cc0
refactor: 554 - add props type
YulikK Oct 17, 2024
9ec10ed
refactor: 554 - about component
YulikK Oct 17, 2024
d413f0b
refactor: 554 - use PropsWithChildren
YulikK Oct 17, 2024
d24f48e
refactor: 554 - add tsc to build script and delete empty img
YulikK Oct 17, 2024
a18a2a3
refactor: 554 - update img logic
YulikK Oct 20, 2024
6e28204
fix: 554 - image & hydration errors
Quiddlee Oct 22, 2024
6a10206
chore: 554 - update .gitignore
Quiddlee Oct 22, 2024
0d7ea0f
fix: 554 - to use re-exported dayjs
Quiddlee Oct 22, 2024
289f0ac
chore: 554 - update gitignore
Quiddlee Oct 22, 2024
dff113e
chore: 554 - migrate to latest nexjs version
Quiddlee Oct 22, 2024
47723a8
chore: 554 - resolve merge conflicts
Quiddlee Oct 23, 2024
1652433
fix: 554 - npm issue
Quiddlee Oct 24, 2024
01aa39e
fix: 554 - playwright config ports
Quiddlee Oct 24, 2024
44298d2
fix: 554 - course path data
Quiddlee Oct 24, 2024
4cbd296
fix: 554 - js preschool inconsistencies
Quiddlee Oct 24, 2024
fa90f23
fix: 554 - js ru course inconsistencies
Quiddlee Oct 24, 2024
54c0c23
fix: 554 - unit test
Quiddlee Oct 24, 2024
0fefaf3
fix: 554 - training program spaces
Quiddlee Oct 24, 2024
aceed14
fix: 554 - nav item active state condition
Quiddlee Oct 24, 2024
7e452bb
chore: 554 - remove nextjs static route indicator
Quiddlee Oct 26, 2024
9a656f3
chore: 554 - resolve merge conflicts
Quiddlee Oct 26, 2024
a8106a7
chore: 554 - remove sharp
SpaNb4 Oct 26, 2024
dc5e32a
chore: 554 - upgrade next
SpaNb4 Oct 26, 2024
4803ca4
Merge branch 'feat/554-poc-ssg-nextjs' of github.com:rolling-scopes/s…
SpaNb4 Oct 26, 2024
6b6a074
chore: 554 - use optimized image
SpaNb4 Oct 26, 2024
1f5ec0d
fix: 554 - dima's role
SpaNb4 Oct 26, 2024
0d85570
chore: 554 - use ts for next.config
SpaNb4 Oct 26, 2024
40a2186
refactor: 554 - move base-layout to core folder
Quiddlee Oct 26, 2024
244b958
chore: 554 - remove image optimization script
Quiddlee Oct 26, 2024
85d6904
chore: 554 - delete tsconfig.node.json file
Quiddlee Oct 26, 2024
434b006
chore: 554 - upgrade next
SpaNb4 Oct 29, 2024
63edf52
chore: 554 - merge branch main
apalchys Nov 4, 2024
d714147
fix: 554 - update github actions
apalchys Nov 4, 2024
0cb12ae
fix: 554 - update github actions
apalchys Nov 4, 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
4 changes: 4 additions & 0 deletions .env.next
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NEXT_PUBLIC_TABLET=768
NEXT_PUBLIC_MOBILE=425
NEXT_PUBLIC_COMPRESS_QUALITY=80
NEXT_PUBLIC_DEV=true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build
dist
dist-ssr
*.local
.next

# Editor directories and files
!.vscode/extensions.json
Expand Down
2 changes: 0 additions & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ fi
echo "-"
echo "Your branch name is OK 😎"
echo "-"

npm run test
YulikK marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true
"singleQuote": true,
"quoteProps": "consistent"
SpaNb4 marked this conversation as resolved.
Show resolved Hide resolved
}
29 changes: 15 additions & 14 deletions dev-data/about.data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import noteIcon from '@/shared/assets/icons/note-icon.webp';
import paperIcon from '@/shared/assets/icons/paper-icon.webp';
import personIcon from '@/shared/assets/icons/person-icon.webp';
import planetIcon from '@/shared/assets/icons/planet.webp';
import { ImageType } from '@/shared/ui/image/image';
import { LinkCustom } from '@/shared/ui/link-custom';
import { type CourseNamesChannels, DISCORD_LINKS } from 'data';
import { COURSE_TITLES, type CourseName, DISCORD_LINKS } from 'data';

type AboutInfo = {
id: number;
title: string;
info: string | ReactNode;
icon: string;
icon: ImageType;
YulikK marked this conversation as resolved.
Show resolved Hide resolved
};

type ContentMap = {
[key in CourseNamesChannels]: AboutInfo[];
[key in CourseName]: AboutInfo[];
};

const angularNodejsAwsFundamentals: (course: string) => AboutInfo[] = () => [
Expand Down Expand Up @@ -176,7 +177,7 @@ const reactEn: AboutInfo[] = javaScriptEN().map((item) => {
<p>
Throughout the course, we mostly use
{' '}
<LinkCustom href={DISCORD_LINKS['react']} external>
<LinkCustom href={DISCORD_LINKS[COURSE_TITLES.REACT]} external>
Discord chat
</LinkCustom>
.
Expand Down Expand Up @@ -235,14 +236,14 @@ const reactRuAbout: AboutInfo[] = [
];

export const contentMapAbout: ContentMap = {
'js / front-end ru': javaScriptRU(),
'js / front-end en': javaScriptEN(),
'js / front-end pre-school ru': javaScriptPreSchoolRU(),
react: reactEn,
'react ru': reactRuAbout,
angular: angularNodejsAwsFundamentals('angular'),
'node.js': angularNodejsAwsFundamentals('node.js'),
'aws fundamentals': angularNodejsAwsFundamentals('aws fundamentals'),
'aws cloud dev': awsCloudDeveloper,
'aws devops': awsDevops,
[COURSE_TITLES.JS_RU]: javaScriptRU(),
[COURSE_TITLES.JS_EN]: javaScriptEN(),
[COURSE_TITLES.JS_PRESCHOOL_RU]: javaScriptPreSchoolRU(),
[COURSE_TITLES.REACT]: reactEn,
[`${COURSE_TITLES.REACT} ru`]: reactRuAbout,
YulikK marked this conversation as resolved.
Show resolved Hide resolved
[COURSE_TITLES.ANGULAR]: angularNodejsAwsFundamentals('angular'),
[COURSE_TITLES.NODE]: angularNodejsAwsFundamentals('node.js'),
[COURSE_TITLES.AWS_FUNDAMENTALS]: angularNodejsAwsFundamentals('aws fundamentals'),
[COURSE_TITLES.AWS_CLOUD_DEVELOPER]: awsCloudDeveloper,
[COURSE_TITLES.AWS_DEVOPS]: awsDevops,
};
15 changes: 0 additions & 15 deletions dev-data/communication.data.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
export const RS_DOCS_COMMUNICATION_LINK = 'https://docs.rs.school/#/rs-school-chats';
export const RS_DOCS_TELEGRAM_CHATS_LINK = 'https://docs.rs.school/#/rs-school-chats?id=telegram';

export const DISCORD_LINKS = {
'js / front-end ru': 'https://discord.com/invite/QvEYg7EaQ4',
'js / front-end en': 'https://discord.com/invite/uW5cCHR',
'js / front-end pre-school ru': 'https://discord.com/invite/gFnRh8Sudg',
react: 'https://discord.com/invite/zyRcphs3px',
'react ru': 'https://discord.com/invite/zyRcphs3px',
angular: 'https://discord.com/invite/xwReXYqvs7',
'node.js': 'https://discord.com/invite/8BFb8va',
'aws fundamentals': 'https://discord.com/invite/WEZxwRa4J6',
'aws cloud dev': 'https://discord.com/invite/WEZxwRa4J6',
'aws devops': 'https://discord.com/invite/WEZxwRa4J6',
};

export type CourseNamesChannels = keyof typeof DISCORD_LINKS;
23 changes: 23 additions & 0 deletions dev-data/courseTitles.data.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Course } from '@/widgets/required/required.types';

export const COURSE_TITLES = {
JS_PRESCHOOL_RU: 'JS / Front-end Pre-school RU',
JS_EN: 'JS / Front-end EN',
Expand All @@ -9,3 +11,24 @@ export const COURSE_TITLES = {
AWS_CLOUD_DEVELOPER: 'AWS Cloud Developer',
AWS_DEVOPS: 'AWS DevOps',
};

export type CourseName =
| (typeof COURSE_TITLES)[keyof typeof COURSE_TITLES]
| `${(typeof COURSE_TITLES)[keyof typeof COURSE_TITLES]} ru`
| `${(typeof COURSE_TITLES)[keyof typeof COURSE_TITLES]} badge`;
YulikK marked this conversation as resolved.
Show resolved Hide resolved

export type CourseMap = {
[courseName in CourseName]: Course;
};
YulikK marked this conversation as resolved.
Show resolved Hide resolved

export const DISCORD_LINKS: Record<(typeof COURSE_TITLES)[keyof typeof COURSE_TITLES], string> = {
[COURSE_TITLES.JS_PRESCHOOL_RU]: 'https://discord.com/invite/gFnRh8Sudg',
[COURSE_TITLES.JS_EN]: 'https://discord.com/invite/uW5cCHR',
[COURSE_TITLES.JS_RU]: 'https://discord.com/invite/QvEYg7EaQ4',
[COURSE_TITLES.REACT]: 'https://discord.com/invite/zyRcphs3px',
[COURSE_TITLES.ANGULAR]: 'https://discord.com/invite/xwReXYqvs7',
[COURSE_TITLES.NODE]: 'https://discord.com/invite/8BFb8va',
[COURSE_TITLES.AWS_FUNDAMENTALS]: 'https://discord.com/invite/WEZxwRa4J6',
[COURSE_TITLES.AWS_CLOUD_DEVELOPER]: 'https://discord.com/invite/WEZxwRa4J6',
[COURSE_TITLES.AWS_DEVOPS]: 'https://discord.com/invite/WEZxwRa4J6',
};
YulikK marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 3 additions & 2 deletions dev-data/courses-data.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Course } from '@/entities/course';
import { ImageType } from '@/shared/ui/image/image';
import { type ListData } from '@/shared/ui/list';

export type DataMap = {
Expand All @@ -14,7 +15,7 @@ export interface JSPath {
id: number;
title: string;
description: string;
imageSrc: string;
imageSrc: ImageType;
topics?: string[];
list?: ListData;
marked?: boolean;
Expand All @@ -26,7 +27,7 @@ export interface CoursesPath {
id: number;
title: string;
description: string;
logoIcon: string;
logoIcon: ImageType;
links: {
linkTitle: string;
href: string;
Expand Down
2 changes: 1 addition & 1 deletion dev-data/courses-path.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type CoursesPath } from './courses-data.types';
import { ROUTES } from '@/app/const';
import { ROUTES } from '@/core/const';
import AWSDeveloperIcon from '@/shared/assets/icons/aws-developer.webp';
import AWSFundamentalsIcon from '@/shared/assets/icons/aws-fundamentals.webp';
import HTMLIcon from '@/shared/assets/icons/html.webp';
Expand Down
2 changes: 1 addition & 1 deletion dev-data/courses.data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ROUTES } from '@/app/const';
import { ROUTES } from '@/core/const';
import type { Course } from '@/entities/course';
import angularSecondary from '@/shared/assets/icons/angular-secondary.webp';
import angular from '@/shared/assets/icons/angular.svg';
Expand Down
12 changes: 10 additions & 2 deletions dev-data/hero-page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ export const heroPageData = {
mainTitle: 'RS School',
widgetTitle: 'Connecting people, growing together, having fun',
subTitle: ['Free courses. High motivation'],
heroImageSrc: '',
heroImageSrc: {
src: '',
height: 0,
width: 0,
},
imageAltText: '',
},
courses: {
Expand All @@ -19,7 +23,11 @@ export const heroPageData = {
mainTitle: 'The Rolling Scopes',
widgetTitle: 'Connecting people, growing together, having fun',
subTitle: ['an international community of developers', 'since 2013'],
heroImageSrc: '',
heroImageSrc: {
src: '',
height: 0,
width: 0,
SpaNb4 marked this conversation as resolved.
Show resolved Hide resolved
},
imageAltText: '',
},
};
11 changes: 3 additions & 8 deletions dev-data/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
export type { AngularAwsPath, CoursesPath, DataMap, JSPath } from './courses-data.types';
export { COURSE_TITLES } from './courseTitles.data';
export { type CourseNames, contentMap } from './training-program.data';
export {
type CourseNamesChannels,
DISCORD_LINKS,
RS_DOCS_COMMUNICATION_LINK,
RS_DOCS_TELEGRAM_CHATS_LINK,
} from './communication.data';
export { COURSE_TITLES, type CourseMap, type CourseName, DISCORD_LINKS } from './courseTitles.data';
export { RS_DOCS_COMMUNICATION_LINK, RS_DOCS_TELEGRAM_CHATS_LINK } from './communication.data';
export { angular } from './angular.data';
export { angularPath } from './angular-path.data';
export { awsDev } from './awsDev.data';
export { awsDevPath } from './aws-dev-path.data';
export { awsDevops } from './aws-devops.data';
export { awsFundamentals } from './awsFundamentals.data';
export { communicationText } from './widget-communication.data';
export { contentMap } from './training-program.data';
export { contentMapAbout } from './about.data';
export { courseDataMap } from './required.data';
export { courses } from './courses.data';
Expand Down
3 changes: 1 addition & 2 deletions dev-data/js-path.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export const jsPath: JSPath[] = [
description:
'Learning either React or Angular Framework (the choice belongs to the student). To enroll, you need to successfully complete two stages of training. Format: mentoring, self-study, webinars, and communication on Discord. Practical sessions are reviewed and evaluated by mentors, as well as through cross-checking methods. Throughout the training, mock interviews are conducted with different mentors.',
imageSrc: stage3,
list:
[
list: [
'Choose a Framework: React or Angular.',
'Collaborative development of a final project.',
'Framework-based interviews.',
Expand Down
22 changes: 10 additions & 12 deletions dev-data/required.data.ts
YulikK marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CourseMap } from '@/widgets/required/required.types';
import { COURSE_TITLES, CourseMap } from './courseTitles.data';

export const courseDataMap: CourseMap = {
'js / front-end en': {
[COURSE_TITLES.JS_EN]: {
title: 'What you should know before starting',
knowBefore: {
title: 'Required before the start',
Expand Down Expand Up @@ -78,7 +78,7 @@ export const courseDataMap: CourseMap = {
},
],
},
'js / front-end ru': {
[COURSE_TITLES.JS_RU]: {
title: 'Π§Ρ‚ΠΎ Π½ΡƒΠΆΠ½ΠΎ Π·Π½Π°Ρ‚ΡŒ Π΄ΠΎ Π½Π°Ρ‡Π°Π»Π°',
knowBefore: {
title: 'ВрСбуСтся Π΄ΠΎ Π½Π°Ρ‡Π°Π»Π°',
Expand Down Expand Up @@ -155,7 +155,7 @@ export const courseDataMap: CourseMap = {
},
],
},
'js / front-end pre-school ru': {
[COURSE_TITLES.JS_PRESCHOOL_RU]: {
title: 'Π§Ρ‚ΠΎ слСдуСт ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ Π΄ΠΎ старта курса',
willLearn: [
{
Expand Down Expand Up @@ -259,7 +259,7 @@ export const courseDataMap: CourseMap = {
},
],
},
awsFundamentals: {
[COURSE_TITLES.AWS_FUNDAMENTALS]: {
title: 'What you should know before starting',
knowBefore: {
title: 'Required before the start',
Expand All @@ -282,7 +282,7 @@ export const courseDataMap: CourseMap = {
},
],
},
awsDev: {
[COURSE_TITLES.AWS_CLOUD_DEVELOPER]: {
title: 'What you should know before starting',
knowBefore: {
title: 'Required before the start',
Expand All @@ -294,15 +294,15 @@ export const courseDataMap: CourseMap = {
},
willLearn: [],
},
nodejs: {
[COURSE_TITLES.NODE]: {
title: 'What you should know before starting',
knowBefore: {
title: 'Required before the start',
description: ['Solid knowledge of JavaScript, including ES6, is required for this course.'],
},
willLearn: [],
},
angular: {
[COURSE_TITLES.ANGULAR]: {
title: 'What you should know before starting',
knowBefore: {
title: 'Required before the start',
Expand All @@ -316,7 +316,7 @@ export const courseDataMap: CourseMap = {
},
willLearn: [],
},
awsDevops: {
[COURSE_TITLES.AWS_DEVOPS]: {
title: 'What is required for training?',
knowBefore: {
title: 'Required before the start',
Expand All @@ -332,9 +332,7 @@ export const courseDataMap: CourseMap = {
willLearn: [
{
title: 'Nice to have:',
description: [
'Knowledge and experience with any cloud platforms (AWS, GCP, Azure)',
],
description: ['Knowledge and experience with any cloud platforms (AWS, GCP, Azure)'],
},
],
},
Expand Down
Loading