mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 01:22:48 +00:00
major file refactor - fix disconnecting bug
This commit is contained in:
21
client/app/components/Navbar/Navbar.component.js
Normal file
21
client/app/components/Navbar/Navbar.component.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
|
||||
import './Navbar.scss';
|
||||
|
||||
export default class Navbar extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="Navbar">
|
||||
<div className="Navbar__header">Go Discord Bot</div>
|
||||
<Link to="/" className="Navbar__item" onlyActiveOnIndex activeClassName="Navbar__item--active">Home</Link>
|
||||
<Link to="/soundboard" className="Navbar__item" activeClassName="Navbar__item--active">Soundboard</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Navbar.propTypes = {
|
||||
children: React.PropTypes.node,
|
||||
};
|
||||
52
client/app/components/Navbar/Navbar.scss
Normal file
52
client/app/components/Navbar/Navbar.scss
Normal file
@@ -0,0 +1,52 @@
|
||||
@import '../../scss/variables';
|
||||
|
||||
.Navbar {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: $navbarWidth;
|
||||
background-color: $gray2;
|
||||
border-right: 1px solid darken($gray2, 2%);
|
||||
overflow-y: auto;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.Navbar__header {
|
||||
font-size: 25px;
|
||||
min-height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
background-color: $primaryBlue;
|
||||
border-bottom: 1px solid $gray3;
|
||||
}
|
||||
|
||||
.Navbar__item {
|
||||
min-height: 50px;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: $white;
|
||||
transition: background-color 0.1s linear, color 0.2s linear;
|
||||
|
||||
&:hover {
|
||||
background-color: $gray1;
|
||||
}
|
||||
|
||||
& + .Navbar__item {
|
||||
border-top: 1px solid $gray3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.Navbar__item--active {
|
||||
padding-left: 4px;
|
||||
border-right: 4px solid $primaryBlue;
|
||||
color: $primaryBlue !important;
|
||||
}
|
||||
Reference in New Issue
Block a user