Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add Exercism public profile in Social section (fixes #761) #853

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/simple-icons@3.1.0/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.