add nav to IDE view
This commit is contained in:
parent
75b33a18c2
commit
5c3f36e671
7 changed files with 57 additions and 1 deletions
18
shared/components/Nav/Nav.jsx
Normal file
18
shared/components/Nav/Nav.jsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router'
|
||||
|
||||
class Nav extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<nav className="nav">
|
||||
<ul className="nav__items">
|
||||
<li>
|
||||
<Link to={`/login`}>Login</Link> or <Link to={`/signup`}>Sign Up</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Nav;
|
|
@ -53,7 +53,7 @@ class PreviewFrame extends React.Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
React.unmountComponentAtNode(this.getDOMNode().contentDocument.body);
|
||||
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).contentDocument.body);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -3,6 +3,7 @@ import Editor from '../../components/Editor/Editor'
|
|||
import PreviewFrame from '../../components/Preview/PreviewFrame'
|
||||
import Toolbar from '../../components/Toolbar/Toolbar'
|
||||
import Preferences from '../../components/Preferences/Preferences'
|
||||
import Nav from '../../components/Nav/Nav'
|
||||
import { bindActionCreators } from 'redux'
|
||||
import { connect } from 'react-redux'
|
||||
import * as FileActions from '../../redux/actions'
|
||||
|
@ -11,6 +12,7 @@ class IDEView extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<div className="ide">
|
||||
<Nav />
|
||||
<Toolbar
|
||||
className="Toolbar"
|
||||
isPlaying={this.props.ide.isPlaying}
|
||||
|
|
|
@ -6,7 +6,21 @@ html {
|
|||
font-size: #{$base-font-size}px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Montserrat, sans-serif;
|
||||
color: $light-primary-text-color;
|
||||
}
|
||||
|
||||
.root-app, .app {
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: $light-secondary-text-color;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: $light-primary-text-color;
|
||||
}
|
||||
}
|
|
@ -5,4 +5,9 @@ html, body {
|
|||
padding: 0;
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
16
styles/components/_nav.scss
Normal file
16
styles/components/_nav.scss
Normal file
|
@ -0,0 +1,16 @@
|
|||
.nav {
|
||||
width: 100%;
|
||||
padding: #{10 / $base-font-size}rem #{40 / $base-font-size}rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.nav__items {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
padding: #{5 / $base-font-size}rem #{10 / $base-font-size}rem;
|
||||
border-bottom: 2px dashed;
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
@import 'components/p5-widget-codemirror-theme';
|
||||
@import 'components/editor';
|
||||
@import 'components/nav';
|
||||
@import 'components/toolbar';
|
||||
@import 'components/preferences';
|
||||
|
||||
|
|
Loading…
Reference in a new issue