Skip to content

Commit

Permalink
Merge pull request #22 from olivertsesk/feature/stylish
Browse files Browse the repository at this point in the history
Abstract Style to CSS; Fix All Warnings; Remove Dead Code; Cleanup
  • Loading branch information
MrCerealKiller authored Mar 8, 2018
2 parents db917a4 + 5f7eed3 commit 151df49
Show file tree
Hide file tree
Showing 22 changed files with 1,458 additions and 1,275 deletions.
28 changes: 0 additions & 28 deletions src/App.css

This file was deleted.

21 changes: 0 additions & 21 deletions src/App.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/App.test.js

This file was deleted.

128 changes: 65 additions & 63 deletions src/bodies/adminLanding.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,75 @@
/**
* Created by jaewonlee on 2018. 2. 9..
*/
import React, { Component } from 'react';
import{
Navbar,
Nav,
NavItem,
Col,
Panel
} from 'react-bootstrap'
import ClassList from './components/adminListing'

import React, { Component } from 'react';
import { Col } from 'react-bootstrap';
import * as firebase from "firebase";

class AdminLanding extends Component {
constructor(props) {
super(props);
this.state = {
height:window.innerHeight,
width:window.innerWidth,
classes:[]
};
}
resize = () => {
this.setState({width:window.innerWidth,height:window.innerHeight})
}
import ClassList from './components/adminListing';

class AdminLanding extends Component {
constructor(props) {
super(props);
this.state = {
height:window.innerHeight,
width:window.innerWidth,
classes:[]
};
}

resize = () => {
this.setState({width: window.innerWidth, height: window.innerHeight});
}

componentDidMount() {
window.addEventListener('resize', this.resize);
firebase.database().ref('/classes/').on('value',(snapshot) =>{
var classes =[];

snapshot.forEach(function(item) {
classes.push(item);
});

this.setState({classes});
})
}

componentWillUnmount() {
window.removeEventListener('resize', this.resize);
}

render() {
return (
<div className="landingPage" style={{height:this.state.height-100}}>
<Col lg={8} md={8} sm={8} xs={12} className="landingPageHalfCol">
<div className="classListWrapper scroll">
{
this.state.classes.map((item,i)=>{
return(
<ClassList item ={item}/>
)
})
}
</div>
</Col>

componentDidMount() {
window.addEventListener('resize', this.resize)
firebase.database().ref('/classes/').on('value',(snapshot) =>{
var classes =[];
snapshot.forEach(function(item) {
classes.push(item);
});
this.setState({classes})
console.log(classes)
})
}
<Col lg={4} md={4} sm={4} xs={12} className="landingPageHalfCol">
<div className="center rightSideWrapper" style={{width:(this.state.width-160)*1/3-90}}>
<div className="center rightSideButton">
<p>Manage Professors</p>
</div>

componentWillUnmount() {
window.removeEventListener('resize', this.resize)
}
<br className="rightSideSpacer"/>

render() {
return (
<div style={{width:'100%',height:this.state.height-65,padding:80}}>
<Col lg={8} md={8} sm={8} xs={12} style={{height:'100%',padding:0,background:'white',overflowY:"scroll"}}>
{
this.state.classes.map((item,i)=>{
return(
<ClassList item ={item}/>
)
})
}
</Col>
<Col lg={4} md={4} sm={4} xs={12} style={{height:'100%',padding:0}}>
<div className="center" style={{flexDirection:'column',height:"100%",width:(this.state.width-160)*1/3-90,marginLeft:80,}}>
<div className="center" style={{flexDirection:'column',height:"50%",width:'90%',borderColor:'#343f4b',borderRadius:10,border:'solid',background:'white'}}>
<p style={{fontSize:30}}>Search</p>
</div>
<br style={{height:"10%",width:'90%'}}/>
<div className="center" style={{flexDirection:'column',height:"50%",width:'90%',borderColor:'#343f4b',borderRadius:10,border:'solid',background:'white'}}>
<p style={{fontSize:30}}>See Professor's</p>
<p style={{fontSize:30}}>Other Courses</p>
</div>
</div>
</Col>
</div>
);
}
}
<div className="center rightSideButton">
<p>Manage Classes</p>
</div>
</div>
</Col>
</div>
);
}
}

export default AdminLanding;
Loading

0 comments on commit 151df49

Please sign in to comment.