Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeevrevan committed Aug 19, 2023
0 parents commit a58e385
Show file tree
Hide file tree
Showing 29 changed files with 432 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
"@babel/preset-env",
[
"@babel/preset-react",
{
"runtime": "automatic"
}
],
"@babel/preset-typescript"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
node_modules
package-lock.json
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/Edna-task.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added images/Captcha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/edna_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "edna-task",
"version": "1.1.1",
"description": "yet another try to build damn app...",
"main": "index.js",
"scripts": {
"start": "webpack serve --config webpack/webpack.config.js --open"
},
"author": "",
"license": "ISC",
"keywords": [],
"dependencies": {
"@babel/plugin-transform-runtime": "^7.22.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.4",
"styled-components": "^6.0.7"
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@babel/preset-env": "^7.22.10",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"babel-loader": "^9.1.3",
"html-webpack-plugin": "^5.5.3",
"styled-components": "^6.0.7",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
}
58 changes: 58 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import Wrapper from "./components/Wrapper";
import Title from "./components/Title_component";
import Window from "./components/Main_window";
import edna_logo from "../images/edna_logo.png";
import Captcha from "../images/Captcha.png";

import Image_Wrapper from "./components/Image_wrapper";
import Login_Frame from "./components/Login_Frame";
import Input_Field from "./components/Input_Field";
import Small_Grey_Text from "./components/Small_Grey_Text";
import Input_text from "./components/Input_text";
import Bottom_Frame from "./components/Bottom_Frame";
import Forgot_Password from "./components/Forgot_Password";
import Entry_Button from "./components/Entry_Button";
import Sign_In from "./components/Sign_In";
import Footer from "./components/Footer";
import Footer_Text from "./components/Footer_Text";

export const App = () => {
return (
<div>
<Wrapper>
<Window>
<Image_Wrapper>
<img src={edna_logo}/>
</Image_Wrapper>
<Login_Frame>
<Title>Вход в аккаунт</Title>
<Input_Field>
<Small_Grey_Text>Е-mail</Small_Grey_Text>
<Input_text placeholder = "company.com"></Input_text>
<div style={{height: '1px', alignSelf: 'stretch'}}></div>
</Input_Field>
<Input_Field>
<Small_Grey_Text>Пароль</Small_Grey_Text>
<Input_text placeholder = "●●●●●●●●●●●●●●●●"></Input_text>
<div style={{height: '12px', alignSelf: 'stretch'}}></div>
</Input_Field>
<img src={Captcha} style={{position: 'relative',left: "-3px"}}/>
<Input_Field>
<Small_Grey_Text>Цифры с картинки</Small_Grey_Text>
<Input_text placeholder = "00000"></Input_text>
<div style={{height: '12px', alignSelf: 'stretch'}}></div>
</Input_Field>
<Bottom_Frame>
<Forgot_Password href={'/'}>Забыли пароль?</Forgot_Password>
<Entry_Button href={'/'}>Войти</Entry_Button>
</Bottom_Frame>
<Sign_In>Еще нет аккаунта?<a href={'/'} style={{color:'black', marginLeft: '3px'}}>Зарегистрируйтесь</a> </Sign_In>
</Login_Frame>
</Window>
</Wrapper>
<Footer>
<Footer_Text>© 2005 – 2020 edna <a href={'/'} style={{color:'#E5E5E5', marginLeft: '3px', textDecoration:"none"}}>Поддержка</a></Footer_Text>
</Footer>
</div>
)
}
14 changes: 14 additions & 0 deletions src/components/Bottom_Frame.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import styled from "styled-components";


const Bottom_Frame = styled.div`
width: 320px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
`


export default Bottom_Frame
21 changes: 21 additions & 0 deletions src/components/Entry_Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import styled from "styled-components";


const Entry_Button = styled.button`
cursor: pointer;
width: 85px;
height: 36px;
background: #121212;
color: #FFFFFF;
align-items: center;
justify-content: center;
border-radius: 8px;
font-size: 12px;
font-weight: bold;
text-decoration: none;
margin-left: 10px;
`


export default Entry_Button
16 changes: 16 additions & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import styled from "styled-components";


const Footer = styled.div`
width: 100%;
height: 40px;
background: #121212;
display: flex;
bottom: 0;
left: 0;
position: fixed;
`


export default Footer
Empty file added src/components/Footer_Text.tsx
Empty file.
14 changes: 14 additions & 0 deletions src/components/Forgot_Password.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import styled from "styled-components";


const Forgot_Password = styled.a`
text-align: center;
color: #000000;
font-size: 12px;
font-weight: bold;
text-decoration: none;
`


export default Forgot_Password
15 changes: 15 additions & 0 deletions src/components/Image_wrapper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import styled from "styled-components";


const Image_Wrapper = styled.div`
width: 400px;
height: 400px;
margin-top: 148px;
margin-bottom: 200px;
margin-left: 38px;
margin-right: 103px;
`


export default Image_Wrapper
13 changes: 13 additions & 0 deletions src/components/Input_Field.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";
import styled from "styled-components";


const InputField = styled.div`
display: flex;
width: 320px;
flex-direction: column;
align-items: flex-start;
`


export default InputField
16 changes: 16 additions & 0 deletions src/components/Input_text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import styled from "styled-components";


const InputText = styled.input`
background: #F4F4F4;
height: 36px;
width: 100%;
border-radius: 4px;
border: none ;
padding-left: 16px;
font-weight: 400;
`


export default InputText
15 changes: 15 additions & 0 deletions src/components/Login_Frame.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import styled from "styled-components";


const Login_Frame = styled.div`
width: 320px;
height: 479px;
margin-top: 100px;
margin-bottom: 136px;
margin-right: 79px;
`


export default Login_Frame
14 changes: 14 additions & 0 deletions src/components/Main_window.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import styled from "styled-components";


const Window = styled.div`
width: 940px;
height: 690px;
display: flex;
align-items: center;
justify-content: center;
`


export default Window
17 changes: 17 additions & 0 deletions src/components/Sign_In.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import styled from "styled-components";


const Sing_In = styled.p`
width: 320px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #000;
font-weight: 400;
`


export default Sing_In
13 changes: 13 additions & 0 deletions src/components/Small_Grey_Text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";
import styled from "styled-components";


const SmallGreyText = styled.p`
color: #5B5B5B;
font-size: 12px;
font-feature-settings: 'clig' off, 'liga' off;
font-weight: 400;
`


export default SmallGreyText
11 changes: 11 additions & 0 deletions src/components/Spacer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
import styled from "styled-components";


const Spacer24 = styled.div`
height: 24px;
align-self: stretch;
`


export default Spacer24
10 changes: 10 additions & 0 deletions src/components/Title_component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import styled from "styled-components";

const Title = styled.h1`
font-size: 24px;
text-align: center;
`


export default Title
14 changes: 14 additions & 0 deletions src/components/Wrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import styled from "styled-components";


const Wrapper = styled.div`
width: 100%;
background: #ffffff;
font-family: 'League Spartan', sans-serif;
display: flex;
justify-content: center;
`


export default Wrapper
Loading

1 comment on commit a58e385

@alexeevrevan
Copy link
Owner Author

Choose a reason for hiding this comment

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

pull request #1:

  1. environment is properly set up to maintain Webpack + React + TypeScript
  2. Styled-components created
  3. Static version of an App is developed

Please sign in to comment.