-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adnan Abdulhussein
committed
Jan 22, 2018
1 parent
28ffc43
commit cb2f42c
Showing
22 changed files
with
476 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.ChartIcon { | ||
height: 64px; | ||
} | ||
.ChartIcon__img { | ||
max-height: 64px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
.ChartListItem { | ||
width: 250px; | ||
} | ||
|
||
.ChartListItem__icon { | ||
max-height: 64px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from "react"; | ||
import { Link } from "react-router-dom"; | ||
|
||
import ChartIcon from "../ChartIcon"; | ||
|
||
interface IChartHeaderProps { | ||
appVersion?: string; | ||
id: string; | ||
icon: string; | ||
repo: string; | ||
description: string; | ||
} | ||
|
||
class ChartHeader extends React.Component<IChartHeaderProps> { | ||
public render() { | ||
const { appVersion, id, icon, repo, description } = this.props; | ||
return ( | ||
<header> | ||
<div className="ChartView__heading margin-normal"> | ||
<ChartIcon icon={icon} /> | ||
<div className="title margin-l-small"> | ||
<h1 className="margin-t-reset">{id}</h1> | ||
<h5 className="subtitle margin-b-normal"> | ||
{appVersion && <span>{appVersion} - </span>} | ||
<Link to={`/charts/${repo}`}>{repo}</Link> | ||
</h5> | ||
<h5 className="subtitle margin-b-reset">{description}</h5> | ||
</div> | ||
</div> | ||
<hr /> | ||
</header> | ||
); | ||
} | ||
} | ||
|
||
export default ChartHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.ChartReadme pre { | ||
overflow: scroll; | ||
background: #f1f1f1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from "react"; | ||
import * as ReactMarkdown from "react-markdown"; | ||
|
||
import "./ChartReadme.css"; | ||
|
||
interface IChartReadmeProps { | ||
markdown?: string; | ||
} | ||
|
||
class ChartReadme extends React.Component<IChartReadmeProps> { | ||
public render() { | ||
const { markdown } = this.props; | ||
return ( | ||
<div className="ChartReadme"> | ||
{markdown ? <ReactMarkdown source={markdown} /> : "Loading"} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default ChartReadme; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from "react"; | ||
|
||
import { IChartVersion } from "../../shared/types"; | ||
|
||
interface IChartVersionsListProps { | ||
versions: IChartVersion[]; | ||
} | ||
|
||
class ChartVersionsList extends React.Component<IChartVersionsListProps> { | ||
public render() { | ||
const items = this.props.versions.slice(0, 5).map(v => ( | ||
<li key={v.id}> | ||
{v.attributes.version} - {this.formatDate(v.attributes.created)} | ||
</li> | ||
)); | ||
return ( | ||
<div className="ChartVersionsList"> | ||
<ul className="remove-style padding-l-reset margin-b-reset">{items}</ul> | ||
<span className="type-small">Show all...</span> | ||
</div> | ||
); | ||
} | ||
|
||
public formatDate(dateStr: string) { | ||
const d = new Date(dateStr); | ||
return d.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }); | ||
} | ||
} | ||
|
||
export default ChartVersionsList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.ChartView__heading { | ||
display: flex; | ||
} | ||
|
||
.ChartView__readme-container { | ||
/* for col-8 class */ | ||
width: 66.66%; | ||
} | ||
|
||
.ChartViewSidebar__section { | ||
/* hack to make h2 margin work... */ | ||
padding-top: 0.1px; | ||
} | ||
|
||
.ChartViewSidebar__section > div { | ||
margin-left: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.Layout { | ||
display: flex; | ||
min-height: 100vh; | ||
width: 100%; | ||
flex-direction: column; | ||
} | ||
|
||
.Layout > main { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.Layout > main > .container { | ||
width: 100%; | ||
} | ||
|
||
.Layout > main > .container > .row { | ||
height: 100%; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Sidebar { | ||
height: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.