Header and Footer moved to _app.

This commit is contained in:
FilipHalon 2020-01-14 15:23:01 +01:00
parent 71d266acc0
commit a31cf63dc8
5 changed files with 19 additions and 12 deletions

View File

@ -1,8 +1,17 @@
import '@fortawesome/fontawesome-svg-core/styles.css'; import '@fortawesome/fontawesome-svg-core/styles.css';
import "../style.css";
import Header from './components/Header';
import Footer from './components/Footer';
// import App from 'next/app' // import App from 'next/app'
function MyApp({ Component, pageProps }) { function MyApp({ Component, pageProps }) {
return <Component {...pageProps} /> return (
<div className="root-container">
<Header />
<Component {...pageProps} />
<Footer />
</div>
)
} }
// Only uncomment this method if you have blocking data requirements for // Only uncomment this method if you have blocking data requirements for

View File

@ -2,7 +2,7 @@ import Link from 'next/link';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCog, faTasks, faComments, faCommentDots, faUserPlus, faUser } from '@fortawesome/free-solid-svg-icons'; import { faCog, faTasks, faComments, faCommentDots, faUserPlus, faUser } from '@fortawesome/free-solid-svg-icons';
const Header = props => { const Header = () => {
return ( return (
<header> <header>
<nav> <nav>

View File

@ -8,7 +8,7 @@ const RegisterForm = props => {
const lockIcon = <span><FontAwesomeIcon icon={faLock} /></span> const lockIcon = <span><FontAwesomeIcon icon={faLock} /></span>
return ( return (
<div> <div className="page-content-center">
<h1>Rejestracja konta programisty do systemy Task-O!</h1> <h1>Rejestracja konta programisty do systemy Task-O!</h1>
<form> <form>
<ul> <ul>

View File

@ -1,11 +1,6 @@
import "../style.css";
import Header from './components/Header';
import LoginArea from './components/LoginArea'; import LoginArea from './components/LoginArea';
import Footer from './components/Footer';
const Index = props => ( const Index = () => (
<div className="index">
<Header />
<div className="page-content-center"> <div className="page-content-center">
<h1>Rejestracja do systemu Task-O!</h1> <h1>Rejestracja do systemu Task-O!</h1>
<span className="login-areas"> <span className="login-areas">
@ -13,8 +8,6 @@ const Index = props => (
<LoginArea accountType="company"/> <LoginArea accountType="company"/>
</span> </span>
</div> </div>
<Footer />
</div>
); );
export default Index; export default Index;

View File

@ -15,7 +15,12 @@ body {
height: 100%; height: 100%;
} }
body div:first-child { /* body div:first-child {
height: 100%;
} */
#__next,
.root-container {
height: 100%; height: 100%;
} }