mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Reformated code to use 2-space indents
This commit is contained in:
parent
07049261e3
commit
39a78414eb
5 changed files with 78 additions and 78 deletions
22
src/App.js
22
src/App.js
|
@ -3,15 +3,15 @@ import './App.scss';
|
|||
import MainHeader from './common/MainHeader';
|
||||
|
||||
export default class App extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<MainHeader/>
|
||||
<div className="app">
|
||||
<h1 className="app__title">Welcome to Shlink</h1>
|
||||
<h5 className="App__intro">Please, select a server.</h5>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<MainHeader/>
|
||||
<div className="app">
|
||||
<h1 className="app__title">Welcome to Shlink</h1>
|
||||
<h5 className="App__intro">Please, select a server.</h5>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
14
src/App.scss
14
src/App.scss
|
@ -1,12 +1,12 @@
|
|||
.app {
|
||||
text-align: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-flow: column;
|
||||
text-align: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.app__title {
|
||||
font-size: 36px;
|
||||
font-size: 36px;
|
||||
}
|
||||
|
|
|
@ -2,65 +2,65 @@ import plusIcon from '@fortawesome/fontawesome-free-solid/faPlus';
|
|||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import React from 'react';
|
||||
import {
|
||||
Collapse, DropdownItem, DropdownMenu,
|
||||
DropdownToggle,
|
||||
Nav,
|
||||
Navbar,
|
||||
NavbarBrand,
|
||||
NavbarToggler,
|
||||
NavItem,
|
||||
NavLink,
|
||||
UncontrolledDropdown
|
||||
Collapse, DropdownItem, DropdownMenu,
|
||||
DropdownToggle,
|
||||
Nav,
|
||||
Navbar,
|
||||
NavbarBrand,
|
||||
NavbarToggler,
|
||||
NavItem,
|
||||
NavLink,
|
||||
UncontrolledDropdown
|
||||
} from 'reactstrap';
|
||||
import './MainHeader.scss';
|
||||
import shlinkLogo from './shlink-logo-white.png';
|
||||
|
||||
export default class MainHeader extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
isOpen: false
|
||||
};
|
||||
}
|
||||
this.state = {
|
||||
isOpen: false
|
||||
};
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.setState({
|
||||
isOpen: ! this.state.isOpen
|
||||
});
|
||||
}
|
||||
toggle() {
|
||||
this.setState({
|
||||
isOpen: !this.state.isOpen
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
|
||||
<NavbarBrand href="https://shlink.io" target="_blank">
|
||||
<img src={shlinkLogo} alt="Shlink" className="main-header__brand-logo"/> Shlink
|
||||
</NavbarBrand>
|
||||
<NavbarToggler onClick={() => this.toggle()} />
|
||||
<Collapse navbar isOpen={this.state.isOpen}>
|
||||
<Nav navbar className="ml-auto">
|
||||
<NavItem>
|
||||
<NavLink href="#">
|
||||
<FontAwesomeIcon icon={plusIcon} /> Add server
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
<UncontrolledDropdown nav>
|
||||
<DropdownToggle nav caret>
|
||||
Servers
|
||||
</DropdownToggle>
|
||||
render() {
|
||||
return (
|
||||
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
|
||||
<NavbarBrand href="https://shlink.io" target="_blank">
|
||||
<img src={shlinkLogo} alt="Shlink" className="main-header__brand-logo"/> Shlink
|
||||
</NavbarBrand>
|
||||
<NavbarToggler onClick={() => this.toggle()}/>
|
||||
<Collapse navbar isOpen={this.state.isOpen}>
|
||||
<Nav navbar className="ml-auto">
|
||||
<NavItem>
|
||||
<NavLink href="#">
|
||||
<FontAwesomeIcon icon={plusIcon}/> Add server
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
<UncontrolledDropdown nav>
|
||||
<DropdownToggle nav caret>
|
||||
Servers
|
||||
</DropdownToggle>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownItem>
|
||||
Server 1
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
Server 2
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledDropdown>
|
||||
</Nav>
|
||||
</Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
}
|
||||
<DropdownMenu>
|
||||
<DropdownItem>
|
||||
Server 1
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
Server 2
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledDropdown>
|
||||
</Nav>
|
||||
</Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
@import "../utils/base";
|
||||
|
||||
.main-header.main-header {
|
||||
background-color: $mainColor !important;
|
||||
color: white;
|
||||
background-color: $mainColor !important;
|
||||
color: white;
|
||||
|
||||
.navbar-brand {
|
||||
color: inherit !important;
|
||||
}
|
||||
.navbar-brand {
|
||||
color: inherit !important;
|
||||
}
|
||||
}
|
||||
|
||||
.main-header__brand-logo {
|
||||
width: 26px;
|
||||
margin-right: 5px;
|
||||
width: 26px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
* {
|
||||
outline: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue