init project

This commit is contained in:
AmirHossein Mahmoodi
2024-01-29 16:14:12 +03:30
commit 1df5a5edb4
15 changed files with 643 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
const Layout = ({children}) => {
return (
<>{children}</>
)
}
export default Layout

View File

@@ -0,0 +1,7 @@
const Page = () => {
return (
<div>dashboard</div>
)
}
export default Page

View File

@@ -0,0 +1,11 @@
const Template = ({children}) => {
return (
<>
header
sidebar
{children}
</>
)
}
export default Template

11
src/app/layout.js Normal file
View File

@@ -0,0 +1,11 @@
export const metadata = {
title: 'سامانه جامع راهداری',
}
export default function RootLayout({children}) {
return (<html lang="fa" dir={'rtl'}>
<body>
{children}
</body>
</html>)
}

5
src/app/page.js Normal file
View File

@@ -0,0 +1,5 @@
const Page = () => {
return (<></>)
}
export default Page

17
src/app/template.js Normal file
View File

@@ -0,0 +1,17 @@
import cacheProviderRtl from "@/core/utils/cacheRtl";
import {CssBaseline, ThemeProvider} from "@mui/material";
import theme from "@/core/utils/theme";
import {AppRouterCacheProvider} from "@mui/material-nextjs/v14-appRouter";
const Template = ({children}) => {
return (
<AppRouterCacheProvider CacheProvider={cacheProviderRtl} options={{enableCssLayer: true}}>
<ThemeProvider theme={theme}>
<CssBaseline/>
{children}
</ThemeProvider>
</AppRouterCacheProvider>
)
}
export default Template

View File

@@ -0,0 +1,16 @@
'use client'
import createCache from "@emotion/cache";
import {prefixer} from "stylis";
import stylisRTLPlugin from "stylis-plugin-rtl";
import {CacheProvider} from "@emotion/react";
const cache = createCache({
key: 'mui-rtl',
stylisPlugins: [prefixer, stylisRTLPlugin],
});
const cacheProviderRtl = (props) => {
return <CacheProvider value={cache}>{props.children}</CacheProvider>;
}
export default cacheProviderRtl

8
src/core/utils/theme.js Normal file
View File

@@ -0,0 +1,8 @@
'use client'
import {createTheme} from "@mui/material";
const theme = createTheme({
direction: 'rtl'
});
export default theme