feat: init login page

This commit is contained in:
swve 2022-09-21 23:09:47 +02:00
parent fcd281d1d6
commit 920339b5fd
11 changed files with 107 additions and 25 deletions

View file

@ -0,0 +1,37 @@
import React from "react";
import styled from "styled-components";
import Link from "next/link";
export const HeaderProfileBox = () => {
return (
<ProfileArea>
{" "}
<span>HeaderProfileBox</span>{" "}
<Link href="/login">
<a>Login</a>
</Link>{" "}
<Link href="/signup">
<a>Sign up</a>
</Link>
</ProfileArea>
);
};
const ProfileArea = styled.div`
display: flex;
place-items: stretch;
place-items: center;
span {
position: relative;
display: block;
top: 32px;
right: -20px;
padding-right: 20px;
font-size: 12px;
margin: 3px;
background-color: gray;
color: white;
width: auto;
}
`;

View file

@ -0,0 +1,98 @@
import React from "react";
import styled from "styled-components";
import { HeaderProfileBox } from "../../auth/HeaderProfileBox";
import Link from "next/link";
export const Menu = () => {
return (
<GlobalHeader>
<LogoArea>
<Logo>
<img src="./learnhouse_logo.png" alt="" />
</Logo>
<div id="accounts"></div>
</LogoArea>
<SearchArea>
<Search>
<SearchInput placeholder="find something" type="text" />
</Search>
</SearchArea>
<MenuArea>
<ul>
<li>Courses </li>
<li>Collections</li>
<li>Activity</li>
<li>More</li>
</ul>
</MenuArea>
<HeaderProfileBox></HeaderProfileBox>
</GlobalHeader>
);
};
const GlobalHeader = styled.div`
display: flex;
height: 60px;
background: #ffffff;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.03);
`;
const LogoArea = styled.div`
display: flex;
place-items: stretch;
`;
const Logo = styled.div`
display: flex;
place-items: center;
padding-left: 20px;
img {
width: 100px;
}
`;
const SearchArea = styled.div`
display: flex;
place-items: stretch;
flex-grow: 2;
`;
const Search = styled.div`
display: flex;
place-items: center;
padding-left: 20px;
width: auto;
`;
const SearchInput = styled.input`
box-shadow: inset 5px 6px 16px rgba(0, 0, 0, 0.01);
background: rgb(244 242 242 / 35%);
border-radius: 6px;
height: 50%;
border: none;
margin-top: 20px;
margin-bottom: 20px;
padding-left: 10px;
color: #52525220;
`;
const MenuArea = styled.div`
display: flex;
place-items: stretch;
flex-grow: 1;
ul {
display: flex;
place-items: center;
list-style: none;
padding-left: 20px;
li {
padding-right: 20px;
font-size: 16px;
font-weight: 500;
color: #525252;
}
}
`;

View file

@ -0,0 +1,12 @@
import React from "react";
import { Menu } from "./elements/menu";
import Link from 'next/link'
export const Header = () => {
return (
<div>
<Menu></Menu>
</div>
);
};

View file

@ -0,0 +1,43 @@
import React from "react";
import Head from "next/head";
import { Header } from "./header";
import styled from "styled-components";
const Layout = (props: any) => {
return (
<div>
<Head>
<title>{props.title}</title>
<meta name="description" content={props.description} />
<link rel="icon" href="/favicon.ico" />
</Head>
<Header></Header>
<Main className="min-h-screen">{props.children}</Main>
<Footer>
<a href="" target="_blank" rel="noopener noreferrer">
<img src="/learnhouse_icon.png" alt="Learnhouse Logo" />
</a>
</Footer>
</div>
);
};
const Main = styled.main`
min-height: 100vh;
`;
const Footer = styled.footer`
display: flex;
justify-content: center;
margin: 20px;
font-size: 16px;
img{
width: 40px;
opacity: 0.40;
display: inline;
}
`;
export default Layout;

View file

@ -0,0 +1,7 @@
import styled from "styled-components";
export const Title = styled.h1`
font-size: 1.5em;
padding-left: 20px;
font-weight: 500;
`;