diff --git a/components/Header.module.css b/components/Header.module.css
index 575236fc..03f6f93d 100644
--- a/components/Header.module.css
+++ b/components/Header.module.css
@@ -23,3 +23,7 @@
font-weight: 600;
margin-left: 40px;
}
+
+.logo {
+ margin-right: 12px;
+}
diff --git a/components/Icon.js b/components/Icon.js
index c0073ab0..30bd9081 100644
--- a/components/Icon.js
+++ b/components/Icon.js
@@ -6,6 +6,7 @@ export default function Icon({ icon, className, size = 'M' }) {
return (
svg {
+ width: 48px;
+ height: 48px;
+}
+
.large > svg {
width: 24px;
height: 24px;
diff --git a/components/Layout.js b/components/Layout.js
index b8c744e7..a2d45cc1 100644
--- a/components/Layout.js
+++ b/components/Layout.js
@@ -1,9 +1,18 @@
import React from 'react';
+import classNames from 'classnames';
import Head from 'next/head';
import Header from 'components/Header';
import Footer from 'components/Footer';
+import styles from './Layout.module.css';
-export default function Layout({ title, children }) {
+export default function Layout({
+ title,
+ children,
+ header = true,
+ footer = true,
+ center = false,
+ middle = false,
+}) {
return (
<>
@@ -14,9 +23,16 @@ export default function Layout({ title, children }) {
rel="stylesheet"
/>
-
-
{children}
-
+ {header &&
}
+
+ {children}
+
+ {footer &&
}
>
);
}
diff --git a/components/Layout.module.css b/components/Layout.module.css
new file mode 100644
index 00000000..30ddec41
--- /dev/null
+++ b/components/Layout.module.css
@@ -0,0 +1,12 @@
+.layout {
+ display: flex;
+ flex-direction: column;
+}
+
+.center {
+ align-items: center;
+}
+
+.middle {
+ justify-content: center;
+}
diff --git a/components/Login.js b/components/Login.js
index 649142b9..1daff572 100644
--- a/components/Login.js
+++ b/components/Login.js
@@ -1,8 +1,9 @@
import React, { useState } from 'react';
-import { Formik, Form, Field, ErrorMessage } from 'formik';
+import { Formik, Form, Field } from 'formik';
import Router from 'next/router';
import { post } from 'lib/web';
import Button from './Button';
+import FormLayout, { FormButtons, FormError, FormMessage, FormRow } from './FormLayout';
import styles from './Login.module.css';
const validate = ({ username, password }) => {
@@ -32,30 +33,35 @@ export default function Login() {
};
return (
-
- {() => (
-
- )}
-
+
+
+ {() => (
+
+ )}
+
+
);
}
diff --git a/components/Login.module.css b/components/Login.module.css
index db0b1286..43bc3150 100644
--- a/components/Login.module.css
+++ b/components/Login.module.css
@@ -1,5 +1,4 @@
-.form {
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
+.title {
+ font-size: var(--font-size-xlarge);
+ text-align: center;
}
diff --git a/pages/login.js b/pages/login.js
index 45ddf433..7a91fcba 100644
--- a/pages/login.js
+++ b/pages/login.js
@@ -1,10 +1,13 @@
import React from 'react';
import Layout from 'components/Layout';
import Login from 'components/Login';
+import Icon from 'components/Icon';
+import Logo from 'assets/logo.svg';
export default function LoginPage() {
return (
-
+
+ } size="XL" />
);
diff --git a/styles/index.css b/styles/index.css
index 25ee6baf..ef4a8859 100644
--- a/styles/index.css
+++ b/styles/index.css
@@ -19,7 +19,12 @@ body {
box-sizing: inherit;
}
-h2 {
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
font-weight: 400;
}
@@ -42,16 +47,9 @@ a:visited {
color: var(--primary400);
}
-form label {
- display: inline-block;
- min-width: 100px;
-}
-
input,
textarea {
padding: 4px 8px;
- margin-right: 10px;
- margin-bottom: 20px;
font-size: var(--font-size-normal);
line-height: 1.8;
border: 1px solid var(--gray500);
diff --git a/styles/variables.css b/styles/variables.css
index ed76fd35..7f4d7d76 100644
--- a/styles/variables.css
+++ b/styles/variables.css
@@ -7,7 +7,7 @@
--gray400: #cacaca;
--gray500: #b3b3b3;
--gray600: #8e8e8e;
- --gray6700: #6e6e6e;
+ --gray700: #6e6e6e;
--gray800: #4b4b4b;
--gray900: #2c2c2c;
@@ -26,4 +26,6 @@
--grid-size-medium: 768px;
--grid-size-large: 992px;
--grid-size-xlarge: 1140px;
+
+ --color-error: #e34850;
}