-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from bn-digital/task-9-task-10-theme-and-layout…
…-setup Task 9 task 10 theme and layout setup
- Loading branch information
Showing
12 changed files
with
222 additions
and
145 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
.app-header { | ||
position: fixed; | ||
left: 0; | ||
top: 0; | ||
height: 70px; | ||
width: 100%; | ||
height: 100vh; | ||
padding: 200px 56px 0 64px; | ||
background-color: #ffffff; | ||
|
||
.header-content-wrapper { | ||
height: 100%; | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
.title-box { | ||
flex: 1 1 auto; | ||
margin-top: 10px; | ||
&.ant-typography { | ||
color: gray; | ||
text-align: start; | ||
|
||
.nav-link { | ||
margin-bottom: 24px; | ||
padding: 0; | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
line-height: 1.5; | ||
font-family: "Inter Bold"; | ||
font-weight: 700; | ||
letter-spacing: 0.02em; | ||
color: #101012; | ||
|
||
&:focus { | ||
border: none; | ||
outline: transparent; | ||
} | ||
} | ||
|
||
.header-text { | ||
font-weight: 500; | ||
color: #8d8d8f; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import {Button, Typography} from "antd"; | ||
import { Button, Layout, Typography } from "antd"; | ||
import logo from "../../assets/logo.png" | ||
import './Header.scss' | ||
import {useLocation, useNavigate} from "react-router-dom"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const {Title} = Typography | ||
const {Title, Text} = Typography | ||
const Header = () => { | ||
const location = useLocation() | ||
const navigate = useNavigate() | ||
return ( | ||
<div className={'app-header'}> | ||
<div className="container"> | ||
<div className="header-content-wrapper"> | ||
<Title level={3} className={'title-box'}>{'Mortgage Mathematics'}</Title> | ||
{location.pathname !== '/' && ( | ||
<Button type={'ghost'} onClick={() => navigate('/')}>{'Home'}</Button> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
const navigate = useNavigate() | ||
return ( | ||
<Layout.Sider width={480} theme={"light"} className={'app-header'}> | ||
<div className={'header-content-wrapper'}> | ||
<Button type={'ghost'} onClick={() => navigate('/')} className={"nav-link"}> | ||
<img src={logo}/> | ||
{'Mortgage Calculator'}</Button> | ||
<Title level={1}>{'Find your refinance options'}</Title> | ||
<Text className={'header-text'}>{'Mortgage refinancing is when you replace your current home loan with a new one.\n' + | ||
'This is a demo of a form submission.'}</Text> | ||
</div> | ||
</Layout.Sider> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { ThemeConfig} from "antd/es/config-provider/context"; | ||
|
||
export const theme : ThemeConfig = { | ||
components: { | ||
Button: { | ||
colorPrimary: "#4169F6", | ||
colorPrimaryHover: "#1B47E4", | ||
colorPrimaryActive: "#1B47E4", | ||
colorPrimaryText: "#FFFFFF", | ||
colorText: "#4169F6", | ||
fontSize: 16, | ||
lineHeight: 1, | ||
borderRadius: 8, | ||
}, | ||
Typography: { | ||
fontSizeHeading1: 32, | ||
fontSizeHeading2: 24, | ||
fontSize: 14, | ||
lineHeightHeading1: 1.25, | ||
lineHeightHeading2: 1.33, | ||
colorTextHeading: "#101012", | ||
colorText: "#4B4C4E", | ||
colorTextDescription: "#8D8D8F", | ||
lineHeight: 1.71, | ||
}, | ||
Input: { | ||
borderRadius: 4, | ||
colorBorder: "#B9B9BA", | ||
colorErrorBorder: "#F6414C", | ||
colorErrorText: "#F6414C", | ||
fontSize: 16, | ||
lineHeight: 24, | ||
colorTextPlaceholder: "#A0A0A2", | ||
paddingContentHorizontal: 16, | ||
paddingContentVertical: 8, | ||
} | ||
}, | ||
token: { | ||
colorPrimary: "#4169F6", | ||
colorBgLayout: "#F9F8FA", | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,50 @@ | ||
.ant-layout { | ||
background: none; | ||
} | ||
//.ant-layout { | ||
// background: none; | ||
//} | ||
.container { | ||
max-width: 1200px; | ||
margin: 0 auto; | ||
height: 100%; | ||
max-width: 960px; | ||
height: 100%; | ||
margin: 0 auto; | ||
padding: 200px 176px 100px 144px; | ||
} | ||
button.ant-btn-text { | ||
border: none; | ||
background: none; | ||
|
||
&:hover { | ||
border: none; | ||
background-color: transparent !important; | ||
} | ||
&:focus { | ||
border: none; | ||
background-color: transparent !important; | ||
outline: transparent; | ||
} | ||
} | ||
button.ant-btn-ghost { | ||
border: 1px solid gray; | ||
&:focus { | ||
border: none; | ||
outline: transparent; | ||
} | ||
.subtitle.ant-typography { | ||
margin-bottom: 16px; | ||
color: #8D8D8F; | ||
} | ||
button.ant-btn-primary { | ||
border: 1px solid #5c5c5c; | ||
background-color: #5c5c5c; | ||
&:hover { | ||
border: 1px solid #5c5c5c; | ||
background-color: #4b4b4b !important; | ||
} | ||
&:focus { | ||
border: none; | ||
background-color: #4b4b4b !important; | ||
outline: none; | ||
} | ||
|
||
.description.ant-typography { | ||
max-width: 416px; | ||
margin-bottom: 32px; | ||
|
||
} | ||
|
||
|
||
|
||
//button.ant-btn-text { | ||
// border: none; | ||
// background: none; | ||
// | ||
// &:hover { | ||
// border: none; | ||
// background-color: transparent !important; | ||
// } | ||
// &:focus { | ||
// border: none; | ||
// background-color: transparent !important; | ||
// outline: transparent; | ||
// } | ||
//} | ||
//button.ant-btn-primary { | ||
// border: 1px solid #5c5c5c; | ||
// background-color: #5c5c5c; | ||
// &:hover { | ||
// border: 1px solid #5c5c5c; | ||
// background-color: #4b4b4b !important; | ||
// } | ||
// &:focus { | ||
// border: none; | ||
// background-color: #4b4b4b !important; | ||
// outline: none; | ||
// } | ||
//} |
Oops, something went wrong.