Skip to content

Commit 4e90d3f

Browse files
committed
fix styles for progress
1 parent 18fcd6a commit 4e90d3f

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lib/components/progress/progress.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ var ProgressPage = (function (_super) {
5252
var _a = this.props, page = _a.page, itemPosition = _a.itemPosition, position = _a.position;
5353
var isActive = itemPosition.chapter === position.chapter && itemPosition.page === position.page;
5454
return (React.createElement(material_ui_1.ListItem, {key: itemPosition.page, className: classnames({
55-
'cr-page': true,
56-
'cr-page-isDisabled': !this.canActivate(isActive, itemPosition, position)
55+
'page': true,
56+
'page-isDisabled': !this.canActivate(isActive, itemPosition, position)
5757
}), primaryText: (itemPosition.page + 1) + ". " + page.title, secondaryText: page.description, secondaryTextLines: page.description.length > 50 ? 2 : 1, leftIcon: this.getProgressIcon(page.completed, isActive), onClick: this.canActivate(isActive, itemPosition, position) ? this.props.selectPage.bind(this, itemPosition) : null}));
5858
};
5959
;
@@ -87,6 +87,6 @@ exports.default = function (_a) {
8787
}), initiallyOpen: chapterIndex === 0, leftIcon: chapter.completed ? React.createElement(AllCompleted, null) : null, primaryTogglesNestedList: chapterIndex === position.chapter && !chapter.completed, nestedItems: chapter.pages.map(function (page, pageIndex) {
8888
var itemPosition = { chapter: chapterIndex, page: pageIndex };
8989
return React.createElement(ProgressPage, {key: 'c' + chapterIndex + 'p' + pageIndex, page: page, itemPosition: itemPosition, position: position});
90-
})}, React.createElement("h3", null, chapterIndex + 1, ". ", chapter.title), React.createElement("span", {className: 'cr-chapter-description'}, React.createElement(_components_1.MarkdownText, {text: chapter.description})));
90+
})}, React.createElement("h3", null, chapterIndex + 1, ". ", chapter.title), React.createElement("span", {className: 'chapter-description'}, React.createElement(_components_1.MarkdownText, {text: chapter.description})));
9191
}))));
9292
};

lib/components/projects/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var Projects = (function (_super) {
3939
return (React.createElement(material_ui_1.Paper, {className: 'cr-projects'}, React.createElement("div", {className: 'cr-projects-header'}, React.createElement("span", {className: 'title'}, "CodeRoad"), React.createElement("p", {className: 'tagline'}, "Tutorials in the Editor"), React.createElement("div", {className: 'cr-tutorials'}, React.createElement(material_ui_1.List, {subheader: 'Tutorials'}, window.coderoad.dir ? null : React.createElement(material_ui_1.ListItem, {key: 'open', primaryText: 'Create an Atom Project', secondaryText: 'File > Open > any older'}), this.props.tutorials.length > 0 ?
4040
this.props.tutorials.map(function (tutorial, index) {
4141
return (React.createElement(material_ui_1.ListItem, {key: index, primaryText: _this.trim(tutorial), onClick: _this.props.selectProject.bind(_this, tutorial)}));
42-
}) : React.createElement(material_ui_1.ListItem, {key: 'demo', primaryText: 'Try a Demo', secondaryText: 'npm i -s coderoad-functional-school'})), React.createElement("br", null), React.createElement(material_ui_1.RaisedButton, {label: 'Load Tutorials', secondary: true, onClick: this.load.bind(this)})), React.createElement("p", {className: 'notes'}, "Beta"))));
42+
}) : React.createElement(material_ui_1.ListItem, {key: 'demo', primaryText: 'Try a Demo', secondaryText: 'npm i --save-dev coderoad-functional-school'})), React.createElement("br", null), React.createElement(material_ui_1.RaisedButton, {label: 'Load Tutorials', secondary: true, onClick: this.load.bind(this)})), React.createElement("p", {className: 'notes'}, "Beta"))));
4343
};
4444
Projects = __decorate([
4545
react_redux_1.connect(null, function (dispatch) {

src/components/progress/_progress.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
.chapter.isActive {
1010
background-color: darken(white, 10%);
1111
}
12-
.cr-page {
12+
.page {
1313
padding-left: 15px;
1414
margin-top: 0;
1515
}
16-
.cr-page .cr-page-isDisabled {
16+
.page .page-isDisabled {
1717
color: rgba(0, 0, 0, 0.5);
1818
background: white;
1919
&:hover {

src/components/progress/progress.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class ProgressPage extends React.Component<{page: CR.Page, itemPosition: CR.Posi
4343
return (<ListItem
4444
key={itemPosition.page}
4545
className={classnames({
46-
'cr-page': true,
47-
'cr-page-isDisabled': !this.canActivate(isActive, itemPosition, position)
46+
'page': true,
47+
'page-isDisabled': !this.canActivate(isActive, itemPosition, position)
4848
})}
4949
primaryText={`${itemPosition.page + 1}. ${page.title}`}
5050
secondaryText={page.description}
@@ -68,7 +68,7 @@ const style = {
6868
export default ({progress, position}) => (
6969
<Paper style={style} zDepth={1} className='cr-progress'>
7070
{/*}<ProjectDescription project={project} />*/}
71-
<List subheader='Chapters'>
71+
<List subheader='Progress'>
7272
{progress.chapters.map((chapter: CR.Chapter, chapterIndex: number) => {
7373
const isActive = chapterIndex === position.chapter;
7474
return <ListItem
@@ -84,9 +84,9 @@ export default ({progress, position}) => (
8484
const itemPosition = {chapter: chapterIndex, page: pageIndex};
8585
return <ProgressPage key={'c' + chapterIndex + 'p' + pageIndex} page={page} itemPosition={itemPosition} position={position}/>;
8686
})}>
87-
<h4>{chapterIndex + 1}. {chapter.title}</h4>
88-
<span className='cr-chapter-description'>
89-
<MarkdownText text={chapter.description} />
87+
<h3>{chapterIndex + 1}. {chapter.title}</h3>
88+
<span className='chapter-description'>
89+
<MarkdownText text={chapter.description} />
9090
</span>
9191
</ListItem>;
9292
})}

styles/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ atom-panel-container > atom-panel > #crv {
9797
.cr-progress .chapter.isActive {
9898
background-color: #e6e6e6;
9999
}
100-
.cr-progress .cr-page {
100+
.cr-progress .page {
101101
padding-left: 15px;
102102
margin-top: 0;
103103
}
104-
.cr-progress .cr-page .cr-page-isDisabled {
104+
.cr-progress .page .page-isDisabled {
105105
color: rgba(0, 0, 0, 0.5);
106106
background: white;
107107
}
108-
.cr-progress .cr-page .cr-page-isDisabled:hover {
108+
.cr-progress .page .page-isDisabled:hover {
109109
background: white;
110110
}
111111
.cr-alert.pass button span {

0 commit comments

Comments
 (0)