mirror of
https://github.com/Lissy93/web-check.git
synced 2025-02-18 11:20:58 +01:00
🚧 Working on home page
This commit is contained in:
parent
045ce468d3
commit
385927c1de
@ -1,6 +1,13 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'PTMono';
|
||||||
|
src: url('assets/fonts/PTMono-Regular.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
font-family: 'PTMono', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
sans-serif;
|
sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import colors from 'styles/colors';
|
import colors from 'styles/colors';
|
||||||
|
import Heading from 'components/Form/Heading';
|
||||||
import Input from 'components/Form/Input'
|
import Input from 'components/Form/Input'
|
||||||
|
import Button from 'components/Form/Button';
|
||||||
|
import FancyBackground from 'components/misc/FancyBackground';
|
||||||
|
|
||||||
|
import { determineAddressType } from 'utils/address-type-checker';
|
||||||
|
|
||||||
const HomeContainer = styled.section`
|
const HomeContainer = styled.section`
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -9,28 +15,44 @@ const HomeContainer = styled.section`
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
font-family: 'PTMono';
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const UserInputMain = styled.div`
|
const UserInputMain = styled.div`
|
||||||
background: ${colors.backgroundLighter};
|
background: ${colors.backgroundLighter};
|
||||||
|
box-shadow: 4px 4px 0px ${colors.bgShadowColor};
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
z-index: 5;
|
||||||
|
min-height: 25vh;
|
||||||
|
min-width: 50vw;
|
||||||
|
margin: 1rem;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Home = (): JSX.Element => {
|
const Home = (): JSX.Element => {
|
||||||
const [userInput, setUserInput] = useState('');
|
const [userInput, setUserInput] = useState('');
|
||||||
|
|
||||||
|
const submit = () => {
|
||||||
|
// TODO - Submit form, using the following data:
|
||||||
|
console.log('Will Submit with: ', userInput);
|
||||||
|
console.log('Address Type: ', determineAddressType(userInput));
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HomeContainer>
|
<HomeContainer>
|
||||||
|
<FancyBackground />
|
||||||
<UserInputMain>
|
<UserInputMain>
|
||||||
|
<Heading as="h1" size="large" align="center" color={colors.primary}>Web Check</Heading>
|
||||||
<Input
|
<Input
|
||||||
id="user-input"
|
id="user-input"
|
||||||
value={userInput}
|
value={userInput}
|
||||||
label="Enter an IP or URL"
|
label="Enter an IP or URL"
|
||||||
size="large"
|
size="large"
|
||||||
orientation="vertical"
|
orientation="vertical"
|
||||||
|
placeholder="e.g. https://duck.com"
|
||||||
handleChange={(e) => setUserInput(e.target.value)}
|
handleChange={(e) => setUserInput(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<p>{ userInput }</p>
|
<Button size="large" onClick={submit}>Analyze!</Button>
|
||||||
</UserInputMain>
|
</UserInputMain>
|
||||||
</HomeContainer>
|
</HomeContainer>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user