Skip to content

Commit 3d1dabf

Browse files
authored
Merge 90b41c2 into db5a160
2 parents db5a160 + 90b41c2 commit 3d1dabf

File tree

10 files changed

+158
-124
lines changed

10 files changed

+158
-124
lines changed

__tests__/__snapshots__/storyshots.test.js.snap

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31166,40 +31166,46 @@ exports[`Storyshots mdx/BlockQuote Quote 1`] = `
3116631166

3116731167
exports[`Storyshots mdx/ChallengeBar Standart 1`] = `
3116831168
<div
31169-
className="d-flex justify-content-center my-3"
31169+
className="my-3 mt-5"
3117031170
>
3117131171
<div
31172-
className="card shadow-sm bg-primary text-white px-4 py-2 border-0"
31172+
className="d-flex flex-col flex-md-row gap-3 justify-content-between align-items-none align-items-md-center card shadow-sm bg-primary text-white px-4 py-4 border-0"
3117331173
>
31174-
<h1
31175-
className="text-center fw-bold align-self-center"
31176-
>
31177-
Master your skill by solving challenges
31178-
</h1>
31179-
<a
31180-
className="text-white text-center noUnderline"
31181-
href="/docs/setup#submitting-challenges"
31182-
rel="noopener noreferrer"
31183-
target="_blank"
31184-
>
31185-
Submitting challenges
31186-
</a>
31187-
<p
31188-
className="px-2 m-0 text-center fw-bold"
31189-
>
31190-
Complete the first seven of JS0 challenges
31191-
</p>
31174+
<div>
31175+
<span
31176+
className="align-self-center fs-4"
31177+
>
31178+
Master your skill by solving challenges
31179+
</span>
31180+
<p
31181+
className="m-0"
31182+
>
31183+
Complete the first seven of JS0 challenges
31184+
</p>
31185+
</div>
3119231186
<div
31193-
className="text-center"
31187+
className="d-flex flex-column gap-2"
3119431188
>
3119531189
<a
31196-
className="btn btn-light mt-2 text-primary noUnderline"
31190+
className="btn btn-light text-primary py-3 px-3 noUnderline"
3119731191
href="/"
3119831192
rel="noopener noreferrer"
3119931193
target="_blank"
3120031194
>
3120131195
View Challenges
3120231196
</a>
31197+
<a
31198+
className="MDX_a"
31199+
>
31200+
<a
31201+
className="text-white d-block noUnderline"
31202+
href="/docs/setup#submitting-challenges"
31203+
rel="noopener noreferrer"
31204+
target="_blank"
31205+
>
31206+
How to submit challenges?
31207+
</a>
31208+
</a>
3120331209
</div>
3120431210
</div>
3120531211
</div>

