diff --git a/apps/web/Components/Admin/Layout.tsx b/apps/web/Components/Admin/Layout.tsx index 602c63a..540495f 100644 --- a/apps/web/Components/Admin/Layout.tsx +++ b/apps/web/Components/Admin/Layout.tsx @@ -1,3 +1,4 @@ +import { Media } from '@/styles/media'; import { min } from '@/styles/mq'; import type { MenuProps } from 'antd'; import Link from 'next/link'; @@ -5,26 +6,37 @@ import { useRouter } from 'next/router'; import type { PropsWithChildren } from 'react'; import styled from 'styled-components'; import { Menu } from 'ui/elements'; -import { DatabaseOutlined, HomeOutlined, PlusSquareOutlined } from 'ui/elements/icons'; +import { AppstoreOutlined, SettingOutlined } from 'ui/elements/icons'; const items: MenuProps['items'] = [ { - icon: , - key: '/', - label: Главная, + children: [ + { + // icon: , + key: '/', + label: Главная, + }, + { + // icon: , + key: '/unlimited', + label: Без ограничений, + }, + ], + icon: , + key: 'home', + label: 'Приложение', }, { - icon: , - key: '/unlimited', - label: Без ограничений, - }, - { - type: 'divider', - }, - { - icon: , - key: '/admin/cache', - label: Управление кэшем, + children: [ + { + // icon: , + key: '/admin/cache', + label: Управление кэшем, + }, + ], + icon: , + key: 'admin', + label: 'Панель управления', }, ]; @@ -40,9 +52,11 @@ const Wrapper = styled.div` `; const MenuWrapper = styled(Wrapper)` - > :first-child { - min-height: 100%; - width: 280px; + ${min('laptop')} { + > :first-child { + min-height: 100%; + width: 280px; + } } `; @@ -52,6 +66,11 @@ const ContentWrapper = styled(Wrapper)` const Flex = styled.div` display: flex; + flex-direction: column; + + ${min('laptop')} { + flex-direction: row; + } `; export function Layout({ children }: PropsWithChildren) { @@ -59,9 +78,21 @@ export function Layout({ children }: PropsWithChildren) { return ( - - - + + + + + + + + + + {children} ); diff --git a/apps/web/package.json b/apps/web/package.json index bff01d0..1213f0a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@apollo/client": "^3.9.5", + "@artsy/fresnel": "^7.1.4", "@fontsource/montserrat": "^4.5.14", "@sentry/nextjs": "^7.102.0", "@sentry/node": "^7.102.0", diff --git a/apps/web/pages/_app.jsx b/apps/web/pages/_app.jsx index 6cb442a..8ea8ba3 100644 --- a/apps/web/pages/_app.jsx +++ b/apps/web/pages/_app.jsx @@ -10,6 +10,7 @@ import { theme } from '@/config/ui'; import StoreProvider from '@/stores/Provider'; import getColors from '@/styles/colors'; import { GlobalStyle } from '@/styles/global-style'; +import { MediaContextProvider } from '@/styles/media'; import { trpcClient } from '@/trpc/client'; import { ApolloProvider } from '@apollo/client'; import { QueryClientProvider } from '@tanstack/react-query'; @@ -52,9 +53,11 @@ function App({ Component, pageProps }) { }} > - - - + + + + + diff --git a/apps/web/pages/_document.jsx b/apps/web/pages/_document.jsx index 4a1c9fa..b086f8f 100644 --- a/apps/web/pages/_document.jsx +++ b/apps/web/pages/_document.jsx @@ -1,7 +1,9 @@ +/* eslint-disable react/no-danger */ /* eslint-disable @typescript-eslint/explicit-member-accessibility */ import { metaFavicon } from '@/config/meta'; import { withBasePath } from '@/config/urls'; import { PAGE_DESCRIPTION } from '@/constants/page'; +import { mediaStyles } from '@/styles/media'; import Document, { Head, Html, Main, NextScript } from 'next/document'; import { ServerStyleSheet } from 'styled-components'; import { createCache, doExtraStyle, StyleProvider } from 'ui/tools'; @@ -46,6 +48,7 @@ export default class MyDocument extends Document { {metaFavicon} +