Skip to content

Commit 5f05fd0

Browse files
authored
Replace ThemedImage with GitHub's approach (#411)
1 parent 164bd6f commit 5f05fd0

File tree

15 files changed

+48
-186
lines changed

15 files changed

+48
-186
lines changed

content/authoring/tutorials/create-first-kata.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Creating your first kata
33
tags: [authoring, tutorial]
44
---
55

6-
import ThemedImage from "@theme/ThemedImage";
7-
86
Kata on Codewars are created by regular users who want to share their ideas with the community and create challenges for others to train on. After solving a few kata, many users often find that they want to contribute back to the community with kata of their own. Not only can authoring a kata be a great learning experience, well-crafted kata are a source of great fun for everyone.
97

108
However, first-time authors – regardless of programming experience – may not realize that creating a good quality kata from scratch is a much more involved task than solving one, as it requires a wider mindset and broader set of skills (if that sounds intimidating, don't be discouraged: that's what this tutorial is for!). In many ways authoring a kata is closer to what would be considered a "professional" task: it requires designing a challenge with a diverse target audience in mind, implementing a solution, creating tests, handling feedback from users, and finally maintaining them. Every kata is like a small software product and goes through an equivalent of a full software development lifecycle.
@@ -24,13 +22,8 @@ You can also reach out to the community directly with any questions and seek exp
2422

2523
In order to create a new kata, you first need to earn the ["Create Kata" privilege](/gamification/privileges/), which is automatically awarded once you accumulate 300 Honor points. Then you can select the **"New Kata"** option from the profile menu:
2624

