This commit is contained in:
matteo
2019-02-19 01:38:10 +01:00
parent 5f86943496
commit aabf86e3d7
5 changed files with 60 additions and 35 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ class TopBar extends Component {
render() { render() {
return ( return (
<React.Fragment> <React.Fragment>
<Navbar bg="dark" className="py-0 px-1 w-100" expand="md"> <Navbar bg="primary" varian="dark" className="py-0 px-1 w-100" expand="md">
<Navbar.Brand> <Navbar.Brand>
<Link to="/">HazeTV</Link> <Link className="text-light" to="/">HazeTV</Link>
</Navbar.Brand> </Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" /> <Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav"> <Navbar.Collapse id="basic-navbar-nav">
+1 -1
View File
@@ -72,7 +72,7 @@ class VideoInfo extends React.Component {
); );
} else if (!isLoaded) { } else if (!isLoaded) {
return <div className="text-center"> return <div className="text-center">
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div> <div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
</div>; </div>;
} else { } else {
return ( return (
+7 -6
View File
@@ -154,7 +154,7 @@ class Wikipedia extends Component {
else { //oof else { //oof
axios.get(`${musicbrainzBaseUrl}/work`, { axios.get(`${musicbrainzBaseUrl}/work`, {
params: { params: {
'query': 'undefined' === typeof this.props.title ? this.props.title2 : this.props.title, 'query': 'undefined' === typeof this.props.title ? 'undefined' === typeof this.props.title2 ? this.props.artist2 : this.props.title2 : this.props.title,
'limit': 1, 'limit': 1,
'offset': 0, 'offset': 0,
'fmt': 'json' 'fmt': 'json'
@@ -221,12 +221,13 @@ class Wikipedia extends Component {
return <React.Fragment>Error: {error.message}</React.Fragment>; return <React.Fragment>Error: {error.message}</React.Fragment>;
} else if (!this.state.isLoaded) { } else if (!this.state.isLoaded) {
return <Col className="text-center"> return <Col className="text-center">
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div> <div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
</Col>; </Col>;
} else { } else {
return (<> return (
{/* {isWikiLoaded && wikipedia.desc} */} // <>
<Table bordered variant="dark" hover size="sm"> // {isWikiLoaded && wikipedia.desc}
<Table size="sm">
<tbody> <tbody>
{isWikiLoaded && {isWikiLoaded &&
this.state.wikipediakeys.map(key => ( this.state.wikipediakeys.map(key => (
@@ -276,7 +277,7 @@ class Wikipedia extends Component {
} }
</tbody> </tbody>
</Table> </Table>
</> // </>
); );
} }
} }
+4 -1
View File
@@ -1,5 +1,8 @@
a[target=_blank]{ a[target=_blank]{
background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAXklEQVQoka2QwQ3AMAwCs1N28k7eiZ3oI7IcU6efBomXOREyxhUZ2brTdNAcVB2BaJgCVcDAalJLXsB+iLAjm1pAwzHWHD3gWMcMg/ERMjKfFOHVqMEGqEM/gKP/6gE2f+h+Z5P45wAAAABJRU5ErkJggg==') center right no-repeat; background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAXklEQVQoka2QwQ3AMAwCs1N28k7eiZ3oI7IcU6efBomXOREyxhUZ2brTdNAcVB2BaJgCVcDAalJLXsB+iLAjm1pAwzHWHD3gWMcMg/ERMjKfFOHVqMEGqEM/gKP/6gE2f+h+Z5P45wAAAABJRU5ErkJggg==') center right no-repeat;
padding-right: 14px; padding-right: 14px;
}
tbody a{
color: #DF691A !important;
} }
+46 -25
View File
@@ -1,9 +1,8 @@
import React from 'react'; import React from 'react';
import { Col, Card } from 'react-bootstrap'; // eslint-disable-line no-unused-vars import { Col, Card, Media } from 'react-bootstrap'; // eslint-disable-line no-unused-vars
import axios from 'axios'; // eslint-disable-line no-unused-vars import axios from 'axios'; // eslint-disable-line no-unused-vars
import { Link } from 'react-router-dom'; // eslint-disable-line no-unused-vars import { Link } from 'react-router-dom'; // eslint-disable-line no-unused-vars
/*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */ /*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */
import moment from "moment";
class fvitali extends React.Component { class fvitali extends React.Component {
state = { state = {
@@ -85,29 +84,51 @@ class fvitali extends React.Component {
); );
} else { } else {
return ( return (
<React.Fragment> // <React.Fragment>
{items.map(item=>( <Col md="4"> // {items.map(item=>( <Col md="4">
<Card key={item.videoID}> // <Card key={item.videoID}>
<Link // <Link
to={{ // to={{
pathname: '/video/' + item.videoID, // pathname: '/video/' + item.videoID,
}} // }}
> // >
<Card.Img // <Card.Img
src={item.thumbnail} // src={item.thumbnail}
alt={'Thumbnail of ' + item.name} // alt={'Thumbnail of ' + item.name}
/> // />
<Card.ImgOverlay> // <Card.ImgOverlay>
<Card.Title className="bg-dark d-inline text-white"> // <Card.Title className="bg-dark d-inline text-white">
{item.name}<br/> // {item.name}<br/>
{item.lastSelected} // {item.lastSelected}
</Card.Title> // </Card.Title>
</Card.ImgOverlay> // </Card.ImgOverlay>
</Link> // </Link>
</Card> // </Card>
</Col>))} // </Col>))}
// </React.Fragment>
</React.Fragment> <ul className="list-unstyled">{
items.map(item => (
<Link
key={item.videoID}
as="li" className="media mx-5 my-1 suggItem"
to={{
pathname: '/video/' + item.videoID,
}}>
<img
width={240}
height={120}
className="align-self-center mr-3"
src={item.thumbnail}
alt={'Thumbnail of ' + item.name}
/>
<Media.Body>
<h5>{item.name}</h5>
<p>{item.lastSelected}</p>
<p>Reccomender: fvitali</p>
</Media.Body>
</Link>
))
}</ul>
); );
} }
} }