__tests__/pages/curriculum/[lessonSlug]/__snapshots__/[subLessonSlug].test.js.snap

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,59 +72,67 @@ exports[`[subLessonSlug] Page should match screenshot 1`] = `
7272
</div>
7373
</div>
7474
<div
75-
class="card shadow-sm d-block border-0 p-3 p-md-4 bg-white lesson-wrapper "
75+
class="card shadow-sm d-flex flex-column gap-5 border-0 p-3 p-md-4 bg-white lesson-wrapper"
7676
>
77-
<nav
78-
aria-label="Sub-lesson Links"
79-
>
80-
<a
81-
aria-current="page"
82-
class="subtitle link-dark dark d-block"
83-
href="/curriculum/js0/first_sub_lesson"
77+
<div>
78+
<nav
79+
aria-label="Sub-lesson Links"
8480
>
85-
Part 1: first sub lesson
86-
</a>
87-
<a
88-
class="subtitle text-muted d-block"
89-
href="/curriculum/js0/second_sub_lesson"
81+
<a
82+
aria-current="page"
83+
class="subtitle link-dark dark d-block"
84+
href="/curriculum/js0/first_sub_lesson"
85+
>
86+
Part 1: first sub lesson
87+
</a>
88+
<a
89+
class="subtitle text-muted d-block"
90+
href="/curriculum/js0/second_sub_lesson"
91+
>
92+
Part 2: second sub lesson
93+
</a>
94+
<a
95+
class="subtitle text-muted d-block"
96+
href="/curriculum/js0/third_sub_lesson"
97+
>
98+
Part 3: third sub lesson
99+
</a>
100+
</nav>
101+
<h1
102+
class="MDX_h1"
103+
id="first"
90104
>
91-
Part 2: second sub lesson
92-
</a>
93-
<a
94-
class="subtitle text-muted d-block"
95-
href="/curriculum/js0/third_sub_lesson"
105+
first
106+
</h1>
107+
<p
108+
class="MDX_p"
96109
>
97-
Part 3: third sub lesson
98-
</a>
99-
</nav>
100-
<h1
101-
class="MDX_h1"
102-
id="first"
103-
>
104-
first
105-
</h1>
106-
<p>
107-
simple
108-
</p>
109-
<div
110-
class="d-flex"
111-
>
112-
<a
113-
class="lessonLink next"
114-
href="/curriculum/js0/second_sub_lesson"
110+
simple
111+
</p>
112+
<div
113+
class="mt-5"
115114
>
116-
Next part:
117-
<span>
118-
second sub lesson
119-
</span>
120-
</a>
115+
<div
116+
class="d-flex"
117+
>
118+
<a
119+
class="lessonLink next"
120+
href="/curriculum/js0/second_sub_lesson"
121+
>
122+
Next part:
123+
<span>
124+
second sub lesson
125+
</span>
126+
</a>
127+
</div>
128+
</div>
121129
</div>
122130
<a
123131
class="MDX_a edit"
124132
href="https://github.com/garageScript/c0d3-app/edit/master/some/fake/path"
125133
title="Edit this page on Github"
126134
>
127-
Edit this page
135+
Edit this page on Github
128136
</a>
129137
</div>
130138
</div>

__tests__/pages/docs/__snapshots__/[docSlug].test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports[`[docSlug] Page should match screenshot 1`] = `
3838
href="https://github.com/garageScript/c0d3-app/edit/master/some/fake/path"
3939
title="Edit this page on Github"
4040
>
41-
Edit this page
41+
Edit this page on Github
4242
</a>
4343
</div>
4444
</div>

components/EditPage/EditPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const EditPage: React.FC<Props> = ({ filePath }) => {
1010
<a
1111
href={`https://github.com/garageScript/c0d3-app/edit/master/${filePath}`}
1212
title="Edit this page on Github"
13-
className={`${styles['MDX_a']} ${styles['edit']}`}
13+
className={`${styles.MDX_a} ${styles.edit}`}
1414
>
15-
Edit this page
15+
Edit this page on Github
1616
</a>
1717
)
1818
}

components/mdx/ChallengBar.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
11
import React from 'react'
22
import NavLink from '../NavLink'
3+
import MDXcomponents from '../../helpers/mdxComponents'
34

