доработка хедера футера
This commit is contained in:
parent
b414c0e8ab
commit
848e4111c0
24
src/App.tsx
24
src/App.tsx
@ -14,23 +14,19 @@ const App: React.FC = () => (
|
||||
<IonApp>
|
||||
<IonReactRouter>
|
||||
|
||||
{/* Постоянный Header */}
|
||||
<Header />
|
||||
<div className='flex flex-col h-screen bg-green-300'>
|
||||
<Header />
|
||||
|
||||
{/* Основной контейнер для контента */}
|
||||
<div className='flex flex-col min-h-screen container mx-auto px-4 bg-fuchsia-200'>
|
||||
{/* Контент с отступом равным высоте Header */}
|
||||
<div className='flex-1 overflow-auto'>
|
||||
<IonRouterOutlet>
|
||||
<AppRoutes />
|
||||
</IonRouterOutlet>
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
|
||||
<div className='container mt-20 flex-1'>
|
||||
<IonRouterOutlet>
|
||||
<AppRoutes />
|
||||
</IonRouterOutlet>
|
||||
</div>
|
||||
|
||||
{/* Постоянный Footer */}
|
||||
<Footer />
|
||||
|
||||
</div>
|
||||
</IonReactRouter>
|
||||
</IonApp>
|
||||
);
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import { Route } from 'react-router-dom';
|
||||
|
||||
import Home from './pages/Home';
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
import { IonRouterLink } from '@ionic/react';
|
||||
|
||||
function Footer() {
|
||||
return (
|
||||
<div className='mt-auto bg-fuchsia-400'>
|
||||
<h1>Footer</h1>
|
||||
|
||||
<div className='w-full bg-fuchsia-400 shadow h-12 px-4 flex justify-center items-center fixed bottom-0 left-0 right-0 bg-opacity-80'>
|
||||
{/* Можно добавить содержимое футера */}
|
||||
Футер
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Footer;
|
||||
export default Footer;
|
@ -1,16 +1,17 @@
|
||||
import React from 'react';
|
||||
import { IonRouterLink } from '@ionic/react';
|
||||
|
||||
function Header() {
|
||||
return (
|
||||
<div className='fixed top-0 left-0 w-full z-50 bg-fuchsia-400 shadow h-12 px-4 flex justify-between'>
|
||||
<h1>Вмеда</h1>
|
||||
<IonRouterLink href="/register">
|
||||
<a className="text-sm">Зарегистрироваться</a>
|
||||
<div className='w-full z-50 bg-fuchsia-400 shadow h-12 px-4 flex justify-between items-center fixed top-0 left-0 right-0 bg-opacity-80'>
|
||||
<IonRouterLink href='/home' className='cursor-pointer'>
|
||||
Вмеда
|
||||
</IonRouterLink>
|
||||
|
||||
<IonRouterLink href="/register" className="text-sm">
|
||||
Зарегистрироваться
|
||||
</IonRouterLink>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Header;
|
||||
|
||||
export default Header;
|
@ -1,12 +0,0 @@
|
||||
|
||||
|
||||
function MainContent() {
|
||||
return (
|
||||
<div className="flex-1 mt-12 bg-green-200">
|
||||
<p>main content</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default MainContent;
|
||||
|
@ -2,7 +2,10 @@
|
||||
function Home() {
|
||||
return (
|
||||
<>
|
||||
<p className="pt-20">Домашняя страница</p>
|
||||
<div className="pt-20 mx-auto px-4">
|
||||
<p>Домашняя страница</p>
|
||||
</div>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
function Login() {
|
||||
return (
|
||||
<div className=''>
|
||||
<h1>Войти/залогиниться</h1>
|
||||
|
||||
<h1>Войти/залогиниться</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
|
||||
|
||||
function Auth() {
|
||||
return (
|
||||
<div className='pt-20'>
|
||||
|
||||
<h1 className='cursor-pointer'>Страница регистрации</h1>
|
||||
|
||||
<div className="pt-20 mx-auto px-4">
|
||||
<h1>Страница регистрации</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user