Skip to content

Commit

Permalink
feat: Add Exercism public profile in Social section (fixes #761)
Browse files Browse the repository at this point in the history
  • Loading branch information
RianNegreiros committed Dec 18, 2024
1 parent 888aff3 commit 04aaa5e
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/markdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,13 @@ const Markdown = (props) => {
<>
<DisplaySocial base="" icon={`${iconBaseUrl}rss.svg`} username={social.rssurl} />
</>
<>
<DisplaySocial
base="https://exercism.org/profiles"
icon={`${iconBaseUrl}exercism.svg`}
username={social.exercism}
/>
</>
{isSocial(social) ? (
<>
{'</p>'}
Expand Down
7 changes: 7 additions & 0 deletions src/components/markdownPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ export const SocialPreview = (props) => {
<>
<DisplaySocial base="" icon={`${iconBaseUrl}rss.svg`} username={social.rssurl} />
</>
<>
<DisplaySocial
base="https://exercism.org/profiles"
icon={`${iconBaseUrl}exercism.svg`}
username={social.exercism}
/>
</>
</div>
);
};
Expand Down
14 changes: 14 additions & 0 deletions src/components/social.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,20 @@ const Social = (props) => {
onChange={(event) => handleSocialChange('rssurl', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
<img
src="https://cdn.jsdelivr.net/npm/[email protected]/icons/exercism.svg"
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
alt="exercism"
/>
<input
id="exercism"
placeholder="exercism username"
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={social.exercism}
onChange={(event) => handleSocialChange('exercism', event)}
/>
</div>
</div>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/constants/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const DEFAULT_SOCIAL = {
geeks_for_geeks: '',
discord: '',
rssurl: '',
exercism: '',
};

export const DEFAULT_SUPPORT = {
Expand Down
18 changes: 18 additions & 0 deletions src/images/icons/Social/exercism.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 04aaa5e

Please sign in to comment.