Archived
scroll lista iniziale, link react readme, minor changes
This commit is contained in:
@@ -234,6 +234,12 @@ Il css di bootstrap va importato una volta sola nel componente che racchiude tut
|
||||
- [Bootstrap 4.1 css classes](https://hackerthemes.com/bootstrap-cheatsheet)
|
||||
- [Bootstrap 4.1 site](https://getbootstrap.com/docs/4.1)
|
||||
- [ReactBootstrap reference](https://react-bootstrap.netlify.com/getting-started/introduction/)
|
||||
- [awesome-react-bootstrap](https://github.com/Hermanya/awesome-react-bootstrap-components/blob/master/readme.md)
|
||||
|
||||
|
||||
## React stuff
|
||||
|
||||
[awesome-react](https://github.com/enaqx/awesome-react) --> lista di link su react.
|
||||
|
||||
## YouTube video player
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
.bg-black{
|
||||
background-color:#000000;
|
||||
}
|
||||
|
||||
.scrollable{
|
||||
overflow: auto !important;
|
||||
height: 40vh;
|
||||
margin-top: 2vh;
|
||||
}
|
||||
+3
-1
@@ -12,7 +12,9 @@ class App extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Row>
|
||||
<TopBar />
|
||||
</Row>
|
||||
<Row className="justify-content-center bg-black">
|
||||
<Col xs="12" sm="6">
|
||||
<Switch>
|
||||
@@ -22,7 +24,7 @@ class App extends React.Component {
|
||||
</Switch>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Row className='scrollable'>
|
||||
<Switch>
|
||||
<Route path="/video/:id" component={VideoInfo} />
|
||||
<Route exact path='/' component={VideoList} />
|
||||
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import {
|
||||
Row,
|
||||
Navbar,
|
||||
Nav,
|
||||
NavDropdown,
|
||||
@@ -35,7 +34,7 @@ class TopBar extends Component {
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Row>
|
||||
<React.Fragment>
|
||||
<Navbar bg="dark" className="py-0 px-1 w-100" expand="md">
|
||||
<Navbar.Brand>
|
||||
<Link to="/">HazeTV</Link>
|
||||
@@ -70,7 +69,7 @@ class TopBar extends Component {
|
||||
</form>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,6 @@ class VideoList extends React.Component {
|
||||
} else {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Col className="my-2" xs="12" sm="12">
|
||||
<code>
|
||||
Url loaded: <span className="bg-dark">{headers.url}</span>
|
||||
</code>
|
||||
<br />
|
||||
<code>Total videos: {items.length}</code>
|
||||
</Col>
|
||||
{items.map(item => (
|
||||
<Col key={item.videoID} lg="4" md="6">
|
||||
<Card className="my-1">
|
||||
|
||||
+13
-3
@@ -6,12 +6,22 @@ class Wikipedia extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data : {},
|
||||
data: {},
|
||||
infobox: {},
|
||||
error: null,
|
||||
isLoaded: false
|
||||
|
||||
};
|
||||
this.getWikiBox = this.getWikiBox.bind(this);
|
||||
}
|
||||
|
||||
getWikiBox(name){
|
||||
wikijs()
|
||||
.page(name)
|
||||
.then(page => page.fullInfo())
|
||||
.then(infobox => console.log(infobox)
|
||||
//this.setState({ infobox })
|
||||
);
|
||||
//console.log('infobox', this.state.infobox)
|
||||
}
|
||||
|
||||
// componentWillMount() {
|
||||
@@ -19,7 +29,7 @@ class Wikipedia extends Component {
|
||||
// }
|
||||
|
||||
componentDidMount() {
|
||||
wikijs().search(this.props.query,1).then(data => {
|
||||
wikijs().search(this.props.query).then(data => {
|
||||
this.setState({
|
||||
data,
|
||||
isLoaded: true
|
||||
|
||||
Reference in New Issue
Block a user