+
{guideUrl ? (
) : null}
{videoUrl ? (
@@ -69,7 +73,7 @@ function ToolPanel({
className='btn-primary-invert'
onClick={openVideoModal}
>
- Watch a video
+ {isMobile ? 'Video' : 'Watch a video'}
) : null}
diff --git a/client/src/templates/Challenges/components/completion-modal.css b/client/src/templates/Challenges/components/completion-modal.css
index 1e8c67eedd..0970bdc871 100644
--- a/client/src/templates/Challenges/components/completion-modal.css
+++ b/client/src/templates/Challenges/components/completion-modal.css
@@ -9,3 +9,9 @@
height: 30vh;
width: 30vh;
}
+
+@media screen, (max-width: 767px) {
+ .challenge-success-modal .btn-lg {
+ font-size: 16px;
+ }
+}
diff --git a/client/src/templates/Challenges/components/help-modal.css b/client/src/templates/Challenges/components/help-modal.css
new file mode 100644
index 0000000000..ac54f7f115
--- /dev/null
+++ b/client/src/templates/Challenges/components/help-modal.css
@@ -0,0 +1,5 @@
+@media screen, (max-width: 767px) {
+ .help-modal .btn-lg {
+ font-size: 16px;
+ }
+}
diff --git a/client/src/templates/Challenges/components/preview.css b/client/src/templates/Challenges/components/preview.css
index 338dc0f19e..24498dc399 100644
--- a/client/src/templates/Challenges/components/preview.css
+++ b/client/src/templates/Challenges/components/preview.css
@@ -3,6 +3,13 @@
width: 100%;
padding: 0;
margin: 0;
+ border: none;
+}
+
+@media screen, (max-width: 767px) {
+ .challenge-preview, .challenge-preview-frame {
+ height: calc(100vh - 112px);
+ }
}
.enable-iframe {
diff --git a/client/src/templates/Challenges/components/reset-modal.css b/client/src/templates/Challenges/components/reset-modal.css
index 5e561d1fe7..76a560e495 100644
--- a/client/src/templates/Challenges/components/reset-modal.css
+++ b/client/src/templates/Challenges/components/reset-modal.css
@@ -8,4 +8,10 @@
color: #fff;
font-size: 28px;
text-shadow: none;
-}
\ No newline at end of file
+}
+
+@media screen, (max-width: 767px) {
+ .reset-modal .btn-lg {
+ font-size: 16px;
+ }
+}
diff --git a/client/src/templates/Challenges/components/tool-panel.css b/client/src/templates/Challenges/components/tool-panel.css
index fc70fdc2b3..fe5e09fce9 100644
--- a/client/src/templates/Challenges/components/tool-panel.css
+++ b/client/src/templates/Challenges/components/tool-panel.css
@@ -1,3 +1,17 @@
.tool-panel-group button, .tool-panel-group a {
font-size: 1.1rem;
}
+
+.tool-panel-group-mobile button, .tool-panel-group-mobile a {
+ font-size: 16px;
+}
+
+.tool-panel-group-mobile {
+ display: flex;
+ flex-direction: row-reverse;
+ padding: 0 2px;
+ background: #fff;
+}
+.tool-panel-group-mobile .btn-block + .btn-block {
+ margin: 0 2px 0 0;
+}
diff --git a/client/src/templates/Challenges/redux/execute-challenge-epic.js b/client/src/templates/Challenges/redux/execute-challenge-epic.js
index 57f657da18..dd45bf8c2d 100644
--- a/client/src/templates/Challenges/redux/execute-challenge-epic.js
+++ b/client/src/templates/Challenges/redux/execute-challenge-epic.js
@@ -43,7 +43,12 @@ const executeDebounceTimeout = 750;
function updateMainEpic(action$, state$, { document }) {
return action$.pipe(
- ofType(types.updateFile, types.challengeMounted),
+ ofType(
+ types.updateFile,
+ types.previewMounted,
+ types.challengeMounted,
+ types.resetChallenge
+ ),
filter(() => {
const { challengeType } = challengeMetaSelector(state$.value);
return (
diff --git a/client/src/templates/Challenges/redux/index.js b/client/src/templates/Challenges/redux/index.js
index 4dd3f5eece..46abdd15c1 100644
--- a/client/src/templates/Challenges/redux/index.js
+++ b/client/src/templates/Challenges/redux/index.js
@@ -67,6 +67,7 @@ export const types = createTypes(
'closeModal',
'openModal',
+ 'previewMounted',
'challengeMounted',
'checkChallenge',
'executeChallenge',
@@ -74,6 +75,8 @@ export const types = createTypes(
'submitChallenge',
'submitComplete',
+ 'moveToTab',
+
...createAsyncTypes('fetchIdToNameMap')
],
ns
@@ -143,6 +146,7 @@ export const noStoredCodeFound = createAction(types.noStoredCodeFound);
export const closeModal = createAction(types.closeModal);
export const openModal = createAction(types.openModal);
+export const previewMounted = createAction(types.challengeMounted);
export const challengeMounted = createAction(types.challengeMounted);
export const checkChallenge = createAction(types.checkChallenge);
export const executeChallenge = createAction(types.executeChallenge);
@@ -150,6 +154,9 @@ export const resetChallenge = createAction(types.resetChallenge);
export const submitChallenge = createAction(types.submitChallenge);
export const submitComplete = createAction(types.submitComplete);
+export const moveToTab = createAction(types.moveToTab);
+
+export const currentTabSelector = state => state[ns].currentTab;
export const challengeFilesSelector = state => state[ns].challengeFiles;
export const challengeIdToNameMapSelector = state =>
state[ns].challengeIdToNameMap;
@@ -234,6 +241,7 @@ export const reducer = handleActions(
[types.resetChallenge]: state => ({
...state,
+ currentTab: 2,
challengeFiles: {
...Object.keys(state.challengeFiles)
.map(key => state.challengeFiles[key])
@@ -291,6 +299,14 @@ export const reducer = handleActions(
...state.modal,
[payload]: true
}
+ }),
+ [types.moveToTab]: (state, { payload }) => ({
+ ...state,
+ currentTab: payload
+ }),
+ [types.executeChallenge]: (state, { payload }) => ({
+ ...state,
+ currentTab: 3
})
},
initialState
diff --git a/client/src/templates/Introduction/Intro.js b/client/src/templates/Introduction/Intro.js
index ed93aef7af..e2b9f1cbeb 100644
--- a/client/src/templates/Introduction/Intro.js
+++ b/client/src/templates/Introduction/Intro.js
@@ -44,31 +44,33 @@ function IntroductionPage({ data: { markdownRemark, allChallengeNode } }) {
{block} | freeCodeCamp
-
-
-
-
-
- Go to the first lesson
-
-
-
-
-
-
-
-
-
- Upcoming Lessons
-
- {allChallengeNode ? renderMenuItems(allChallengeNode) : null}
-
-
+
+
+
+
+
+
+ Go to the first lesson
+
+
+
+
+
+
+
+
+
+ Upcoming Lessons
+
+ {allChallengeNode ? renderMenuItems(allChallengeNode) : null}
+
+
+
);
}
diff --git a/client/src/templates/Introduction/intro.css b/client/src/templates/Introduction/intro.css
index 5fb9d1946d..1e82af8973 100644
--- a/client/src/templates/Introduction/intro.css
+++ b/client/src/templates/Introduction/intro.css
@@ -1,3 +1,9 @@
+@media screen, (max-width: 767px) {
+ .intro-layout-container {
+ padding: 0 10px;
+ }
+}
+
.intro-layout {
margin-top: 1.45rem;
}