-
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.
- Loading branch information
Showing
24 changed files
with
366 additions
and
61 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
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,13 +1,17 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Document</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> | ||
|
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
.MainLayout { | ||
min-height: 100vh; | ||
display: grid; | ||
grid-template-areas: "sidebar content rightbar"; | ||
grid-template-columns: 284px 1fr 176px; | ||
} | ||
|
||
.sidebar { | ||
grid-area: sidebar; | ||
justify-self: center; | ||
padding: 32px; | ||
} | ||
|
||
.content { | ||
grid-area: content; | ||
max-width: 1200px; | ||
justify-self: center; | ||
padding: 32px; | ||
} | ||
|
||
.rightbar { | ||
grid-area: rightbar; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-end; | ||
} | ||
|
||
.rightbar, | ||
.sidebar { | ||
position: sticky; | ||
top: 0; | ||
height: 100vh; | ||
} | ||
|
||
.toolbar { | ||
height: 100%; | ||
} |
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,30 @@ | ||
import { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
import { MainLayout } from './MainLayout'; | ||
|
||
export default { | ||
title: 'shared/MainLayout', | ||
component: MainLayout, | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
} as ComponentMeta<typeof MainLayout>; | ||
|
||
const Template: ComponentStory<typeof MainLayout> = (args) => ( | ||
<MainLayout {...args} /> | ||
); | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
className: 'custom-class', | ||
header: <div>Header</div>, | ||
content: <div>Content</div>, | ||
sidebar: <div>Sidebar</div>, | ||
toolbar: <div>Toolbar</div>, | ||
}; | ||
|
||
export const WithoutToolbar = Template.bind({}); | ||
WithoutToolbar.args = { | ||
header: <div>Header</div>, | ||
content: <div>Content</div>, | ||
sidebar: <div>Sidebar</div>, | ||
}; |
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,26 @@ | ||
import { memo, ReactElement } from 'react'; | ||
import { classNames } from '@/shared/lib/classNames/classNames'; | ||
import cls from './MainLayout.module.scss'; | ||
|
||
interface MainLayoutProps { | ||
className?: string; | ||
header: ReactElement; | ||
content: ReactElement; | ||
sidebar: ReactElement; | ||
toolbar?: ReactElement; | ||
} | ||
|
||
export const MainLayout = memo((props: MainLayoutProps) => { | ||
const { className, content, toolbar, header, sidebar } = props; | ||
|
||
return ( | ||
<div className={classNames(cls.MainLayout, {}, [className])}> | ||
<div className={cls.content}>{content}</div> | ||
<div className={cls.sidebar}>{sidebar}</div> | ||
<div className={cls.rightbar}> | ||
<div className={cls.header}>{header}</div> | ||
<div className={cls.toolbar}>{toolbar}</div> | ||
</div> | ||
</div> | ||
); | ||
}); |
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 { MainLayout } from './MainLayout'; |
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,4 +1,5 @@ | ||
export interface FeatureFlags { | ||
isArticleRatingEnabled?: boolean; | ||
isCounterEnabled?: boolean; | ||
isAppRedesigned?: boolean; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.appLogoWrapper { | ||
position: relative; | ||
} | ||
|
||
.gradientBig { | ||
position: absolute; | ||
background: radial-gradient(57.05% 57.05% at 49.84% 42.95%, rgb(94 211 243 / 20%) 0%, rgb(94 211 243 / 13.2%) 7.81%, rgb(94 211 243 / 8.3%) 29.69%, rgb(94 211 243 / 3.86%) 56.77%, rgb(94 211 243 / 2.19%) 77.6%, rgb(94 211 243 / 0%) 100%); | ||
width: 300px; | ||
height: 300px; | ||
border-radius: 50%; | ||
opacity: 0.6; | ||
} | ||
|
||
.gradientSmall { | ||
position: absolute; | ||
width: 200px; | ||
height: 200px; | ||
background: radial-gradient(30.29% 30.29% at 50% 50%, rgb(94 211 243 / 18%) 0%, rgb(94 211 243 / 10.6%) 25.55%, rgb(94 211 243 / 7%) 47.27%, rgb(94 211 243 / 3.8%) 69.66%, rgb(94 211 243 / 0%) 100%); | ||
border-radius: 50%; | ||
opacity: 0.6; | ||
} |
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,21 @@ | ||
import React, { memo } from 'react'; | ||
import cls from './AppLogo.module.scss'; | ||
import { HStack } from '../Stack'; | ||
import AppSvg from '@/shared/assets/icons/app-image.svg'; | ||
import { classNames } from '@/shared/lib/classNames/classNames'; | ||
|
||
interface AppLogoProps { | ||
className?: string; | ||
} | ||
|
||
export const AppLogo = memo(({ className }: AppLogoProps) => ( | ||
<HStack | ||
max | ||
justify="center" | ||
className={classNames(cls.appLogoWrapper, {}, [className])} | ||
> | ||
<div className={cls.gradientBig} /> | ||
<div className={cls.gradientSmall} /> | ||
<AppSvg className={cls.appLogo} /> | ||
</HStack> | ||
)); |
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 { AppLogo } from './AppLogo'; |
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 |
---|---|---|
|
@@ -7,6 +7,10 @@ | |
padding: 20px; | ||
} | ||
|
||
.NavbarRedesigned { | ||
padding: 16px; | ||
} | ||
|
||
.links, | ||
.actions { | ||
margin-left: auto; | ||
|
Oops, something went wrong.