diff --git a/.gitignore b/.gitignore index 7dca590..dd0c177 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /.vscode /.next /.env -/next-env.d.ts \ No newline at end of file +/next-env.d.ts +/tsconfig.tsbuildinfo \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs index 87d7dcd..0451ed1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -34,6 +34,8 @@ const eslintCommonRules = { ], // https://eslint.org/docs/latest/rules/no-console 'no-console': ['error', { allow: ['warn', 'info', 'error'] }], + // Запретить использование пустых функций + 'no-empty-function': 'error', // Форматирование объектов 'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }], // https://eslint.org/docs/latest/rules/padding-line-between-statements diff --git a/package.json b/package.json index 7d9aae3..1b28996 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev --turbopack", "build": "next build", "start": "next start", - "lint": "next lint && npx stylelint \"**/*.scss\"" + "lint": "next lint && npx stylelint \"**/*.scss\" && tsc --noEmit" }, "dependencies": { "axios": "^1.7.9", diff --git a/public/images/light-dark.avif b/public/images/light-dark.avif new file mode 100644 index 0000000..1966010 Binary files /dev/null and b/public/images/light-dark.avif differ diff --git a/public/images/light.avif b/public/images/light.avif new file mode 100644 index 0000000..a05ed83 Binary files /dev/null and b/public/images/light.avif differ diff --git a/src/app/(with-navbar)/layout.tsx b/src/app/(with-navbar)/layout.tsx new file mode 100644 index 0000000..41bf83a --- /dev/null +++ b/src/app/(with-navbar)/layout.tsx @@ -0,0 +1,14 @@ +import { Navbar } from '@/widgets/Navbar/client'; + +interface INavbarLayout { + children: React.ReactNode +} + +const NavbarLayout = ({ children }: INavbarLayout) => ( + <> + {children} + + +); + +export default NavbarLayout; diff --git a/src/app/page.tsx b/src/app/(with-navbar)/page.tsx similarity index 85% rename from src/app/page.tsx rename to src/app/(with-navbar)/page.tsx index 50acba8..5610e4c 100644 --- a/src/app/page.tsx +++ b/src/app/(with-navbar)/page.tsx @@ -1,13 +1,12 @@ import { Headers } from '@/widgets/Headers'; import { InfoBlock } from '@/widgets/InfoBlock/client'; import { mockInfoBlockExercisesItems } from '@/widgets/InfoBlock/model/mock-exercises'; -import { Navbar } from '@/widgets/Navbar/client'; import { Layout } from '@/shared/ui'; const Home = () => ( <> - +
( />
- ); diff --git a/src/app/(with-navbar)/settings/page.module.scss b/src/app/(with-navbar)/settings/page.module.scss new file mode 100644 index 0000000..567a280 --- /dev/null +++ b/src/app/(with-navbar)/settings/page.module.scss @@ -0,0 +1,5 @@ +.layout { + display: flex; + flex-direction: column; + gap: 24px; +} \ No newline at end of file diff --git a/src/app/(with-navbar)/settings/page.tsx b/src/app/(with-navbar)/settings/page.tsx new file mode 100644 index 0000000..03a32da --- /dev/null +++ b/src/app/(with-navbar)/settings/page.tsx @@ -0,0 +1,28 @@ +import { Headers } from '@/widgets/Headers'; +import { Navbar } from '@/widgets/Navbar/client'; + +import { Layout } from '@/shared/ui'; + +import { SettingsContent } from './ui/SettingsContent'; + +import styles from './page.module.scss'; + +import type { Metadata } from 'next'; + +export const metadata: Metadata = { + title: 'Vees My | Настройки', +}; + +const Settings = () => ( + <> + +
+ + + +
+ + +); + +export default Settings; diff --git a/src/app/(with-navbar)/settings/ui/SettingsContent.tsx b/src/app/(with-navbar)/settings/ui/SettingsContent.tsx new file mode 100644 index 0000000..5a89580 --- /dev/null +++ b/src/app/(with-navbar)/settings/ui/SettingsContent.tsx @@ -0,0 +1,87 @@ +'use client'; + +import { + ExportOutlineIcon, + FlashOutlineIcon, + FolderOutlineIcon, + ImportOutlineIcon, + LangIcon, + ThemeIcon, + VeesIcon, +} from '@/shared/icons'; +import { Button, Section } from '@/shared/ui'; + +import styles from './settingsContent.module.scss'; + +export const SettingsContent = () => ( + <> +
, + onClick: () => { /* void */ }, + title: 'Тренировки', + }, + { + color: '#FFB21A', + icon: , + onClick: () => { /* void */ }, + title: 'Настроить группы', + }, + { + color: '#FA4838', + icon: , + onClick: () => { /* void */ }, + title: 'Упражнения', + }, + ]} + /> +
, + onClick: () => { /* void */ }, + rightText: 'Русский', + title: 'Язык', + }, + { + color: '#5AADF2', + icon: , + onClick: () => { /* void */ }, + rightText: 'Как в системе', + title: 'Оформление', + }, + ]} + /> +
, + onClick: () => { /* void */ }, + title: 'Импорт настроек', + }, + { + color: '#D15347', + description: 'Сохранить файл', + icon: , + onClick: () => { /* void */ }, + title: 'Экспорт настроек', + }, + ]} + /> + + +); diff --git a/src/app/(with-navbar)/settings/ui/settingsContent.module.scss b/src/app/(with-navbar)/settings/ui/settingsContent.module.scss new file mode 100644 index 0000000..b446597 --- /dev/null +++ b/src/app/(with-navbar)/settings/ui/settingsContent.module.scss @@ -0,0 +1,3 @@ +.logout { + animation: var(--anim-scale-in); +} \ No newline at end of file diff --git a/src/app/globals.scss b/src/app/globals.scss index 0b92178..c923f3f 100644 --- a/src/app/globals.scss +++ b/src/app/globals.scss @@ -29,4 +29,8 @@ body { &:hover { background: theme('colors.base.100'); } +} + +:disabled { + cursor: not-allowed; } \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f24c54d..7b8273e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,8 @@ import { Inter } from 'next/font/google'; import { ThemeProvider } from 'next-themes'; +import { Light } from '@/shared/ui'; + import type { Metadata } from 'next'; import './globals.scss'; @@ -26,6 +28,7 @@ const RootLayout = ({ children }: IRootLayout) => ( {children} +