Skip to content

Commit

Permalink
feat: add years
Browse files Browse the repository at this point in the history
  • Loading branch information
jigglycrumb committed May 19, 2023
1 parent 4cfe97d commit 9cc0c96
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/bundle.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ There is no need to install anything, you can use it directly at [http://jigglyc

- Run dev server: `npm start`
- Build: `npm run build`

### Deployment

Runs on Github pages, from the `docs` folder.
Do a manual build and commit it to deploy.
4 changes: 0 additions & 4 deletions src/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ ul.flat {
width: 100%;
}

.show-poster {
margin-top: 1.5em;
}

.help-text {
font-weight: normal;
font-style: italic;
Expand Down
18 changes: 12 additions & 6 deletions src/views/TvShow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,26 @@ export default class TvShow extends React.Component {

if (poster)
posterStr = (
<img
alt="Show poster"
className="img-thumbnail show-poster"
src={poster}
/>
<img alt="Show poster" className="img-thumbnail" src={poster} />
);

var yearStart = this.props.info.first_air_date
? this.props.info.first_air_date.split("-")[0]
: "";
var yearEnd = this.props.info.last_air_date
? this.props.info.last_air_date.split("-")[0]
: "";

return (
<div>
{/* Show info */}
<div className="row">
<div className="col-3 text-right">{posterStr}</div>
<div className="col-3">{posterStr}</div>
<div className="col-9">
<h2>{this.props.info.name}</h2>
<h6>
{yearStart}-{yearEnd}
</h6>
<ul className="flat">
<li>
<strong>
Expand Down

0 comments on commit 9cc0c96

Please sign in to comment.