From c804c968dded45a2a809e2755d59563d12712d62 Mon Sep 17 00:00:00 2001
From: Stuart Taylor
Date: Tue, 22 May 2018 07:53:27 +0100
Subject: [PATCH] Fix: Map UI & Tool panel styles (#83)
Closes #75




---
packages/learn/src/components/Map/map.css | 6 ++-
.../learn/src/components/MapModal/index.js | 2 +-
packages/learn/src/layouts/global.css | 19 ++++++++
packages/learn/src/pages/index.js | 4 +-
.../src/templates/Challenges/classic/Show.js | 3 +-
.../Challenges/components/Side-Panel.js | 32 ++------------
.../Challenges/components/Tool-Panel.js | 43 ++++++++++++++++---
.../Challenges/components/tool-panel.css | 14 +++++-
.../Challenges/project/Tool-Panel.js | 12 ++++--
.../learn/src/templates/Introduction/Intro.js | 14 +++---
10 files changed, 98 insertions(+), 51 deletions(-)
diff --git a/packages/learn/src/components/Map/map.css b/packages/learn/src/components/Map/map.css
index 9b5fa81bfd..6bcbddd8a2 100644
--- a/packages/learn/src/components/Map/map.css
+++ b/packages/learn/src/components/Map/map.css
@@ -22,4 +22,8 @@
li.open > .map-title svg {
transform: rotate(90deg);
-}
\ No newline at end of file
+}
+
+.map-challenge-title {
+ margin-bottom: 0.25rem;
+}
diff --git a/packages/learn/src/components/MapModal/index.js b/packages/learn/src/components/MapModal/index.js
index 2b030128d3..6bac732685 100644
--- a/packages/learn/src/components/MapModal/index.js
+++ b/packages/learn/src/components/MapModal/index.js
@@ -45,7 +45,7 @@ function MapModal({ introNodes, nodes, show, toggleMapModal }) {
>
- A Map to Learn to Code
+ A Curriculum to Learn to Code
diff --git a/packages/learn/src/layouts/global.css b/packages/learn/src/layouts/global.css
index 0c9a632e27..e717ac4f4e 100644
--- a/packages/learn/src/layouts/global.css
+++ b/packages/learn/src/layouts/global.css
@@ -634,3 +634,22 @@ pre tt:after {
font-size: 28px;
text-shadow: none;
}
+
+.btn-primary-invert {
+ color: #006400;
+ background-color: #fff;
+ border-color: #006400;
+}
+
+.btn-primary-invert:hover, .btn-primary-invert:focus, .btn-primary-invert:active {
+ color: #006400;
+ border-color: #006400;
+}
+
+.btn-primary-invert.btn-primary:hover {
+ color: #fff;
+}
+
+.btn-primary-link > a {
+ color: #fff;
+}
\ No newline at end of file
diff --git a/packages/learn/src/pages/index.js b/packages/learn/src/pages/index.js
index 4be4c31d28..bdfdc3ae80 100644
--- a/packages/learn/src/pages/index.js
+++ b/packages/learn/src/pages/index.js
@@ -49,9 +49,9 @@ const IndexPage = ({
We recommend you start at the beginning{' '}
{`${blockName} -> ${title}`}
- Want to see what we can offer?
+ Want to dive into our curriculum?
- Explore the lesson map
+ Explore the curriculum
);
diff --git a/packages/learn/src/templates/Challenges/classic/Show.js b/packages/learn/src/templates/Challenges/classic/Show.js
index 6a0ae113fd..4388d0c305 100644
--- a/packages/learn/src/templates/Challenges/classic/Show.js
+++ b/packages/learn/src/templates/Challenges/classic/Show.js
@@ -171,13 +171,12 @@ class ShowClassic extends PureComponent {
return (
-
+
diff --git a/packages/learn/src/templates/Challenges/components/Side-Panel.js b/packages/learn/src/templates/Challenges/components/Side-Panel.js
index b8b4bdb88a..28c8569790 100644
--- a/packages/learn/src/templates/Challenges/components/Side-Panel.js
+++ b/packages/learn/src/templates/Challenges/components/Side-Panel.js
@@ -3,30 +3,26 @@ import PropTypes from 'prop-types';
import ReactDom from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
-import { Button } from 'react-bootstrap';
import ChallengeTitle from './Challenge-Title';
import ChallengeDescription from './Challenge-Description';
import Spacer from '../../../components/util/Spacer';
-import { initConsole, openModal } from '../redux';
+import { initConsole } from '../redux';
const mapStateToProps = () => ({});
const mapDispatchToProps = dispatch =>
bindActionCreators(
{
- initConsole,
- openHelpModal: () => openModal('help')
+ initConsole
},
dispatch
);
const propTypes = {
description: PropTypes.arrayOf(PropTypes.string),
- guideUrl: PropTypes.string,
initConsole: PropTypes.func.isRequired,
- openHelpModal: PropTypes.func.isRequired,
title: PropTypes.string
};
@@ -56,7 +52,7 @@ export class SidePanel extends PureComponent {
}
render() {
- const { title, description, guideUrl, openHelpModal } = this.props;
+ const { title, description } = this.props;
return (
@@ -66,28 +62,6 @@ export class SidePanel extends PureComponent {
- {guideUrl ? (
-
- ) : null}
-
- Ask for help on the forum
-
);
}
diff --git a/packages/learn/src/templates/Challenges/components/Tool-Panel.js b/packages/learn/src/templates/Challenges/components/Tool-Panel.js
index fbb5e62f0c..20ebcf48d3 100644
--- a/packages/learn/src/templates/Challenges/components/Tool-Panel.js
+++ b/packages/learn/src/templates/Challenges/components/Tool-Panel.js
@@ -14,6 +14,7 @@ const mapDispatchToProps = dispatch =>
bindActionCreators(
{
executeChallenge,
+ openHelpModal: () => openModal('help'),
openResetModal: () => openModal('reset'),
toggleMapModal
},
@@ -22,19 +23,31 @@ const mapDispatchToProps = dispatch =>
const propTypes = {
executeChallenge: PropTypes.func.isRequired,
+ guideUrl: PropTypes.string,
+ openHelpModal: PropTypes.func.isRequired,
openResetModal: PropTypes.func.isRequired,
toggleMapModal: PropTypes.func.isRequired
};
-function ToolPanel({ executeChallenge, openResetModal, toggleMapModal }) {
+function ToolPanel({
+ executeChallenge,
+ openHelpModal,
+ openResetModal,
+ toggleMapModal,
+ guideUrl
+}) {
return (
-
diff --git a/packages/learn/src/templates/Introduction/Intro.js b/packages/learn/src/templates/Introduction/Intro.js
index 2504cd0778..aa410e986f 100644
--- a/packages/learn/src/templates/Introduction/Intro.js
+++ b/packages/learn/src/templates/Introduction/Intro.js
@@ -55,15 +55,19 @@ function IntroductionPage({
/>
-
-
- Go to the first lesson
-
+
+ Go to the first lesson
-
+
View the curriculum
+