Merge pull request #384 from answerdev/feat/1.1.0/ui

Feat/1.1.0/UI
This commit is contained in:
haitao.jarvis 2023-06-02 18:30:37 +08:00 committed by GitHub
commit 16d2715d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 29 deletions

View File

@ -18,6 +18,10 @@
}
}
:root {
scroll-behavior: auto;
}
html,
body {
padding: 0;

View File

@ -1,31 +1,29 @@
import { FC } from 'react';
import { Container, Row, Col, Nav } from 'react-bootstrap';
import { Row, Col, Nav } from 'react-bootstrap';
import { Outlet, NavLink } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
const Index: FC = () => {
const { t } = useTranslation('translation', { keyPrefix: 'nav_menus' });
return (
<Container className="pt-4 mt-2 mb-5">
<Row className="justify-content-center">
<Col xxl={10}>
<Nav
className="mb-4 flex-nowrap"
variant="pills"
style={{ overflow: 'auto' }}>
<NavLink to="/tos" key="tos" className="nav-link">
{t('tos')}
</NavLink>
<NavLink to="/privacy" key="privacy" className="nav-link">
{t('privacy')}
</NavLink>
</Nav>
</Col>
<Col xxl={10}>
<Outlet />
</Col>
</Row>
</Container>
<Row className="pt-4 mb-5">
<Col xxl={12}>
<Nav
className="mb-4 flex-nowrap"
variant="pills"
style={{ overflow: 'auto' }}>
<NavLink to="/tos" key="tos" className="nav-link">
{t('tos')}
</NavLink>
<NavLink to="/privacy" key="privacy" className="nav-link">
{t('privacy')}
</NavLink>
</Nav>
</Col>
<Col xxl={12}>
<Outlet />
</Col>
</Row>
);
};

View File

@ -41,7 +41,6 @@ const routes: RouteNode[] = [
// question and answer
{
// side nav layout
path: '/',
page: 'pages/SideNavLayout',
children: [
{
@ -400,17 +399,26 @@ const routes: RouteNode[] = [
{
path: '/',
page: 'pages/Layout',
loader: async () => {
await guard.setupApp();
return null;
},
children: [
{
page: 'pages/Legal',
page: 'pages/SideNavLayout',
children: [
{
path: 'tos',
page: 'pages/Legal/Tos',
},
{
path: 'privacy',
page: 'pages/Legal/Privacy',
page: 'pages/Legal',
children: [
{
path: 'tos',
page: 'pages/Legal/Tos',
},
{
path: 'privacy',
page: 'pages/Legal/Privacy',
},
],
},
],
},