-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fc2be7
commit e200ae6
Showing
14 changed files
with
101 additions
and
135 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"source.fixAll.eslint": true | ||
}, | ||
"cSpell.words": [ | ||
"bgcolor", | ||
"flowtype", | ||
"Parens", | ||
"precached", | ||
|
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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,57 +1,76 @@ | ||
import React, { Component } from 'react'; | ||
|
||
import { | ||
Collapse, | ||
Navbar, | ||
NavbarToggler, | ||
NavbarBrand, | ||
Nav, | ||
NavItem, | ||
NavLink | ||
} from 'reactstrap'; | ||
|
||
import { AppContextProps } from '@/api'; | ||
import Toolbar from '@mui/material/Toolbar'; | ||
import IconButton from '@mui/material/IconButton'; | ||
import SearchIcon from '@mui/icons-material/Search'; | ||
import Typography from '@mui/material/Typography'; | ||
import Link from '@mui/material/Link'; | ||
|
||
import logo from '../../assets/images/logo.svg'; | ||
import '../header/style.scss'; | ||
|
||
export class UIHeader extends Component<AppContextProps> { | ||
constructor(props) { | ||
super(props); | ||
import '../header/style.scss'; | ||
|
||
this.toggle = this.toggle.bind(this); | ||
interface HeaderProps { | ||
sections: ReadonlyArray<{ | ||
title: string; | ||
url: string; | ||
}>; | ||
title: string; | ||
} | ||
|
||
this.state = { | ||
isOpen: false | ||
}; | ||
} | ||
toggle() { | ||
this.setState({ | ||
isOpen: !this.state | ||
}); | ||
} | ||
export class UIHeader extends Component<HeaderProps> { | ||
render() { | ||
let name = 'SHDSVN'; | ||
const { sections, title } = this.props; | ||
|
||
return ( | ||
<div> | ||
<Navbar color="light" light expand="md"> | ||
<NavbarBrand href="/"> | ||
<React.Fragment> | ||
<Toolbar sx={{ borderBottom: 1, borderColor: 'divider' }}> | ||
<Typography | ||
component="h1" | ||
variant="h5" | ||
color="inherit" | ||
align="left" | ||
noWrap | ||
mt={1} | ||
sx={{ flex: 1 }} | ||
> | ||
{title} | ||
</Typography> | ||
<Typography | ||
component="h1" | ||
variant="h5" | ||
color="inherit" | ||
align="left" | ||
noWrap | ||
mt={1} | ||
sx={{ flex: 1 }} | ||
> | ||
<img src={logo} className="App-logo-header" alt="logo" /> | ||
{name} | ||
</NavbarBrand> | ||
<NavbarToggler onClick={this.toggle} /> | ||
<Collapse navbar> | ||
<Nav className="ml-auto" navbar> | ||
<NavItem></NavItem> | ||
<NavItem> | ||
<NavLink href="https://github.com/Devteamvietnam/shdsvn.com"> | ||
GitHub | ||
</NavLink> | ||
</NavItem> | ||
</Nav> | ||
</Collapse> | ||
</Navbar> | ||
</div> | ||
</Typography> | ||
<IconButton> | ||
<SearchIcon /> | ||
</IconButton> | ||
</Toolbar> | ||
<Toolbar | ||
component="nav" | ||
variant="dense" | ||
sx={{ justifyContent: 'space-between', overflowX: 'auto' }} | ||
> | ||
{sections.map(section => ( | ||
<Link | ||
color="primary" | ||
rel="noopener" | ||
underline="none" | ||
key={section.title} | ||
variant="body2" | ||
href={section.url} | ||
sx={{ p: 2, flexShrink: 0 }} | ||
> | ||
{section.title} | ||
</Link> | ||
))} | ||
</Toolbar> | ||
</React.Fragment> | ||
); | ||
} | ||
} |
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,5 +1,5 @@ | ||
.App-logo-header { | ||
height: 5vmin; | ||
height: 6vmin; | ||
pointer-events: stroke; | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.