Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Nov 20, 2019
2 parents 503766f + 93c6652 commit d135129
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 122 deletions.
2 changes: 1 addition & 1 deletion components/info.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.root {
text-align: right;
// text-align: right;
font-size: 12px;
color: #505050;
}
3 changes: 1 addition & 2 deletions components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ const Layout = props => {
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/css/normalize.css"></link>
<link rel="stylesheet" href="/css/normalize.css"></link>
</Head>

<div className={css.container}>
{/* <Heading /> */}
<p></p>
{children}
{/* <Footer /> */}
</div>
Expand Down
36 changes: 1 addition & 35 deletions components/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

.container {
min-height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}

:global {
html {
height: 100%;
overflow: hidden;
}
body {
margin: 0;
height: 100%;
font-family: "Roboto", sans-serif;
// font-family: "IM Fell English", serif;
// font-family: 'Montserrat', sans-serif;
line-height: 1.5;
color: #404040;
}
Expand All @@ -38,34 +34,4 @@
#__next {
height: 100%;
}
main {
min-height: 100%;
flex: 1;
padding-top: 16px;
padding-bottom: 16px;
padding-left: 36px;
padding-right: 16px;
display: flex;
justify-content: center;
}
main.mid {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
main.article {
display: flex;
justify-content: center;
}
main section {
max-width: 590px;
width: 100%;
font-size: 20px;
// position: relative;
}
main.center {
display: flex;
justify-content: center;
}
}
32 changes: 17 additions & 15 deletions components/quotation.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import css from "./quotation.scss";
import Link from "next/link"
import Link from "next/link";

const Quotation = props => {
const { quote } = props;
return (
<div className={css.root}>
<h2 className={css.quotationMark}>
<Link href="/quote/[slug]" as={"/quote/" + quote.slug}>
<a>&ldquo;</a>
</Link>
</h2>
<p className={css.text}>{quote.text}</p>
<small>
<div className={css.citation}>
<p className={css.author}>
&mdash;{quote.author}
{props.source && <em className={css.source}>, {quote.source}</em>}
</p>
</div>
</small>
<div className={css.container}>
{/* <h2 className={css.quotationMark}>
<Link href="/quote/[slug]" as={"/quote/" + quote.slug}>
<a>&ldquo;</a>
</Link>
</h2> */}
<p className={css.text}>{quote.text}</p>
<small>
<div className={css.citation}>
<p className={css.author}>
&mdash;{quote.author}
{props.source && <em className={css.source}>, {quote.source}</em>}
</p>
</div>
</small>
</div>
</div>
);
};
Expand Down
16 changes: 11 additions & 5 deletions components/quotation.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
.root {
display: flex;
font-family: "IM Fell English", serif;
position: relative;
font-size: 20px;
margin-left: 16px;
margin-right: 16px;
justify-content: center;
margin-top: 16px;
}

.container {
max-width: 590px;
}

.quotationMark {
position: absolute;
left: -25px;
top: -2px;
margin: 0;

a {
text-decoration: none;
}
}
}
11 changes: 10 additions & 1 deletion components/title.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
import css from "./title.scss"
import css from "./title.scss";

export default props => {
const { text } = props;
return (
<div className={css.root}>
<div className={css.title}>{text}</div>
</div>
);
};
14 changes: 14 additions & 0 deletions components/title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.root {
display: flex;
justify-content: center;
margin-left: 16px;
margin-right: 16px;
margin-top: 32px;
}

.title {
max-width: 590px;
flex: 1;
font-weight: bold;
font-size: 28px;
}
19 changes: 7 additions & 12 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import absoluteUrl from "next-absolute-url";

import Quotation from "../components/quotation";
import Info from "../components/info";
import Title from "../components/title";

import css from "./index.scss";

Expand All @@ -16,18 +17,12 @@ const Home = props => {
setTitle("Quoke");

return (
<>
<center>
<h2>quoke</h2>
</center>
<main className={css.root}>
<section>
<Quotation quote={props.randomQuote} />
<hr />
<Info quote={props.randomQuote} />
</section>
</main>
</>
<div className={css.root}>
<Title text="/quoke" />
<Quotation quote={props.randomQuote} />
<hr />
{/* <Info quote={props.randomQuote} /> */}
</div>
);
};

Expand Down
3 changes: 1 addition & 2 deletions pages/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.root {
display: flex;
justify-content: center;

}
54 changes: 6 additions & 48 deletions pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { useRouter } from "next/router";
import Link from "next/link";
import { useStoreActions } from "easy-peasy";

import css from "./login.scss"

const Login = props => {
const router = useRouter();
const [userMessage, setUserMessage] = useState();
Expand Down Expand Up @@ -52,51 +54,16 @@ const Login = props => {
name="username"
placeholder="Username"
required
className="btn"
className={css.input}
/>
<input
type="password"
name="password"
placeholder="Password"
required
className="btn"
className={css.input}
/>
<input type="submit" value="Login" className="btn" />
{/* <div>
<TextField
id="username"
name="username"
label="Username"
margin="normal"
variant="filled"
required
className={classes.textField}
/>
</div>
<div>
<TextField
id="password"
name="password"
type="password"
label="Password"
margin="normal"
variant="filled"
required
className={classes.textField}
/>
</div>
<div className="button-container">
<Button
type="submit"
variant="contained"
color="default"
fullWidth={false}
>
Login
</Button>
</div> */}
<input type="submit" value="Login" className={css.input} />
</form>
<p>
<small>
Expand All @@ -110,7 +77,7 @@ const Login = props => {
</main>
<style jsx>
{`
.btn {
.input {
width: 100%;
max-width: 480px;
padding: 12px;
Expand All @@ -124,15 +91,6 @@ const Login = props => {
text-decoration: none;
background: none;
}
{
/* .button-container {
display: flex;
justify-content: flex-end;
}
.button-container button {
margin: 3px;
} */
}
`}
</style>
</>
Expand Down
14 changes: 14 additions & 0 deletions pages/login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.input {
width: 100%;
max-width: 480px;
padding: 12px;
border: 1px solid #e1e1e1;
border-radius: 4px;
margin: 5px 0;
opacity: 0.85;
display: block;
font-size: 17px;
line-height: 20px;
text-decoration: none;
background: none;
}
2 changes: 1 addition & 1 deletion pages/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Register = props => {
<main className={"mid"}>
{userMessage && <div>{userMessage}</div>}
<form action="/api/register" method="post" onSubmit={handleSubmit}>
<input type="text" name="username" placeholder="Username" required />
<input type="text" name="username" placeholder="Username" minLength="3" required />
<input type="email" name="email" placeholder="Email" required />
<input
type="password"
Expand Down

1 comment on commit d135129

@vercel
Copy link

@vercel vercel bot commented on d135129 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.