Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buyankhuu/log in screen #7

Merged
merged 7 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,233 changes: 3,218 additions & 15 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"eslint-config-next": "13.5.2",
"next": "13.5.2",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"styled-components": "^6.0.8"
},
"devDependencies": {
"@calblueprint/eslint-config-react": "^0.0.3",
Expand All @@ -34,6 +35,7 @@
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"file-loader": "^6.2.0",
"prettier": "^2.8.8",
"typescript": "^4.9.5"
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/supabase/queries /createClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
);

export default supabase;
export default supabase;
18 changes: 18 additions & 0 deletions src/app/components/InputFields.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client';

import { FormHeaders, Input } from '../screens/loginScreen/styles';

export default function InputFields(props: {
text: string;
placeholder: string;
}) {
const { text, placeholder } = props;
return (
<main>
<div id="userInfo">
<FormHeaders>{text}</FormHeaders>
<Input type="text" placeholder={placeholder} />
</div>
</main>
);
}
12 changes: 12 additions & 0 deletions src/app/components/LoginForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use client';

import InputFields from './InputFields';

export default function LoginForm() {
return (
<div>
<InputFields text="Email address" placeholder="[email protected]" />
<InputFields text="Password" placeholder="************" />
</div>
);
}
14 changes: 7 additions & 7 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';

const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: 'Shanti Project',
description: 'Application Created by Blueprint',
}
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
);
}
4 changes: 1 addition & 3 deletions src/app/login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export default function Home() {
return (
<h1> yo </h1>
)
return <h1> yo </h1>;
}
28 changes: 28 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use client';

import LoginForm from './components/LoginForm';
import {
GlobalStyle,
Fullscreen,
LoginBox,
LoginContent,
WelcomeSign,
Button,
} from './screens/loginScreen/styles';

export default function App() {
return (
<main>
<GlobalStyle />
<Fullscreen>
<LoginBox>
<LoginContent>
<WelcomeSign>Welcome</WelcomeSign>
<LoginForm />
<Button>Log In</Button>
</LoginContent>
</LoginBox>
</Fullscreen>
</main>
);
}
7 changes: 0 additions & 7 deletions src/app/screens/login /loginPage.tsx

This file was deleted.

31 changes: 31 additions & 0 deletions src/app/screens/loginScreen/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use client';

import LoginForm from '../../components/LoginForm';

import {
GlobalStyle,
Fullscreen,
Img,
LoginBox,
LoginContent,
WelcomeSign,
Button,
} from './styles';

export default function App() {
return (
<main>
<GlobalStyle />
<Fullscreen>
<Img />
<LoginBox>
<LoginContent>
<WelcomeSign>Welcome</WelcomeSign>
<LoginForm />
<Button>Log In</Button>
</LoginContent>
</LoginBox>
</Fullscreen>
</main>
);
}
Binary file added src/app/screens/loginScreen/shantiLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions src/app/screens/loginScreen/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import styled, { createGlobalStyle } from 'styled-components';

export const GlobalStyle = createGlobalStyle`
body {
background:white;
}
`;
export const LoginBox = styled.div`
display: flex;
flex-direction: column;
width: 500px;
height: 420px;
margin-left: 450px;
margin-top: 80px;
border: 1px solid #b3b3b3;
`;

export const LoginContent = styled.div`
margin-left: 40px;
margin-top: 30px;
`;

export const Button = styled.button`
margin-top: 40px;
color: #fff;
text-align: center;
font-family: Inter;
font-size: 17px;
font-style: normal;
font-weight: 500;
line-height: normal;
width: 420px;
height: 40px;
border-radius: 8px;
background: #000;
border: transparent;
`;

export const WelcomeSign = styled.div`
color: #000;
font-family: Inter;
font-size: 40px;
font-style: normal;
font-weight: 700;
line-height: normal;
margin-bottom: 30px;
`;

export const Input = styled.input`
background: #d9d9d9;
border: transparent;
width: 420px;
height: 40px;
padding-left: 10px;
`;

export const FormHeaders = styled.p`
color: #000;
font-family: Inter;
font-size: 15px;
font-style: normal;
font-weight: 400;
line-height: normal;
margin-top: 20px;
margin-bottom: 10px;
`;

export const Fullscreen = styled.div`
width: 100 %;
height: 100 %;
`;
export const Img = styled.div`
background-color: yellow;
align-self: flex - start;
justify-self: flex - start;
height: 50px;
width: 110px;
margin: 20px;
`;
12 changes: 6 additions & 6 deletions src/app/screens/profile /profileScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default function Profile() {
return (
<main>
<div>Profile</div>
</main>
);
}
return (
<main>
<div>Profile</div>
</main>
);
}
12 changes: 6 additions & 6 deletions src/app/screens/storefront/storefrontScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default function Storefront() {
return (
<main>
<div>storefront</div>
</main>
);
}
return (
<main>
<div>storefront</div>
</main>
);
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"exclude": [
"node_modules"
]
}
}