27-
<ThemedImage
28-
alt='"New Kata" Menu'
29-
sources={{
30-
light: require("./img/new_kata-light.png").default,
31-
dark: require("./img/new_kata-dark.png").default,
32-
}}
33-
/>
25+
!["New Kata" Menu](./img/new_kata-light.png#gh-light-mode-only)
26+
!["New Kata" Menu](./img/new_kata-dark.png#gh-dark-mode-only)
3427

3528
## How to create a good kata
3629

content/community/following.mdx

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,36 @@ tags: [concept]
44
slug: /community/following
55
---
66

7-
import ThemedImage from "@theme/ThemedImage";
8-
97
You can follow any user, be it a friend, a colleague, your students, or just anyone you'd like to track their Codewars career.
108
Following someone opens for you a couple of new possibilities.
119

1210
To follow a user, you need to visit their profile page, and click the `Follow` button:
1311

14-
<ThemedImage
15-
alt="Follow Button"
16-
sources={{
17-
light: require("./img/follow_light.png").default,
18-
dark: require("./img/follow_dark.png").default,
19-
}}
20-
/>
12+
![Follow Button](./img/follow_light.png#gh-light-mode-only)
13+
![Follow Button](./img/follow_dark.png#gh-dark-mode-only)
2114

2215
If you have already followed the user, the `Follow` button is replaced by `Unfollow` one. You can use it to stop following someone.
2316

2417
## Followers boards
2518

2619
On your profile page, you can find the `Social` tab, which contains a couple of leaderboards. One of them, titled **"Following"**, contains a list and honor ranking of all users followed by you. Another one, titled **"Followers"**, provides a similar list of your followers.
2720

28-
<ThemedImage
29-
alt="Followers Boards"
30-
sources={{
31-
light: require("./img/followers-board_light.png").default,
32-
dark: require("./img/followers-board_dark.png").default,
33-
}}
34-
/>
21+
![Followers Boards](./img/followers-board_light.png#gh-light-mode-only)
22+
![Followers Boards](./img/followers-board_dark.png#gh-dark-mode-only)
3523

3624
## Filtering solutions
3725

3826
When viewing the solutions of a kata, you can choose to see only those from users you are following. This is a great way to easily find solutions from warriors you respect or know personally.
3927

40-
<ThemedImage
41-
alt="Solution"
42-
sources={{
43-
light: require("./img/solutions_light.png").default,
44-
dark: require("./img/solutions_dark.png").default,
45-
}}
46-
/>
28+
![Solution](./img/solutions_light.png#gh-light-mode-only)
29+
![Solution](./img/solutions_dark.png#gh-dark-mode-only)
4730

4831
## Allies
4932

5033
When two users follow each other, they become allies. All your allies are collected in dedicated leaderboards, displayed on your dashboard, or on `Social` tab of your profile. When viewing these boards, you will see all of your allies and be able to keep track of their honor and overall rank progression.
5134

52-
<ThemedImage
53-
alt="Allies board on user dashboard"
54-
sources={{
55-
light: require("./img/allies-board_light.png").default,
56-
dark: require("./img/allies-board_dark.png").default,
57-
}}
58-
/>
35+
![Allies board on user dashboard](./img/allies-board_light.png#gh-light-mode-only)
36+
![Allies board on user dashboard](./img/allies-board_dark.png#gh-dark-mode-only)
5937

6038
You automatically become allies with members of the same [clan](#clans), and with users who join Codewars using your referral code.
6139

@@ -70,13 +48,8 @@ Joining a clan is as simple as setting the clan name in your profile.
7048
If you want to switch clans, you simply need to change the name.
7149
If you want to leave a clan, set its name empty.
7250

73-
<ThemedImage
74-
alt="Joining a Clan"
75-
sources={{
76-
light: require("./img/join-clan_light.png").default,
77-
dark: require("./img/join-clan_dark.png").default,
78-
}}
79-
/>
51+
![Joining a Clan](./img/join-clan_light.png#gh-light-mode-only)
52+
![Joining a Clan](./img/join-clan_dark.png#gh-dark-mode-only)
8053

8154
If you change or leave your clan, you are still allies with all its members.
8255
If you wish to not be associated with them anymore, you will have to manually unfollow everyone from the previous clan.

content/concepts/kata/translations.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Translations
33
tags: [concept]
44
---
55

6-
import ThemedImage from "@theme/ThemedImage";
7-
86
Codewars supports a variety of [programming languages][languages] and every kata can be available in more than one language. Users may choose any language available to solve the kata and do so in as many languages as they wish. After gaining the required privileges, users who solved the kata are allowed to create or review translations to make the kata available in new languages, therefore for a larger audience.
97

108
## Training on a selected language
@@ -20,13 +18,8 @@ Completing a kata in only one language is enough to mark the kata as solved, how
2018

2119
To be able to translate a kata to other languages, the user has to complete the kata in at least one language. Once they have completed it, the option to add a new translation will appear in languages dropdown:
2220

23-
<ThemedImage
24-
alt="Add Translation"
25-
sources={{
26-
light: require("./img/add-translation_light.png").default,
27-
dark: require("./img/add-translation_dark.png").default,
28-
}}
29-
/>
21+
![Add Translation](./img/add-translation_light.png#gh-light-mode-only)
22+
![Add Translation](./img/add-translation_dark.png#gh-dark-mode-only)
3023

3124
This will take the user to the translations page where they can view existing translations (pending ones, approved and rejected) or create new ones.
3225

content/gamification/honor.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Honor
33
tags: [concept]
44
---
55

6-
import ThemedImage from "@theme/ThemedImage";
7-
86
Honor represents the level of respect a user has earned from the community, based on their skills and contributions. While ranks are an indication of your skills only, honor is mostly an indication of your activity and contributions.
97

108
## Honor Rewards
@@ -22,13 +20,8 @@ You may find the exact amount of Honor points earned for all kinds of situations
2220

2321
Your profile page displays a breakdown of your Honor points:
2422

25-
<ThemedImage
26-
alt="Honor Progress"
27-
sources={{
28-
light: require("./img/honor-breakdown_light.png").default,
29-
dark: require("./img/honor-breakdown_dark.png").default,
30-
}}
31-
/>
23+
![Honor Progress](./img/honor-breakdown_light.png#gh-light-mode-only)
24+
![Honor Progress](./img/honor-breakdown_dark.png#gh-dark-mode-only)
3225

3326
- **Completed Kata** is the amount of honor you gained by only solving tasks and voting them,
3427
- **Authored Kata & Translations** represent the amount of honor earned doing so,

content/gamification/index.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@ tags: [concept]
44
slug: /gamification
55
---
66

7-
import ThemedImage from "@theme/ThemedImage";
8-
97
On Codewars, there are two different scales you can level up by doing different things:
108

119
- [**_Rank_**][concept-ranks]: This scale defines your proficiency and current kyu/dan level. You can level up your rank doing only one thing: solving kata.
1210
- [**_Honor_**][concept-honor]: Honor points represent how active the user is. Honor can be earned in many ways: completing kata, translating them, voting, and many others. Earning Honor points grants you additional [privileges][concept-privileges], which let you perform actions not available to everyone, like creating new kata, translations, etc. More details in the next pages.
1311

1412
Your current rank and honor are displayed in the top bar:
1513

16-
<ThemedImage
17-
alt="Top Bar"
18-
sources={{
19-
light: require("./img/top-bar_light.png").default,
20-
dark: require("./img/top-bar_dark.png").default,
21-
}}
22-
/>
14+
![Top Bar](./img/top-bar_light.png#gh-light-mode-only)
15+
![Top Bar](./img/top-bar_dark.png#gh-dark-mode-only)
2316

2417
[concept-ranks]: /gamification/ranks/
2518
[concept-honor]: /gamification/honor/

content/gamification/ranks.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Ranks
33
tags: [concept]
44
---
55

6-
import ThemedImage from "@theme/ThemedImage";
7-
86
Ranks are used to indicate the proficiency of users and the difficulty of Kata. There are two classes of ranks, Kyu and Dan, which are divided in 8 levels each. By increasing order of proficiency/difficulty:
97

108
- 8 Kyu to 1 Kyu
@@ -16,13 +14,8 @@ Why the names Kyu and Dan? The terms are borrowed from a system in Japanese mart
1614

1715
When you visit your profile on Codewars, you can see that you have an Overall rank as well as individual ranks for each language you have completed kata in:
1816

19-
<ThemedImage
20-
alt="Rank Progress"
21-
sources={{
22-
light: require("./img/rank-breakdown_light.png").default,
23-
dark: require("./img/rank-breakdown_dark.png").default,
24-
}}
25-
/>
17+
![Rank Progress](./img/rank-breakdown_light.png#gh-light-mode-only)
18+
![Rank Progress](./img/rank-breakdown_dark.png#gh-dark-mode-only)
2619

2720
The wheel on the left indicates your progress toward your next rank. For example, if you see the `1 dan` badge in the wheel and your overall rank is `1 kyu / 70.0%` that means you have earned 70% of the progress needed to go from 1 kyu to 1 dan (see [required score](#required-score)).
2821

content/getting-started/finding-kata.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
title: Finding Kata
33
---
44

5-
import ThemedImage from "@theme/ThemedImage";
6-
75
Your account is configured and you are ready for your next challenge. Now you will learn how to find a task to train on.
86

97
## Personal Trainer
108

119
The easiest way of getting started is to use the personal trainer on the dashboard to pick your next kata.
1210

13-
<ThemedImage
14-
alt="Training Routines"
15-
sources={{
16-
light: require("./img/finding-kata_01_training-routines_light.png").default,
17-
dark: require("./img/finding-kata_01_training-routines_dark.png").default,
18-
}}
19-
/>
11+
![Training Routines](./img/finding-kata_01_training-routines_light.png#gh-light-mode-only)
12+
![Training Routines](./img/finding-kata_01_training-routines_dark.png#gh-dark-mode-only)
2013

2114
The personal trainer suggests to you a kata based on the selected language and focus area. You can either train on the suggested kata or skip to see the next suggestion.
2215

@@ -30,13 +23,8 @@ If, for some reason, you do not like the suggested kata, you can skip on it with
3023

3124
For those really looking for a hard challenge or a specific kind of rank/task/..., we recommend you go directly to the full list of kata where you can select from over 8000 kata to train on. Remember, 8 kyū is the easiest level a kata can be.
3225

33-
<ThemedImage
34-
alt="Sidebar"
35-
sources={{
36-
light: require("./img/finding-kata_02_sidebar_light.png").default,
37-
dark: require("./img/finding-kata_02_sidebar_dark.png").default,
38-
}}
39-
/>
26+
![Sidebar](./img/finding-kata_02_sidebar_light.png#gh-light-mode-only)
27+
![Sidebar](./img/finding-kata_02_sidebar_dark.png#gh-dark-mode-only)
4028

4129
Details of the kata search page are described in the `[UI documentation (TODO: insert link to documentation of kata search panel)]`, but here are some useful hints for beginners:
4230

content/getting-started/kata-solved.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: After Solving a Kata
33
---
44

5-
import ThemedImage from "@theme/ThemedImage";
6-
75
Finally, this great moment happened: the test output panel is all green, and you were able to submit your solution. Congratulations! It's time to collect your reward. It's also a good time to share some feedback, to guide others who'd encounter the same kata.
86

97
## Rewards
@@ -14,13 +12,8 @@ You worked hard to solve your last challenge, and after you succeeded, you defin
1412

1513
The rank level reflects your experience and knowledge you have gained by solving kata. You start at the lowest rank of 8 kyū, and each correct solution brings you closer to a higher rank. You can see your rank progress toward the next level on your profile page:
1614

17-
<ThemedImage
18-
alt="Rank Progress"
19-
sources={{
20-
light: require("./img/solving_01_rank-progress_light.png").default,
21-
dark: require("./img/solving_01_rank-progress_dark.png").default,
22-
}}
23-
/>
15+
![Rank Progress](./img/solving_01_rank-progress_light.png#gh-light-mode-only)
16+
![Rank Progress](./img/solving_01_rank-progress_dark.png#gh-dark-mode-only)
2417

2518
More information on ranks and progress can be found [here](/gamification/ranks/).
2619

@@ -32,12 +25,7 @@ Honor points are rewarded by contributing to Codewars in many ways, and solving
3225

3326
After you have successfully solved a task, you can let others know how you liked it. One way to do this is to leave your satisfaction vote:
3427

35-
<ThemedImage
36-
alt="Satisfaction Vote"
37-
sources={{
38-
light: require("./img/solving_02_vote_light.png").default,
39-
dark: require("./img/solving_02_vote_dark.png").default,
40-
}}
41-
/>
28+
![Satisfaction Vote](./img/solving_02_vote_light.png#gh-light-mode-only)
29+
![Satisfaction Vote](./img/solving_02_vote_dark.png#gh-dark-mode-only)
4230

4331
You can also participate in the discussion on a kata. If you wish to log an issue about this specific kata, such as poorly worded descriptions or issues with test cases, then you can leave a comment in the discourse section. More on this in the next part.

content/getting-started/setting-up.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
title: Setting Up
33
---
44

5-
import ThemedImage from "@theme/ThemedImage";
6-
75
In this section you will learn how to set up your account to get the best training experience and tune your preferences for the Codewars site. There are two areas you can configure: [Account Settings](#account-settings) and [Training Setup](#training-setup).
86

97
## Account Settings
108

119
You can enter your account settings panel by navigating with [this link](https://www.codewars.com/users/edit), or using following menu:
1210

13-
<ThemedImage
14-
alt="Account Settings Menu"
15-
sources={{
16-
light: require("./img/setting-up_01_account-menu_light.png").default,
17-
dark: require("./img/setting-up_01_account-menu_dark.png").default,
18-
}}
19-
/>
11+
![Account Settings Menu](./img/setting-up_01_account-menu_light.png#gh-light-mode-only)
12+
![Account Settings Menu](./img/setting-up_01_account-menu_dark.png#gh-dark-mode-only)
2013

2114
You can find all options described in detail `[here (TODO: insert link to actual documentation of UI)]`, and below are listed ones useful to get you running as soon as possible:
2215

@@ -38,13 +31,8 @@ Now you just need to click `UPDATE` to have your settings stored in the database
3831

3932
You can enter your training setup panel by navigating with [this link](https://www.codewars.com/trainer/setup), or using following menu:
4033

41-
<ThemedImage
42-
alt="Training Setup Menu"
43-
sources={{
44-
light: require("./img/setting-up_02_training-menu_light.png").default,
45-
dark: require("./img/setting-up_02_training-menu_dark.png").default,
46-
}}
47-
/>
34+
![Training Setup Menu](./img/setting-up_02_training-menu_light.png#gh-light-mode-only)
35+
![Training Setup Menu](./img/setting-up_02_training-menu_dark.png#gh-dark-mode-only)
4836

4937
Again, a detailed description can be found in `[UI documentation (TODO: insert link to actual documentation of UI)]`, but things needed to get you started are briefly explained below:
5038

content/getting-started/solving-kata.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
title: Solving a Kata
33
---
44

5-
import ThemedImage from "@theme/ThemedImage";
6-
75
After opening a kata page, you are presented with the kata details view with general information about it. Read carefully through the description, and if you are ready to face the challenge, you can start your training by clicking on `TRAIN`.
86

97
## Kata Trainer
108

119
Welcome to the kata trainer! You use this view to take your solution attempts, write the code and run tests. A few tips to get you started:
1210

13-
<ThemedImage
14-
alt="Kata Trainer"
15-
sources={{
16-
light: require("./img/solving_03_trainer_light.png").default,
17-
dark: require("./img/solving_03_trainer_dark.png").default,
18-
}}
19-
/>
11+
![Kata Trainer](./img/solving_03_trainer_light.png#gh-light-mode-only)
12+
![Kata Trainer](./img/solving_03_trainer_dark.png#gh-dark-mode-only)
2013

2114
### Solution editor
2215

content/languages/python/codewars-test.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebar_label: Codewars Test Framework
44
tags: [python, reference]
55
---
66

7-
import ThemedImage from "@theme/ThemedImage";
8-
97
To run Python tests, Codewars currently uses a custom test framework, published and available in [this GitHub repository][test-framework-repo].
108

119
## Overview
@@ -91,13 +89,8 @@ def rnd_tests():
9189

9290
The above produces an output similar to the following:
9391

94-
<ThemedImage
95-
alt="Output window example"
96-
sources={{
97-
light: require("./img/python-test-framework-example-light.png").default,
98-
dark: require("./img/python-test-framework-example-dark.png").default,
99-
}}
100-
/>
92+
![Output window example](./img/python-test-framework-example-light.png#gh-light-mode-only)
93+
![Output window example](./img/python-test-framework-example-dark.png#gh-dark-mode-only)
10194

10295
## Failing Early
10396

content/references/kata-trainer.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@ title: Kata Trainer
33
tags: [reference]
44
---
55

6-
import ThemedImage from "@theme/ThemedImage";
7-
86
The kata trainer is the interface you're presented when you click "Train" on a kata. It is here that you write your solution, run tests and attempt to complete the kata. Since this is where you'll be spending the majority of your time, it is recommended that you familiarize yourself with the interface and its functionality. That way, you can focus entirely on solving the kata.
97

10-
<ThemedImage
11-
alt="Kata trainer interface"
12-
sources={{
13-
light: require("./img/kata-trainer-light.png").default,
14-
dark: require("./img/kata-trainer-dark.png").default,
15-
}}
16-
/>
8+
![Kata trainer interface](./img/kata-trainer-light.png#gh-light-mode-only)
9+
![Kata trainer interface](./img/kata-trainer-dark.png#gh-dark-mode-only)
1710

1811
*The interface: 1) View Panel 2) Language selection 3) Language version 4) Solution Editor 5) Sample Tests Editor 6) Action buttons 7) Enable Vim/Emacs mode*
1912

0 commit comments

Comments
 (0)