From 099413662f7607d19753f3fe258e88c9770fcc69 Mon Sep 17 00:00:00 2001 From: Semyon Okulov Date: Sun, 21 Jan 2024 18:34:32 +0700 Subject: [PATCH] wip --- README.md | 2 ++ .../index.tsx => AppWrapper/App/Sidebar.tsx} | 0 src/AppWrapper/App/index.tsx | 5 +-- src/assets/technologies.ts | 14 ++++++++ .../Profile/ProfileInfo}/LinkWithImage.tsx | 0 .../Profile}/ProfileInfo/UserInfo.tsx | 5 ++- .../Profile}/ProfileInfo/UserStory.tsx | 6 ++-- .../Profile}/ProfileInfo/data.tsx | 33 +++++++++---------- .../Profile}/ProfileInfo/index.tsx | 0 .../Profile}/ProfileInfo/styles.ts | 0 src/views/{Profile.tsx => Profile/index.tsx} | 9 +++-- .../Settings}/ToggleTheme.tsx | 0 .../{Settings.tsx => Settings/index.tsx} | 5 ++- 13 files changed, 45 insertions(+), 34 deletions(-) rename src/{components/Sidebar/index.tsx => AppWrapper/App/Sidebar.tsx} (100%) rename src/{components => views/Profile/ProfileInfo}/LinkWithImage.tsx (100%) rename src/{components => views/Profile}/ProfileInfo/UserInfo.tsx (93%) rename src/{components => views/Profile}/ProfileInfo/UserStory.tsx (90%) rename src/{components => views/Profile}/ProfileInfo/data.tsx (90%) rename src/{components => views/Profile}/ProfileInfo/index.tsx (100%) rename src/{components => views/Profile}/ProfileInfo/styles.ts (100%) rename src/views/{Profile.tsx => Profile/index.tsx} (94%) rename src/{components => views/Settings}/ToggleTheme.tsx (100%) rename src/views/{Settings.tsx => Settings/index.tsx} (96%) diff --git a/README.md b/README.md index 44f39d1..44c269a 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,5 @@ git clone https://github.com/scffs/portfolio ``` For installing all dependencies type `yarn` > If you get some error delete `.node_modules` and try again **or** create an issue about that + +#### P.S. there are a lot of type errors because react types and preact types are not always compatible diff --git a/src/components/Sidebar/index.tsx b/src/AppWrapper/App/Sidebar.tsx similarity index 100% rename from src/components/Sidebar/index.tsx rename to src/AppWrapper/App/Sidebar.tsx diff --git a/src/AppWrapper/App/index.tsx b/src/AppWrapper/App/index.tsx index 5018d84..2703189 100644 --- a/src/AppWrapper/App/index.tsx +++ b/src/AppWrapper/App/index.tsx @@ -12,11 +12,12 @@ import { useAdaptivityConditionalRender, usePlatform } from '@vkontakte/vkui' -import { Suspense, lazy, useCallback, useEffect, useState } from 'react' -import Sidebar from '../../components/Sidebar' +import { useCallback, useEffect, useState } from 'react' +import Suspense from '../../components/Suspense.tsx' import { VIEW_PROFILE } from '../../routes' import { Pages } from '../../types' import Epic from './Epic.tsx' +import Sidebar from './Sidebar.tsx' const App = () => { const platform = usePlatform() diff --git a/src/assets/technologies.ts b/src/assets/technologies.ts index 4e4653c..f16f3a2 100644 --- a/src/assets/technologies.ts +++ b/src/assets/technologies.ts @@ -1,11 +1,18 @@ +import ava from './avaSmall.jpg' import bun from './bun.png' import charp from './charp.png' import docker from './docker.png' import elysia from './elysia.svg' import fastify from './fastify.png' +import github from './github.svg' import go from './go.png' +import habr from './habr.svg' import js from './js.png' +import avaKot from './kot.png' import kuber from './kuber.png' +import leetcode from './leetcode.svg' +import avaVKT from './logovkt.webp' +import mdn from './mdn.svg' import mongodb from './mongodb.svg' import mysql from './mysql.svg' import nest from './nest.png' @@ -25,6 +32,11 @@ import vue from './vue.svg' import zustand from './zustand.png' export { + mdn, + habr, + avaVKT, + avaKot, + ava, bun, charp, docker, @@ -46,7 +58,9 @@ export { styled, ts, vite, + leetcode, vk, + github, vue, elysia, zustand diff --git a/src/components/LinkWithImage.tsx b/src/views/Profile/ProfileInfo/LinkWithImage.tsx similarity index 100% rename from src/components/LinkWithImage.tsx rename to src/views/Profile/ProfileInfo/LinkWithImage.tsx diff --git a/src/components/ProfileInfo/UserInfo.tsx b/src/views/Profile/ProfileInfo/UserInfo.tsx similarity index 93% rename from src/components/ProfileInfo/UserInfo.tsx rename to src/views/Profile/ProfileInfo/UserInfo.tsx index 9c8e4f5..9c34b62 100644 --- a/src/components/ProfileInfo/UserInfo.tsx +++ b/src/views/Profile/ProfileInfo/UserInfo.tsx @@ -12,9 +12,8 @@ import { import { gradientBorder, infoStyle, styles } from './styles' -import ava from '../../assets/avaSmall.jpg' - -import { VK_URL } from '../../constants' +import { ava } from '../../../assets/technologies.ts' +import { VK_URL } from '../../../constants' import { userInfoItems } from './data.tsx' const UserInfo = () => ( diff --git a/src/components/ProfileInfo/UserStory.tsx b/src/views/Profile/ProfileInfo/UserStory.tsx similarity index 90% rename from src/components/ProfileInfo/UserStory.tsx rename to src/views/Profile/ProfileInfo/UserStory.tsx index dba1bb6..949eb57 100644 --- a/src/components/ProfileInfo/UserStory.tsx +++ b/src/views/Profile/ProfileInfo/UserStory.tsx @@ -1,8 +1,6 @@ import { Accordion, Div, Gradient, Paragraph, Spacing } from '@vkontakte/vkui' - -import { gradientBorder } from './styles' - -import { userStoryContent } from './data' +import { userStoryContent } from './data.tsx' +import { gradientBorder } from './styles.ts' const UserStory = () => ( diff --git a/src/components/ProfileInfo/data.tsx b/src/views/Profile/ProfileInfo/data.tsx similarity index 90% rename from src/components/ProfileInfo/data.tsx rename to src/views/Profile/ProfileInfo/data.tsx index 3fb0d64..09ddf35 100644 --- a/src/components/ProfileInfo/data.tsx +++ b/src/views/Profile/ProfileInfo/data.tsx @@ -4,6 +4,18 @@ import { Icon28ServicesOutline } from '@vkontakte/icons' import { Avatar, Div, Link, Spacing } from '@vkontakte/vkui' +import { + avaKot, + avaVKT, + github, + habr, + leetcode, + mdn, + python, + react, + vk +} from '../../../assets/technologies.ts' +import Flex from '../../../components/Flex.tsx' import { GITHUB_URL, HABR_URL, @@ -15,22 +27,9 @@ import { TEPT_URL, VKT_URL, VKUI_URL -} from '../../constants' -import Flex from '../Flex' - -import LinkWithImage from '../LinkWithImage' - -import github from '../../assets/github.svg' -import habr from '../../assets/habr.svg' -import avaKot from '../../assets/kot.png' -import leetcode from '../../assets/leetcode.svg' -import avaVKT from '../../assets/logovkt.webp' -import mdn from '../../assets/mdn.svg' -import python from '../../assets/python.png' -import react from '../../assets/react.svg' -import vkui from '../../assets/vk.svg' - -import { VIEW_PROJECTS, VIEW_STACK } from '../../routes' +} from '../../../constants' +import { VIEW_PROJECTS, VIEW_STACK } from '../../../routes' +import LinkWithImage from "./LinkWithImage.tsx"; export const userInfoItems = [ { @@ -152,7 +151,7 @@ export const userStoryContent = [ прошлом был модератором и участником крупнейшей веб-документации{' '} и других крупных OpenSource проектов, например, - и + и {/* Логотип реакта не квадратный, поэтому для полного отображения изменяю ширину */} = ({ id }) => { const { panel: activePanel, panelsHistory } = useActiveVkuiLocation() diff --git a/src/components/ToggleTheme.tsx b/src/views/Settings/ToggleTheme.tsx similarity index 100% rename from src/components/ToggleTheme.tsx rename to src/views/Settings/ToggleTheme.tsx diff --git a/src/views/Settings.tsx b/src/views/Settings/index.tsx similarity index 96% rename from src/views/Settings.tsx rename to src/views/Settings/index.tsx index 2d41d3b..4391337 100644 --- a/src/views/Settings.tsx +++ b/src/views/Settings/index.tsx @@ -13,9 +13,8 @@ import { View } from '@vkontakte/vkui' import { FC, useEffect, useState } from 'react' - -import PanelHeaderWithBack from '../components/PanelHeaderWithBack' -import ToggleTheme from '../components/ToggleTheme' +import PanelHeaderWithBack from "../../components/PanelHeaderWithBack"; +import ToggleTheme from "./ToggleTheme.tsx"; const formatKeyText = (key: string) => { if (key.startsWith('orientation')) {