Navbar layout ready.
This commit is contained in:
parent
19a27fc028
commit
9f204f4751
@ -1,4 +1,4 @@
|
|||||||
const withCSS = require('@zeit/next-css')
|
const withCSS = require('@zeit/next-css')
|
||||||
module.exports = withCSS({
|
module.exports = withCSS({
|
||||||
cssModules: true
|
cssModules: false
|
||||||
})
|
})
|
22
pages/_document.js
Normal file
22
pages/_document.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
|
class MyDocument extends Document {
|
||||||
|
static async getInitialProps(ctx) {
|
||||||
|
const initialProps = await Document.getInitialProps(ctx)
|
||||||
|
return { ...initialProps }
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<Html>
|
||||||
|
<Head />
|
||||||
|
<body>
|
||||||
|
<Main />
|
||||||
|
<NextScript />
|
||||||
|
</body>
|
||||||
|
</Html>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default MyDocument
|
54
pages/components/Header.js
Normal file
54
pages/components/Header.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
|
||||||
|
const Header = props => {
|
||||||
|
return (
|
||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<div className="navbar-options">
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Tasko-O!</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Zadania</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Pytania</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Rozmowy</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Ustawienia</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div className="navbar-auth">
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Zaloguj się</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Zarejestruj się</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Header;
|
@ -1,10 +1,10 @@
|
|||||||
import "../style.css"
|
import "../style.css"
|
||||||
import Link from 'next/link';
|
import Header from './components/Header'
|
||||||
|
|
||||||
|
const Index = props => (
|
||||||
const Index = () => (
|
|
||||||
<div>
|
<div>
|
||||||
<p>Hello Next.js</p>
|
<Header/>
|
||||||
|
<p>Hello Next.js</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
60
style.css
60
style.css
@ -1,3 +1,59 @@
|
|||||||
|
:root {
|
||||||
|
--navbar-text-color: #B5BDFB;
|
||||||
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
color: red
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
background-color: #465DEF;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul div {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-options {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-auth {
|
||||||
|
justify-content: flex-end;
|
||||||
|
width: 30%;
|
||||||
|
/* display: grid;
|
||||||
|
grid: 1fr / 1fr 1fr */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .navbar-auth li a {
|
||||||
|
width: 100%;
|
||||||
|
} */
|
||||||
|
|
||||||
|
nav ul div li {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul div li a {
|
||||||
|
padding: 1em;
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--navbar-text-color);
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-auth li:first-of-type a {
|
||||||
|
border: solid 1px rgba(255, 255, 255, .1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-auth li:last-of-type a:last-of-type {
|
||||||
|
background-color: #5D6CED;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user