This commit is contained in:
Philipinho
2023-11-23 15:04:03 +00:00
parent 8238f82c35
commit aeb549add4
4 changed files with 24 additions and 27 deletions
+2 -4
View File
@@ -1,11 +1,10 @@
import { Box, ScrollArea, Text, useMantineTheme } from '@mantine/core'; import { Box, ScrollArea, Text } from '@mantine/core';
import CommentList from '@/features/comment/components/comment-list'; import CommentList from '@/features/comment/components/comment-list';
import { useAtom } from 'jotai'; import { useAtom } from 'jotai';
import { asideStateAtom } from '@/components/navbar/atoms/sidebar-atom'; import { asideStateAtom } from '@/components/navbar/atoms/sidebar-atom';
import React from 'react'; import React from 'react';
export default function Aside() { export default function Aside() {
const theme = useMantineTheme();
const [{ tab }] = useAtom(asideStateAtom); const [{ tab }] = useAtom(asideStateAtom);
let title; let title;
@@ -23,7 +22,7 @@ export default function Aside() {
return ( return (
<Box p="md" bg={theme.colors?.gray[1]}> <Box p="md">
{component && ( {component && (
<> <>
<Text mb="md" fw={500}>{title}</Text> <Text mb="md" fw={500}>{title}</Text>
@@ -31,7 +30,6 @@ export default function Aside() {
<ScrollArea style={{ height: '85vh' }} scrollbarSize={5} type="scroll"> <ScrollArea style={{ height: '85vh' }} scrollbarSize={5} type="scroll">
<div style={{ paddingBottom: '200px' }}> <div style={{ paddingBottom: '200px' }}>
{component} {component}
</div> </div>
</ScrollArea> </ScrollArea>
</> </>
+22 -16
View File
@@ -1,20 +1,26 @@
.header, @media (max-width: 992px) {
.footer { .header,
/* [data-layout='alt'] & { .footer {
--_section-right: var(--app-shell-aside-offset, 0px); [data-layout='alt'] & {
} --_section-right: var(--app-shell-aside-offset, 0px);
*/ }
}
.aside {
background: var(--mantine-color-gray-light);
[data-layout='alt'] & {
--_section-top: var(--_section-top, var(--app-shell-header-offset, 0px));
--_section-height: var(
--_section-height,
calc(100dvh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px))
);
} }
} }
@media (min-width: 993px) {
.aside {
background: var(--mantine-color-gray-light);
[data-layout='alt'] & {
--_section-top: var(--_section-top, var(--app-shell-header-offset, 0px));
--_section-height: var(
--_section-height,
calc(100dvh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px))
);
}
}
}
@@ -4,6 +4,3 @@ import { Editor } from '@tiptap/core';
export const editorAtom = atom<Editor | null>(null); export const editorAtom = atom<Editor | null>(null);
export const titleEditorAtom = atom<Editor | null>(null); export const titleEditorAtom = atom<Editor | null>(null);
export type EditorAtomType = typeof editorAtom;
export type TitleEditorAtomType = typeof titleEditorAtom;
-4
View File
@@ -1,11 +1,7 @@
import { useAtom } from 'jotai';
import { currentUserAtom } from '@/features/user/atoms/current-user-atom';
import { Container } from '@mantine/core'; import { Container } from '@mantine/core';
import HomeTabs from '@/features/home/components/home-tabs'; import HomeTabs from '@/features/home/components/home-tabs';
// Hello {currentUser && currentUser.user.name}!
export default function Home() { export default function Home() {
const [currentUser] = useAtom(currentUserAtom);
return ( return (
<Container size={'800'} pt="xl"> <Container size={'800'} pt="xl">