landing
This commit is contained in:
1
src/__data__/assets/lottie/under-construction.json
Normal file
1
src/__data__/assets/lottie/under-construction.json
Normal file
File diff suppressed because one or more lines are too long
20
src/app.tsx
Normal file
20
src/app.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { Suspense } from "react";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import {Helmet} from 'react-helmet';
|
||||
|
||||
import { Dashboard } from './dashboard';
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>bro js</title>
|
||||
</Helmet>
|
||||
<BrowserRouter>
|
||||
<Dashboard />
|
||||
</BrowserRouter>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
22
src/dashboard.tsx
Normal file
22
src/dashboard.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import { Spinner } from '@chakra-ui/react';
|
||||
|
||||
import { UnderConstructionPage } from './pages';
|
||||
const Hello = () => <h1>Hello</h1>;
|
||||
|
||||
export const Dashboard = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route
|
||||
path={'*'}
|
||||
element={
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<UnderConstructionPage />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path={'*'} element={<h1>Страница не найдена</h1>} />
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
18
src/index.ejs
Normal file
18
src/index.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700,900&subset=cyrillic,cyrillic-ext" rel="stylesheet" />
|
||||
<title>bro-js admin</title>
|
||||
<style>body {margin: 0; padding: 0;}</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/87860751" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
26
src/index.tsx
Normal file
26
src/index.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import i18next from 'i18next';
|
||||
import { i18nextReactInitConfig } from '@brojs/cli/lib/i18next';
|
||||
import { createRoot } from 'react-dom/client'
|
||||
|
||||
import App from './app';
|
||||
|
||||
i18next.t = i18next.t.bind(i18next);
|
||||
const i18nextPromise = i18nextReactInitConfig(i18next);
|
||||
const MOUNT_NODE = document.getElementById('app');
|
||||
|
||||
(async () => {
|
||||
await Promise.all([i18nextPromise]);
|
||||
const rootElement = createRoot(MOUNT_NODE)
|
||||
rootElement.render(<App />);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./app', async () => {
|
||||
await i18next.reloadResources();
|
||||
rootElement.render(<App />);
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
export const mount = () => console.log('mounted');
|
||||
export const unmount = () => console.log('unmounted');
|
||||
3
src/pages/index.ts
Normal file
3
src/pages/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { lazy } from 'react';
|
||||
|
||||
export const UnderConstructionPage = lazy(() => import('./under-construction'));
|
||||
3
src/pages/under-construction/index.ts
Normal file
3
src/pages/under-construction/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { UnderConstruction } from './underConstruction';
|
||||
|
||||
export default UnderConstruction;
|
||||
14
src/pages/under-construction/underConstruction.tsx
Normal file
14
src/pages/under-construction/underConstruction.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import Lottie from "lottie-react";
|
||||
import animation from '../../__data__/assets/lottie/under-construction.json';
|
||||
|
||||
export const UnderConstruction = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Lottie animationData={animation} />
|
||||
|
||||
<h3><center>Сайт в разработке</center></h3>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user