45
const ChallengeBar: React.FC<{
56
href: string
67
description: string
78
title: string
89
}> = ({ href, description, title }) => {
910
return (
10-
<div className="d-flex justify-content-center my-3">
11-
<div className="card shadow-sm bg-primary text-white px-4 py-2 border-0">
12-
<h1 className="text-center fw-bold align-self-center">{title}</h1>
13-
<NavLink
14-
path="/docs/setup#submitting-challenges"
15-
className="text-white text-center "
16-
external
17-
>
18-
Submitting challenges
19-
</NavLink>
20-
<p className="px-2 m-0 text-center fw-bold">{description}</p>
21-
22-
<div className="text-center">
11+
<div className="my-3 mt-5">
12+
<div className="d-flex flex-col flex-md-row gap-3 justify-content-between align-items-none align-items-md-center card shadow-sm bg-primary text-white px-4 py-4 border-0">
13+
<div>
14+
<span className="align-self-center fs-4">{title}</span>
15+
<p className="m-0">{description}</p>
16+
</div>
17+
<div className="d-flex flex-column gap-2">
2318
<NavLink
2419
path={href}
25-
className={`btn btn-light mt-2 text-primary `}
20+
className="btn btn-light text-primary py-3 px-3"
2621
external
2722
>
2823
View Challenges
2924
</NavLink>
25+
<MDXcomponents.a>
26+
<NavLink
27+
path="/docs/setup#submitting-challenges"
28+
className="text-white d-block"
29+
external
30+
>
31+
How to submit challenges?
32+
</NavLink>
33+
</MDXcomponents.a>
3034
</div>
3135
</div>
3236
</div>

components/mdx/__snapshots__/ChallengeBar.test.js.snap

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,35 @@
33
exports[`ChallengeBar component Should created redirect based on input 1`] = `
44
<div>
55
<div
6-
class="d-flex justify-content-center my-3"
6+
class="my-3 mt-5"
77
>
88
<div
9-
class="card shadow-sm bg-primary text-white px-4 py-2 border-0"
9+
class="d-flex flex-col flex-md-row gap-3 justify-content-between align-items-none align-items-md-center card shadow-sm bg-primary text-white px-4 py-4 border-0"
1010
>
11-
<h1
12-
class="text-center fw-bold align-self-center"
13-
/>
14-
<a
15-
class="text-white text-center noUnderline"
16-
href="/docs/setup#submitting-challenges"
17-
rel="noopener noreferrer"
18-
target="_blank"
19-
>
20-
Submitting challenges
21-
</a>
22-
<p
23-
class="px-2 m-0 text-center fw-bold"
24-
/>
11+
<div>
12+
<span
13+
class="align-self-center fs-4"
14+
/>
15+
<p
16+
class="m-0"
17+
/>
18+
</div>
2519
<div
26-
class="text-center"
27-
/>
20+
class="d-flex flex-column gap-2"
21+
>
22+
<a
23+
class="MDX_a"
24+
>
25+
<a
26+
class="text-white d-block noUnderline"
27+
href="/docs/setup#submitting-challenges"
28+
rel="noopener noreferrer"
29+
target="_blank"
30+
>
31+
How to submit challenges?
32+
</a>
33+
</a>
34+
</div>
2835
</div>
2936
</div>
3037
</div>

helpers/mdxComponents.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const MDXcomponents = {
2828
ul: (props: any) => <ul className={`${styles['MDX_ul']}`} {...props} />,
2929
ol: (props: any) => <ol className={`${styles['MDX_ol']}`} {...props} />,
3030
a: (props: any) => <a className={`${styles['MDX_a']}`} {...props} />,
31+
p: (props: any) => <p className={`${styles['MDX_p']}`} {...props} />,
3132
td: (props: any) => <td className={`${styles['MDX_td']}`} {...props} />,
3233
th: (props: any) => <th className={`${styles['MDX_th']}`} {...props} />
3334
}

pages/curriculum/[lessonSlug]/[subLessonSlug].tsx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -151,30 +151,36 @@ const SubLessonPage: React.FC<Props> & WithLayout = ({
151151
breakpoint={breakpoint}
152152
/>
153153
<div
154-
className={`card shadow-sm d-block border-0 p-3 p-md-4 bg-white ${mdxStyles['lesson-wrapper']} `}
154+
className={`card shadow-sm d-flex flex-column gap-5 border-0 p-3 p-md-4 bg-white ${mdxStyles['lesson-wrapper']}`}
155155
>
156-
<Title
157-
title={`${selectedSubLesson.frontMatter.title} | ${lessonSlug} | C0D3`}
158-
/>
159-
<ScrollTopArrow />
160-
{hasMultipleSubLessons && (
161-
<SubLessonLinks
162-
subLessons={subLessons}
163-
lessonSlug={lessonSlug}
164-
subLessonSlug={subLessonSlug}
156+
<div>
157+
<Title
158+
title={`${selectedSubLesson.frontMatter.title} | ${lessonSlug} | C0D3`}
165159
/>
166-
)}
167-
168-
<MDXRemote {...selectedSubLesson.source!} components={MDXcomponents} />
169-
170-
{hasMultipleSubLessons && (
171-
<NextPreviousLessons
172-
subLessons={subLessons}
173-
subLessonSlug={subLessonSlug}
174-
lessonSlug={lessonSlug}
160+
<ScrollTopArrow />
161+
{hasMultipleSubLessons && (
162+
<SubLessonLinks
163+
subLessons={subLessons}
164+
lessonSlug={lessonSlug}
165+
subLessonSlug={subLessonSlug}
166+
/>
167+
)}
168+
169+
<MDXRemote
170+
{...selectedSubLesson.source!}
171+
components={MDXcomponents}
175172
/>
176-
)}
177173

174+
{hasMultipleSubLessons && (
175+
<div className="mt-5">
176+
<NextPreviousLessons
177+
subLessons={subLessons}
178+
subLessonSlug={subLessonSlug}
179+
lessonSlug={lessonSlug}
180+
/>
181+
</div>
182+
)}
183+
</div>
178184
<EditPage filePath={githubFilePath} />
179185
</div>
180186
</div>

scss/_text.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ h2 {
1717

1818
h3 {
1919
@include rubik-bold;
20-
font-size: 18px;
20+
font-size: 20px;
2121
line-height: 160%;
2222
}
2323

0 commit comments

Comments
 (0)