Compare commits

...

89 Commits

Author SHA1 Message Date
dependabot[bot] 403b6a8011 Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 20:30:27 +00:00
Rahul Jain 888aff31e1 Merge pull request #568 from rahuldkjain/hotfix/skills
fix: #565
2022-06-28 19:05:03 +05:30
Rahul Jain f4b2f5cf88 fix: #565 2022-06-28 19:00:18 +05:30
Rahul Jain c83a129e01 Merge pull request #564 from rahuldkjain/hotfix/icons
fix: linting errors
2022-06-26 20:13:18 +05:30
Rahul Jain 3461a5b865 fix: linting errors 2022-06-26 20:05:52 +05:30
Rahul Jain c919601f7e Merge pull request #501 from techieeliot/issue-452-hasnode
feature: add hashnode to socials input and preview
2021-11-01 10:16:46 +05:30
Eliot Sanford 5e0cd2e639 docs: add content to readme 2021-10-31 23:34:18 -05:00
Eliot Sanford 9b24ae64c9 fix: change placeholder to include the 'with @' 2021-10-31 23:19:54 -05:00
Eliot Sanford 71d1fafbd6 feature: add hashnode to socials input and preview
closes #452
2021-10-31 23:07:15 -05:00
Rahul Jain 8947cb3641 Merge pull request #500 from rahuldkjain/issue-499
fix: html.jsx linting
2021-10-31 17:03:37 +05:30
Rahul Jain 7898e38f8e improve html.jsx 2021-10-31 17:00:05 +05:30
Rahul Jain b23cab5944 Merge pull request #498 from rahuldkjain/issue-497
fix: issue-497
2021-10-31 16:51:17 +05:30
Rahul Jain 8899046e5e remove files 2021-10-31 16:50:30 +05:30
Rahul Jain a0e34df02d Merge pull request #496 from rahuldkjain/enhancement/issue-495
Enhancement/issue 495
2021-10-31 15:49:44 +05:30
Rahul Jain 9ba8ccff66 fix: eslinting 2021-10-31 15:43:03 +05:30
Rahul Jain 004401a8d1 intial eslint pre-commit setup 2021-10-31 12:51:09 +05:30
Rahul Jain fb6389f569 Merge pull request #493 from rahuldkjain/enhancement/fix-warnings
fix: few ESLint warnings
2021-10-31 12:23:18 +05:30
Rahul Jain d33d139590 make node version 14 2021-10-31 12:18:45 +05:30
Rahul Jain 1bffabd8bb add before script in travis.yml 2021-10-31 12:14:27 +05:30
Rahul Jain 6ff29bcf87 fix node version 2021-10-31 10:51:51 +05:30
Rahul Jain 8c84e917c9 fix: npm version in .yml 2021-10-31 10:48:54 +05:30
Rahul Jain f04dc760e2 fix: few ESLint warnings 2021-10-31 10:36:41 +05:30
Rahul Jain 938a8a9d43 Merge pull request #484 from ajvideira/nextjs-logo-fix
fix: nextjs broken logo url
2021-10-28 13:16:53 +05:30
Jonathan Alba Videira 2109192d72 Fix nextjs broken logo url 2021-10-21 07:43:57 -03:00
Rahul Jain 793513dc21 Merge pull request #465 from chandrikadeb7/kafka-svg-fix
Kafka svg fix
2021-10-21 08:55:14 +05:30
Rahul Jain bf62cec45f Merge pull request #463 from pranansh-s/master
[add]: Nim-Programming language
2021-10-21 08:54:03 +05:30
Rahul Jain 646c0804b9 Merge pull request #464 from mehabhalodiya/patch1
Adds "pandas" and "seaborn" in AI/ML
2021-10-21 08:53:32 +05:30
Rahul Jain b406f4d181 Merge pull request #460 from BerniWittmann/master
feat: add ifttt to automation
2021-10-21 08:50:56 +05:30
Rahul Jain ededb4b8a5 Merge pull request #458 from MrDoomy/feat/better-checkboxes
Using toggle switches instead of checkboxes
2021-10-21 08:49:14 +05:30
Rahul Jain 63347fc8b5 Merge pull request #456 from RetiFier/valdate_json_upload
Add Validation JSON Upload Under Config options
2021-10-21 08:46:58 +05:30
Rahul Jain 1c7bcb7d6b Merge pull request #454 from MrDoomy/feat/backend-development-nestjs
[add]: NestJS Option
2021-10-21 08:46:02 +05:30
Rahul Jain edbaa47c40 Merge pull request #439 from gargipandkar/support-bugfix
Fix #423 - support field not saved/restored
2021-10-21 08:37:43 +05:30
Damien Chazoule e084c9e775 Using redesigned checkboxes on addons section 2021-10-06 19:56:06 +02:00
Chandrika Deb 91bdf52f58 Add files via upload 2021-10-06 22:24:46 +05:30
Chandrika Deb 0823cd43ce Delete kafka.svg 2021-10-06 22:24:03 +05:30
Damien Chazoule 7a93ebeae1 Using redesigned checkboxes rather than toggle switches 2021-10-06 13:18:31 +02:00
mehabhalodiya 46d3751b91 Add pandas and seaborn 2021-10-06 14:38:35 +05:30
Pranansh Singh 6a7a6575b7 Updated icon with a better visibility one 2021-10-06 03:00:16 +05:30
Pranansh Singh 61b8362a55 Added Nim-Programming language 2021-10-06 02:54:21 +05:30
Bernhard Wittmann 68bfa23dff feat: add ifttt to automation 2021-10-04 20:06:34 +02:00
Damien Chazoule f0a9d02f26 Adding unit tests 2021-10-04 10:08:00 +02:00
Damien Chazoule 20b47a9c3d Using toggle switches instead of checkboxes 2021-10-03 23:00:56 +02:00
Damien Chazoule 9432f7d88d Using Devicons SVG + Adding NestJS Link 2021-10-03 21:32:38 +02:00
Reti Fier 15c63a347a Add Validation JSON Upload Under Config options 2021-10-04 01:13:16 +06:30
Damien Chazoule fc1ecf5ab6 Added NestJS Option 2021-10-03 20:04:50 +02:00
Rahul Jain 0194c38eb6 Merge pull request #450 from chandrikadeb7/chandrikadeb7-svg
fix #444: add theme neutral social icons
2021-10-03 09:48:07 +05:30
Chandrika Deb be0234927d SVG social icons added 2021-10-02 16:19:33 +05:30
Rahul Jain 0253d1b5bb Merge pull request #441 from wweverma1/feature/add-kofi-button
issue #424: add Ko-fi donation option
2021-10-02 13:38:17 +05:30
Rahul Jain c7fc859f0c Merge pull request #443 from chandrikadeb7/chandrikadeb7-devlogo
fix #345: dev-dot-to logo
2021-10-02 13:31:49 +05:30
Chandrika Deb f21bbf2af7 Dev logo svg neutral icon added 2021-10-02 13:25:34 +05:30
wweverma1 bbf6cf6018 Added Ko-fi donation option 2021-10-01 17:23:32 +05:30
gargipandkar ccdd09db3f Merge branch 'rahuldkjain:master' into support-bugfix 2021-09-27 14:55:43 +08:00
Rahul Jain 9eb2ab1260 Merge pull request #437 from rahuldkjain/dependabot/npm_and_yarn/color-string-1.6.0
Bump color-string from 1.5.3 to 1.6.0
2021-09-26 20:00:56 +05:30
dependabot[bot] 36076a1fe9 Bump color-string from 1.5.3 to 1.6.0
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.6.0)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-26 14:09:31 +00:00
Rahul Jain e92300198d Merge pull request #432 from rahuldkjain/dependabot/npm_and_yarn/tmpl-1.0.5
Bump tmpl from 1.0.4 to 1.0.5
2021-09-26 19:38:04 +05:30
Rahul Jain 25a970c5aa Merge pull request #429 from rahuldkjain/dependabot/npm_and_yarn/object-path-0.11.8
Bump object-path from 0.11.4 to 0.11.8
2021-09-26 19:37:54 +05:30
Rahul Jain 0038d17908 Merge pull request #428 from rahuldkjain/dependabot/npm_and_yarn/prismjs-1.25.0
Bump prismjs from 1.20.0 to 1.25.0
2021-09-26 19:37:44 +05:30
dependabot[bot] 742a7d5d53 Bump tmpl from 1.0.4 to 1.0.5
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 08:50:59 +00:00
dependabot[bot] 45f8ca0c9b Bump object-path from 0.11.4 to 0.11.8
Bumps [object-path](https://github.com/mariocasciaro/object-path) from 0.11.4 to 0.11.8.
- [Release notes](https://github.com/mariocasciaro/object-path/releases)
- [Commits](https://github.com/mariocasciaro/object-path/commits)

---
updated-dependencies:
- dependency-name: object-path
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-21 18:10:32 +00:00
dependabot[bot] 131f4b00bf Bump prismjs from 1.20.0 to 1.25.0
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.20.0...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 22:42:50 +00:00
gargipandkar f8b2c5d9d4 Fix save/restore/reset of support fields 2021-08-15 16:08:53 +08:00
Rahul Jain e0c08558d8 [fix]: mssql, matlab icon 2021-06-04 17:08:16 +05:30
Rahul Jain 70d473ca91 Merge pull request #387 from Shrestha7/master
[fix]: social icons url
2021-06-04 09:20:55 +05:30
Rahul Jain 3d2510ac71 Merge pull request #394 from AdrianArtiles/fix-typos
[fix]: readme typos
2021-06-04 09:11:26 +05:30
Adrian Artiles fe35dcea9a docs: fix typos 2021-06-03 15:18:04 -07:00
Savitha Gollamudi 22064237dc Merge pull request #370 from aravindvnair99/typo-fixes
Fixes #369 - incorrect spelling
2021-05-10 12:12:58 +05:30
Savitha Gollamudi 704df3681f Merge pull request #374 from frntnd93/feature/angular-icon-link
Add Angular 2+ icon, link
2021-05-10 12:08:14 +05:30
swastik shrestha d8139bc7e2 fixed social icons 2021-05-10 11:57:33 +05:45
Savitha Gollamudi 6253936f99 Merge pull request #384 from PuneetGopinath/patch-1
Fix social icons base link
2021-05-01 16:29:04 +05:30
Puneet Gopinath a5389b6646 Fix social icons base link 2021-04-26 09:55:03 +03:00
Rahul Jain 4a1846e7df Merge pull request #380 from rahuldkjain/rahul_hotfix_paypal-icon
[fix]: paypal-icon
2021-04-18 12:59:06 +05:30
Rahul Jain 13829db4cb [fix]: paypal-icon 2021-04-18 12:58:01 +05:30
Rahul Jain c4becd7949 Merge pull request #368 from kodumbeats/appwrite
[add]: Appwrite BaaS in Skills
2021-04-18 12:38:55 +05:30
Dzhanik Marupov 9e323b9157 Update src/constants/skills.js
Co-authored-by: Aravind V. Nair <22199259+aravindvnair99@users.noreply.github.com>
2021-03-31 12:51:52 +03:00
Aravind V Nair 29a0db0aad Remove unnecessary spaces
Signed-off-by: Aravind V Nair <22199259+aravindvnair99@users.noreply.github.com>
2021-03-31 12:35:55 +05:30
Aravind V Nair e53c7321b6 Merge branch 'master' of https://github.com/rahuldkjain/github-profile-readme-generator into typo-fixes 2021-03-28 14:55:56 +05:30
kodumbeats b7b1fd0a42 Use Appwrite svg 2021-03-24 07:22:21 -04:00
Rahul Jain 04ce080957 Merge pull request #366 from harikanani/harikanani/paypal-icon-fix
[fix]: paypal icon
2021-03-24 11:54:42 +05:30
Dzhanik 49552b7c42 [add] Angular 2+ icon, link 2021-03-03 14:51:11 +03:00
Aravind V Nair fb1b92b0a2 Fix spelling of "regularly"
Signed-off-by: Aravind V Nair <22199259+aravindvnair99@users.noreply.github.com>
2021-03-01 15:59:35 +05:30
kodumbeats 83af4c1839 Add Appwrite BaaS 2021-02-27 15:50:08 -05:00
harikanani d36431ed29 fix paypal icon 2021-02-27 16:49:21 +05:30
rahuldkjain 9cb1b35ac2 [update]: icon-base-url for social 2021-01-31 10:54:16 +05:30
Rahul Jain 2c2cdb30a5 Merge pull request #356 from MaheshBharadwaj/neutral-icons
Added theme neutral icons for some social sites
2021-01-31 10:47:09 +05:30
rahuldkjain db23c74d4f [add]: eslint in package.json 2021-01-15 22:28:08 +05:30
MaheshBharadwaj ebbb1dab5a [ADD] SVG files 2021-01-15 21:27:40 +05:30
Rahul Jain 7603bf41b6 Merge pull request #352 from saitharunsai/patch-1
[fix]: icon cdn links
2021-01-03 18:26:37 +05:30
saitharunsai bbf0836509 update skill.js
changed the c programming link
2021-01-03 16:29:10 +05:30
saitharunsai 901802b9d2 changed the cdn links
changed the cdn links
2021-01-03 15:51:21 +05:30
141 changed files with 45515 additions and 8073 deletions
+1
View File
@@ -0,0 +1 @@
node_modules/**
+19
View File
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["plugin:react/recommended", "airbnb", "prettier"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/forbid-prop-types": 0
},
"ignorePatterns": ["**/*.test.js"]
}
+2 -3
View File
@@ -1,9 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
title: ''
labels: bug
assignees: ""
assignees: ''
---
**Describe the bug**
@@ -39,7 +39,6 @@ If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
Join the **Discord Server** for further discussions.
<a href="https://discord.gg/HHMs7Eg">
@@ -1,9 +1,9 @@
---
name: Feature/Enhancement request
about: Suggest an idea for this project
title: ""
title: ''
labels: enhancement, hacktoberfest
assignees: ""
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
-1
View File
@@ -40,4 +40,3 @@ as any relevant images for UI changes._
## Added to documentation?
- [ ] readme
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged
+7 -2
View File
@@ -1,4 +1,9 @@
{
"arrowParens": "avoid",
"semi": false
"singleQuote": true,
"jsxSingleQuote": false,
"tabWidth": 2,
"printWidth": 120,
"trailingComma": "all",
"semi": true,
"exclude": ["node_modules", "codepipeline"]
}
+1 -1
View File
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "stable"
- "14"
cache:
directories:
- "node_modules"
+13 -13
View File
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
+59 -51
View File
@@ -3,28 +3,31 @@
## File Layout (`src/components/*.js`)
1. Imports
2. Reusabe components needed for the main component
2. Reusable components needed for the main component
3. Main component (Eg: Addons in addons.js)
4. export default \<MainComponent\>;
## Reusable components
* Do not make a new file for smaller components.
* Smaller, reusable components neeeded in the main components should be added **above** the main component, **not** inside it.
* Use ES6 arrow functions for defining components.
- Do not make a new file for smaller components.
- Smaller, reusable components needed in the main components should be added **above** the main component, **not** inside it.
- Use ES6 arrow functions for defining components.
## Spacing
1. **JS:**
* Use a space after `if`, `for`, `while`, `switch`.
* Do not use a space after the opening `(` and before the closing `)`.
* Use a space before and after destructuring objects.
```js
//good
const { apple, mangoes } = fruits;
//bad
const {apple, mangoes} = fruits;
- Use a space after `if`, `for`, `while`, `switch`.
- Do not use a space after the opening `(` and before the closing `)`.
- Use a space before and after destructuring objects.
```js
//good
const { apple, mangoes } = fruits;
//bad
const { apple, mangoes } = fruits;
```
//Same for destructuring props:
@@ -36,56 +39,61 @@
```
2. **JSX:**
* Use a space before the forward slash (`/`) of a self-closing tag
```js
//good
<Foo />
//bad
<Foo/>
```
* Do **not** use spaces for JSX curly braces
```js
//good
<Foo bar={baz} />
- Use a space before the forward slash (`/`) of a self-closing tag
//bad
<Foo bar={ baz } />
```
```js
//good
<Foo />
//bad
<Foo/>
```
- Do **not** use spaces for JSX curly braces
```js
//good
<Foo bar={baz} />
//bad
<Foo bar={ baz } />
```
## **Props:**
* Use camelCase for prop names, or PascalCase if the prop value is a React component.
* Use new lines when props do not fit on the same line.
```js
//good
<Foo
prop1={value1}
prop2={value2}
prop3={value3}
/>
- Use camelCase for prop names, or PascalCase if the prop value is a React component.
- Use new lines when props do not fit on the same line.
//bad
<Foo prop1={value1} prop2={value2} prop3={value3} />
```
```js
//good
<Foo
prop1={value1}
prop2={value2}
prop3={value3}
/>
//bad
<Foo prop1={value1} prop2={value2} prop3={value3} />
```
## **Best practices:**
* **Always** add semicolons after a line.
* Use ES6 arrow functions.
* Keep the indentation in your code correct.
* Use 4 spaces for tabs.
* Don't Repeat Yourself. If you think you're repeating too much code, make a smaller component, or a function.
* **Always** add alt prop to `img` tags.
* Add `rel="noopener"` for `a` tags which has `target="_blank"`.
* Don't do `outline: none` on user input elements. If you do not want outline, give them faint, visible background on focus. This is for accessibility.
- **Always** add semicolons after a line.
- Use ES6 arrow functions.
- Keep the indentation in your code correct.
- Use 4 spaces for tabs.
- Don't Repeat Yourself. If you think you're repeating too much code, make a smaller component, or a function.
- **Always** add alt prop to `img` tags.
- Add `rel="noopener"` for `a` tags which has `target="_blank"`.
- Don't do `outline: none` on user input elements. If you do not want outline, give them faint, visible background on focus. This is for accessibility.
### Other things to note
* We are using [octicons](https://primer.style/octicons/) for icons. Use this if you need to add icons. Do **not** add a new library for icons.
* Try to not commit changes in `package.json`, `package-lock.json`.
* Disscuss with contributors on discord if you're planning to add/remove a package.
- We are using [octicons](https://primer.style/octicons/) for icons. Use this if you need to add icons. Do **not** add a new library for icons.
- Try to not commit changes in `package.json`, `package-lock.json`.
- Discuss with contributors on discord if you're planning to add/remove a package.
## Further reading:
This guide is based on [airbnb's react guide](https://github.com/airbnb/javascript/tree/master/react). You can read all the best practices there.
This guide is based on [airbnb's react guide](https://github.com/airbnb/javascript/tree/master/react). You can read all the best practices there.
+4 -5
View File
@@ -9,7 +9,7 @@
<p align="center">
<a href="https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/LICENSE" target="blank">
<img src="https://img.shields.io/github/license/rahuldkjain/github-profile-readme-generator?style=flat-square" alt="github-profile-readme-generator licence" />
<img src="https://img.shields.io/github/license/rahuldkjain/github-profile-readme-generator?style=flat-square" alt="github-profile-readme-generator license" />
</a>
<a href="https://github.com/rahuldkjain/github-profile-readme-generator/fork" target="blank">
<img src="https://img.shields.io/github/forks/rahuldkjain/github-profile-readme-generator?style=flat-square" alt="github-profile-readme-generator forks"/>
@@ -54,8 +54,8 @@
This tool provides an easy way to create a GitHub profile readme with the latest add-ons such as `visitors count`, `github stats`, etc.
## 🚀 Demo
## 🚀 Demo
<a href="https://rahuldkjain.github.io/gh-profile-readme-generator" target="blank">
<img src="https://img.shields.io/website?url=https%3A%2F%2Frahuldkjain.github.io%2Fgh-profile-readme-generator&logo=github&style=flat-square" />
</a>
@@ -126,11 +126,11 @@ Please contribute using [GitHub Flow](https://guides.github.com/introduction/flo
Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md), and the process for submitting pull requests to us.
## 💻 Built with
- [Gatsby](https://www.gatsbyjs.com/)
- [Tailwind CSS](https://tailwindcss.com/): for styling
- [GSAP](https://greensock.com/gsap/): for small SVG Animations
## 🙇 Special Thanks
- [Anurag Hazra](https://github.com/anuraghazra) for amazing [github-readme-stats](https://github.com/anuraghazra/github-readme-stats)
@@ -138,6 +138,7 @@ Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDU
- [Gautam Krishna R](https://github.com/gautamkrishnar) for the awesome [blog post workflow](https://github.com/gautamkrishnar/blog-post-workflow)
- [Jonah Lawrence](https://github.com/DenverCoder1) for the incredible [github-readme-streak-stats](https://github.com/DenverCoder1/github-readme-streak-stats)
- [Julien Monty](https://github.com/konpa) for super useful [devicon](https://github.com/konpa/devicon)
- [Eliot Sanford](https://github.com/techieeliot) for adding hashnode as a blog input
## 🙇 Sponsors
@@ -146,7 +147,6 @@ Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDU
- [Aadit Kamat](https://github.com/aaditkamat) find the tool useful and showed support with his donation. A big thanks to him.
- [Jean-Michel Fayard](https://github.com/jmfayard) used the generator to create his GitHub Profile README and he loved it. Thanks to him for showing support to the tool with the donation.
## 🙏 Support
<p align="left">
@@ -163,7 +163,6 @@ Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDU
<a href="https://www.buymeacoffee.com/rahuldkjain" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="23" width="100" style="border-radius:2px" />
</p>
<hr>
<p align="center">
Developed with ❤️ in India 🇮🇳
+1 -1
View File
@@ -1 +1 @@
module.exports = "test-file-stub"
module.exports = 'test-file-stub';
+8 -16
View File
@@ -1,27 +1,19 @@
const React = require("react")
const gatsby = jest.requireActual("gatsby")
/* eslint-disable no-undef */
const React = require('react');
const gatsby = jest.requireActual('gatsby');
module.exports = {
...gatsby,
graphql: jest.fn(),
Link: jest.fn().mockImplementation(
// these props are invalid for an `a` tag
({
activeClassName,
activeStyle,
getProps,
innerRef,
partiallyActive,
ref,
replace,
to,
...rest
}) =>
React.createElement("a", {
({ activeClassName, activeStyle, getProps, innerRef, partiallyActive, ref, replace, to, ...rest }) =>
React.createElement('a', {
...rest,
href: to,
})
}),
),
StaticQuery: jest.fn(),
useStaticQuery: jest.fn(),
}
};
+2 -2
View File
@@ -1,2 +1,2 @@
import "./src/styles/tailwind.css"
require("prismjs/themes/prism-okaidia.css")
import './src/styles/tailwind.css';
require('prismjs/themes/prism-okaidia.css');
+3 -3
View File
@@ -44,7 +44,7 @@ module.exports = {
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-168596085-3",
trackingId: 'UA-168596085-3',
// this option places the tracking script into the head of the DOM
head: true,
// other options
@@ -53,7 +53,7 @@ module.exports = {
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [require("tailwindcss")],
postCssPlugins: [require('tailwindcss')],
},
},
{
@@ -69,4 +69,4 @@ module.exports = {
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
}
};
+9 -12
View File
@@ -1,14 +1,11 @@
exports.createPages = async ({ actions, graphql, reporter }) => {
const { createPage } = actions
const { createPage } = actions;
const blogPostTemplate = require.resolve(`./src/templates/blogTemplate.js`)
const blogPostTemplate = require.resolve(`./src/templates/blogTemplate.js`);
const result = await graphql(`
{
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
limit: 1000
) {
allMarkdownRemark(sort: { order: DESC, fields: [frontmatter___date] }, limit: 1000) {
edges {
node {
frontmatter {
@@ -18,12 +15,12 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
}
}
}
`)
`);
// Handle errors
if (result.errors) {
reporter.panicOnBuild(`Error while running GraphQL query.`)
return
reporter.panicOnBuild(`Error while running GraphQL query.`);
return;
}
result.data.allMarkdownRemark.edges.forEach(({ node }) => {
@@ -34,6 +31,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
// additional data can be passed via context
slug: node.frontmatter.slug,
},
})
})
}
});
});
};
+3 -3
View File
@@ -1,5 +1,5 @@
const babelOptions = {
presets: ["babel-preset-gatsby"],
}
presets: ['babel-preset-gatsby'],
};
module.exports = require("babel-jest").createTransformer(babelOptions)
module.exports = require('babel-jest').createTransformer(babelOptions);
+7 -7
View File
@@ -1,20 +1,20 @@
module.exports = {
transform: {
"^.+\\.jsx?$": `<rootDir>/jest-preprocess.js`,
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
},
moduleNameMapper: {
".+\\.(css|styl|less|sass|scss)$": `identity-obj-proxy`,
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": `<rootDir>/__mocks__/file-mock.js`,
'.+\\.(css|styl|less|sass|scss)$': `identity-obj-proxy`,
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/__mocks__/file-mock.js`,
},
testPathIgnorePatterns: [`node_modules`, `\\.cache`, `<rootDir>.*/public`],
transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],
globals: {
__PATH_PREFIX__: ``,
__BASE_PATH__: ``,
__BASE_PATH__: ``,
},
setupFiles: [`<rootDir>/loadershim.js`],
setupFilesAfterEnv: ["<rootDir>/setupTests.js"],
snapshotSerializers: ["enzyme-to-json/serializer"],
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
snapshotSerializers: ['enzyme-to-json/serializer'],
coverageThreshold: {
global: {
branches: 0,
@@ -23,4 +23,4 @@ module.exports = {
statements: 68,
},
},
}
};
+1 -1
View File
@@ -1,3 +1,3 @@
global.___loader = {
enqueue: jest.fn(),
}
};
+38113 -3200
View File
File diff suppressed because it is too large Load Diff
+28 -1
View File
@@ -4,8 +4,25 @@
"description": "A simple react app to generate beautiful github profile readme in md(markdown)",
"version": "1.2.0",
"author": "Rahul Jain <rahuldkjain@gmail.com>",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx}": [
"prettier --write",
"eslint --fix",
"git add"
],
"*.{html,css,less,ejs}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"@primer/octicons-react": "^10.0.0",
"axios": "^0.24.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",
@@ -21,7 +38,7 @@
"gatsby-transformer-remark": "^2.8.27",
"gatsby-transformer-sharp": "^2.5.7",
"gsap": "^3.4.0",
"prismjs": "^1.20.0",
"prismjs": "^1.25.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
@@ -30,13 +47,23 @@
"devDependencies": {
"babel-jest": "26.3.0",
"babel-preset-gatsby": "0.5.11",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"gatsby-plugin-postcss": "^2.3.11",
"gatsby-plugin-purgecss": "^5.0.0",
"gatsby-plugin-twitter": "^2.3.10",
"gatsby-remark-embedder": "^3.0.0",
"gh-pages": "^3.1.0",
"husky": "^7.0.4",
"identity-obj-proxy": "3.0.0",
"jest": "26.4.2",
"lint-staged": "^11.2.6",
"prettier": "2.0.5",
"tailwindcss": "^1.7.6"
},
+3 -3
View File
@@ -1,4 +1,4 @@
import { configure } from "enzyme"
import Adapter from "enzyme-adapter-react-16"
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() })
configure({ adapter: new Adapter() });
@@ -99,6 +99,24 @@ exports[`Addons renders correctly 1`] = `
>
display top skills
</AddonsItem>
<AddonsItem
Options={
<CustomizeOptions
CustomizationOptions={
<CustomizeStreakStats
onUpdate={[Function]}
options={Object {}}
prefix="streak-stats"
/>
}
title="Customize Streak Stats Card"
/>
}
inputId="streak-stats"
onInputChange={[Function]}
>
display github streak stats
</AddonsItem>
<AddonsItem
inputChecked={false}
inputId="twitter-badge"
@@ -339,15 +357,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="visitors-count"
>
<input
checked={false}
className="checkbox-label__input"
id="visitors-count"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -363,6 +385,7 @@ exports[`Addons should render Customize Badges 1`] = `
"outline": "none",
}
}
type="button"
>
<XCircleIcon
className="transform scale-100 md:scale-125"
@@ -493,6 +516,7 @@ exports[`Addons should render Customize Badges 1`] = `
>
Preview: 
<img
alt="profile-visitors-count"
src="https://komarev.com/ghpvc/?username=undefined&label=Profile%20views&color=0e75b6&style=flat"
/>
</span>
@@ -510,15 +534,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-profile-trophy"
>
<input
checked={false}
className="checkbox-label__input"
id="github-profile-trophy"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -558,15 +586,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-stats"
>
<input
checked={false}
className="checkbox-label__input"
id="github-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -582,6 +614,7 @@ exports[`Addons should render Customize Badges 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -644,15 +677,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="top-languages"
>
<input
checked={false}
className="checkbox-label__input"
id="top-languages"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -668,6 +705,86 @@ exports[`Addons should render Customize Badges 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
size={16}
verticalAlign="text-bottom"
>
<svg
aria-hidden="true"
className="transform scale-100 md:scale-125"
dangerouslySetInnerHTML={
Object {
"__html": "<path fill-rule=\\"evenodd\\" d=\\"M5.433 2.304A4.494 4.494 0 003.5 6c0 1.598.832 3.002 2.09 3.802.518.328.929.923.902 1.64v.008l-.164 3.337a.75.75 0 11-1.498-.073l.163-3.33c.002-.085-.05-.216-.207-.316A5.996 5.996 0 012 6a5.994 5.994 0 012.567-4.92 1.482 1.482 0 011.673-.04c.462.296.76.827.76 1.423v2.82c0 .082.041.16.11.206l.75.51a.25.25 0 00.28 0l.75-.51A.25.25 0 009 5.282V2.463c0-.596.298-1.127.76-1.423a1.482 1.482 0 011.673.04A5.994 5.994 0 0114 6a5.996 5.996 0 01-2.786 5.068c-.157.1-.209.23-.207.315l.163 3.33a.75.75 0 11-1.498.074l-.164-3.345c-.027-.717.384-1.312.902-1.64A4.496 4.496 0 0012.5 6a4.494 4.494 0 00-1.933-3.696c-.024.017-.067.067-.067.16v2.818a1.75 1.75 0 01-.767 1.448l-.75.51a1.75 1.75 0 01-1.966 0l-.75-.51A1.75 1.75 0 015.5 5.282V2.463c0-.092-.043-.142-.067-.159zm.01-.005z\\"></path>",
}
}
fill="currentColor"
height={16}
role="img"
style={
Object {
"display": "inline-block",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
viewBox="0 0 16 16"
width={16}
/>
</ToolsIcon>
</button>
</div>
</AddonsItem>
<AddonsItem
Options={
<CustomizeOptions
CustomizationOptions={
<CustomizeStreakStats
onUpdate={[Function]}
options={Object {}}
prefix="streak-stats"
/>
}
title="Customize Streak Stats Card"
/>
}
inputId="streak-stats"
onInputChange={[Function]}
>
<div
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="checkbox-label flex items-center"
htmlFor="streak-stats"
>
<input
className="checkbox-label__input"
id="streak-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
display github streak stats
</span>
</label>
<button
className="flex ml-3 focus:bg-gray-400"
id="streak-stats-open-btn"
onClick={[Function]}
style={
Object {
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -708,15 +825,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="twitter-badge"
>
<input
checked={false}
className="checkbox-label__input"
id="twitter-badge"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -734,15 +855,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="dev-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="dev-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -760,15 +885,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="medium-dynamic-blogs"
>
<input
checked="some-medium-blogs-value"
className="checkbox-label__input"
id="medium-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -786,15 +915,19 @@ exports[`Addons should render Customize Badges 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="rss-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="rss-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -931,15 +1064,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="visitors-count"
>
<input
checked={false}
className="checkbox-label__input"
id="visitors-count"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -955,6 +1092,7 @@ exports[`Addons should render Customize Github stats card 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -995,15 +1133,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-profile-trophy"
>
<input
checked={false}
className="checkbox-label__input"
id="github-profile-trophy"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1043,15 +1185,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-stats"
>
<input
checked={false}
className="checkbox-label__input"
id="github-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1067,6 +1213,7 @@ exports[`Addons should render Customize Github stats card 1`] = `
"outline": "none",
}
}
type="button"
>
<XCircleIcon
className="transform scale-100 md:scale-125"
@@ -1254,15 +1401,20 @@ exports[`Addons should render Customize Github stats card 1`] = `
/>
</label>
<label
className="checkbox-label"
htmlFor="stats-hide-border"
>
Hide border: 
<input
checked={false}
className="checkbox-label__input"
id="stats-hide-border"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
</label>
<label
htmlFor="stats-cache-seconds"
@@ -1327,15 +1479,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="top-languages"
>
<input
checked={false}
className="checkbox-label__input"
id="top-languages"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1351,6 +1507,86 @@ exports[`Addons should render Customize Github stats card 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
size={16}
verticalAlign="text-bottom"
>
<svg
aria-hidden="true"
className="transform scale-100 md:scale-125"
dangerouslySetInnerHTML={
Object {
"__html": "<path fill-rule=\\"evenodd\\" d=\\"M5.433 2.304A4.494 4.494 0 003.5 6c0 1.598.832 3.002 2.09 3.802.518.328.929.923.902 1.64v.008l-.164 3.337a.75.75 0 11-1.498-.073l.163-3.33c.002-.085-.05-.216-.207-.316A5.996 5.996 0 012 6a5.994 5.994 0 012.567-4.92 1.482 1.482 0 011.673-.04c.462.296.76.827.76 1.423v2.82c0 .082.041.16.11.206l.75.51a.25.25 0 00.28 0l.75-.51A.25.25 0 009 5.282V2.463c0-.596.298-1.127.76-1.423a1.482 1.482 0 011.673.04A5.994 5.994 0 0114 6a5.996 5.996 0 01-2.786 5.068c-.157.1-.209.23-.207.315l.163 3.33a.75.75 0 11-1.498.074l-.164-3.345c-.027-.717.384-1.312.902-1.64A4.496 4.496 0 0012.5 6a4.494 4.494 0 00-1.933-3.696c-.024.017-.067.067-.067.16v2.818a1.75 1.75 0 01-.767 1.448l-.75.51a1.75 1.75 0 01-1.966 0l-.75-.51A1.75 1.75 0 015.5 5.282V2.463c0-.092-.043-.142-.067-.159zm.01-.005z\\"></path>",
}
}
fill="currentColor"
height={16}
role="img"
style={
Object {
"display": "inline-block",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
viewBox="0 0 16 16"
width={16}
/>
</ToolsIcon>
</button>
</div>
</AddonsItem>
<AddonsItem
Options={
<CustomizeOptions
CustomizationOptions={
<CustomizeStreakStats
onUpdate={[Function]}
options={Object {}}
prefix="streak-stats"
/>
}
title="Customize Streak Stats Card"
/>
}
inputId="streak-stats"
onInputChange={[Function]}
>
<div
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="checkbox-label flex items-center"
htmlFor="streak-stats"
>
<input
className="checkbox-label__input"
id="streak-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
display github streak stats
</span>
</label>
<button
className="flex ml-3 focus:bg-gray-400"
id="streak-stats-open-btn"
onClick={[Function]}
style={
Object {
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -1391,15 +1627,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="twitter-badge"
>
<input
checked={false}
className="checkbox-label__input"
id="twitter-badge"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1417,15 +1657,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="dev-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="dev-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1443,15 +1687,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="medium-dynamic-blogs"
>
<input
checked="some-medium-blogs-value"
className="checkbox-label__input"
id="medium-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1469,15 +1717,19 @@ exports[`Addons should render Customize Github stats card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="rss-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="rss-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1614,15 +1866,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="visitors-count"
>
<input
checked={false}
className="checkbox-label__input"
id="visitors-count"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1638,6 +1894,7 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -1678,15 +1935,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-profile-trophy"
>
<input
checked={false}
className="checkbox-label__input"
id="github-profile-trophy"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1726,15 +1987,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="github-stats"
>
<input
checked={false}
className="checkbox-label__input"
id="github-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1750,6 +2015,7 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
@@ -1812,15 +2078,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="top-languages"
>
<input
checked={false}
className="checkbox-label__input"
id="top-languages"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -1836,6 +2106,7 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
"outline": "none",
}
}
type="button"
>
<XCircleIcon
className="transform scale-100 md:scale-125"
@@ -2023,15 +2294,20 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
/>
</label>
<label
className="checkbox-label"
htmlFor="top-lang-hide-border"
>
Hide border: 
<input
checked={false}
className="checkbox-label__input"
id="top-lang-hide-border"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
</label>
<label
htmlFor="top-lang-cache-seconds"
@@ -2065,6 +2341,85 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
</div>
</CustomizeOptions>
</AddonsItem>
<AddonsItem
Options={
<CustomizeOptions
CustomizationOptions={
<CustomizeStreakStats
onUpdate={[Function]}
options={Object {}}
prefix="streak-stats"
/>
}
title="Customize Streak Stats Card"
/>
}
inputId="streak-stats"
onInputChange={[Function]}
>
<div
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="checkbox-label flex items-center"
htmlFor="streak-stats"
>
<input
className="checkbox-label__input"
id="streak-stats"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
display github streak stats
</span>
</label>
<button
className="flex ml-3 focus:bg-gray-400"
id="streak-stats-open-btn"
onClick={[Function]}
style={
Object {
"outline": "none",
}
}
type="button"
>
<ToolsIcon
className="transform scale-100 md:scale-125"
size={16}
verticalAlign="text-bottom"
>
<svg
aria-hidden="true"
className="transform scale-100 md:scale-125"
dangerouslySetInnerHTML={
Object {
"__html": "<path fill-rule=\\"evenodd\\" d=\\"M5.433 2.304A4.494 4.494 0 003.5 6c0 1.598.832 3.002 2.09 3.802.518.328.929.923.902 1.64v.008l-.164 3.337a.75.75 0 11-1.498-.073l.163-3.33c.002-.085-.05-.216-.207-.316A5.996 5.996 0 012 6a5.994 5.994 0 012.567-4.92 1.482 1.482 0 011.673-.04c.462.296.76.827.76 1.423v2.82c0 .082.041.16.11.206l.75.51a.25.25 0 00.28 0l.75-.51A.25.25 0 009 5.282V2.463c0-.596.298-1.127.76-1.423a1.482 1.482 0 011.673.04A5.994 5.994 0 0114 6a5.996 5.996 0 01-2.786 5.068c-.157.1-.209.23-.207.315l.163 3.33a.75.75 0 11-1.498.074l-.164-3.345c-.027-.717.384-1.312.902-1.64A4.496 4.496 0 0012.5 6a4.494 4.494 0 00-1.933-3.696c-.024.017-.067.067-.067.16v2.818a1.75 1.75 0 01-.767 1.448l-.75.51a1.75 1.75 0 01-1.966 0l-.75-.51A1.75 1.75 0 015.5 5.282V2.463c0-.092-.043-.142-.067-.159zm.01-.005z\\"></path>",
}
}
fill="currentColor"
height={16}
role="img"
style={
Object {
"display": "inline-block",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
viewBox="0 0 16 16"
width={16}
/>
</ToolsIcon>
</button>
</div>
</AddonsItem>
<AddonsItem
inputChecked={false}
inputId="twitter-badge"
@@ -2074,15 +2429,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="twitter-badge"
>
<input
checked={false}
className="checkbox-label__input"
id="twitter-badge"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -2100,15 +2459,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="dev-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="dev-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -2126,15 +2489,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="medium-dynamic-blogs"
>
<input
checked="some-medium-blogs-value"
className="checkbox-label__input"
id="medium-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -2152,15 +2519,19 @@ exports[`Addons should render Customize Top Skills Card 1`] = `
className="py-2 flex justify-start items-center text-sm sm:text-lg"
>
<label
className="cursor-pointer flex items-center"
className="checkbox-label flex items-center"
htmlFor="rss-dynamic-blogs"
>
<input
checked={false}
className="checkbox-label__input"
id="rss-dynamic-blogs"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<span
className="pl-4"
>
@@ -71,17 +71,16 @@ exports[`Donate renders correctly 1`] = `
Buy me a ko-fi
</a>
<a
className="flex items-center justify-evenly bg-blue-500 text-white py-2 px-4 my-2"
className="flex items-center justify-evenly bg-white-500 text-white py-2 px-4 my-2 border border-solid"
href="https://www.paypal.me/rahuldkjain/10"
rel="noreferrer"
target="_blank"
>
<img
alt="Donate rahuldkjain via paypal"
className="w-6 h-6 mr-2"
src="https://cdn.worldvectorlogo.com/logos/paypal-icon.svg"
className="w-32 h-4"
src="https://cdn.worldvectorlogo.com/logos/paypal-2.svg"
/>
Paypal
</a>
<a
className="flex items-center justify-evenly bg-orange-500 text-white py-2 px-4 my-2"
@@ -24,8 +24,7 @@ exports[`Footer component renders correctly 1`] = `
<div
className="mr-2 sm:mr-0"
>
GitHub Profile
GitHub Profile
<img
alt="github profile markdown generator logo"
className="inline sm:hidden h-12"
@@ -157,7 +156,7 @@ exports[`Footer component renders correctly 1`] = `
</strong>
</div>
<div
class="ml-2 sm:ml-0"
className="ml-2 sm:ml-0"
>
<a
aria-label="Discord of the community"
File diff suppressed because it is too large Load Diff
@@ -7,7 +7,7 @@ exports[`DisplaySocial Preview renders correctly 1`] = `
target="blank"
>
<img
alt="props.username"
alt="username"
className="w-6 h-6"
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
/>
@@ -182,7 +182,7 @@ exports[`Markdown Preview renders correctly 1`] = `
},
"prefix": Object {
"ama": "💬 Ask me about",
"blog": "📝 I regulary write articles on",
"blog": "📝 I regularly write articles on",
"collaborateOn": "👯 Im looking to collaborate on",
"contact": "📫 How to reach me",
"currentLearn": "🌱 Im currently learning",
@@ -219,6 +219,9 @@ exports[`Markdown Preview renders correctly 1`] = `
"twitter": "",
"youtube": "",
},
"support": Object {
"buyMeACoffee": "",
},
}
}
/>
@@ -254,6 +257,13 @@ exports[`Markdown Preview renders correctly 1`] = `
<SkillsPreview
skills={Object {}}
/>
<SupportPreview
support={
Object {
"buyMeACoffee": "",
}
}
/>
<div
className="block sm:flex sm:justify-center sm:items-start"
>
@@ -287,6 +297,11 @@ exports[`Markdown Preview renders correctly 1`] = `
}
show={false}
/>
<StreakStatsPreview
github=""
options={Object {}}
show={false}
/>
</div>
</div>
`;
@@ -313,13 +328,13 @@ exports[`Skills Preview renders correctly 1`] = `
/>
<a
href="https://unity.com/"
key="unity"
rel="noreferrer"
target="_blank"
>
<img
alt="unity"
className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10"
key="unity"
src="https://www.vectorlogo.zone/logos/unity3d/unity3d-icon.svg"
/>
</a>
@@ -338,112 +353,112 @@ exports[`Social Preview renders correctly 1`] = `
/>
<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/codepen.svg"
username="dummy"
/>
<DisplaySocial
base="https://dev.to"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/devto.svg"
username=""
/>
<DisplaySocial
base="https://twitter.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/twitter.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/twitter.svg"
username=""
/>
<DisplaySocial
base="https://linkedin.com/in"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/linked-in-alt.svg"
username=""
/>
<DisplaySocial
base="https://stackoverflow.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/stack-overflow.svg"
username=""
/>
<DisplaySocial
base="https://codesandbox.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/codesandbox.svg"
username=""
/>
<DisplaySocial
base="https://kaggle.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/kaggle.svg"
username=""
/>
<DisplaySocial
base="https://fb.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/facebook.svg"
username=""
/>
<DisplaySocial
base="https://instagram.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/instagram.svg"
username=""
/>
<DisplaySocial
base="https://dribbble.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dribbble.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/dribbble.svg"
username=""
/>
<DisplaySocial
base="https://www.behance.net"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/behance.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/behance.svg"
username=""
/>
<DisplaySocial
base="https://medium.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/medium.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/medium.svg"
username=""
/>
<DisplaySocial
base="https://www.youtube.com/c"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/youtube.svg"
username=""
/>
<DisplaySocial
base="https://www.codechef.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codechef.svg"
username=""
/>
<DisplaySocial
base="https://codeforces.com/profile"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codeforces.svg"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
username=""
/>
<DisplaySocial
base="https://www.hackerrank.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerrank.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/hackerrank.svg"
username=""
/>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/geeksforgeeks.svg"
username=""
/>
<DisplaySocial
base="https://www.hackerearth.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerearth.svg"
username=""
/>
<DisplaySocial
base="https://www.topcoder.com/members"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/topcoder.svg"
base="https://codeforces.com/profile"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/codeforces.svg"
username=""
/>
<DisplaySocial
base="https://www.leetcode.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/leetcode.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/leet-code.svg"
username=""
/>
<DisplaySocial
base="https://www.hackerearth.com"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/hackerearth.svg"
username=""
/>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/geeks-for-geeks.svg"
username=""
/>
<DisplaySocial
base="https://www.topcoder.com/members"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/topcoder.svg"
username=""
/>
<DisplaySocial
base="https://discord.gg"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/discord.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/discord.svg"
username=""
/>
<DisplaySocial
base=""
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/rss.svg"
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/rss.svg"
username=""
/>
</div>
@@ -500,8 +515,9 @@ exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `
>
<a
href="https://twitter.com/\${props.twitter}"
target="blank"
href="https://twitter.com/"
rel="noreferrer"
target="_blank"
>
<img
alt=""
@@ -537,6 +553,7 @@ exports[`Work Preview renders correctly 1`] = `
project="readme-generator"
/>
<DisplayWork
link=""
prefix="🌱 Im currently learning"
project=""
/>
@@ -551,26 +568,32 @@ exports[`Work Preview renders correctly 1`] = `
project=""
/>
<DisplayWork
link=""
prefix="💬 Ask me about"
project=""
/>
<DisplayWork
link=""
prefix="👨‍💻 All of my projects are available at"
project=""
/>
<DisplayWork
link=""
prefix="📝 I regulary write articles on"
prefix="📝 I regularly write articles on"
project=""
/>
<DisplayWork
link=""
prefix="📄 Know about my experiences"
project=""
/>
<DisplayWork
link=""
prefix="📫 How to reach me"
project=""
/>
<DisplayWork
link=""
prefix="⚡ Fun fact"
project=""
/>
@@ -50,15 +50,19 @@ exports[`Skills renders correctly 1`] = `
key="javascript"
>
<label
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
className="checkbox-label flex items-center justify-start"
htmlFor="javascript"
>
<input
checked={true}
className="checkbox-label__input"
id="javascript"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<img
alt="javascript"
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
@@ -90,14 +94,18 @@ exports[`Skills renders correctly 1`] = `
key="react"
>
<label
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
className="checkbox-label flex items-center justify-start"
htmlFor="react"
>
<input
className="checkbox-label__input"
id="react"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<img
alt="react"
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
@@ -115,14 +123,18 @@ exports[`Skills renders correctly 1`] = `
key="svelte"
>
<label
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
className="checkbox-label flex items-center justify-start"
htmlFor="svelte"
>
<input
className="checkbox-label__input"
id="svelte"
onChange={[Function]}
type="checkbox"
/>
<span
className="checkbox-label__control"
/>
<img
alt="svelte"
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
File diff suppressed because it is too large Load Diff
+10 -11
View File
@@ -1,12 +1,11 @@
import React from "react"
import toJson from "enzyme-to-json"
import { shallow } from "enzyme"
import React from 'react';
import toJson from 'enzyme-to-json';
import { shallow } from 'enzyme';
import Donate from '../donate';
import Donate from "../donate"
describe("Donate", () => {
it("renders correctly", () => {
const component = shallow(<Donate />)
expect(toJson(component)).toMatchSnapshot()
})
})
describe('Donate', () => {
it('renders correctly', () => {
const component = shallow(<Donate />);
expect(toJson(component)).toMatchSnapshot();
});
});
+10 -10
View File
@@ -1,13 +1,13 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Footer from "../footer"
import Footer from '../footer';
describe("Footer component", () => {
const component = shallow(<Footer />)
describe('Footer component', () => {
const component = shallow(<Footer />);
it("renders correctly", () => {
expect(toJson(component)).toMatchSnapshot()
})
})
it('renders correctly', () => {
expect(toJson(component)).toMatchSnapshot();
});
});
+10 -10
View File
@@ -1,13 +1,13 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Header from "../header"
import Header from '../header';
describe("Header", () => {
const component = shallow(<Header heading="heading" />)
describe('Header', () => {
const component = shallow(<Header heading="heading" />);
it("renders correctly", () => {
expect(toJson(component)).toMatchSnapshot()
})
})
it('renders correctly', () => {
expect(toJson(component)).toMatchSnapshot();
});
});
+10 -10
View File
@@ -1,13 +1,13 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Loader from "../loader"
import Loader from '../loader';
describe("Loader", () => {
const component = shallow(<Loader />)
describe('Loader', () => {
const component = shallow(<Loader />);
it("renders correctly", () => {
expect(toJson(component)).toMatchSnapshot()
})
})
it('renders correctly', () => {
expect(toJson(component)).toMatchSnapshot();
});
});
+122 -123
View File
@@ -1,10 +1,10 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Markdown from "../markdown"
import Markdown from '../markdown';
describe("Markdown", () => {
describe('Markdown', () => {
const props = {
data: {
ama: '',
@@ -56,7 +56,7 @@ describe("Markdown", () => {
},
prefix: {
ama: '💬 Ask me about',
blog: '📝 I regulary write articles on',
blog: '📝 I regularly write articles on',
collaborateOn: '👯 Im looking to collaborate on',
contact: '📫 How to reach me',
currentLearn: '🌱 Im currently learning',
@@ -77,139 +77,138 @@ describe("Markdown", () => {
},
};
it("renders without subtitle", () => {
it('renders without subtitle', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
subtitle: '',
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
subtitle: '',
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders without prefix.title and data.title", () => {
it('renders without prefix.title and data.title', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
title: '',
}}
prefix={{
...props.prefix,
title: '',
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
title: '',
}}
prefix={{
...props.prefix,
title: '',
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders topLanguages is true", () => {
it('renders topLanguages is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
topLanguages: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
topLanguages: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders topLanguages is true and githubStats is true", () => {
it('renders topLanguages is true and githubStats is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
topLanguages: true,
githubStats: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
topLanguages: true,
githubStats: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders devDynamicBlogs is true", () => {
it('renders devDynamicBlogs is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
devDynamicBlogs: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
devDynamicBlogs: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders without link.currentWork", () => {
it('renders without link.currentWork', () => {
const component = shallow(
<Markdown
{...props}
link={{
...props.data,
currentWork: '',
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
link={{
...props.data,
currentWork: '',
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders visitorsBadge is true", () => {
it('renders visitorsBadge is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
visitorsBadge: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
visitorsBadge: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders twitterBadge is true", () => {
it('renders twitterBadge is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
twitterBadge: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
twitterBadge: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders githubProfileTrophy is true", () => {
it('renders githubProfileTrophy is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
githubProfileTrophy: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
<Markdown
{...props}
data={{
...props.data,
githubProfileTrophy: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
it("renders githubProfileTrophy is true", () => {
it('renders githubProfileTrophy is true', () => {
const component = shallow(
<Markdown
{...props}
data={{
...props.data,
githubProfileTrophy: true,
}}
/>
)
expect(toJson(component)).toMatchSnapshot()
})
})
<Markdown
{...props}
data={{
...props.data,
githubProfileTrophy: true,
}}
/>,
);
expect(toJson(component)).toMatchSnapshot();
});
});
+389 -400
View File
@@ -1,415 +1,404 @@
import React from "react";
import React from 'react';
import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import MarkdownPreview, { GithubProfileTrophyPreview, GitHubStatsPreview, SkillsPreview, SocialPreview, SubTitlePreview, TitlePreview, TopLanguagesPreview, TwitterBadgePreview, VisitorsBadgePreview, WorkPreview, SectionTitle, DisplayWork, DisplaySocial } from "../markdownPreview"
import MarkdownPreview, {
GithubProfileTrophyPreview,
GitHubStatsPreview,
SkillsPreview,
SocialPreview,
SubTitlePreview,
TitlePreview,
TopLanguagesPreview,
TwitterBadgePreview,
VisitorsBadgePreview,
WorkPreview,
SectionTitle,
DisplayWork,
DisplaySocial,
} from '../markdownPreview';
configure({ adapter: new Adapter() });
const DEFAULT_PREFIX = {
title: "Hi 👋, I'm",
currentWork: "🔭 Im currently working on",
currentLearn: "🌱 Im currently learning",
collaborateOn: "👯 Im looking to collaborate on",
helpWith: "🤝 Im looking for help with",
ama: "💬 Ask me about",
contact: "📫 How to reach me",
resume: "📄 Know about my experiences",
funFact: "⚡ Fun fact",
portfolio: "👨‍💻 All of my projects are available at",
blog: "📝 I regulary write articles on",
}
title: "Hi 👋, I'm",
currentWork: '🔭 Im currently working on',
currentLearn: '🌱 Im currently learning',
collaborateOn: '👯 Im looking to collaborate on',
helpWith: '🤝 Im looking for help with',
ama: '💬 Ask me about',
contact: '📫 How to reach me',
resume: '📄 Know about my experiences',
funFact: '⚡ Fun fact',
portfolio: '👨‍💻 All of my projects are available at',
blog: '📝 I regularly write articles on',
};
const DEFAULT_DATA = {
title: "dummy",
subtitle: "A passionate frontend developer from India",
currentWork: "readme-generator",
currentLearn: "",
collaborateOn: "",
helpWith: "",
ama: "",
contact: "",
funFact: "",
twitterBadge: false,
visitorsBadge: false,
badgeStyle: "flat",
badgeColor: "0e75b6",
badgeLabel: "Profile views",
githubProfileTrophy: false,
githubStats: false,
githubStatsOptions: {
theme: "",
titleColor: "",
textColor: "",
bgColor: "",
hideBorder: false,
cacheSeconds: null,
locale: "en",
},
topLanguages: false,
topLanguagesOptions: {
theme: "",
titleColor: "",
textColor: "",
bgColor: "",
hideBorder: false,
cacheSeconds: null,
locale: "en",
},
devDynamicBlogs: false,
mediumDynamicBlogs: false,
rssDynamicBlogs: false,
}
title: 'dummy',
subtitle: 'A passionate frontend developer from India',
currentWork: 'readme-generator',
currentLearn: '',
collaborateOn: '',
helpWith: '',
ama: '',
contact: '',
funFact: '',
twitterBadge: false,
visitorsBadge: false,
badgeStyle: 'flat',
badgeColor: '0e75b6',
badgeLabel: 'Profile views',
githubProfileTrophy: false,
githubStats: false,
githubStatsOptions: {
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: false,
cacheSeconds: null,
locale: 'en',
},
topLanguages: false,
topLanguagesOptions: {
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: false,
cacheSeconds: null,
locale: 'en',
},
devDynamicBlogs: false,
mediumDynamicBlogs: false,
rssDynamicBlogs: false,
};
const DEFAULT_LINK = {
currentWork: "https://dummy.com",
collaborateOn: "",
helpWith: "",
portfolio: "",
blog: "",
resume: "",
}
currentWork: 'https://dummy.com',
collaborateOn: '',
helpWith: '',
portfolio: '',
blog: '',
resume: '',
};
const DEFAULT_SOCIAL = {
github: "",
dev: "",
linkedin: "",
codepen: "dummy",
stackoverflow: "",
kaggle: "",
codesandbox: "",
fb: "",
instagram: "",
twitter: "",
dribbble: "",
behance: "",
medium: "",
youtube: "",
codechef: "",
hackerrank: "",
codeforces: "",
leetcode: "",
topcoder: "",
hackerearth: "",
geeks_for_geeks: "",
discord: "",
rssurl: "",
}
github: '',
dev: '',
linkedin: '',
codepen: 'dummy',
stackoverflow: '',
kaggle: '',
codesandbox: '',
fb: '',
instagram: '',
twitter: '',
dribbble: '',
behance: '',
medium: '',
youtube: '',
codechef: '',
hackerrank: '',
codeforces: '',
leetcode: '',
topcoder: '',
hackerearth: '',
geeks_for_geeks: '',
discord: '',
rssurl: '',
};
const DUMMY_SKILLS = {
skills: {
unity: true,
android: false,
angularjs: false,
apachecordova: false,
}
}
skills: {
unity: true,
android: false,
angularjs: false,
apachecordova: false,
},
};
describe("Markdown Preview", () => {
it("renders correctly", () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
let social = DEFAULT_SOCIAL;
let skills = {}
const tree = shallow(<MarkdownPreview
prefix={prefix}
data={data}
link={link}
social={social}
skills={skills} />)
expect(tree).toMatchSnapshot()
})
})
describe("Title Preview", () => {
it("renders correctly", () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
const tree = shallow(<TitlePreview prefix={prefix.title} title={data.title} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no prefix", () => {
let prefix = DEFAULT_PREFIX;
const tree = shallow(<TitlePreview prefix={prefix.title} title={""} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no title", () => {
let data = DEFAULT_DATA;
const tree = shallow(<TitlePreview title={data.title} prefix={""} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no title and prefix", () => {
const tree = shallow(<TitlePreview />)
expect(tree).toMatchSnapshot()
})
})
describe("SubTitle Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
const tree = shallow(<SubTitlePreview subtitle={data.subtitle} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no subtitle", () => {
const tree = shallow(<SubTitlePreview subtitle={""} />)
expect(tree).toMatchSnapshot()
})
})
describe("SectionTitle Preview", () => {
it("renders correctly", () => {
const tree = shallow(<SectionTitle visible={true} label={"dummy"} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no label", () => {
const tree = shallow(<SectionTitle visible={true} label={""} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with visible false", () => {
const tree = shallow(<SectionTitle visible={false} label={"dummy"} />)
expect(tree).toMatchSnapshot()
})
})
describe("DisplayWork Preview", () => {
it("renders correctly", () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={prefix} project={data.currentWork} link={link.currentWork} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no prefix, link and project", () => {
const tree = shallow(<DisplayWork prefix={undefined} project={undefined} link={undefined} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no prefix", () => {
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={undefined} project={data.currentWork} link={link.currentWork} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no project", () => {
let prefix = DEFAULT_PREFIX;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={prefix} project={undefined} link={link.currentWork} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no link", () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
const tree = shallow(<DisplayWork prefix={prefix} project={data.currentWork} link={undefined}/>)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no prefix and link", () => {
let data = DEFAULT_DATA;
const tree = shallow(<DisplayWork project={data.currentWork} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no project and link", () => {
let prefix = DEFAULT_PREFIX;
const tree = shallow(<DisplayWork prefix={prefix} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no project and prefix", () => {
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork link={link.currentWork} />)
expect(tree).toMatchSnapshot()
})
})
describe("DisplaySocial Preview", () => {
it("renders correctly", () => {
let social = DEFAULT_SOCIAL;
const tree = shallow(<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={social.codepen}
/>
)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no username", () => {
const tree = shallow(<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={""}
/>
)
expect(tree).toMatchSnapshot()
})
})
describe("VisitorsBadge Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<VisitorsBadgePreview
show={data.visitorsBadge}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>
)
expect(tree).toMatchSnapshot()
})
it("renders correctly with show true", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<VisitorsBadgePreview
show={true}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>
)
expect(tree).toMatchSnapshot()
})
})
describe("GithubProfileTrophy Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GithubProfileTrophyPreview
show={data.githubProfileTrophy}
github={social.github}
/>)
expect(tree).toMatchSnapshot()
})
it("renders correctly with show true", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GithubProfileTrophyPreview
show={true}
github={social.github}
/>)
expect(tree).toMatchSnapshot()
})
})
describe("TwitterBadgePreview Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TwitterBadgePreview
show={data.twitterBadge}
twitter={social.twitter}
/>)
expect(tree).toMatchSnapshot()
})
it("renders correctly with show true", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TwitterBadgePreview
show={true}
twitter={social.twitter}
/>)
expect(tree).toMatchSnapshot()
})
})
describe("Work Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let prefix = DEFAULT_PREFIX;
let link = DEFAULT_LINK;
let props = { data: data, prefix: prefix, link: link }
const tree = shallow(<WorkPreview work={props} />)
expect(tree).toMatchSnapshot()
})
})
describe("Social Preview", () => {
it("renders correctly", () => {
let social = DEFAULT_SOCIAL;
const tree = shallow(<SocialPreview social={social} />)
expect(tree).toMatchSnapshot()
})
})
describe("Skills Preview", () => {
it("renders correctly", () => {
let skills = DUMMY_SKILLS.skills
const tree = shallow(<SkillsPreview skills={skills} />)
expect(tree).toMatchSnapshot()
})
it("renders correctly with no skills", () => {
let skills = {}
const tree = shallow(<SkillsPreview skills={skills} />)
expect(tree).toMatchSnapshot()
})
})
describe("TopLanguages Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TopLanguagesPreview
show={data.topLanguages}
github={social.github}
options={data.topLanguagesOptions}
/>)
expect(tree).toMatchSnapshot()
})
it("renders correctly with show true", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TopLanguagesPreview
show={true}
github={social.github}
options={data.topLanguagesOptions}
/>)
expect(tree).toMatchSnapshot()
})
})
describe("GitHubStats Preview", () => {
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GitHubStatsPreview
show={data.githubStats}
github={social.github}
options={data.githubStatsOptions}
/>)
expect(tree).toMatchSnapshot()
})
it("renders correctly", () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GitHubStatsPreview
show={true}
github={social.github}
options={data.githubStatsOptions}
/>)
expect(tree).toMatchSnapshot()
})
})
describe('Markdown Preview', () => {
it('renders correctly', () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
let social = DEFAULT_SOCIAL;
let skills = {};
const tree = shallow(<MarkdownPreview prefix={prefix} data={data} link={link} social={social} skills={skills} />);
expect(tree).toMatchSnapshot();
});
});
describe('Title Preview', () => {
it('renders correctly', () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
const tree = shallow(<TitlePreview prefix={prefix.title} title={data.title} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no prefix', () => {
let prefix = DEFAULT_PREFIX;
const tree = shallow(<TitlePreview prefix={prefix.title} title={''} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no title', () => {
let data = DEFAULT_DATA;
const tree = shallow(<TitlePreview title={data.title} prefix={''} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no title and prefix', () => {
const tree = shallow(<TitlePreview />);
expect(tree).toMatchSnapshot();
});
});
describe('SubTitle Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
const tree = shallow(<SubTitlePreview subtitle={data.subtitle} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no subtitle', () => {
const tree = shallow(<SubTitlePreview subtitle={''} />);
expect(tree).toMatchSnapshot();
});
});
describe('SectionTitle Preview', () => {
it('renders correctly', () => {
const tree = shallow(<SectionTitle visible={true} label={'dummy'} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no label', () => {
const tree = shallow(<SectionTitle visible={true} label={''} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with visible false', () => {
const tree = shallow(<SectionTitle visible={false} label={'dummy'} />);
expect(tree).toMatchSnapshot();
});
});
describe('DisplayWork Preview', () => {
it('renders correctly', () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={prefix} project={data.currentWork} link={link.currentWork} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no prefix, link and project', () => {
const tree = shallow(<DisplayWork prefix={undefined} project={undefined} link={undefined} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no prefix', () => {
let data = DEFAULT_DATA;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={undefined} project={data.currentWork} link={link.currentWork} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no project', () => {
let prefix = DEFAULT_PREFIX;
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork prefix={prefix} project={undefined} link={link.currentWork} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no link', () => {
let prefix = DEFAULT_PREFIX;
let data = DEFAULT_DATA;
const tree = shallow(<DisplayWork prefix={prefix} project={data.currentWork} link={undefined} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no prefix and link', () => {
let data = DEFAULT_DATA;
const tree = shallow(<DisplayWork project={data.currentWork} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no project and link', () => {
let prefix = DEFAULT_PREFIX;
const tree = shallow(<DisplayWork prefix={prefix} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no project and prefix', () => {
let link = DEFAULT_LINK;
const tree = shallow(<DisplayWork link={link.currentWork} />);
expect(tree).toMatchSnapshot();
});
});
describe('DisplaySocial Preview', () => {
it('renders correctly', () => {
let social = DEFAULT_SOCIAL;
const tree = shallow(
<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={social.codepen}
/>,
);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no username', () => {
const tree = shallow(
<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={''}
/>,
);
expect(tree).toMatchSnapshot();
});
});
describe('VisitorsBadge Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(
<VisitorsBadgePreview
show={data.visitorsBadge}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>,
);
expect(tree).toMatchSnapshot();
});
it('renders correctly with show true', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(
<VisitorsBadgePreview
show={true}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>,
);
expect(tree).toMatchSnapshot();
});
});
describe('GithubProfileTrophy Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GithubProfileTrophyPreview show={data.githubProfileTrophy} github={social.github} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with show true', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GithubProfileTrophyPreview show={true} github={social.github} />);
expect(tree).toMatchSnapshot();
});
});
describe('TwitterBadgePreview Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TwitterBadgePreview show={data.twitterBadge} twitter={social.twitter} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with show true', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TwitterBadgePreview show={true} twitter={social.twitter} />);
expect(tree).toMatchSnapshot();
});
});
describe('Work Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let prefix = DEFAULT_PREFIX;
let link = DEFAULT_LINK;
let props = { data: data, prefix: prefix, link: link };
const tree = shallow(<WorkPreview work={props} />);
expect(tree).toMatchSnapshot();
});
});
describe('Social Preview', () => {
it('renders correctly', () => {
let social = DEFAULT_SOCIAL;
const tree = shallow(<SocialPreview social={social} />);
expect(tree).toMatchSnapshot();
});
});
describe('Skills Preview', () => {
it('renders correctly', () => {
let skills = DUMMY_SKILLS.skills;
const tree = shallow(<SkillsPreview skills={skills} />);
expect(tree).toMatchSnapshot();
});
it('renders correctly with no skills', () => {
let skills = {};
const tree = shallow(<SkillsPreview skills={skills} />);
expect(tree).toMatchSnapshot();
});
});
describe('TopLanguages Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(
<TopLanguagesPreview show={data.topLanguages} github={social.github} options={data.topLanguagesOptions} />,
);
expect(tree).toMatchSnapshot();
});
it('renders correctly with show true', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<TopLanguagesPreview show={true} github={social.github} options={data.topLanguagesOptions} />);
expect(tree).toMatchSnapshot();
});
});
describe('GitHubStats Preview', () => {
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(
<GitHubStatsPreview show={data.githubStats} github={social.github} options={data.githubStatsOptions} />,
);
expect(tree).toMatchSnapshot();
});
it('renders correctly', () => {
let data = DEFAULT_DATA;
let social = DEFAULT_SOCIAL;
const tree = shallow(<GitHubStatsPreview show={true} github={social.github} options={data.githubStatsOptions} />);
expect(tree).toMatchSnapshot();
});
});
+25 -27
View File
@@ -1,42 +1,40 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Skills from "../skills"
import Skills from '../skills';
jest.mock("../../constants/skills", () => ({
jest.mock('../../constants/skills', () => ({
__esModule: true,
categorizedSkills: {
language: {
title: "Programming Languages",
skills: ["javascript"],
title: 'Programming Languages',
skills: ['javascript'],
},
frontend_dev: {
title: "Frontend Development",
skills: ["react", "svelte"],
title: 'Frontend Development',
skills: ['react', 'svelte'],
},
},
icons: {
javascript: "javascript.svg",
react: "react.svg",
svelte: "svelte.svg",
javascript: 'javascript.svg',
react: 'react.svg',
svelte: 'svelte.svg',
},
}))
}));
describe("Skills", () => {
it("renders correctly", () => {
const component = shallow(<Skills skills={{ javascript: true }} />)
expect(toJson(component)).toMatchSnapshot()
})
describe('Skills', () => {
it('renders correctly', () => {
const component = shallow(<Skills skills={{ javascript: true }} />);
expect(toJson(component)).toMatchSnapshot();
});
it("calls handleSkillsChange prop when a skill is clicked", () => {
const mockFn = jest.fn()
const component = shallow(
<Skills skills={{ javascript: true }} handleSkillsChange={mockFn} />
)
it('calls handleSkillsChange prop when a skill is clicked', () => {
const mockFn = jest.fn();
const component = shallow(<Skills skills={{ javascript: true }} handleSkillsChange={mockFn} />);
component.find("#javascript").simulate("change")
component.find('#javascript').simulate('change');
expect(mockFn).toHaveBeenCalledTimes(1)
})
})
expect(mockFn).toHaveBeenCalledTimes(1);
});
});
+37 -37
View File
@@ -1,44 +1,44 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Social from "../social"
import Social from '../social';
describe("Social", () => {
const mockEvent = { target: { value: "This is a mock event" } }
describe('Social', () => {
const mockEvent = { target: { value: 'This is a mock event' } };
const props = {
social: {
github: "github ",
twitter: "twitter",
dev: "dev",
codepen: "codepen",
codesandbox: "codesandbodx",
stackoverflow: "stackoverflow",
linkedin: "linkedin",
kaggle: "kaggle",
fb: "fb",
instagram: "instagram",
dribble: "dribble",
behance: "behance",
medium: "medium",
youtube: "youtube",
codechef: "codechef",
hackerrack: "hackerranck",
codeforces: "codeforces",
leetcode: "leetcode",
topcoder: "topcoder",
hackerearth: "@hackerearth",
geeks_for_geeks: "geeks_for_geeks",
discord: "discord",
rssurl: "rssurl",
github: 'github ',
twitter: 'twitter',
dev: 'dev',
codepen: 'codepen',
codesandbox: 'codesandbodx',
stackoverflow: 'stackoverflow',
linkedin: 'linkedin',
kaggle: 'kaggle',
fb: 'fb',
instagram: 'instagram',
dribble: 'dribble',
behance: 'behance',
medium: 'medium',
youtube: 'youtube',
codechef: 'codechef',
hackerrack: 'hackerranck',
codeforces: 'codeforces',
leetcode: 'leetcode',
topcoder: 'topcoder',
hackerearth: '@hackerearth',
geeks_for_geeks: 'geeks_for_geeks',
discord: 'discord',
rssurl: 'rssurl',
},
handleSocialChange: jest.fn().mockReturnValue({}),
}
it("renders correctly", () => {
const component = shallow(<Social {...props} />)
for (let i = 0; i < component.find("input").length; i++) {
component.find("input").at(i).simulate("change", mockEvent)
};
it('renders correctly', () => {
const component = shallow(<Social {...props} />);
for (let i = 0; i < component.find('input').length; i++) {
component.find('input').at(i).simulate('change', mockEvent);
}
expect(toJson(component)).toMatchSnapshot()
})
})
expect(toJson(component)).toMatchSnapshot();
});
});
+17 -17
View File
@@ -1,26 +1,26 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Subtitle from "../subtitle"
import Subtitle from '../subtitle';
describe("Subtitle", () => {
const mockEvent = { target: { value: "This is a mock event" } }
describe('Subtitle', () => {
const mockEvent = { target: { value: 'This is a mock event' } };
const props = {
data: {
subtitle: "A frontend developer",
subtitle: 'A frontend developer',
},
handleDataChange: jest.fn().mockReturnValue({}),
}
};
const component = shallow(<Subtitle {...props} />)
const component = shallow(<Subtitle {...props} />);
it("renders correctly", () => {
expect(toJson(component)).toMatchSnapshot()
})
it('renders correctly', () => {
expect(toJson(component)).toMatchSnapshot();
});
it("calls onChange", () => {
component.find("input").at(0).simulate("change", mockEvent)
expect(props.handleDataChange).toBeCalledWith("subtitle", mockEvent)
})
})
it('calls onChange', () => {
component.find('input').at(0).simulate('change', mockEvent);
expect(props.handleDataChange).toBeCalledWith('subtitle', mockEvent);
});
});
+18 -18
View File
@@ -1,27 +1,27 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Title from "../title"
import Title from '../title';
describe("Title", () => {
const mockEvent = { target: { value: "This is a mock event" } }
describe('Title', () => {
const mockEvent = { target: { value: 'This is a mock event' } };
const props = {
prefix: {
title: "test_title",
currentWork: "test_currentwork",
title: 'test_title',
currentWork: 'test_currentwork',
},
data: { title: "test_data" },
link: { currentWork: "test_currentwork" },
data: { title: 'test_data' },
link: { currentWork: 'test_currentwork' },
handlePrefixChange: jest.fn().mockReturnValue({}),
handleLinkChange: jest.fn().mockReturnValue({}),
handleDataChange: jest.fn().mockReturnValue({}),
}
};
it("renders title component correctly", () => {
const component = shallow(<Title {...props} />)
component.find("input").at(0).simulate("change", mockEvent)
component.find("input").at(1).simulate("change", mockEvent)
expect(toJson(component)).toMatchSnapshot()
})
})
it('renders title component correctly', () => {
const component = shallow(<Title {...props} />);
component.find('input').at(0).simulate('change', mockEvent);
component.find('input').at(1).simulate('change', mockEvent);
expect(toJson(component)).toMatchSnapshot();
});
});
+18 -18
View File
@@ -1,28 +1,28 @@
import React from "react"
import { shallow } from "enzyme"
import toJson from "enzyme-to-json"
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Work from "../work"
import Work from '../work';
describe("Work", () => {
const mockEvent = { target: { value: "This is a mock event" } }
describe('Work', () => {
const mockEvent = { target: { value: 'This is a mock event' } };
const props = {
prefix: {
title: "test_title",
currentWork: "test_currentwork",
title: 'test_title',
currentWork: 'test_currentwork',
},
data: { title: "test_data" },
link: { currentWork: "test_currentwork" },
data: { title: 'test_data' },
link: { currentWork: 'test_currentwork' },
handlePrefixChange: jest.fn().mockReturnValue({}),
handleLinkChange: jest.fn().mockReturnValue({}),
handleDataChange: jest.fn().mockReturnValue({}),
}
};
it("renders work component correctly", () => {
const component = shallow(<Work {...props} />)
for (let i = 0; i < component.find("input").length; i++) {
component.find("input").at(i).simulate("change", mockEvent)
it('renders work component correctly', () => {
const component = shallow(<Work {...props} />);
for (let i = 0; i < component.find('input').length; i++) {
component.find('input').at(i).simulate('change', mockEvent);
}
expect(toJson(component)).toMatchSnapshot()
})
})
expect(toJson(component)).toMatchSnapshot();
});
});
-451
View File
@@ -1,451 +0,0 @@
import React, { useState, useEffect } from "react"
import { withPrefix } from "gatsby"
import { latestBlogs } from "../utils/workflows"
import links from "../constants/page-links"
import { isMediumUsernameValid, isGitHubUsernameValid } from "../utils/validation"
import { ToolsIcon, XCircleIcon } from "@primer/octicons-react";
const AddonsItem = ({ inputId, inputChecked, onInputChange, Options, onIconClick, ...props }) => {
const [open, setOpen] = useState(false);
const Icon = open ? XCircleIcon : ToolsIcon;
return (
<>
<div className="py-2 flex justify-start items-center text-sm sm:text-lg">
<label htmlFor={inputId} className="cursor-pointer flex items-center">
<input
type="checkbox"
id={inputId}
checked={inputChecked}
onChange={onInputChange}
/>
<span className="pl-4">{props.children}</span>
</label>
{Options && (
<button
id={`${inputId}-open-btn`}
onClick={() => setOpen(!open)}
className="flex ml-3 focus:bg-gray-400"
style={{ outline: "none" }}
>
<Icon className="transform scale-100 md:scale-125" />
</button>
)}
</div>
{Options && open && Options}
</>
);
};
const CustomizeOptions = ({ title, CustomizationOptions }) => (
<div
className={`border-2 border-solid border-gray-900 bg-gray-100 p-2 ml-8`}
style={{ maxWidth: "21rem" }}
>
<header className="text-base sm:text-lg">{title}</header>
<hr className="border-gray-500" />
<div className="text-sm sm:text-lg flex flex-col mt-2 ml-0 md:ml-4">
{CustomizationOptions}
</div>
</div>
);
const CustomizeBadge = ({githubName, badgeOptions, onBadgeUpdate}) => {
return (
<>
<label htmlFor="badge-style">Style:&nbsp;
<select
id="badge-style"
onChange={(e) => onBadgeUpdate('badgeStyle', e.target.value)}
value = {badgeOptions.badgeStyle}
>
<option value="flat">Flat</option>
<option value="flat-square">Flat Square</option>
<option value="plastic">Plastic</option>
</select>
</label>
<label htmlFor="badge-color">Color:&nbsp;
<input
type="color"
id="badge-color"
defaultValue={`#${badgeOptions.badgeColor}`}
className="w-6"
onChange={(e) => onBadgeUpdate('badgeColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor="badge-label-text">Label Text:&nbsp;
<input
type="text"
id="badge-label-text"
placeholder="Profile views"
className="w-2/4 bg-gray-300 pl-2"
onChange={(e) => onBadgeUpdate('badgeLabel', e.target.value.trim())}
defaultValue={badgeOptions.badgeLabel}
/>
</label>
<span className="mt-2 flex items-center">
Preview:&nbsp;
{
isGitHubUsernameValid(githubName)?
<img
src={`https://komarev.com/ghpvc/`
+ `?username=${githubName}`
+ `&label=${encodeURI(badgeOptions.badgeLabel)}`
+ `&color=${badgeOptions.badgeColor}`
+ `&style=${badgeOptions.badgeStyle}`
}
/>
: <span className="text-xxs md:text-sm text-red-600">Invalid GitHub username</span>
}
</span>
</>
)
}
const CustomizeGithubStatsBase = ({ prefix, options, onUpdate }) =>
<>
<label htmlFor={`${prefix}-theme`}>Theme:&nbsp;
<select
id={`${prefix}-theme`}
onChange={({target: { value }}) => onUpdate("theme", value)}
defaultValue={options.theme}
>
<option value="none">none</option>
<option value="dark">Dark</option>
<option value="radical">Radical</option>
<option value="merko">Merko</option>
<option value="gruvbox">Gruvbox</option>
<option value="tokyonight">Tokyonight</option>
<option value="onedark">Onedark</option>
<option value="cobalt">Cobalt</option>
<option value="synthwave">Synthwave</option>
<option value="highcontrast">Highcontrast</option>
<option value="dracula">Dracula</option>
</select>
</label>
<label htmlFor={`${prefix}-title-color`}>Title Color:&nbsp;
<input
type="color"
id={`${prefix}-title-color`}
defaultValue={`#${options.titleColor}`}
className="w-6"
onChange={(e) => onUpdate('titleColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-text-color`}>Text Color:&nbsp;
<input
type="color"
id={`${prefix}-text-color`}
defaultValue={`#${options.textColor}`}
className="w-6"
onChange={(e) => onUpdate('textColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-bg-color`}>Background Color:&nbsp;
<input
type="color"
id={`${prefix}-bg-color`}
defaultValue={`#${options.bgColor}`}
className="w-6"
onChange={(e) => onUpdate('bgColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-hide-border`}>Hide border:&nbsp;
<input
id={`${prefix}-hide-border`}
type="checkbox"
checked={options.hideBorder}
onChange={(e) => onUpdate('hideBorder', e.target.checked)}
/>
</label>
<label htmlFor={`${prefix}-cache-seconds`}>Cache Seconds:&nbsp;
<input
id={`${prefix}-cache-seconds`}
type="number"
min={1800}
max={86400}
placeholder={1800}
defaultValue={options.cacheSeconds}
onChange={(e) => onUpdate('cacheSeconds', e.target.value)}
/>
</label>
<label htmlFor={`${prefix}-locale`}>Locale:&nbsp;
<input
id={`${prefix}-locale`}
type="text"
placeholder="en"
defaultValue={options.locale}
onChange={(e) => onUpdate('locale', e.target.value)}
size="2"
/>
</label>
</>
const CustomizeStreakStats = ({ prefix, options, onUpdate }) => (
<>
<label htmlFor={`${prefix}-theme`}>
Theme:&nbsp;
<select
id={`${prefix}-theme`}
onChange={({ target: { value } }) => onUpdate("theme", value)}
defaultValue={options.theme}
>
<option value="default">default</option>
<option value="dark">dark</option>
<option value="highcontrast">highcontrast</option>
</select>
</label>
</>
)
const Addons = props => {
const [debounce, setDebounce] = useState(undefined);
const [badgeOptions, setBadgeOptions] = useState({
badgeStyle: props.data.badgeStyle,
badgeColor: props.data.badgeColor,
badgeLabel: props.data.badgeLabel
});
useEffect(() => {
setBadgeOptions({
badgeStyle: props.data.badgeStyle,
badgeColor: props.data.badgeColor,
badgeLabel: props.data.badgeLabel
})
}, [props.data.badgeStyle, props.data.badgeColor, props.data.badgeLabel])
const [githubStatsOptions, setGithubStatsOptions] = useState({
...props.data.githubStatsOptions,
});
useEffect(() => {
setGithubStatsOptions({
...props.data.githubStatsOptions
})
}, [props.data.githubStatsOptions])
const [topLanguagesOptions, setTopLanguagesOptions] = useState({
...props.data.topLanguagesOptions,
});
useEffect(() => {
setTopLanguagesOptions({
...props.data.topLanguagesOptions
})
}, [props.data.topLanguagesOptions])
const [streakStatsOptions, setStreakStatsOptions] = useState({
...props.data.streakStatsOptions,
});
useEffect(() => {
setStreakStatsOptions({
...props.data.streakStatsOptions
})
}, [props.data.streakStatsOptions])
const blogPostPorkflow = () => {
let payload = {
dev: {
show: props.data.devDynamicBlogs,
username: props.social.dev,
},
medium: {
show: props.data.mediumDynamicBlogs,
username: props.social.medium,
},
rssurl: {
show: props.data.rssDynamicBlogs,
username: props.social.rssurl,
},
}
var actionContent = latestBlogs(payload)
var tempElement = document.createElement("a")
tempElement.setAttribute(
"href",
"data:text/yaml;charset=utf-8," + encodeURIComponent(actionContent)
)
tempElement.setAttribute("download", "blog-post-workflow.yml")
tempElement.style.display = "none"
document.body.appendChild(tempElement)
tempElement.click()
document.body.removeChild(tempElement)
}
const onBadgeUpdate = (option, value) => {
const callback = () => {
let newVal = (option==='badgeLabel' && value==='')?'Profile views':value;
setBadgeOptions({...badgeOptions, [option]: newVal});
props.handleDataChange(option, {target: {value: newVal}})
}
clearTimeout(debounce);
setDebounce(setTimeout(callback, 300));
}
const onStatsUpdate = (option, value) => {
const newStatsOptions = {...githubStatsOptions, [option]: value}
setGithubStatsOptions(newStatsOptions)
props.handleDataChange("githubStatsOptions", {target: {value: newStatsOptions}})
}
const onTopLangUpdate = (option, value) => {
const newLangOptions = {...topLanguagesOptions, [option]: value}
setTopLanguagesOptions(newLangOptions)
props.handleDataChange("topLanguagesOptions", {target: {value: newLangOptions}})
}
const onStreakStatsUpdate = (option, value) => {
const newStreakStatsOptions = {...streakStatsOptions, [option]: value}
setStreakStatsOptions(newStreakStatsOptions)
props.handleDataChange("streakStatsOptions", {target: {value: newStreakStatsOptions}})
}
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Add-ons
</div>
<AddonsItem
inputId="visitors-count"
inputChecked={props.data.visitorsBadge}
onInputChange={() => props.handleCheckChange("visitorsBadge")}
Options={
<CustomizeOptions
title="Customize Badge"
CustomizationOptions={
<CustomizeBadge
githubName={props.social.github}
badgeOptions={badgeOptions}
onBadgeUpdate={onBadgeUpdate}
/>
}
/>
}
>
display visitors count badge
</AddonsItem>
<AddonsItem
inputId="github-profile-trophy"
inputChecked={props.data.githubProfileTrophy}
onInputChange={() => props.handleCheckChange("githubProfileTrophy")}
>
display github trophy
</AddonsItem>
<AddonsItem
inputId="github-stats"
inputChecked={props.data.githubStats}
onInputChange={() => props.handleCheckChange("githubStats")}
Options={
<CustomizeOptions
title="Customize Github Stats Card"
CustomizationOptions={
<CustomizeGithubStatsBase prefix="stats" options={githubStatsOptions} onUpdate={onStatsUpdate}/>
}
/>
}
>
display github profile stats card
</AddonsItem>
<AddonsItem
inputId="top-languages"
inputChecked={props.data.topLanguages}
onInputChange={() => props.handleCheckChange("topLanguages")}
Options={
<CustomizeOptions
title="Customize Top Skills Card"
CustomizationOptions={
<CustomizeGithubStatsBase prefix="top-lang" options={topLanguagesOptions} onUpdate={onTopLangUpdate}/>
}
/>
}
>
display top skills
</AddonsItem>
<AddonsItem
inputId="streak-stats"
inputChecked={props.data.streakStats}
onInputChange={() => props.handleCheckChange("streakStats")}
Options={
<CustomizeOptions
title="Customize Streak Stats Card"
CustomizationOptions={
<CustomizeStreakStats prefix="streak-stats" options={streakStatsOptions} onUpdate={onStreakStatsUpdate}/>
}
/>
}
>
display github streak stats
</AddonsItem>
<AddonsItem
inputId="twitter-badge"
inputChecked={props.data.twitterBadge}
onInputChange={() => props.handleCheckChange("twitterBadge")}
>
display twitter badge
</AddonsItem>
<AddonsItem
inputId="dev-dynamic-blogs"
inputChecked={props.data.devDynamicBlogs}
onInputChange={() => props.handleCheckChange("devDynamicBlogs")}
>
display latest dev.to blogs dynamically (GitHub Action)
</AddonsItem>
<AddonsItem
inputId="medium-dynamic-blogs"
inputChecked={props.data.mediumDynamicBlogs}
onInputChange={() => props.handleCheckChange("mediumDynamicBlogs")}
>
display latest medium blogs dynamically (GitHub Action)
</AddonsItem>
<AddonsItem
inputId="rss-dynamic-blogs"
inputChecked={props.data.rssDynamicBlogs}
onInputChange={() => props.handleCheckChange("rssDynamicBlogs")}
>
display latest blogs from your personal blog dynamically (GitHub Action)
</AddonsItem>
{(props.data.devDynamicBlogs && props.social.dev) ||
(props.data.rssDynamicBlogs && props.social.rssurl) ||
(props.data.mediumDynamicBlogs &&
props.social.medium &&
isMediumUsernameValid(props.social.medium)) ? (
<div className="workflow">
<div>
download
<span
id="blog-post-worklow-span"
onClick={blogPostPorkflow}
onKeyDown={(e) => e.keyCode === 13 && blogPostPorkflow()}
role="button"
tabIndex="0"
style={{ cursor: "pointer", color: "#002ead" }}
>
{" "}
blog-post-workflow.yml
</span>{" "}
file(learn
<a
href={withPrefix(links.addons)}
target="blank"
style={{ color: "#002ead" }}
>
{" "}
how to setup
</a>
)
</div>
</div>
) : (
""
)}
</div>
)
}
export default Addons
+482
View File
@@ -0,0 +1,482 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { withPrefix } from 'gatsby';
import { ToolsIcon, XCircleIcon } from '@primer/octicons-react';
import latestBlogs from '../utils/workflows';
import links from '../constants/page-links';
import { isMediumUsernameValid, isGitHubUsernameValid } from '../utils/validation';
const AddonsItem = (props) => {
const { inputId, inputChecked, onInputChange, Options, children } = props;
const [open, setOpen] = useState(false);
const Icon = open ? XCircleIcon : ToolsIcon;
return (
<>
<div className="py-2 flex justify-start items-center text-sm sm:text-lg">
<label htmlFor={inputId} className="checkbox-label flex items-center">
<input
id={inputId}
type="checkbox"
className="checkbox-label__input"
checked={inputChecked}
onChange={onInputChange}
/>
<span className="checkbox-label__control" />
<span className="pl-4">{children}</span>
</label>
{Options && (
<button
type="button"
id={`${inputId}-open-btn`}
onClick={() => setOpen(!open)}
className="flex ml-3 focus:bg-gray-400"
style={{ outline: 'none' }}
>
<Icon className="transform scale-100 md:scale-125" />
</button>
)}
</div>
{Options && open && Options}
</>
);
};
AddonsItem.propTypes = {
inputId: PropTypes.string.isRequired,
inputChecked: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired,
Options: PropTypes.element.isRequired,
children: PropTypes.element.isRequired,
};
const CustomizeOptions = ({ title, CustomizationOptions }) => (
<div className="border-2 border-solid border-gray-900 bg-gray-100 p-2 ml-8" style={{ maxWidth: '21rem' }}>
<header className="text-base sm:text-lg">{title}</header>
<hr className="border-gray-500" />
<div className="text-sm sm:text-lg flex flex-col mt-2 ml-0 md:ml-4">{CustomizationOptions}</div>
</div>
);
CustomizeOptions.propTypes = {
title: PropTypes.string.isRequired,
CustomizationOptions: PropTypes.element.isRequired,
};
const CustomizeBadge = ({ githubName, badgeOptions, onBadgeUpdate }) => (
<>
<label htmlFor="badge-style">
Style:&nbsp;
<select
id="badge-style"
onChange={(e) => onBadgeUpdate('badgeStyle', e.target.value)}
value={badgeOptions.badgeStyle}
>
<option value="flat">Flat</option>
<option value="flat-square">Flat Square</option>
<option value="plastic">Plastic</option>
</select>
</label>
<label htmlFor="badge-color">
Color:&nbsp;
<input
type="color"
id="badge-color"
defaultValue={`#${badgeOptions.badgeColor}`}
className="w-6"
onChange={(e) => onBadgeUpdate('badgeColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor="badge-label-text">
Label Text:&nbsp;
<input
type="text"
id="badge-label-text"
placeholder="Profile views"
className="w-2/4 bg-gray-300 pl-2"
onChange={(e) => onBadgeUpdate('badgeLabel', e.target.value.trim())}
defaultValue={badgeOptions.badgeLabel}
/>
</label>
<span className="mt-2 flex items-center">
Preview:&nbsp;
{isGitHubUsernameValid(githubName) ? (
<img
src={`https://komarev.com/ghpvc/?username=${githubName}&label=${encodeURI(badgeOptions.badgeLabel)}&color=${
badgeOptions.badgeColor
}&style=${badgeOptions.badgeStyle}`}
alt="profile-visitors-count"
/>
) : (
<span className="text-xxs md:text-sm text-red-600">Invalid GitHub username</span>
)}
</span>
</>
);
CustomizeBadge.propTypes = {
githubName: PropTypes.string.isRequired,
badgeOptions: PropTypes.object.isRequired,
onBadgeUpdate: PropTypes.func.isRequired,
};
const CustomizeGithubStatsBase = ({ prefix, options, onUpdate }) => (
<>
<label htmlFor={`${prefix}-theme`}>
Theme:&nbsp;
<select
id={`${prefix}-theme`}
onChange={({ target: { value } }) => onUpdate('theme', value)}
defaultValue={options.theme}
>
<option value="none">none</option>
<option value="dark">Dark</option>
<option value="radical">Radical</option>
<option value="merko">Merko</option>
<option value="gruvbox">Gruvbox</option>
<option value="tokyonight">Tokyonight</option>
<option value="onedark">Onedark</option>
<option value="cobalt">Cobalt</option>
<option value="synthwave">Synthwave</option>
<option value="highcontrast">Highcontrast</option>
<option value="dracula">Dracula</option>
</select>
</label>
<label htmlFor={`${prefix}-title-color`}>
Title Color:&nbsp;
<input
type="color"
id={`${prefix}-title-color`}
defaultValue={`#${options.titleColor}`}
className="w-6"
onChange={(e) => onUpdate('titleColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-text-color`}>
Text Color:&nbsp;
<input
type="color"
id={`${prefix}-text-color`}
defaultValue={`#${options.textColor}`}
className="w-6"
onChange={(e) => onUpdate('textColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-bg-color`}>
Background Color:&nbsp;
<input
type="color"
id={`${prefix}-bg-color`}
defaultValue={`#${options.bgColor}`}
className="w-6"
onChange={(e) => onUpdate('bgColor', e.target.value.replace('#', ''))}
/>
</label>
<label htmlFor={`${prefix}-hide-border`} className="checkbox-label">
Hide border:&nbsp;
<input
id={`${prefix}-hide-border`}
type="checkbox"
className="checkbox-label__input"
checked={options.hideBorder}
onChange={(e) => onUpdate('hideBorder', e.target.checked)}
/>
<span className="checkbox-label__control" />
</label>
<label htmlFor={`${prefix}-cache-seconds`}>
Cache Seconds:&nbsp;
<input
id={`${prefix}-cache-seconds`}
type="number"
min={1800}
max={86400}
placeholder={1800}
defaultValue={options.cacheSeconds}
onChange={(e) => onUpdate('cacheSeconds', e.target.value)}
/>
</label>
<label htmlFor={`${prefix}-locale`}>
Locale:&nbsp;
<input
id={`${prefix}-locale`}
type="text"
placeholder="en"
defaultValue={options.locale}
onChange={(e) => onUpdate('locale', e.target.value)}
size="2"
/>
</label>
</>
);
CustomizeGithubStatsBase.propTypes = {
prefix: PropTypes.string.isRequired,
options: PropTypes.object.isRequired,
onUpdate: PropTypes.func.isRequired,
};
const CustomizeStreakStats = ({ prefix, options, onUpdate }) => (
<>
<label htmlFor={`${prefix}-theme`}>
Theme:&nbsp;
<select
id={`${prefix}-theme`}
onChange={({ target: { value } }) => onUpdate('theme', value)}
defaultValue={options.theme}
>
<option value="default">default</option>
<option value="dark">dark</option>
<option value="highcontrast">highcontrast</option>
</select>
</label>
</>
);
CustomizeStreakStats.propTypes = {
prefix: PropTypes.string.isRequired,
options: PropTypes.object.isRequired,
onUpdate: PropTypes.func.isRequired,
};
const Addons = (props) => {
const { data, social, handleDataChange, handleCheckChange } = props;
const [debounce, setDebounce] = useState(undefined);
const [badgeOptions, setBadgeOptions] = useState({
badgeStyle: data.badgeStyle,
badgeColor: data.badgeColor,
badgeLabel: data.badgeLabel,
});
useEffect(() => {
setBadgeOptions({
badgeStyle: data.badgeStyle,
badgeColor: data.badgeColor,
badgeLabel: data.badgeLabel,
});
}, [data.badgeStyle, data.badgeColor, data.badgeLabel]);
const [githubStatsOptions, setGithubStatsOptions] = useState({
...data.githubStatsOptions,
});
useEffect(() => {
setGithubStatsOptions({
...data.githubStatsOptions,
});
}, [data.githubStatsOptions]);
const [topLanguagesOptions, setTopLanguagesOptions] = useState({
...data.topLanguagesOptions,
});
useEffect(() => {
setTopLanguagesOptions({
...data.topLanguagesOptions,
});
}, [data.topLanguagesOptions]);
const [streakStatsOptions, setStreakStatsOptions] = useState({
...data.streakStatsOptions,
});
useEffect(() => {
setStreakStatsOptions({
...data.streakStatsOptions,
});
}, [data.streakStatsOptions]);
const blogPostPorkflow = () => {
const payload = {
dev: {
show: data.devDynamicBlogs,
username: social.dev,
},
medium: {
show: data.mediumDynamicBlogs,
username: social.medium,
},
rssurl: {
show: data.rssDynamicBlogs,
username: social.rssurl,
},
};
const actionContent = latestBlogs(payload);
const tempElement = document.createElement('a');
tempElement.setAttribute('href', `data:text/yaml;charset=utf-8,${encodeURIComponent(actionContent)}`);
tempElement.setAttribute('download', 'blog-post-workflow.yml');
tempElement.style.display = 'none';
document.body.appendChild(tempElement);
tempElement.click();
document.body.removeChild(tempElement);
};
const onBadgeUpdate = (option, value) => {
const callback = () => {
const newVal = option === 'badgeLabel' && value === '' ? 'Profile views' : value;
setBadgeOptions({ ...badgeOptions, [option]: newVal });
handleDataChange(option, { target: { value: newVal } });
};
clearTimeout(debounce);
setDebounce(setTimeout(callback, 300));
};
const onStatsUpdate = (option, value) => {
const newStatsOptions = { ...githubStatsOptions, [option]: value };
setGithubStatsOptions(newStatsOptions);
handleDataChange('githubStatsOptions', {
target: { value: newStatsOptions },
});
};
const onTopLangUpdate = (option, value) => {
const newLangOptions = { ...topLanguagesOptions, [option]: value };
setTopLanguagesOptions(newLangOptions);
handleDataChange('topLanguagesOptions', {
target: { value: newLangOptions },
});
};
const onStreakStatsUpdate = (option, value) => {
const newStreakStatsOptions = { ...streakStatsOptions, [option]: value };
setStreakStatsOptions(newStreakStatsOptions);
handleDataChange('streakStatsOptions', {
target: { value: newStreakStatsOptions },
});
};
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Add-ons</div>
<AddonsItem
inputId="visitors-count"
inputChecked={data.visitorsBadge}
onInputChange={() => handleCheckChange('visitorsBadge')}
Options={
<CustomizeOptions
title="Customize Badge"
CustomizationOptions={
<CustomizeBadge githubName={social.github} badgeOptions={badgeOptions} onBadgeUpdate={onBadgeUpdate} />
}
/>
}
>
display visitors count badge
</AddonsItem>
<AddonsItem
inputId="github-profile-trophy"
inputChecked={data.githubProfileTrophy}
onInputChange={() => handleCheckChange('githubProfileTrophy')}
>
display github trophy
</AddonsItem>
<AddonsItem
inputId="github-stats"
inputChecked={data.githubStats}
onInputChange={() => handleCheckChange('githubStats')}
Options={
<CustomizeOptions
title="Customize Github Stats Card"
CustomizationOptions={
<CustomizeGithubStatsBase prefix="stats" options={githubStatsOptions} onUpdate={onStatsUpdate} />
}
/>
}
>
display github profile stats card
</AddonsItem>
<AddonsItem
inputId="top-languages"
inputChecked={data.topLanguages}
onInputChange={() => handleCheckChange('topLanguages')}
Options={
<CustomizeOptions
title="Customize Top Skills Card"
CustomizationOptions={
<CustomizeGithubStatsBase prefix="top-lang" options={topLanguagesOptions} onUpdate={onTopLangUpdate} />
}
/>
}
>
display top skills
</AddonsItem>
<AddonsItem
inputId="streak-stats"
inputChecked={data.streakStats}
onInputChange={() => handleCheckChange('streakStats')}
Options={
<CustomizeOptions
title="Customize Streak Stats Card"
CustomizationOptions={
<CustomizeStreakStats prefix="streak-stats" options={streakStatsOptions} onUpdate={onStreakStatsUpdate} />
}
/>
}
>
display github streak stats
</AddonsItem>
<AddonsItem
inputId="twitter-badge"
inputChecked={data.twitterBadge}
onInputChange={() => handleCheckChange('twitterBadge')}
>
display twitter badge
</AddonsItem>
<AddonsItem
inputId="dev-dynamic-blogs"
inputChecked={data.devDynamicBlogs}
onInputChange={() => handleCheckChange('devDynamicBlogs')}
>
display latest dev.to blogs dynamically (GitHub Action)
</AddonsItem>
<AddonsItem
inputId="medium-dynamic-blogs"
inputChecked={data.mediumDynamicBlogs}
onInputChange={() => handleCheckChange('mediumDynamicBlogs')}
>
display latest medium blogs dynamically (GitHub Action)
</AddonsItem>
<AddonsItem
inputId="rss-dynamic-blogs"
inputChecked={data.rssDynamicBlogs}
onInputChange={() => handleCheckChange('rssDynamicBlogs')}
>
display latest blogs from your personal blog dynamically (GitHub Action)
</AddonsItem>
{(data.devDynamicBlogs && social.dev) ||
(data.rssDynamicBlogs && social.rssurl) ||
(data.mediumDynamicBlogs && social.medium && isMediumUsernameValid(social.medium)) ? (
<div className="workflow">
<div>
download
<span
id="blog-post-worklow-span"
onClick={blogPostPorkflow}
onKeyDown={(e) => e.keyCode === 13 && blogPostPorkflow()}
role="button"
tabIndex="0"
style={{ cursor: 'pointer', color: '#002ead' }}
>
{' '}
blog-post-workflow.yml
</span>{' '}
file(learn
<a href={withPrefix(links.addons)} target="blank" style={{ color: '#002ead' }}>
{' '}
how to setup
</a>
)
</div>
</div>
) : (
''
)}
</div>
);
};
export default Addons;
Addons.propTypes = {
data: PropTypes.object.isRequired,
social: PropTypes.object.isRequired,
handleDataChange: PropTypes.func.isRequired,
handleCheckChange: PropTypes.func.isRequired,
};
-82
View File
@@ -1,82 +0,0 @@
import React from "react"
const Donate = () => {
return (
<>
<div className="text-center text-4xl my-2">Support&nbsp;
<span role="img" aria-label="praying hand emoji">🙏</span>
</div>
<div className="flex flex-col sm:flex-row items-start justify-between">
<div className="w-full sm:w-2/3">
<div className="text-2xl mb-2">
Are you using the tool and happy with it to create your GitHub
Profile?
</div>
<div className="text-lg">
Your kind support keeps open-source tools like this free for others.
</div>
<div className="mt-4">
<a
className="flex items-center justify-start w-20"
href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-profile-readme-generator"
>
<img
className="w-20"
src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-profile-readme-generator"
alt="tweet github profile readme generator"
/>
</a>
Let the world know how you feel using this tool. Share with others
on twitter.
</div>
</div>
<div className="w-full sm:w-1/3 flex flex-col justify-center items-center">
<span>Tip<span role="img" aria-label="Dollar medal">💰</span></span>
{/* Ko-Fi */}
<a
href="https://ko-fi.com/A0A81XXSX"
className="flex items-center justify-evenly bg-red-500 text-white py-2 px-4 my-2"
target="_blank"
rel="noreferrer"
>
<img
className="w-6 h-6 mr-2"
src="https://www.vectorlogo.zone/logos/ko-fi/ko-fi-icon.svg"
alt="Buy ko-fi for rahuldkjain"
/>
Buy me a ko-fi
</a>
{/* Paypal */}
<a
href="https://www.paypal.me/rahuldkjain/10"
className="flex items-center justify-evenly bg-blue-500 text-white py-2 px-4 my-2"
target="_blank"
rel="noreferrer"
>
<img
className="w-6 h-6 mr-2"
src="https://cdn.worldvectorlogo.com/logos/paypal-icon.svg"
alt="Donate rahuldkjain via paypal"
/>
Paypal
</a>
{/* BuyMeACoffee */}
<a
href="https://www.buymeacoffee.com/rahuldkjain"
className="flex items-center justify-evenly bg-orange-500 text-white py-2 px-4 my-2"
target="_blank"
rel="noreferrer"
>
<img
className="w-6 h-6 mr-2"
src="https://www.vectorlogo.zone/logos/buymeacoffee/buymeacoffee-icon.svg"
alt="Buy rahuldkjain A Coffee"
/>
Buy me a coffee
</a>
</div>
</div>
</>
)
}
export default Donate
+88
View File
@@ -0,0 +1,88 @@
import React from 'react';
const Donate = () => (
<>
<div className="text-center text-4xl my-2">
Support&nbsp;
<span role="img" aria-label="praying hand emoji">
🙏
</span>
</div>
<div className="flex flex-col sm:flex-row items-start justify-between">
<div className="w-full sm:w-2/3">
<div className="text-2xl mb-2">Are you using the tool and happy with it to create your GitHub Profile?</div>
<div className="text-lg">Your kind support keeps open-source tools like this free for others.</div>
<div className="mt-4">
<a
className="flex items-center justify-start w-20"
href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-profile-readme-generator"
>
<img
className="w-20"
src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-profile-readme-generator"
alt="tweet github profile readme generator"
/>
</a>
Let the world know how you feel using this tool. Share with others on twitter.
</div>
</div>
<div className="w-full sm:w-1/3 flex flex-col justify-center items-center">
<span>
Tip
<span role="img" aria-label="Dollar medal">
💰
</span>
</span>
{/* Ko-Fi */}
<a
href="https://ko-fi.com/A0A81XXSX"
className="flex items-center justify-evenly bg-red-500 text-white py-2 px-4 my-2"
target="_blank"
rel="noreferrer"
>
<img
className="w-6 h-6 mr-2"
src="https://www.vectorlogo.zone/logos/ko-fi/ko-fi-icon.svg"
alt="Buy ko-fi for rahuldkjain"
/>
Buy me a ko-fi
</a>
{/* Paypal */}
<a
href="https://www.paypal.me/rahuldkjain/10"
className="flex items-center justify-evenly bg-white-500 text-white py-2 px-4 my-2 border border-solid"
target="_blank"
rel="noreferrer"
>
<img
className="w-32 h-4"
src="https://cdn.worldvectorlogo.com/logos/paypal-2.svg"
alt="Donate rahuldkjain via paypal"
/>
{/* <img
className="w-6 h-6 mr-2"
src="https://www.vectorlogo.zone/logos/paypal/paypal-ar21.svg"
alt="Donate rahuldkjain via paypal"
/>
Paypal */}
</a>
{/* BuyMeACoffee */}
<a
href="https://www.buymeacoffee.com/rahuldkjain"
className="flex items-center justify-evenly bg-orange-500 text-white py-2 px-4 my-2"
target="_blank"
rel="noreferrer"
>
<img
className="w-6 h-6 mr-2"
src="https://www.vectorlogo.zone/logos/buymeacoffee/buymeacoffee-icon.svg"
alt="Buy rahuldkjain A Coffee"
/>
Buy me a coffee
</a>
</div>
</div>
</>
);
export default Donate;
-120
View File
@@ -1,120 +0,0 @@
import React from "react"
import links from "../constants/page-links"
import logo from "../images/mdg.png"
import discord from "../images/Discord-Logo.png"
import { Link } from "gatsby"
const Footer = () => {
return (
<div className="bg-gray-100 p-4 flex flex-col justify-center items-center shadow-inner mt-2">
<div className="w-full flex flex-col sm:flex-row justify-evenly py-2">
<div className="sm:ml-0 sm:mr-6 order-last sm:order-none flex">
<h1 className="text-base font-bold font-title text-xl sm:text-2xl mt-3 sm:mt-0">
<div className="flex sm:flex-col items-start mb-3 sm:mb-0">
<img
src={logo}
className="hidden sm:block h-24"
alt="github profile markdown generator logo"
/>
<div className="mr-2 sm:mr-0">
GitHub Profile{" "}
<img
src={logo}
className="inline sm:hidden h-12"
alt="github profile markdown generator logo"
/>
<span className="block sm:inline">README Generator</span>
</div>
</div>
</h1>
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold mb-4 sm:mb-2">
<strong>Pages</strong>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.addons} activeStyle={{ color: "#002ead" }}>
Addons
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.support} activeStyle={{ color: "#002ead" }}>
Support
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.about} activeStyle={{ color: "#002ead" }}>
About
</Link>
</div>
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold my-4 sm:my-0 sm:mb-2">
<strong>More</strong>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator"
aria-label="Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Github
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/releases"
aria-label="Releases on Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Releases
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/issues"
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Issues
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/pulls"
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Pull Requests
</a>
</div>
</div>
<div>
<div className="font-title font-bold text-xl sm:text-base my-4 sm:my-0 sm:mb-2">
<strong>Join Community</strong>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://discord.gg/HHMs7Eg"
aria-label="Discord of the community"
target="blank"
>
<img
src={discord}
className="h-12"
alt="Discord of the community"
/>
</a>
</div>
</div>
</div>
<div className="py-2 mt-2">
Developed in India{" "}
<span role="img" aria-label="india">
{" "}
🇮🇳
</span>
</div>
</div>
)
}
export default Footer
+103
View File
@@ -0,0 +1,103 @@
import React from 'react';
import { Link } from 'gatsby';
import links from '../constants/page-links';
import logo from '../images/mdg.png';
import discord from '../images/Discord-Logo.png';
const Footer = () => (
<div className="bg-gray-100 p-4 flex flex-col justify-center items-center shadow-inner mt-2">
<div className="w-full flex flex-col sm:flex-row justify-evenly py-2">
<div className="sm:ml-0 sm:mr-6 order-last sm:order-none flex">
<h1 className="text-base font-bold font-title text-xl sm:text-2xl mt-3 sm:mt-0">
<div className="flex sm:flex-col items-start mb-3 sm:mb-0">
<img src={logo} className="hidden sm:block h-24" alt="github profile markdown generator logo" />
<div className="mr-2 sm:mr-0">
GitHub Profile{' '}
<img src={logo} className="inline sm:hidden h-12" alt="github profile markdown generator logo" />
<span className="block sm:inline">README Generator</span>
</div>
</div>
</h1>
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold mb-4 sm:mb-2">
<strong>Pages</strong>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.addons} activeStyle={{ color: '#002ead' }}>
Addons
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.support} activeStyle={{ color: '#002ead' }}>
Support
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.about} activeStyle={{ color: '#002ead' }}>
About
</Link>
</div>
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold my-4 sm:my-0 sm:mb-2">
<strong>More</strong>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator"
aria-label="Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Github
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/releases"
aria-label="Releases on Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Releases
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/issues"
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Issues
</a>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator/pulls"
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Pull Requests
</a>
</div>
</div>
<div>
<div className="font-title font-bold text-xl sm:text-base my-4 sm:my-0 sm:mb-2">
<strong>Join Community</strong>
</div>
<div className="ml-2 sm:ml-0">
<a href="https://discord.gg/HHMs7Eg" aria-label="Discord of the community" target="blank">
<img src={discord} className="h-12" alt="Discord of the community" />
</a>
</div>
</div>
</div>
<div className="py-2 mt-2">
Developed in India{' '}
<span role="img" aria-label="india">
{' '}
🇮🇳
</span>
</div>
</div>
);
export default Footer;
@@ -1,68 +1,63 @@
import React, { useEffect, useState } from "react"
import { StarIcon, RepoForkedIcon } from "@primer/octicons-react"
import logo from "../images/mdg.png"
import links from "../constants/page-links"
import gsap from "gsap"
import axios from "axios"
import { Link } from "gatsby"
import { act } from "react-dom/test-utils"
const Header = props => {
const shouldRequestStats = () => {
const isFirstRequest = stats.starsCount === 0
const isVisible = window.document.visibilityState === 'visible'
const hasFocus = window.document.hasFocus()
return isFirstRequest || isVisible && hasFocus
}
const fetchData = async () => {
if (shouldRequestStats()) {
var response = await axios.get(
"https://api.github.com/repos/rahuldkjain/github-profile-readme-generator"
)
const { stargazers_count, forks_count } = response.data
act(() =>
setstats({
starsCount: stargazers_count,
forksCount: forks_count,
})
)
}
}
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { StarIcon, RepoForkedIcon } from '@primer/octicons-react';
import gsap from 'gsap';
import axios from 'axios';
import { Link } from 'gatsby';
import { act } from 'react-dom/test-utils';
import links from '../constants/page-links';
import logo from '../images/mdg.png';
const Header = (props) => {
const { heading } = props;
const [stats, setstats] = useState({
starsCount: 0,
forksCount: 0,
})
});
const shouldRequestStats = () => {
const isFirstRequest = stats.starsCount === 0;
const isVisible = window.document.visibilityState === 'visible';
const hasFocus = window.document.hasFocus();
return isFirstRequest || (isVisible && hasFocus);
};
const fetchData = async () => {
if (shouldRequestStats()) {
const response = await axios.get('https://api.github.com/repos/rahuldkjain/github-profile-readme-generator');
const { stargazers_count: stargazersCount, forks_count: forksCount } = response.data;
act(() =>
setstats({
starsCount: stargazersCount,
forksCount,
}),
);
}
};
useEffect(() => {
fetchData()
setInterval(fetchData, 60000)
fetchData();
setInterval(fetchData, 60000);
gsap.set(".star, .fork", {
transformOrigin: "center",
})
gsap.to(".star, .fork", {
rotateZ: "360",
gsap.set('.star, .fork', {
transformOrigin: 'center',
});
gsap.to('.star, .fork', {
rotateZ: '360',
duration: 2,
ease: "elastic.inOut",
ease: 'elastic.inOut',
repeat: -1,
yoyo: true,
})
}, [])
});
}, []);
return (
<div className="shadow flex items-center justify-center flex-col mb-2 py-2">
<Link to={links.home}>
<h1 className="text-base font-bold font-title sm:text-2xl font-medium text-blue-800 flex justify-center items-center flex-col">
<img
src={logo}
className="w-12 h-12"
alt="github profile markdown generator logo"
/>
<div>{props.heading}</div>
<img src={logo} className="w-12 h-12" alt="github profile markdown generator logo" />
<div>{heading}</div>
</h1>
</Link>
<div className="flex justify-center items-center">
@@ -75,9 +70,7 @@ const Header = props => {
<div className="text-xxs sm:text-sm border-2 border-solid border-gray-900 bg-gray-100 flex items-center justify-center py-1 px-2">
<StarIcon size={16} id="star-icon" className="px-1 w-6 star" />
Star this repo
<span className="github-count px-1 sm:px-2">
{stats.starsCount}
</span>
<span className="github-count px-1 sm:px-2">{stats.starsCount}</span>
</div>
</a>
<a
@@ -86,20 +79,17 @@ const Header = props => {
target="blank"
>
<div className="text-xxs sm:text-sm border-2 border-solid border-gray-900 bg-gray-100 flex items-center justify-center py-1 px-2">
<RepoForkedIcon
size={16}
id="fork-icon"
className="px-1 w-6 fork"
/>
<RepoForkedIcon size={16} id="fork-icon" className="px-1 w-6 fork" />
Fork on GitHub
<span className="github-count px-1 sm:px-2">
{stats.forksCount}
</span>
<span className="github-count px-1 sm:px-2">{stats.forksCount}</span>
</div>
</a>
</div>
</div>
)
}
);
};
export default Header
export default Header;
Header.propTypes = {
heading: PropTypes.string.isRequired,
};
-18
View File
@@ -1,18 +0,0 @@
import React from "react"
import Header from "./header"
import Footer from "./footer"
const Layout = ({ children }) => {
return (
<div className="flex flex-col min-h-screen">
<header>
<Header heading="GitHub Profile README Generator" />
</header>
<main className="flex-grow">{children}</main>
<footer>
<Footer />
</footer>
</div>
)
}
export default Layout
+25
View File
@@ -0,0 +1,25 @@
import React from 'react';
import PropTypes from 'prop-types';
import Header from './header';
import Footer from './footer';
const Layout = ({ children }) => (
<div className="flex flex-col min-h-screen">
<header>
<Header heading="GitHub Profile README Generator" />
</header>
<main className="flex-grow">{children}</main>
<footer>
<Footer />
</footer>
</div>
);
export default Layout;
Layout.defaultProps = {
children: '',
};
Layout.propTypes = {
children: PropTypes.element,
};
-49
View File
@@ -1,49 +0,0 @@
import React, { useRef, useEffect } from "react"
import gsap from "gsap"
const Loader = () => {
let arrow = useRef([])
useEffect(() => {
var tl = new gsap.timeline({ repeat: -1 })
tl.fromTo(
arrow.current,
{
y: 0,
color: "#3b3b4f",
},
{
y: -50,
color: "#d0d0d5",
stagger: 0.1,
duration: 0.5,
ease: "Linear.easeNone",
}
)
tl.add("cp")
tl.fromTo(
arrow.current,
{
y: -50,
color: "#d0d0d5",
},
{
y: 0,
color: "#3b3b4f",
stagger: 0.1,
duration: 0.5,
ease: "Linear.easeNone",
},
"cp-=0.3"
)
})
return (
<div className="loader">
<span ref={el => (arrow.current[0] = el)}></span>
<span ref={el => (arrow.current[1] = el)}></span>
<span ref={el => (arrow.current[2] = el)}></span>
<span ref={el => (arrow.current[3] = el)}></span>
<span ref={el => (arrow.current[4] = el)}></span>
</div>
)
}
export default Loader
+80
View File
@@ -0,0 +1,80 @@
import React, { useRef, useEffect } from 'react';
import gsap from 'gsap';
const Loader = () => {
const arrow = useRef([]);
useEffect(() => {
const tl = gsap.timeline({ repeat: -1 });
tl.fromTo(
arrow.current,
{
y: 0,
color: '#3b3b4f',
},
{
y: -50,
color: '#d0d0d5',
stagger: 0.1,
duration: 0.5,
ease: 'Linear.easeNone',
},
);
tl.add('cp');
tl.fromTo(
arrow.current,
{
y: -50,
color: '#d0d0d5',
},
{
y: 0,
color: '#3b3b4f',
stagger: 0.1,
duration: 0.5,
ease: 'Linear.easeNone',
},
'cp-=0.3',
);
});
return (
<div className="loader">
<span
ref={(el) => {
arrow.current[0] = el;
}}
>
</span>
<span
ref={(el) => {
arrow.current[1] = el;
}}
>
</span>
<span
ref={(el) => {
arrow.current[2] = el;
}}
>
</span>
<span
ref={(el) => {
arrow.current[3] = el;
}}
>
</span>
<span
ref={(el) => {
arrow.current[4] = el;
}}
>
</span>
</div>
);
};
export default Loader;
-576
View File
@@ -1,576 +0,0 @@
import React from "react"
import { isMediumUsernameValid } from "../utils/validation"
import { icons, skills, skillWebsites } from "../constants/skills"
import {
githubStatsLinkGenerator,
topLanguagesLinkGenerator,
streakStatsLinkGenerator,
} from "../utils/link-generators"
const Title = props => {
if (props.prefix && props.title) {
return (
<>
{`<h1 align="center">${props.prefix + " " + props.title}</h1>`}
<br />
</>
)
}
return ""
}
const SubTitle = props => {
if (props.subtitle) {
return (
<>
{`<h3 align="center">${props.subtitle}</h3>`}
<br />
<br />
</>
)
}
return ""
}
const SectionTitle = props => {
if (props.label) {
return (
<>
{`<h3 align="left">${props.label}</h3>`}
<br />
</>
)
}
return ""
}
const DisplayWork = props => {
if (props.prefix && props.project) {
if (props.link) {
return (
<>
{`- ${props.prefix} [${props.project}](${props.link})`}
<br />
<br />
</>
)
} else {
return (
<>
{`- ${props.prefix} **${props.project}**`}
<br />
<br />
</>
)
}
}
if (props.prefix && props.link) {
return (
<>
{`- ${props.prefix} [${props.link}](${props.link})`}
<br />
<br />
</>
)
}
return ""
}
const DisplaySocial = props => {
if (props.username) {
return (
<>
{`<a href="${props.base}/${props.username}" target="blank"><img align="center" src="${props.icon}" alt="${props.username}" height="30" width="40" /></a>`}
<br />
</>
)
}
return ""
}
const VisitorsBadge = props => {
let link =
"https://komarev.com/ghpvc/?username=" +
props.github +
`&label=${props.badgeOptions.badgeLabel}` +
`&color=${props.badgeOptions.badgeColor}` +
`&style=${props.badgeOptions.badgeStyle}`
if (props.show) {
return (
<>
{`<p align="left"> <img src="${link}" alt="${props.github}" /> </p>`}
<br />
<br />
</>
)
}
return ""
}
const TwitterBadge = props => {
let link =
"https://img.shields.io/twitter/follow/" +
props.twitter +
"?logo=twitter&style=for-the-badge"
if (props.show) {
return (
<>
{`<p align="left"> <a href="${props.base}/${props.twitter}" target="blank"><img src="${link}" alt="${props.twitter}" /></a> </p>`}
<br />
<br />
</>
)
}
return ""
}
const GithubProfileTrophy = props => {
let link =
"https://github-profile-trophy.vercel.app/?username=" + props.github
if (props.show) {
return (
<>
{`<p align="left"> <a href="https://github.com/ryo-ma/github-profile-trophy"><img src="${link}" alt="${props.github}" /></a> </p>`}
<br />
<br />
</>
)
}
return ""
}
const GitHubStats = ({ show, github, options }) => {
if (show) {
return (
<>
{`<p>&nbsp;<img align="center" src="${githubStatsLinkGenerator({
github: github,
options,
})}" alt="${github}" /></p>`}
<br />
<br />
</>
)
}
return ""
}
const isSocial = social => {
return (
social.dev ||
social.twitter ||
social.codepen ||
social.codesandbox ||
social.stackoverflow ||
social.linkedin ||
social.kaggle ||
social.instagram ||
social.fb ||
social.dribbble ||
social.behance ||
social.medium ||
social.youtube ||
social.codechef ||
social.hackerrank ||
social.codeforces ||
social.leetcode ||
social.topcoder ||
social.hackerearth ||
social.geeks_for_geeks ||
social.discord ||
social.rssurl
)
}
const DisplaySkills = props => {
const listChosenSkills = []
skills.forEach(skill => {
if (props.skills[skill]) {
listChosenSkills.push(
`
<a href="${skillWebsites[skill]}" target="_blank">
<img src="${icons[skill]}" alt="${skill}" width="40" height="40"/>
</a>
`
)
}
})
return listChosenSkills.length > 0 ? (
<>
<SectionTitle label="Languages and Tools:" />
{`<p align="left">${listChosenSkills.join(" ")}</p>`}
<br />
<br />
</>
) : (
""
)
}
const DisplayDynamicBlogs = props => {
if (props.show) {
return (
<>
{`### Blogs posts`}
<br />
{`<!-- BLOG-POST-LIST:START -->`}
<br />
{`<!-- BLOG-POST-LIST:END -->`}
<br /> <br />
</>
)
}
return ""
}
const DisplayTopLanguages = props => {
if (props.show) {
if (!props.showStats) {
return (
<>
{`<p><img align="center" src="${topLanguagesLinkGenerator({
github: props.github,
options: props.options,
})}" alt="${props.github}" /></p>`}
<br />
<br />
</>
)
}
return (
<>
{`<p><img align="left" src="${topLanguagesLinkGenerator({
github: props.github,
options: props.options,
})}" alt="${props.github}" /></p>`}
<br />
<br />
</>
)
}
return ""
}
const DisplayStreakStats = props => {
if (props.show) {
return (
<>
{`<p><img align="center" src="${streakStatsLinkGenerator({
github: props.github,
options: props.options,
})}" alt="${props.github}" /></p>`}
<br />
<br />
</>
)
}
return ""
}
const DisplaySupport = props => {
let viewSupport = false
Object.keys(props.support).forEach(key => {
if (props.support[key]) {
viewSupport = true
}
})
return viewSupport ? (
<div>
<SectionTitle label="Support:" />
{`<p>`}
{props.support.buyMeACoffee &&
`<a href="https://www.buymeacoffee.com/${props.support.buyMeACoffee}">
<img align="left" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50" width="210" alt="${props.support.buyMeACoffee}" /></a>`}
{`</p><br><br>`}
<br />
<br />
</div>
) : (
""
)
}
const Markdown = props => {
return (
<div id="markdown-content" className="break-words">
<>
<Title prefix={props.prefix.title} title={props.data.title} />
</>
<>
<SubTitle subtitle={props.data.subtitle} />
</>
<>
<VisitorsBadge
show={props.data.visitorsBadge}
github={props.social.github}
badgeOptions={{
badgeLabel: encodeURI(props.data.badgeLabel),
badgeColor: props.data.badgeColor,
badgeStyle: props.data.badgeStyle,
}}
/>
</>
<>
<GithubProfileTrophy
show={props.data.githubProfileTrophy}
github={props.social.github}
/>
<TwitterBadge
base="https://twitter.com"
show={props.data.twitterBadge}
twitter={props.social.twitter}
/>
</>
<>
<DisplayWork
prefix={props.prefix.currentWork}
project={props.data.currentWork}
link={props.link.currentWork}
/>
</>
<>
<DisplayWork
prefix={props.prefix.currentLearn}
project={props.data.currentLearn}
/>
</>
<>
<DisplayWork
prefix={props.prefix.collaborateOn}
project={props.data.collaborateOn}
link={props.link.collaborateOn}
/>
</>
<>
<DisplayWork
prefix={props.prefix.helpWith}
project={props.data.helpWith}
link={props.link.helpWith}
/>
</>
<>
<DisplayWork
prefix={props.prefix.portfolio}
link={props.link.portfolio}
/>
</>
<>
<DisplayWork prefix={props.prefix.blog} link={props.link.blog} />
</>
<>
<DisplayWork prefix={props.prefix.ama} project={props.data.ama} />
</>
<>
<DisplayWork
prefix={props.prefix.contact}
project={props.data.contact}
/>
</>
<>
<DisplayWork prefix={props.prefix.resume} link={props.link.resume} />
</>
<>
<DisplayWork
prefix={props.prefix.funFact}
project={props.data.funFact}
/>
</>
<>
<DisplayDynamicBlogs
show={
(props.data.devDynamicBlogs && props.social.dev) ||
(props.data.rssDynamicBlogs && props.social.rssurl) ||
(props.data.mediumDynamicBlogs &&
props.social.medium &&
isMediumUsernameValid(props.social.medium))
}
/>
</>
{isSocial(props.social) ? (
<>
<SectionTitle label="Connect with me:" />
{`<p align="left">`}
</>
) : (
""
)}
<br />
<>
<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={props.social.codepen}
/>
</>
<>
<DisplaySocial
base="https://dev.to"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
username={props.social.dev}
/>
</>
<>
<DisplaySocial
base="https://twitter.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/twitter.svg"
username={props.social.twitter}
/>
</>
<>
<DisplaySocial
base="https://linkedin.com/in"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
username={props.social.linkedin}
/>
</>
<>
<DisplaySocial
base="https://stackoverflow.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
username={props.social.stackoverflow}
/>
</>
<>
<DisplaySocial
base="https://codesandbox.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
username={props.social.codesandbox}
/>
</>
<>
<DisplaySocial
base="https://kaggle.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
username={props.social.kaggle}
/>
</>
<>
<DisplaySocial
base="https://fb.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
username={props.social.fb}
/>
</>
<>
<DisplaySocial
base="https://instagram.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
username={props.social.instagram}
/>
</>
<>
<DisplaySocial
base="https://dribbble.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dribbble.svg"
username={props.social.dribbble}
/>
</>
<>
<DisplaySocial
base="https://www.behance.net"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/behance.svg"
username={props.social.behance}
/>
</>
<>
<DisplaySocial
base="https://medium.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/medium.svg"
username={props.social.medium}
/>
</>
<>
<DisplaySocial
base="https://www.youtube.com/c"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg"
username={props.social.youtube}
/>
</>
<>
<DisplaySocial
base="https://www.codechef.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
username={props.social.codechef}
/>
</>
<>
<DisplaySocial
base="https://www.hackerrank.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerrank.svg"
username={props.social.hackerrank}
/>
</>
<>
<DisplaySocial
base="https://codeforces.com/profile"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codeforces.svg"
username={props.social.codeforces}
/>
</>
<>
<DisplaySocial
base="https://www.leetcode.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/leetcode.svg"
username={props.social.leetcode}
/>
</>
<>
<DisplaySocial
base="https://www.hackerearth.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerearth.svg"
username={props.social.hackerearth}
/>
</>
<>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/geeksforgeeks.svg"
username={props.social.geeks_for_geeks}
/>
</>
<>
<DisplaySocial
base="https://www.topcoder.com/members"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/topcoder.svg"
username={props.social.topcoder}
/>
</>
<>
<DisplaySocial
base="https://discord.gg"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/discord.svg"
username={props.social.discord}
/>
</>
<>
<DisplaySocial
base=""
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/rss.svg"
username={props.social.rssurl}
/>
</>
{isSocial(props.social) ? (
<>
{`</p>`}
<br />
<br />
</>
) : (
""
)}
<>
<DisplaySkills skills={props.skills} />
</>
<>
<DisplaySupport support={props.support} />
</>
<>
<DisplayTopLanguages
show={props.data.topLanguages}
showStats={props.data.githubStats}
github={props.social.github}
options={props.data.topLanguagesOptions}
/>
</>
<>
<GitHubStats
show={props.data.githubStats}
github={props.social.github}
options={props.data.githubStatsOptions}
/>
</>
<>
<DisplayStreakStats
show={props.data.streakStats}
github={props.social.github}
options={props.data.streakStatsOptions}
/>
</>
</div>
)
}
export default Markdown
+744
View File
@@ -0,0 +1,744 @@
import React from 'react';
import PropTypes from 'prop-types';
import { isMediumUsernameValid } from '../utils/validation';
import { icons, skills as SKILLS, skillWebsites } from '../constants/skills';
import {
githubStatsLinkGenerator,
topLanguagesLinkGenerator,
streakStatsLinkGenerator,
} from '../utils/link-generators';
import { DEFAULT_DATA, DEFAULT_LINK, DEFAULT_PREFIX, DEFAULT_SOCIAL, DEFAULT_SUPPORT } from '../constants/defaults';
const Title = (props) => {
const { prefix, title } = props;
if (prefix && title) {
return (
<>
{`<h1 align="center">${`${prefix} ${title}`}</h1>`}
<br />
</>
);
}
return '';
};
Title.propTypes = {
prefix: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
};
const SubTitle = (props) => {
const { subtitle } = props;
if (subtitle) {
return (
<>
{`<h3 align="center">${subtitle}</h3>`}
<br />
<br />
</>
);
}
return '';
};
SubTitle.propTypes = {
subtitle: PropTypes.string.isRequired,
};
const SectionTitle = (props) => {
const { label } = props;
if (label) {
return (
<>
{`<h3 align="left">${label}</h3>`}
<br />
</>
);
}
return '';
};
SectionTitle.propTypes = {
label: PropTypes.string.isRequired,
};
const DisplayWork = (props) => {
const { prefix, project, link } = props;
if (prefix && project) {
if (link) {
return (
<>
{`- ${prefix} [${project}](${link})`}
<br />
<br />
</>
);
}
return (
<>
{`- ${prefix} **${project}**`}
<br />
<br />
</>
);
}
if (prefix && link) {
return (
<>
{`- ${prefix} [${link}](${link})`}
<br />
<br />
</>
);
}
return '';
};
DisplayWork.defaultProps = {
prefix: '',
project: '',
link: '',
};
DisplayWork.propTypes = {
prefix: PropTypes.string,
project: PropTypes.string,
link: PropTypes.string,
};
const DisplaySocial = (props) => {
const { username, base, icon } = props;
if (username) {
return (
<>
{`<a href="${base}/${username}" target="blank"><img align="center" src="${icon}" alt="${username}" height="30" width="40" /></a>`}
<br />
</>
);
}
return '';
};
DisplaySocial.propTypes = {
username: PropTypes.string.isRequired,
base: PropTypes.string.isRequired,
icon: PropTypes.string.isRequired,
};
const VisitorsBadge = (props) => {
const { github, badgeOptions, show } = props;
const link = `https://komarev.com/ghpvc/?username=${github}&label=${badgeOptions.badgeLabel}&color=${badgeOptions.badgeColor}&style=${badgeOptions.badgeStyle}`;
if (show) {
return (
<>
{`<p align="left"> <img src="${link}" alt="${github}" /> </p>`}
<br />
<br />
</>
);
}
return '';
};
VisitorsBadge.defaultProps = {
badgeOptions: {
badgeLabel: '',
badgeColor: '',
badgeStyle: '',
},
};
VisitorsBadge.propTypes = {
github: PropTypes.string.isRequired,
badgeOptions: {
badgeLabel: PropTypes.string.isRequired,
badgeColor: PropTypes.string.isRequired,
badgeStyle: PropTypes.string.isRequired,
},
show: PropTypes.bool.isRequired,
};
const TwitterBadge = (props) => {
const { twitter, show, base } = props;
const link = `https://img.shields.io/twitter/follow/${twitter}?logo=twitter&style=for-the-badge`;
if (show) {
return (
<>
{`<p align="left"> <a href="${base}/${twitter}" target="blank"><img src="${link}" alt="${twitter}" /></a> </p>`}
<br />
<br />
</>
);
}
return '';
};
TwitterBadge.propTypes = {
twitter: PropTypes.string.isRequired,
base: PropTypes.string.isRequired,
show: PropTypes.bool.isRequired,
};
const GithubProfileTrophy = (props) => {
const { show, github } = props;
const link = `https://github-profile-trophy.vercel.app/?username=${github}`;
if (show) {
return (
<>
{`<p align="left"> <a href="https://github.com/ryo-ma/github-profile-trophy"><img src="${link}" alt="${github}" /></a> </p>`}
<br />
<br />
</>
);
}
return '';
};
GithubProfileTrophy.propTypes = {
github: PropTypes.string.isRequired,
show: PropTypes.bool.isRequired,
};
const GitHubStats = (props) => {
const { show, github, options } = props;
if (show) {
return (
<>
{`<p>&nbsp;<img align="center" src="${githubStatsLinkGenerator({
github,
options,
})}" alt="${github}" /></p>`}
<br />
<br />
</>
);
}
return '';
};
GitHubStats.defaultProps = {
options: {
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: '',
cacheSeconds: 0,
locale: '',
},
};
GitHubStats.propTypes = {
github: PropTypes.string.isRequired,
options: {
theme: PropTypes.string,
titleColor: PropTypes.string,
textColor: PropTypes.string,
bgColor: PropTypes.string,
hideBorder: PropTypes.string,
cacheSeconds: PropTypes.number,
locale: PropTypes.string,
},
show: PropTypes.bool.isRequired,
};
const isSocial = (social) => {
let status = false;
const SOCIAL_KEYS = Object.keys(DEFAULT_SOCIAL);
Object.keys(social).forEach((key) => {
if (SOCIAL_KEYS.includes(key)) {
status = true;
}
});
return status;
};
const DisplaySkills = (props) => {
const { skills } = props;
const listChosenSkills = [];
SKILLS.forEach((skill) => {
if (skills[skill]) {
listChosenSkills.push(
`
<a href="${skillWebsites[skill]}" target="_blank" rel="noreferrer">
<img src="${icons[skill]}" alt="${skill}" width="40" height="40"/>
</a>
`,
);
}
});
return listChosenSkills.length > 0 ? (
<>
<SectionTitle label="Languages and Tools:" />
{`<p align="left">${listChosenSkills.join(' ')}</p>`}
<br />
<br />
</>
) : (
''
);
};
DisplaySkills.defaultProps = {
skills: [],
};
DisplaySkills.propTypes = {
skills: [],
};
const DisplayDynamicBlogs = (props) => {
const { show } = props;
if (show) {
return (
<>
### Blogs posts
<br />
{'<!-- BLOG-POST-LIST:START -->'}
<br />
{'<!-- BLOG-POST-LIST:END -->'}
<br />
<br />
</>
);
}
return '';
};
DisplayDynamicBlogs.defaultProps = {
show: false,
};
DisplayDynamicBlogs.propTypes = {
show: PropTypes.bool,
};
const DisplayTopLanguages = (props) => {
const { show, showStats, github, options } = props;
if (show) {
if (!showStats) {
return (
<>
{`<p><img align="center" src="${topLanguagesLinkGenerator({
github,
options,
})}" alt="${github}" /></p>`}
<br />
<br />
</>
);
}
return (
<>
{`<p><img align="left" src="${topLanguagesLinkGenerator({
github,
options,
})}" alt="${github}" /></p>`}
<br />
<br />
</>
);
}
return '';
};
DisplayTopLanguages.defaultProps = {
options: {
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: '',
cacheSeconds: '',
locale: '',
},
};
DisplayTopLanguages.propTypes = {
github: PropTypes.string.isRequired,
options: {
theme: PropTypes.string,
titleColor: PropTypes.string,
textColor: PropTypes.string,
bgColor: PropTypes.string,
hideBorder: PropTypes.string,
cacheSeconds: PropTypes.number,
locale: PropTypes.string,
},
show: PropTypes.bool.isRequired,
showStats: PropTypes.bool.isRequired,
};
const DisplayStreakStats = (props) => {
const { show, github, options } = props;
if (show) {
return (
<>
{`<p><img align="center" src="${streakStatsLinkGenerator({
github,
options,
})}" alt="${github}" /></p>`}
<br />
<br />
</>
);
}
return '';
};
DisplayStreakStats.defaultProps = {
options: {
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: '',
cacheSeconds: '',
locale: '',
},
};
DisplayStreakStats.propTypes = {
github: PropTypes.string.isRequired,
options: {
theme: PropTypes.string,
titleColor: PropTypes.string,
textColor: PropTypes.string,
bgColor: PropTypes.string,
hideBorder: PropTypes.string,
cacheSeconds: PropTypes.number,
locale: PropTypes.string,
},
show: PropTypes.bool.isRequired,
};
const DisplaySupport = (props) => {
const { support } = props;
let viewSupport = false;
Object.keys(support).forEach((key) => {
if (support[key]) {
viewSupport = true;
}
});
return viewSupport ? (
<div>
<SectionTitle label="Support:" />
{'<p>'}
{support.buyMeACoffee &&
`<a href="https://www.buymeacoffee.com/${support.buyMeACoffee}">
<img align="left" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50" width="210" alt="${support.buyMeACoffee}" /></a>`}
{support.buyMeAKofi &&
`<a href="https://ko-fi.com/${support.buyMeAKofi}">
<img align="left" src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3" height="50" width="210" alt="${support.buyMeAKofi}" /></a>`}
{'</p><br><br>'}
<br />
<br />
</div>
) : (
''
);
};
DisplaySupport.defaultProps = {
support: {
buyMeACoffee: '',
buyMeAKofi: '',
},
};
DisplaySupport.propTypes = {
support: {
buyMeACoffee: PropTypes.string,
buyMeAKofi: PropTypes.string,
},
};
const Markdown = (props) => {
const { prefix, data, link, social, skills, support } = props;
const iconBaseUrl =
'https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/';
return (
<div id="markdown-content" className="break-words">
<>
<Title prefix={prefix.title} title={data.title} />
</>
<>
<SubTitle subtitle={data.subtitle} />
</>
<>
<VisitorsBadge
show={data.visitorsBadge}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>
</>
<>
<GithubProfileTrophy show={data.githubProfileTrophy} github={social.github} />
<TwitterBadge base="https://twitter.com" show={data.twitterBadge} twitter={social.twitter} />
</>
<>
<DisplayWork prefix={prefix.currentWork} project={data.currentWork} link={link.currentWork} />
</>
<>
<DisplayWork prefix={prefix.currentLearn} project={data.currentLearn} />
</>
<>
<DisplayWork prefix={prefix.collaborateOn} project={data.collaborateOn} link={link.collaborateOn} />
</>
<>
<DisplayWork prefix={prefix.helpWith} project={data.helpWith} link={link.helpWith} />
</>
<>
<DisplayWork prefix={prefix.portfolio} link={link.portfolio} />
</>
<>
<DisplayWork prefix={prefix.blog} link={link.blog} />
</>
<>
<DisplayWork prefix={prefix.ama} project={data.ama} />
</>
<>
<DisplayWork prefix={prefix.contact} project={data.contact} />
</>
<>
<DisplayWork prefix={prefix.resume} link={link.resume} />
</>
<>
<DisplayWork prefix={prefix.funFact} project={data.funFact} />
</>
<>
<DisplayDynamicBlogs
show={
(data.devDynamicBlogs && social.dev) ||
(data.rssDynamicBlogs && social.rssurl) ||
(data.mediumDynamicBlogs && social.medium && isMediumUsernameValid(social.medium))
}
/>
</>
{isSocial(social) ? (
<>
<SectionTitle label="Connect with me:" />
{'<p align="left">'}
</>
) : (
''
)}
<br />
<>
<DisplaySocial base="https://codepen.io" icon={`${iconBaseUrl}codepen.svg`} username={social.codepen} />
</>
<>
<DisplaySocial base="https://dev.to" icon={`${iconBaseUrl}devto.svg`} username={social.dev} />
</>
<>
<DisplaySocial base="https://twitter.com" icon={`${iconBaseUrl}twitter.svg`} username={social.twitter} />
</>
<>
<DisplaySocial
base="https://linkedin.com/in"
icon={`${iconBaseUrl}linked-in-alt.svg`}
username={social.linkedin}
/>
</>
<>
<DisplaySocial
base="https://stackoverflow.com/users"
icon={`${iconBaseUrl}stack-overflow.svg`}
username={social.stackoverflow}
/>
</>
<>
<DisplaySocial
base="https://codesandbox.com"
icon={`${iconBaseUrl}codesandbox.svg`}
username={social.codesandbox}
/>
</>
<>
<DisplaySocial base="https://kaggle.com" icon={`${iconBaseUrl}kaggle.svg`} username={social.kaggle} />
</>
<>
<DisplaySocial base="https://fb.com" icon={`${iconBaseUrl}facebook.svg`} username={social.fb} />
</>
<>
<DisplaySocial base="https://instagram.com" icon={`${iconBaseUrl}instagram.svg`} username={social.instagram} />
</>
<>
<DisplaySocial base="https://dribbble.com" icon={`${iconBaseUrl}dribbble.svg`} username={social.dribbble} />
</>
<>
<DisplaySocial base="https://www.behance.net" icon={`${iconBaseUrl}behance.svg`} username={social.behance} />
</>
<>
<DisplaySocial base="https://hashnode.com" icon={`${iconBaseUrl}hashnode.svg`} username={social.hashnode} />
</>
<>
<DisplaySocial base="https://medium.com" icon={`${iconBaseUrl}medium.svg`} username={social.medium} />
</>
<>
<DisplaySocial base="https://www.youtube.com/c" icon={`${iconBaseUrl}youtube.svg`} username={social.youtube} />
</>
<>
<DisplaySocial
base="https://www.codechef.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
username={social.codechef}
/>
</>
<>
<DisplaySocial
base="https://www.hackerrank.com"
icon={`${iconBaseUrl}hackerrank.svg`}
username={social.hackerrank}
/>
</>
<>
<DisplaySocial
base="https://codeforces.com/profile"
icon={`${iconBaseUrl}codeforces.svg`}
username={social.codeforces}
/>
</>
<>
<DisplaySocial
base="https://www.leetcode.com"
icon={`${iconBaseUrl}leet-code.svg`}
username={social.leetcode}
/>
</>
<>
<DisplaySocial
base="https://www.hackerearth.com"
icon={`${iconBaseUrl}hackerearth.svg`}
username={social.hackerearth}
/>
</>
<>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon={`${iconBaseUrl}geeks-for-geeks.svg`}
username={social.geeks_for_geeks}
/>
</>
<>
<DisplaySocial
base="https://www.topcoder.com/members"
icon={`${iconBaseUrl}topcoder.svg`}
username={social.topcoder}
/>
</>
<>
<DisplaySocial base="https://discord.gg" icon={`${iconBaseUrl}discord.svg`} username={social.discord} />
</>
<>
<DisplaySocial base="" icon={`${iconBaseUrl}rss.svg`} username={social.rssurl} />
</>
{isSocial(social) ? (
<>
{'</p>'}
<br />
<br />
</>
) : (
''
)}
<>
<DisplaySkills skills={skills} />
</>
<>
<DisplaySupport support={support} />
</>
<>
<DisplayTopLanguages
show={data.topLanguages}
showStats={data.githubStats}
github={social.github}
options={data.topLanguagesOptions}
/>
</>
<>
<GitHubStats show={data.githubStats} github={social.github} options={data.githubStatsOptions} />
</>
<>
<DisplayStreakStats show={data.streakStats} github={social.github} options={data.streakStatsOptions} />
</>
</div>
);
};
export default Markdown;
Markdown.defaultProps = {
prefix: DEFAULT_PREFIX,
data: DEFAULT_DATA,
link: DEFAULT_LINK,
social: DEFAULT_SOCIAL,
support: DEFAULT_SUPPORT,
skills: [],
};
Markdown.propTypes = {
prefix: {
title: PropTypes.string,
currentWork: PropTypes.string,
currentLearn: PropTypes.string,
collaborateOn: PropTypes.string,
helpWith: PropTypes.string,
ama: PropTypes.string,
contact: PropTypes.string,
resume: PropTypes.string,
funFact: PropTypes.string,
portfolio: PropTypes.string,
blog: PropTypes.string,
},
data: {
title: PropTypes.string,
subtitle: PropTypes.string,
currentWork: PropTypes.string,
currentLearn: PropTypes.string,
collaborateOn: PropTypes.string,
helpWith: PropTypes.string,
ama: PropTypes.string,
contact: PropTypes.string,
funFact: PropTypes.string,
twitterBadge: false,
visitorsBadge: false,
badgeStyle: PropTypes.string,
badgeColor: PropTypes.string,
badgeLabel: PropTypes.string,
githubProfileTrophy: false,
githubStats: false,
githubStatsOptions: {
theme: PropTypes.string,
titleColor: PropTypes.string,
textColor: PropTypes.string,
bgColor: PropTypes.string,
hideBorder: false,
cacheSeconds: null,
locale: PropTypes.string,
},
topLanguages: false,
topLanguagesOptions: {
theme: PropTypes.string,
titleColor: PropTypes.string,
textColor: PropTypes.string,
bgColor: PropTypes.string,
hideBorder: false,
cacheSeconds: null,
locale: PropTypes.string,
},
streakStats: false,
streakStatsOptions: {
theme: PropTypes.string,
},
devDynamicBlogs: false,
mediumDynamicBlogs: false,
rssDynamicBlogs: false,
},
link: {},
social: {},
skills: {},
support: {},
};
-439
View File
@@ -1,439 +0,0 @@
import React from "react"
import { icons, skills, skillWebsites } from "../constants/skills"
import {
githubStatsLinkGenerator,
topLanguagesLinkGenerator,
streakStatsLinkGenerator,
} from "../utils/link-generators"
export const TitlePreview = props => {
if (props.prefix && props.title) {
return (
<h1 className="text-center text-xl font-bold">
{props.prefix + " " + props.title}
</h1>
)
}
return null
}
export const SubTitlePreview = props => {
if (props.subtitle) {
return <h3 className="text-center font-medium">{props.subtitle}</h3>
}
return null
}
export const SectionTitle = props => {
if (!props.visible) return null
else if (props.label) {
return <h3 className="w-full text-lg sm:text-xl">{props.label}</h3>
}
return null
}
export const DisplayWork = props => {
if (props.prefix && props.project) {
if (props.link) {
return (
<div className="my-2">
{props.prefix + " "}
<a
href={props.link}
className="no-underline text-blue-700"
target="blank"
>
{props.project}
</a>
</div>
)
} else {
return (
<div className="my-2">
{props.prefix + " "}
<b>{props.project}</b>
</div>
)
}
}
if (props.prefix && props.link) {
return (
<div className="my-2">
{props.prefix + " "}
<a
href={props.link}
className="no-underline text-blue-700"
target="blank"
>
{props.link}
</a>
</div>
)
}
return null
}
export const WorkPreview = props => {
const prefix = props.work.prefix
const data = props.work.data
const link = props.work.link
return (
<>
<DisplayWork
prefix={prefix.currentWork}
project={data.currentWork}
link={link.currentWork}
/>
<DisplayWork prefix={prefix.currentLearn} project={data.currentLearn} />
<DisplayWork
prefix={prefix.helpWith}
project={data.helpWith}
link={link.helpWith}
/>
<DisplayWork
prefix={prefix.collaborateOn}
project={data.collaborateOn}
link={link.collaborateOn}
/>
<DisplayWork prefix={prefix.ama} project={data.ama} />
<DisplayWork prefix={prefix.portfolio} link={link.portfolio} />
<DisplayWork prefix={prefix.blog} link={link.blog} />
<DisplayWork prefix={prefix.resume} link={link.resume} />
<DisplayWork prefix={prefix.contact} project={data.contact} />
<DisplayWork prefix={prefix.funFact} project={data.funFact} />
</>
)
}
export const DisplaySocial = props => {
if (props.username) {
return (
<a
className="no-underline text-blue-700 m-2"
href={props.base + "/" + props.username}
target="blank"
>
<img className="w-6 h-6" src={props.icon} alt="props.username" />
</a>
)
}
return null
}
export const SocialPreview = props => {
let viewSocial = false
Object.keys(props.social).forEach(key => {
if (props.social[key] && key != "github") viewSocial = true
})
return (
<div className="flex justify-start items-end flex-wrap">
<SectionTitle label="Connect with me:" visible={viewSocial} />
<DisplaySocial
base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
username={props.social.codepen}
/>
<DisplaySocial
base="https://dev.to"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
username={props.social.dev}
/>
<DisplaySocial
base="https://twitter.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/twitter.svg"
username={props.social.twitter}
/>
<DisplaySocial
base="https://linkedin.com/in"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
username={props.social.linkedin}
/>
<DisplaySocial
base="https://stackoverflow.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
username={props.social.stackoverflow}
/>
<DisplaySocial
base="https://codesandbox.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
username={props.social.codesandbox}
/>
<DisplaySocial
base="https://kaggle.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
username={props.social.kaggle}
/>
<DisplaySocial
base="https://fb.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
username={props.social.fb}
/>
<DisplaySocial
base="https://instagram.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
username={props.social.instagram}
/>
<DisplaySocial
base="https://dribbble.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dribbble.svg"
username={props.social.dribbble}
/>
<DisplaySocial
base="https://www.behance.net"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/behance.svg"
username={props.social.behance}
/>
<DisplaySocial
base="https://medium.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/medium.svg"
username={props.social.medium}
/>
<DisplaySocial
base="https://www.youtube.com/c"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg"
username={props.social.youtube}
/>
<DisplaySocial
base="https://www.codechef.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codechef.svg"
username={props.social.codechef}
/>
<DisplaySocial
base="https://codeforces.com/profile"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codeforces.svg"
username={props.social.codeforces}
/>
<DisplaySocial
base="https://www.hackerrank.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerrank.svg"
username={props.social.hackerrank}
/>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/geeksforgeeks.svg"
username={props.social.geeks_for_geeks}
/>
<DisplaySocial
base="https://www.hackerearth.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerearth.svg"
username={props.social.hackerearth}
/>
<DisplaySocial
base="https://www.topcoder.com/members"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/topcoder.svg"
username={props.social.topcoder}
/>
<DisplaySocial
base="https://www.leetcode.com"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/leetcode.svg"
username={props.social.leetcode}
/>
<DisplaySocial
base="https://discord.gg"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/discord.svg"
username={props.social.discord}
/>
<DisplaySocial
base=""
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/rss.svg"
username={props.social.rssurl}
/>
</div>
)
}
export const VisitorsBadgePreview = props => {
let link =
"https://komarev.com/ghpvc/?username=" +
props.github +
`&label=${props.badgeOptions.badgeLabel}` +
`&color=${props.badgeOptions.badgeColor}` +
`&style=${props.badgeOptions.badgeStyle}`
if (props.show) {
return (
<div className="text-left my-2">
{" "}
<img className="h-4 sm:h-6" src={link} alt={props.github} />{" "}
</div>
)
}
return null
}
export const TwitterBadgePreview = props => {
let link =
"https://img.shields.io/twitter/follow/" +
props.twitter +
"?logo=twitter&style=for-the-badge"
if (props.show) {
return (
<div className="text-left my-2">
{" "}
<a href="https://twitter.com/${props.twitter}" target="blank">
<img className="h-4 sm:h-6" src={link} alt={props.twitter} />
</a>{" "}
</div>
)
}
return null
}
export const GithubProfileTrophyPreview = props => {
let link =
"https://github-profile-trophy.vercel.app/?username=" + props.github
if (props.show) {
return (
<div className="text-left my-2">
{" "}
<a href="https://github.com/ryo-ma/github-profile-trophy">
<img src={link} alt={props.github} />
</a>{" "}
</div>
)
}
return null
}
export const GitHubStatsPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img src={githubStatsLinkGenerator({ github, options })} alt={github} />
</div>
)
}
return null
}
export const TopLanguagesPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img
src={topLanguagesLinkGenerator({ github, options })}
alt={github}
/>
</div>
)
}
return <div className="text-center mx-4 mb-4"> &nbsp;</div>
}
export const StreakStatsPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img src={streakStatsLinkGenerator({ github, options })} alt={github} />
</div>
)
}
return null
}
export const SkillsPreview = props => {
var listSkills = []
skills.forEach(skill => {
if (props.skills[skill]) {
listSkills.push(
<a
href={skillWebsites[skill]}
key={skill}
target="_blank"
rel="noreferrer"
>
<img
className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10"
src={icons[skill]}
alt={skill}
/>
</a>
)
}
})
return listSkills.length > 0 ? (
<div className="flex flex-wrap justify-start items-center">
<SectionTitle label="Languages and Tools:" visible={true} />
{listSkills}
</div>
) : (
""
)
}
export const SupportPreview = props => {
let viewSupport = false
Object.keys(props.support).forEach(key => {
if (props.support[key]) {
viewSupport = true
}
})
return (
<div className="mb-4">
<SectionTitle label="Support:" visible={viewSupport} />
{props.support.buyMeACoffee && (
<div style={{ width: "210px" }}>
<a
href={`https://www.buymeacoffee.com/` + props.support.buyMeACoffee}
target="_blank"
>
<img
src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
alt="Buy Me A Coffee"
className="w-36 h-8 sm:w-52 sm:h-12"
/>
</a>
</div>
)}
</div>
)
}
const MarkdownPreview = props => {
return (
<div id="markdown-preview">
<TitlePreview prefix={props.prefix.title} title={props.data.title} />
<SubTitlePreview subtitle={props.data.subtitle} />
<VisitorsBadgePreview
show={props.data.visitorsBadge}
github={props.social.github}
badgeOptions={{
badgeLabel: encodeURI(props.data.badgeLabel),
badgeColor: props.data.badgeColor,
badgeStyle: props.data.badgeStyle,
}}
/>
<GithubProfileTrophyPreview
show={props.data.githubProfileTrophy}
github={props.social.github}
/>
<TwitterBadgePreview
show={props.data.twitterBadge}
twitter={props.social.twitter}
/>
<WorkPreview work={props} />
<SocialPreview social={props.social} />
<SkillsPreview skills={props.skills} />
<SupportPreview support={props.support} />
<div className="block sm:flex sm:justify-center sm:items-start">
<TopLanguagesPreview
show={props.data.topLanguages}
github={props.social.github}
options={props.data.topLanguagesOptions}
/>
<GitHubStatsPreview
show={props.data.githubStats}
github={props.social.github}
options={props.data.githubStatsOptions}
/>
<StreakStatsPreview
show={props.data.streakStats}
github={props.social.github}
options={props.data.streakStatsOptions}
/>
</div>
</div>
)
}
export default MarkdownPreview
+510
View File
@@ -0,0 +1,510 @@
import React from 'react';
import PropTypes from 'prop-types';
import { icons, skills as SKILLS, skillWebsites } from '../constants/skills';
import {
githubStatsLinkGenerator,
topLanguagesLinkGenerator,
streakStatsLinkGenerator,
} from '../utils/link-generators';
import { DEFAULT_DATA, DEFAULT_PREFIX, DEFAULT_SOCIAL, DEFAULT_SUPPORT } from '../constants/defaults';
export const TitlePreview = (props) => {
const { prefix, title } = props;
if (prefix && title) {
return <h1 className="text-center text-xl font-bold">{`${prefix} ${title}`}</h1>;
}
return null;
};
TitlePreview.propTypes = {
prefix: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
};
export const SubTitlePreview = (props) => {
const { subtitle } = props;
if (subtitle) {
return <h3 className="text-center font-medium">{subtitle}</h3>;
}
return null;
};
SubTitlePreview.propTypes = {
subtitle: PropTypes.string.isRequired,
};
export const SectionTitle = (props) => {
const { visible, label } = props;
if (!visible) return null;
if (label) {
return <h3 className="w-full text-lg sm:text-xl">{label}</h3>;
}
return null;
};
SectionTitle.defaultProps = {
visible: false,
};
SectionTitle.propTypes = {
visible: PropTypes.bool,
label: PropTypes.string.isRequired,
};
export const DisplayWork = (props) => {
const { prefix, project, link } = props;
if (prefix && project) {
if (link) {
return (
<div className="my-2">
{`${prefix} `}
<a href={link} className="no-underline text-blue-700" target="blank">
{project}
</a>
</div>
);
}
return (
<div className="my-2">
{`${prefix} `}
<b>{project}</b>
</div>
);
}
if (prefix && link) {
return (
<div className="my-2">
{`${prefix} `}
<a href={link} className="no-underline text-blue-700" target="blank">
{link}
</a>
</div>
);
}
return null;
};
DisplayWork.defaultProps = {
prefix: '',
project: '',
link: '',
};
DisplayWork.propTypes = {
prefix: PropTypes.string,
project: PropTypes.string,
link: PropTypes.string,
};
export const WorkPreview = (props) => {
const { work } = props;
const { prefix, data, link } = work;
return (
<>
<DisplayWork prefix={prefix.currentWork} project={data.currentWork} link={link.currentWork} />
<DisplayWork prefix={prefix.currentLearn} project={data.currentLearn} />
<DisplayWork prefix={prefix.helpWith} project={data.helpWith} link={link.helpWith} />
<DisplayWork prefix={prefix.collaborateOn} project={data.collaborateOn} link={link.collaborateOn} />
<DisplayWork prefix={prefix.ama} project={data.ama} />
<DisplayWork prefix={prefix.portfolio} link={link.portfolio} />
<DisplayWork prefix={prefix.blog} link={link.blog} />
<DisplayWork prefix={prefix.resume} link={link.resume} />
<DisplayWork prefix={prefix.contact} project={data.contact} />
<DisplayWork prefix={prefix.funFact} project={data.funFact} />
</>
);
};
WorkPreview.propTypes = {
work: PropTypes.object.isRequired,
};
export const DisplaySocial = (props) => {
const { username, base, icon } = props;
if (username) {
return (
<a className="no-underline text-blue-700 m-2" href={`${base}/${username}`} target="blank">
<img className="w-6 h-6" src={icon} alt="username" />
</a>
);
}
return null;
};
DisplaySocial.defaultProps = {
username: '',
base: '',
icon: '',
};
DisplaySocial.propTypes = {
username: PropTypes.string,
base: PropTypes.string,
icon: PropTypes.string,
};
export const SocialPreview = (props) => {
const { social } = props;
let viewSocial = false;
const iconBaseUrl =
'https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/';
Object.keys(social).forEach((key) => {
if (social[key] && key !== 'github') viewSocial = true;
});
return (
<div className="flex justify-start items-end flex-wrap">
<SectionTitle label="Connect with me:" visible={viewSocial} />
<>
<DisplaySocial base="https://codepen.io" icon={`${iconBaseUrl}codepen.svg`} username={social.codepen} />
</>
<>
<DisplaySocial base="https://dev.to" icon={`${iconBaseUrl}devto.svg`} username={social.dev} />
</>
<>
<DisplaySocial base="https://twitter.com" icon={`${iconBaseUrl}twitter.svg`} username={social.twitter} />
</>
<>
<DisplaySocial
base="https://linkedin.com/in"
icon={`${iconBaseUrl}linked-in-alt.svg`}
username={social.linkedin}
/>
</>
<>
<DisplaySocial
base="https://stackoverflow.com/users"
icon={`${iconBaseUrl}stack-overflow.svg`}
username={social.stackoverflow}
/>
</>
<>
<DisplaySocial
base="https://codesandbox.com"
icon={`${iconBaseUrl}codesandbox.svg`}
username={social.codesandbox}
/>
</>
<>
<DisplaySocial base="https://kaggle.com" icon={`${iconBaseUrl}kaggle.svg`} username={social.kaggle} />
</>
<>
<DisplaySocial base="https://fb.com" icon={`${iconBaseUrl}facebook.svg`} username={social.fb} />
</>
<>
<DisplaySocial base="https://instagram.com" icon={`${iconBaseUrl}instagram.svg`} username={social.instagram} />
</>
<>
<DisplaySocial base="https://dribbble.com" icon={`${iconBaseUrl}dribbble.svg`} username={social.dribbble} />
</>
<>
<DisplaySocial base="https://www.behance.net" icon={`${iconBaseUrl}behance.svg`} username={social.behance} />
</>
<>
<DisplaySocial base="https://hashnode.com" icon={`${iconBaseUrl}hashnode.svg`} username={social.hashnode} />
</>
<>
<DisplaySocial base="https://medium.com" icon={`${iconBaseUrl}medium.svg`} username={social.medium} />
</>
<>
<DisplaySocial base="https://www.youtube.com/c" icon={`${iconBaseUrl}youtube.svg`} username={social.youtube} />
</>
<>
<DisplaySocial
base="https://www.codechef.com/users"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
username={social.codechef}
/>
</>
<>
<DisplaySocial
base="https://www.hackerrank.com"
icon={`${iconBaseUrl}hackerrank.svg`}
username={social.hackerrank}
/>
</>
<>
<DisplaySocial
base="https://codeforces.com/profile"
icon={`${iconBaseUrl}codeforces.svg`}
username={social.codeforces}
/>
</>
<>
<DisplaySocial
base="https://www.leetcode.com"
icon={`${iconBaseUrl}leet-code.svg`}
username={social.leetcode}
/>
</>
<>
<DisplaySocial
base="https://www.hackerearth.com"
icon={`${iconBaseUrl}hackerearth.svg`}
username={social.hackerearth}
/>
</>
<>
<DisplaySocial
base="https://auth.geeksforgeeks.org/user"
icon={`${iconBaseUrl}geeks-for-geeks.svg`}
username={social.geeks_for_geeks}
/>
</>
<>
<DisplaySocial
base="https://www.topcoder.com/members"
icon={`${iconBaseUrl}topcoder.svg`}
username={social.topcoder}
/>
</>
<>
<DisplaySocial base="https://discord.gg" icon={`${iconBaseUrl}discord.svg`} username={social.discord} />
</>
<>
<DisplaySocial base="" icon={`${iconBaseUrl}rss.svg`} username={social.rssurl} />
</>
</div>
);
};
SocialPreview.propTypes = {
social: PropTypes.object.isRequired,
};
export const VisitorsBadgePreview = (props) => {
const { github, show, badgeOptions } = props;
const link = `https://komarev.com/ghpvc/?username=${github}&label=${badgeOptions.badgeLabel}&color=${badgeOptions.badgeColor}&style=${badgeOptions.badgeStyle}`;
if (show) {
return (
<div className="text-left my-2">
{' '}
<img className="h-4 sm:h-6" src={link} alt={github} />{' '}
</div>
);
}
return null;
};
VisitorsBadgePreview.defaultProps = {
github: '',
show: false,
badgeOptions: {},
};
VisitorsBadgePreview.propTypes = {
github: PropTypes.string,
show: PropTypes.bool,
badgeOptions: PropTypes.object,
};
export const TwitterBadgePreview = (props) => {
const { twitter, show } = props;
const link = `https://img.shields.io/twitter/follow/${twitter}?logo=twitter&style=for-the-badge`;
if (show) {
return (
<div className="text-left my-2">
{' '}
<a href={`https://twitter.com/${twitter}`} target="_blank" rel="noreferrer">
<img className="h-4 sm:h-6" src={link} alt={twitter} />
</a>{' '}
</div>
);
}
return null;
};
TwitterBadgePreview.defaultProps = {
twitter: '',
show: false,
};
TwitterBadgePreview.propTypes = {
twitter: PropTypes.string,
show: PropTypes.bool,
};
export const GithubProfileTrophyPreview = (props) => {
const { github, show } = props;
const link = `https://github-profile-trophy.vercel.app/?username=${github}`;
if (show) {
return (
<div className="text-left my-2">
{' '}
<a href="https://github.com/ryo-ma/github-profile-trophy">
<img src={link} alt={github} />
</a>{' '}
</div>
);
}
return null;
};
GithubProfileTrophyPreview.defaultProps = {
github: '',
show: false,
};
GithubProfileTrophyPreview.propTypes = {
github: PropTypes.string,
show: PropTypes.bool,
};
export const GitHubStatsPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img src={githubStatsLinkGenerator({ github, options })} alt={github} />
</div>
);
}
return null;
};
GitHubStatsPreview.defaultProps = {
github: '',
options: {},
show: false,
};
GitHubStatsPreview.propTypes = {
github: PropTypes.string,
options: PropTypes.object,
show: PropTypes.bool,
};
export const TopLanguagesPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img src={topLanguagesLinkGenerator({ github, options })} alt={github} />
</div>
);
}
return <div className="text-center mx-4 mb-4"> &nbsp;</div>;
};
TopLanguagesPreview.defaultProps = {
github: '',
options: {},
show: false,
};
TopLanguagesPreview.propTypes = {
github: PropTypes.string,
options: PropTypes.object,
show: PropTypes.bool,
};
export const StreakStatsPreview = ({ github, options, show }) => {
if (show) {
return (
<div className="text-center mx-4 mb-4">
<img src={streakStatsLinkGenerator({ github, options })} alt={github} />
</div>
);
}
return null;
};
StreakStatsPreview.defaultProps = {
github: '',
options: {},
show: false,
};
StreakStatsPreview.propTypes = {
github: PropTypes.string,
options: PropTypes.object,
show: PropTypes.bool,
};
export const SkillsPreview = (props) => {
const { skills } = props;
const listSkills = [];
SKILLS.forEach((skill) => {
if (skills[skill]) {
listSkills.push(
<a href={skillWebsites[skill]} key={skill} target="_blank" rel="noreferrer">
<img className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10" src={icons[skill]} alt={skill} />
</a>,
);
}
});
return listSkills.length > 0 ? (
<div className="flex flex-wrap justify-start items-center">
<SectionTitle label="Languages and Tools:" visible />
{listSkills}
</div>
) : (
''
);
};
SkillsPreview.propTypes = {
skills: PropTypes.array.isRequired,
};
export const SupportPreview = (props) => {
const { support } = props;
let viewSupport = false;
Object.keys(support).forEach((key) => {
if (support[key]) {
viewSupport = true;
}
});
return support.buyMeACoffee || support.buyMeAKofi ? (
<div className="flex flex-wrap justify-start items-center">
<SectionTitle label="Support:" visible={viewSupport} />
{support.buyMeACoffee && (
<a href={`https://www.buymeacoffee.com/${support.buyMeACoffee}`} target="_blank" rel="noreferrer">
<img
src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
alt="Buy Me A Coffee"
className="mb-4 mr-4 w-36 h-8 sm:w-52 sm:h-12"
/>
</a>
)}
{support.buyMeAKofi && (
<a href={`https://ko-fi.com/${support.buyMeAKofi}`} target="_blank" rel="noreferrer">
<img
src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3"
alt="Buy Me A Ko-fi"
className="mb-4 mr-4 w-36 h-8 sm:w-52 sm:h-12"
/>
</a>
)}
</div>
) : (
''
);
};
SupportPreview.propTypes = {
support: PropTypes.object.isRequired,
};
const MarkdownPreview = (props) => {
const { prefix, data, social, skills, support } = props;
return (
<div id="markdown-preview">
<TitlePreview prefix={prefix.title} title={data.title} />
<SubTitlePreview subtitle={data.subtitle} />
<VisitorsBadgePreview
show={data.visitorsBadge}
github={social.github}
badgeOptions={{
badgeLabel: encodeURI(data.badgeLabel),
badgeColor: data.badgeColor,
badgeStyle: data.badgeStyle,
}}
/>
<GithubProfileTrophyPreview show={data.githubProfileTrophy} github={social.github} />
<TwitterBadgePreview show={data.twitterBadge} twitter={social.twitter} />
<WorkPreview work={props} />
<SocialPreview social={social} />
<SkillsPreview skills={skills} />
<SupportPreview support={support} />
<div className="block sm:flex sm:justify-center sm:items-start">
<TopLanguagesPreview show={data.topLanguages} github={social.github} options={data.topLanguagesOptions} />
<GitHubStatsPreview show={data.githubStats} github={social.github} options={data.githubStatsOptions} />
<StreakStatsPreview show={data.streakStats} github={social.github} options={data.streakStatsOptions} />
</div>
</div>
);
};
export default MarkdownPreview;
MarkdownPreview.defaultProps = {
prefix: DEFAULT_PREFIX,
data: DEFAULT_DATA,
social: DEFAULT_SOCIAL,
support: DEFAULT_SUPPORT,
skills: [],
};
MarkdownPreview.propTypes = {
prefix: PropTypes.object,
data: PropTypes.object,
social: PropTypes.object,
skills: PropTypes.object,
support: PropTypes.object,
};
@@ -5,10 +5,10 @@
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { Helmet } from "react-helmet"
import { useStaticQuery, graphql } from "gatsby"
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { useStaticQuery, graphql } from 'gatsby';
function SEO({ description, lang, meta, title }) {
const { site } = useStaticQuery(
@@ -22,10 +22,10 @@ function SEO({ description, lang, meta, title }) {
}
}
}
`
)
`,
);
const metaDescription = description || site.siteMetadata.description
const metaDescription = description || site.siteMetadata.description;
return (
<Helmet
@@ -69,20 +69,20 @@ function SEO({ description, lang, meta, title }) {
},
].concat(meta)}
/>
)
);
}
SEO.defaultProps = {
lang: `en`,
meta: [],
description: ``,
}
};
SEO.propTypes = {
description: PropTypes.string,
lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string.isRequired,
}
};
export default SEO
export default SEO;
-104
View File
@@ -1,104 +0,0 @@
import React, {useState} from "react"
import { icons, categorizedSkills } from "../constants/skills"
import { SearchIcon, XIcon } from "@primer/octicons-react";
const Skills = props => {
const [search, setSearch] = useState('')
const [debounce, setDebounce] = useState(undefined);
const inputRef = React.createRef()
const createSkill = skill => {
return (
<div className="w-1/3 sm:w-1/4 my-6" key={skill}>
<label
htmlFor={skill}
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
>
<input
id={skill}
type="checkbox"
checked={props.skills[skill]}
onChange={event => props.handleSkillsChange(skill)}
/>
<img
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
src={icons[skill]}
alt={skill}
/>
<span className="tooltiptext">{skill}</span>
</label>
</div>
)
}
const onSearchChange = (value) => {
const callback = () => {
setSearch(value)
}
clearTimeout(debounce)
setDebounce(setTimeout(callback, 50))
}
return (
<div className="px-2 sm:px-6 mb-10 ">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-4 flex justify-between">
Skills
<div className="relative flex">
<input
type="text"
onChange={(e) => onSearchChange(e.target.value)}
className="leading:none text-xs my-0 py-1 px-2 pr-8 sm:text-xl border-2 border-gray-900 focus:border-blue-700 placeholder-gray-700"
placeholder="Search Skills"
ref = {inputRef}
/>
<span className="absolute" style={{right:"10px"}}>
{(search !== '')
?<button className="focus:outline-none" onClick={() => {
setSearch('')
inputRef.current.value = ''
}
}>
<XIcon size={16} className="mb-1 transform scale-100 md:scale-125"/>
</button>
:<SearchIcon size={16} className="mb-1 transform scale-100 md:scale-125"/>
}
</span>
</div>
</div>
{Object.keys(categorizedSkills)
.filter(key => {
let filtered = categorizedSkills[key].skills.filter(skill => {
return skill.includes(search.toLowerCase())
})
return filtered.length !== 0
})
.map(key => (
<div key={key} className="divide-y divide-gray-500">
<div className="text-sm sm:text-xl text-gray-900 text-left py-1">
{categorizedSkills[key].title}
</div>
<div className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10">
{categorizedSkills[key].skills
.filter(skill => {
return skill.includes(search.toLowerCase())
})
.map(skill => createSkill(skill))}
</div>
</div>
))}
<span className="flex justify-center text-gray-900">
{(Object.keys(categorizedSkills)
.filter(key => {
let filtered = categorizedSkills[key].skills.filter(skill => {
return skill.includes(search.toLowerCase())
})
return filtered.length !== 0
})
.length === 0)?"No Results Found":""}
</span>
</div>
)
}
export default Skills
+99
View File
@@ -0,0 +1,99 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { SearchIcon, XIcon } from '@primer/octicons-react';
import { icons, categorizedSkills } from '../constants/skills';
const Skills = (props) => {
const { skills, handleSkillsChange } = props;
const [search, setSearch] = useState('');
const [debounce, setDebounce] = useState(undefined);
const inputRef = React.createRef();
const createSkill = (skill) => (
<div className="w-1/3 sm:w-1/4 my-6" key={skill}>
<label htmlFor={skill} className="checkbox-label flex items-center justify-start">
<input
id={skill}
type="checkbox"
className="checkbox-label__input"
checked={skills[skill]}
onChange={() => handleSkillsChange(skill)}
/>
<span className="checkbox-label__control" />
<img className="ml-4 w-8 h-8 sm:w-10 sm:h-10" src={icons[skill]} alt={skill} />
<span className="tooltiptext">{skill}</span>
</label>
</div>
);
const onSearchChange = (value) => {
const callback = () => {
setSearch(value);
};
clearTimeout(debounce);
setDebounce(setTimeout(callback, 50));
};
return (
<div className="px-2 sm:px-6 mb-10 ">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-4 flex justify-between">
Skills
<div className="relative flex">
<input
type="text"
onChange={(e) => onSearchChange(e.target.value)}
className="leading:none text-xs my-0 py-1 px-2 pr-8 sm:text-xl border-2 border-gray-900 focus:border-blue-700 placeholder-gray-700"
placeholder="Search Skills"
ref={inputRef}
/>
<span className="absolute" style={{ right: '10px' }}>
{search !== '' ? (
<button
type="button"
className="focus:outline-none"
onClick={() => {
setSearch('');
inputRef.current.value = '';
}}
>
<XIcon size={16} className="mb-1 transform scale-100 md:scale-125" />
</button>
) : (
<SearchIcon size={16} className="mb-1 transform scale-100 md:scale-125" />
)}
</span>
</div>
</div>
{Object.keys(categorizedSkills)
.filter((key) => {
const filtered = categorizedSkills[key].skills.filter((skill) => skill.includes(search.toLowerCase()));
return filtered.length !== 0;
})
.map((key) => (
<div key={key} className="divide-y divide-gray-500">
<div className="text-sm sm:text-xl text-gray-900 text-left py-1">{categorizedSkills[key].title}</div>
<div className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10">
{categorizedSkills[key].skills
.filter((skill) => skill.includes(search.toLowerCase()))
.map((skill) => createSkill(skill))}
</div>
</div>
))}
<span className="flex justify-center text-gray-900">
{Object.keys(categorizedSkills).filter((key) => {
const filtered = categorizedSkills[key].skills.filter((skill) => skill.includes(search.toLowerCase()));
return filtered.length !== 0;
}).length === 0
? 'No Results Found'
: ''}
</span>
</div>
);
};
export default Skills;
Skills.propTypes = {
skills: PropTypes.array.isRequired,
handleSkillsChange: PropTypes.func.isRequired,
};
@@ -1,11 +1,11 @@
import React from "react"
import React from 'react';
import PropTypes from 'prop-types';
const Social = props => {
const Social = (props) => {
const { social, handleSocialChange } = props;
return (
<div className="px-2 sm:px-6 mb-4">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Social
</div>
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Social</div>
<div className="flex flex-wrap justify-center items-center">
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
<img
@@ -17,8 +17,8 @@ const Social = props => {
id="github"
placeholder="github 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-1 sm:px-2 focus:border-blue-700"
value={props.social.github}
onChange={event => props.handleSocialChange("github", event)}
value={social.github}
onChange={(event) => handleSocialChange('github', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -31,8 +31,8 @@ const Social = props => {
id="twitter"
placeholder="twitter 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={props.social.twitter}
onChange={event => props.handleSocialChange("twitter", event)}
value={social.twitter}
onChange={(event) => handleSocialChange('twitter', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -45,8 +45,8 @@ const Social = props => {
id="dev"
placeholder="dev.to 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={props.social.dev}
onChange={event => props.handleSocialChange("dev", event)}
value={social.dev}
onChange={(event) => handleSocialChange('dev', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -59,8 +59,8 @@ const Social = props => {
id="codepen"
placeholder="codepen 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={props.social.codepen}
onChange={event => props.handleSocialChange("codepen", event)}
value={social.codepen}
onChange={(event) => handleSocialChange('codepen', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -73,8 +73,8 @@ const Social = props => {
id="codesandbox"
placeholder="codesandbox 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={props.social.codesandbox}
onChange={event => props.handleSocialChange("codesandbox", event)}
value={social.codesandbox}
onChange={(event) => handleSocialChange('codesandbox', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -87,8 +87,8 @@ const Social = props => {
id="stackoverflow"
placeholder="stackoverflow user ID"
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={props.social.stackoverflow}
onChange={event => props.handleSocialChange("stackoverflow", event)}
value={social.stackoverflow}
onChange={(event) => handleSocialChange('stackoverflow', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -101,8 +101,8 @@ const Social = props => {
id="linkedin"
placeholder="linkedin 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={props.social.linkedin}
onChange={event => props.handleSocialChange("linkedin", event)}
value={social.linkedin}
onChange={(event) => handleSocialChange('linkedin', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -115,8 +115,8 @@ const Social = props => {
id="kaggle"
placeholder="kaggle 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={props.social.kaggle}
onChange={event => props.handleSocialChange("kaggle", event)}
value={social.kaggle}
onChange={(event) => handleSocialChange('kaggle', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -129,8 +129,8 @@ const Social = props => {
id="fb"
placeholder="facebook 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={props.social.fb}
onChange={event => props.handleSocialChange("fb", event)}
value={social.fb}
onChange={(event) => handleSocialChange('fb', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -143,8 +143,8 @@ const Social = props => {
id="instagram"
placeholder="instagram 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={props.social.instagram}
onChange={event => props.handleSocialChange("instagram", event)}
value={social.instagram}
onChange={(event) => handleSocialChange('instagram', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -157,8 +157,8 @@ const Social = props => {
id="dribbble"
placeholder="dribbble 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={props.social.dribbble}
onChange={event => props.handleSocialChange("dribbble", event)}
value={social.dribbble}
onChange={(event) => handleSocialChange('dribbble', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -171,8 +171,22 @@ const Social = props => {
id="behance"
placeholder="behance 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={props.social.behance}
onChange={event => props.handleSocialChange("behance", event)}
value={social.behance}
onChange={(event) => handleSocialChange('behance', 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.0.1/icons/hashnode.svg"
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
alt="hashnode"
/>
<input
id="hashnode"
placeholder="hashnode username (with @)"
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.hashnode}
onChange={(event) => handleSocialChange('hashnode', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -185,8 +199,8 @@ const Social = props => {
id="medium"
placeholder="medium username (with @)"
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={props.social.medium}
onChange={event => props.handleSocialChange("medium", event)}
value={social.medium}
onChange={(event) => handleSocialChange('medium', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -199,8 +213,8 @@ const Social = props => {
id="youtube"
placeholder="youtube channel name"
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={props.social.youtube}
onChange={event => props.handleSocialChange("youtube", event)}
value={social.youtube}
onChange={(event) => handleSocialChange('youtube', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -213,8 +227,8 @@ const Social = props => {
id="codechef"
placeholder="codechef 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={props.social.codechef}
onChange={event => props.handleSocialChange("codechef", event)}
value={social.codechef}
onChange={(event) => handleSocialChange('codechef', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -227,8 +241,8 @@ const Social = props => {
id="hackerrank"
placeholder="hackerrank 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={props.social.hackerrank}
onChange={event => props.handleSocialChange("hackerrank", event)}
value={social.hackerrank}
onChange={(event) => handleSocialChange('hackerrank', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -241,8 +255,8 @@ const Social = props => {
id="codeforces"
placeholder="codeforces 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={props.social.codeforces}
onChange={event => props.handleSocialChange("codeforces", event)}
value={social.codeforces}
onChange={(event) => handleSocialChange('codeforces', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -255,8 +269,8 @@ const Social = props => {
id="leetcode"
placeholder="leetcode 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={props.social.leetcode}
onChange={event => props.handleSocialChange("leetcode", event)}
value={social.leetcode}
onChange={(event) => handleSocialChange('leetcode', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -269,8 +283,8 @@ const Social = props => {
id="topcoder"
placeholder="topcoder 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={props.social.topcoder}
onChange={event => props.handleSocialChange("topcoder", event)}
value={social.topcoder}
onChange={(event) => handleSocialChange('topcoder', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -283,8 +297,8 @@ const Social = props => {
id="hackerearth"
placeholder="hackerearth user (with @)"
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={props.social.hackerearth}
onChange={event => props.handleSocialChange("hackerearth", event)}
value={social.hackerearth}
onChange={(event) => handleSocialChange('hackerearth', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -297,10 +311,8 @@ const Social = props => {
id="geeksforgeeks"
placeholder="GFG (<username>/profile)"
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={props.social.geeks_for_geeks}
onChange={event =>
props.handleSocialChange("geeks_for_geeks", event)
}
value={social.geeks_for_geeks}
onChange={(event) => handleSocialChange('geeks_for_geeks', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -313,8 +325,8 @@ const Social = props => {
id="discord"
placeholder="discord invite (only code)"
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={props.social.discord}
onChange={event => props.handleSocialChange("discord", event)}
value={social.discord}
onChange={(event) => handleSocialChange('discord', event)}
/>
</div>
<div className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
@@ -327,13 +339,17 @@ const Social = props => {
id="rssurl"
placeholder="RSS feed URL"
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={props.social.rssurl}
onChange={event => props.handleSocialChange("rssurl", event)}
value={social.rssurl}
onChange={(event) => handleSocialChange('rssurl', event)}
/>
</div>
</div>
</div>
)
}
);
};
export default Social
export default Social;
Social.propTypes = {
social: PropTypes.object.isRequired,
handleSocialChange: PropTypes.func.isRequired,
};
-19
View File
@@ -1,19 +0,0 @@
import React from "react"
const Subtitle = props => {
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Subtitle
</div>
<input
id="subtitle"
className="outline-none w-full text-xs sm:text-lg 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={props.data.subtitle}
onChange={event => props.handleDataChange("subtitle", event)}
/>
</div>
)
}
export default Subtitle
+23
View File
@@ -0,0 +1,23 @@
import React from 'react';
import PropTypes from 'prop-types';
const Subtitle = (props) => {
const { data, handleDataChange } = props;
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Subtitle</div>
<input
id="subtitle"
className="outline-none w-full text-xs sm:text-lg 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={data.subtitle}
onChange={(event) => handleDataChange('subtitle', event)}
/>
</div>
);
};
export default Subtitle;
Subtitle.propTypes = {
data: PropTypes.object.isRequired,
handleDataChange: PropTypes.func.isRequired,
};
-29
View File
@@ -1,29 +0,0 @@
import React from "react"
const Support = props => {
return (
<div className="px-2 sm:px-6 mb-4">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Support
</div>
<div className="flex flex-wrap justify-start items-center">
<div className="w-2/5 flex justify-between items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
<img
src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
className="w-36 h-8 sm:w-52 sm:h-12"
alt="buymeacoffee"
/>
<input
id="buy-me-a-coffee"
placeholder="buymeacoffee 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-1 sm:px-2 ml-2 sm:ml-0 focus:border-blue-700"
value={props.support.buyMeACoffee || ""}
onChange={event => props.handleSupportChange("buyMeACoffee", event)}
/>
</div>
</div>
</div>
)
}
export default Support
+47
View File
@@ -0,0 +1,47 @@
import React from 'react';
import PropTypes from 'prop-types';
const Support = (props) => {
const { support, handleSupportChange } = props;
return (
<div className="px-2 sm:px-6 mb-4">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Support</div>
<div className="flex flex-wrap justify-start items-center">
<div className="w-1/2 flex justify-start items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
<img
src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
className="w-36 h-8 sm:w-52 sm:h-12 mr-1 sm:mr-4"
alt="buymeacoffee"
/>
<input
id="buy-me-a-coffee"
placeholder="buymeacoffee 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-1 focus:border-blue-700"
value={support.buyMeACoffee || ''}
onChange={(event) => handleSupportChange('buyMeACoffee', event)}
/>
</div>
<div className="w-1/2 flex justify-start items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0">
<img
src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3"
className="w-36 h-8 sm:w-52 sm:h-12 mr-1 sm:mr-4"
alt="buymeakofi"
/>
<input
id="buy-me-a-kofi"
placeholder="Ko-fi 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-1 sm:px-2 ml-2 sm:ml-0 focus:border-blue-700"
value={support.buyMeAKofi || ''}
onChange={(event) => handleSupportChange('buyMeAKofi', event)}
/>
</div>
</div>
</div>
);
};
export default Support;
Support.propTypes = {
support: PropTypes.object.isRequired,
handleSupportChange: PropTypes.func.isRequired,
};
@@ -1,28 +1,34 @@
import React from "react"
import React from 'react';
import PropTypes from 'prop-types';
const Title = props => {
const Title = (props) => {
const { data, prefix, handlePrefixChange, handleDataChange } = props;
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Title
</div>
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Title</div>
<div className="flex justify-start items-center w-full text-regular text-xs sm:text-lg">
<input
id="title-prefix"
className="outline-none w-24 sm:w-40 mr-10 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700 prefix"
value={props.prefix.title}
onChange={event => props.handlePrefixChange("title", event)}
value={prefix.title}
onChange={(event) => handlePrefixChange('title', event)}
/>
<input
id="title-name"
placeholder="name"
className="outline-none placeholder-gray-700 w-1/2 sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.title}
onChange={event => props.handleDataChange("title", event)}
value={data.title}
onChange={(event) => handleDataChange('title', event)}
/>
</div>
</div>
)
}
);
};
export default Title
export default Title;
Title.propTypes = {
prefix: PropTypes.object.isRequired,
data: PropTypes.object.isRequired,
handlePrefixChange: PropTypes.func.isRequired,
handleDataChange: PropTypes.func.isRequired,
};
@@ -1,76 +1,76 @@
import React from "react"
import React from 'react';
import PropTypes from 'prop-types';
const Work = props => {
const Work = (props) => {
const { prefix, handlePrefixChange, data, handleDataChange, link, handleLinkChange } = props;
return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">
Work
</div>
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Work</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="currentWork-prefix"
placeholder="Hi, I'm "
className="outline-none placeholder-gray-700 mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.currentWork}
onChange={event => props.handlePrefixChange("currentWork", event)}
value={prefix.currentWork}
onChange={(event) => handlePrefixChange('currentWork', event)}
/>
<input
id="currentWork"
placeholder="project name"
className="outline-none placeholder-gray-700 mr-8 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.currentWork}
onChange={event => props.handleDataChange("currentWork", event)}
value={data.currentWork}
onChange={(event) => handleDataChange('currentWork', event)}
/>
<input
id="currentWork-link"
placeholder="project link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.currentWork}
onChange={event => props.handleLinkChange("currentWork", event)}
value={link.currentWork}
onChange={(event) => handleLinkChange('currentWork', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="collaborateOn-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.collaborateOn}
onChange={event => props.handlePrefixChange("collaborateOn", event)}
value={prefix.collaborateOn}
onChange={(event) => handlePrefixChange('collaborateOn', event)}
/>
<input
id="collaborateOn"
placeholder="project name"
className="outline-none placeholder-gray-700 mr-8 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.collaborateOn}
onChange={event => props.handleDataChange("collaborateOn", event)}
value={data.collaborateOn}
onChange={(event) => handleDataChange('collaborateOn', event)}
/>
<input
id="collaborateOn-link"
placeholder="project link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.collaborateOn}
onChange={event => props.handleLinkChange("collaborateOn", event)}
value={link.collaborateOn}
onChange={(event) => handleLinkChange('collaborateOn', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="helpWith-prefix"
className="outline-none placeholder-gray-700 mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.helpWith}
onChange={event => props.handlePrefixChange("helpWith", event)}
value={prefix.helpWith}
onChange={(event) => handlePrefixChange('helpWith', event)}
/>
<input
id="helpWith"
placeholder="project name"
className="outline-none placeholder-gray-700 mr-8 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.helpWith}
onChange={event => props.handleDataChange("helpWith", event)}
value={data.helpWith}
onChange={(event) => handleDataChange('helpWith', event)}
/>
<input
id="helpWith-link"
placeholder="project link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/4 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.helpWith}
onChange={event => props.handleLinkChange("helpWith", event)}
value={link.helpWith}
onChange={(event) => handleLinkChange('helpWith', event)}
/>
</div>
@@ -78,30 +78,30 @@ const Work = props => {
<input
id="currentLearn-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.currentLearn}
onChange={event => props.handlePrefixChange("currentLearn", event)}
value={prefix.currentLearn}
onChange={(event) => handlePrefixChange('currentLearn', event)}
/>
<input
id="currentLearn"
placeholder="Frameworks, courses etc."
className="outline-none placeholder-gray-700 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.currentLearn}
onChange={event => props.handleDataChange("currentLearn", event)}
value={data.currentLearn}
onChange={(event) => handleDataChange('currentLearn', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="ama-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.ama}
onChange={event => props.handlePrefixChange("ama", event)}
value={prefix.ama}
onChange={(event) => handlePrefixChange('ama', event)}
/>
<input
id="ama"
placeholder="react, vue and gsap"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.ama}
onChange={event => props.handleDataChange("ama", event)}
value={data.ama}
onChange={(event) => handleDataChange('ama', event)}
/>
</div>
@@ -109,15 +109,15 @@ const Work = props => {
<input
id="contact-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.contact}
onChange={event => props.handlePrefixChange("contact", event)}
value={prefix.contact}
onChange={(event) => handlePrefixChange('contact', event)}
/>
<input
id="contact"
placeholder="example@gmail.com"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.contact}
onChange={event => props.handleDataChange("contact", event)}
value={data.contact}
onChange={(event) => handleDataChange('contact', event)}
/>
</div>
@@ -125,65 +125,73 @@ const Work = props => {
<input
id="portfolio-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.portfolio}
onChange={event => props.handlePrefixChange("portfolio", event)}
value={prefix.portfolio}
onChange={(event) => handlePrefixChange('portfolio', event)}
/>
<input
id="portfolio"
placeholder="portfolio link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.portfolio}
onChange={event => props.handleLinkChange("portfolio", event)}
value={link.portfolio}
onChange={(event) => handleLinkChange('portfolio', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="blog-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.blog}
onChange={event => props.handlePrefixChange("blog", event)}
value={prefix.blog}
onChange={(event) => handlePrefixChange('blog', event)}
/>
<input
id="blog"
placeholder="blog link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.blog}
onChange={event => props.handleLinkChange("blog", event)}
value={link.blog}
onChange={(event) => handleLinkChange('blog', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="resume-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.resume}
onChange={event => props.handlePrefixChange("resume", event)}
value={prefix.resume}
onChange={(event) => handlePrefixChange('resume', event)}
/>
<input
id="resume"
placeholder="resume link"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 text-blue-700 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.link.resume}
onChange={event => props.handleLinkChange("resume", event)}
value={link.resume}
onChange={(event) => handleLinkChange('resume', event)}
/>
</div>
<div className="text-xs sm:text-lg flex flex-col sm:flex-row mb-10 justify-center sm:justify-start items-center sm:items-start w-full px-4 sm:px-0">
<input
id="funFact-prefix"
className="outline-none mr-8 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.prefix.funFact}
onChange={event => props.handlePrefixChange("funFact", event)}
value={prefix.funFact}
onChange={(event) => handlePrefixChange('funFact', event)}
/>
<input
id="funFact"
placeholder="I think I am funny"
className="outline-none placeholder-gray-700 mr-8 sm:mr-0 w-full sm:w-1/3 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
value={props.data.funFact}
onChange={event => props.handleDataChange("funFact", event)}
value={data.funFact}
onChange={(event) => handleDataChange('funFact', event)}
/>
</div>
</div>
)
}
);
};
export default Work
export default Work;
Work.propTypes = {
prefix: PropTypes.object.isRequired,
data: PropTypes.object.isRequired,
link: PropTypes.object.isRequired,
handlePrefixChange: PropTypes.func.isRequired,
handleDataChange: PropTypes.func.isRequired,
handleLinkChange: PropTypes.func.isRequired,
};
+68 -68
View File
@@ -1,97 +1,97 @@
export const DEFAULT_PREFIX = {
title: "Hi 👋, I'm",
currentWork: "🔭 Im currently working on",
currentLearn: "🌱 Im currently learning",
collaborateOn: "👯 Im looking to collaborate on",
helpWith: "🤝 Im looking for help with",
ama: "💬 Ask me about",
contact: "📫 How to reach me",
resume: "📄 Know about my experiences",
funFact: "⚡ Fun fact",
portfolio: "👨‍💻 All of my projects are available at",
blog: "📝 I regularly write articles on",
}
currentWork: '🔭 Im currently working on',
currentLearn: '🌱 Im currently learning',
collaborateOn: '👯 Im looking to collaborate on',
helpWith: '🤝 Im looking for help with',
ama: '💬 Ask me about',
contact: '📫 How to reach me',
resume: '📄 Know about my experiences',
funFact: '⚡ Fun fact',
portfolio: '👨‍💻 All of my projects are available at',
blog: '📝 I regularly write articles on',
};
export const DEFAULT_DATA = {
title: "",
subtitle: "A passionate frontend developer from India",
currentWork: "",
currentLearn: "",
collaborateOn: "",
helpWith: "",
ama: "",
contact: "",
funFact: "",
title: '',
subtitle: 'A passionate frontend developer from India',
currentWork: '',
currentLearn: '',
collaborateOn: '',
helpWith: '',
ama: '',
contact: '',
funFact: '',
twitterBadge: false,
visitorsBadge: false,
badgeStyle: "flat",
badgeColor: "0e75b6",
badgeLabel: "Profile views",
badgeStyle: 'flat',
badgeColor: '0e75b6',
badgeLabel: 'Profile views',
githubProfileTrophy: false,
githubStats: false,
githubStatsOptions: {
theme: "",
titleColor: "",
textColor: "",
bgColor: "",
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: false,
cacheSeconds: null,
locale: "en",
locale: 'en',
},
topLanguages: false,
topLanguagesOptions: {
theme: "",
titleColor: "",
textColor: "",
bgColor: "",
theme: '',
titleColor: '',
textColor: '',
bgColor: '',
hideBorder: false,
cacheSeconds: null,
locale: "en",
locale: 'en',
},
streakStats: false,
streakStatsOptions: {
theme: "",
theme: '',
},
devDynamicBlogs: false,
mediumDynamicBlogs: false,
rssDynamicBlogs: false,
}
};
export const DEFAULT_LINK = {
currentWork: "",
collaborateOn: "",
helpWith: "",
portfolio: "",
blog: "",
resume: "",
}
currentWork: '',
collaborateOn: '',
helpWith: '',
portfolio: '',
blog: '',
resume: '',
};
export const DEFAULT_SOCIAL = {
github: "",
dev: "",
linkedin: "",
codepen: "",
stackoverflow: "",
kaggle: "",
codesandbox: "",
fb: "",
instagram: "",
twitter: "",
dribbble: "",
behance: "",
medium: "",
youtube: "",
codechef: "",
hackerrank: "",
codeforces: "",
leetcode: "",
topcoder: "",
hackerearth: "",
geeks_for_geeks: "",
discord: "",
rssurl: "",
}
github: '',
dev: '',
linkedin: '',
codepen: '',
stackoverflow: '',
kaggle: '',
codesandbox: '',
fb: '',
instagram: '',
twitter: '',
dribbble: '',
behance: '',
medium: '',
youtube: '',
codechef: '',
hackerrank: '',
codeforces: '',
leetcode: '',
topcoder: '',
hackerearth: '',
geeks_for_geeks: '',
discord: '',
rssurl: '',
};
export const DEFAULT_SUPPORT = {
buyMeACoffee: ""
}
buyMeACoffee: '',
};
+6 -6
View File
@@ -1,7 +1,7 @@
const links = {
home: "/",
about: "/about",
addons: "/addons",
support: "/support",
}
export default links
home: '/',
about: '/about',
addons: '/addons',
support: '/support',
};
export default links;
+433 -523
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 KiB

-47
View File
@@ -1,47 +0,0 @@
import React from "react"
import PropTypes from "prop-types"
export default function HTML(props) {
return (
<html {...props.htmlAttributes}>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
{props.headComponents}
<script
data-name="BMC-Widget"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="rahuldkjain"
data-description="Support me on Buy me a coffee!"
data-message="Loved the tool🚀. Buy me a coffee to support the work!"
data-color="#FF813F"
data-position=""
data-x_margin="18"
data-y_margin="18"
></script>
</head>
<body {...props.bodyAttributes}>
{props.preBodyComponents}
<div
key={`body`}
id="___gatsby"
dangerouslySetInnerHTML={{ __html: props.body }}
/>
{props.postBodyComponents}
</body>
</html>
)
}
HTML.propTypes = {
htmlAttributes: PropTypes.object,
headComponents: PropTypes.array,
bodyAttributes: PropTypes.object,
preBodyComponents: PropTypes.array,
body: PropTypes.string,
postBodyComponents: PropTypes.array,
}
+42
View File
@@ -0,0 +1,42 @@
/* eslint-disable react/jsx-props-no-spreading */
import React from 'react';
import PropTypes from 'prop-types';
export default function HTML(props) {
const { htmlAttributes, headComponents, bodyAttributes, preBodyComponents, postBodyComponents, body } = props;
return (
<html {...htmlAttributes} lang="en">
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
{headComponents}
<script
data-name="BMC-Widget"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="rahuldkjain"
data-description="Support me on Buy me a coffee!"
data-message="Loved the tool🚀. Buy me a coffee to support the work!"
data-color="#FF813F"
data-position=""
data-x_margin="18"
data-y_margin="18"
/>
</head>
<body {...bodyAttributes}>
{preBodyComponents}
<div key="body" id="___gatsby" dangerouslySetInnerHTML={{ __html: body }} />
{postBodyComponents}
</body>
</html>
);
}
HTML.propTypes = {
htmlAttributes: PropTypes.object.isRequired,
headComponents: PropTypes.array.isRequired,
bodyAttributes: PropTypes.object.isRequired,
preBodyComponents: PropTypes.array.isRequired,
body: PropTypes.string.isRequired,
postBodyComponents: PropTypes.array.isRequired,
};
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 12" style="enable-background:new 0 0 24 12;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FF4A00;}
</style>
<path d="M.837 2.756h6.488v4.062H.837z" fill="#09f"/><path d="M.837 6.818H4.9v2.427H.837z" fill="#f1422a"/><path d="M4.9 6.818h2.427v2.427H4.9z" fill="#333"/><path d="M8.168 3.96h1.298v4.08H8.168zm7.418 0H13.36v1.298h.927V8.04h1.298V5.258h.927V3.96zm3.524 0h-2.226v1.298h.927V8.04H19.1V5.258h.927V3.96zm3.524 0h-2.226v1.298h.927V8.04h1.298V5.258h.927V3.96zM13 5.258V3.96h-2.967v4.08h1.298V6.927h1.113V5.63H11.32v-.37z" fill="#09f"/>
</svg>

After

Width:  |  Height:  |  Size: 839 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#DF234F" d="M75.4.3c-.9 0-1.8.2-2.6.5 1.7 1.1 2.6 2.6 3.1 4.3 0 .2.1.4.1.6 0 .2.1.4.1.6.1 2.9-.8 3.3-1.4 5-1 2.2-.7 4.6.5 6.5.1.2.2.5.4.7-1.3-8.4 5.7-9.6 7-12.2.1-2.3-1.8-3.8-3.3-4.9C77.8.5 76.6.3 75.4.3zm10.5 1.8c-.1.8 0 .6-.1 1 0 .3 0 .6-.1.9-.1.3-.1.5-.2.8-.1.3-.2.5-.3.8-.1.2-.2.4-.3.7-.1.1-.2.3-.3.4-.1.1-.1.2-.2.3-.2.2-.3.5-.5.7l-.6.6c-.2.2-.4.4-.6.5-.7.5-1.5.9-2.2 1.4-.2.2-.5.3-.7.5-.2.2-.4.3-.6.5l-.6.6c-.2.2-.4.4-.5.7-.2.2-.3.5-.5.7-.1.3-.2.5-.4.8-.1.3-.2.5-.3.8-.1.3-.2.6-.2.8 0 .1 0 .3-.1.4 0 .1 0 .3-.1.4v1.4c0 .3 0 .5.1.8 0 .3.1.5.2.8.1.3.2.5.3.8.1.2.2.3.2.5l-7.6-2.9c-1.3-.4-2.5-.7-3.8-1-.7-.2-1.4-.3-2.1-.5-2-.4-4-.7-6-.9h-.2c-2-.2-3.9-.3-5.9-.3-1.5 0-2.9.1-4.3.2-2 .1-4 .4-6 .7l-1.5.3c-1 .2-2 .4-3 .7-.5.1-1 .3-1.5.4-.5.2-1 .4-1.4.6-.4.2-.7.3-1.1.5-.1 0-.1 0-.2.1-.3.2-.6.3-.9.5-.1 0-.2.1-.2.1-.4.2-.7.4-1 .5-.2.1-.5.2-.7.3-.1.1-.2.1-.3.2-.3.2-.6.3-.9.5-.3.2-.6.3-.8.5-.2.2-.5.3-.7.5 0 0-.1 0-.1.1-.2.1-.4.3-.6.5l-.1.1c-.2.1-.3.3-.5.4-.1 0-.1.1-.2.1-.2.1-.3.3-.5.4 0 .1-.1.1-.1.1l-.6.6-.1.1-.6.6s0 .1-.1.1l-.5.5c-.1.1-.2.1-.2.2l-.6.6c0 .1-.1.1-.1.2l-.8.8-.1.1c-.5.6-1.1 1.1-1.7 1.6-.6.5-1.2 1-1.9 1.5s-1.3.9-2 1.3-1.4.7-2.1 1c-.7.3-1.4.6-2.1.8-1.4.3-2.8.9-4 1 0-.5-.3-.4-.6-.4-.3.1-.6.1-.8.2-.3.1-.5.2-.8.3-.3.1-.5.2-.8.4-.2.2-.5.3-.7.5-.2.2-.5.4-.7.6-.2.2-.5.4-.7.6-.2.2-.4.4-.6.7-.2.3-.4.5-.5.8-.2.2-.3.5-.5.8-.1.3-.3.6-.4.9l-.3.9c-.1.3-.1.5-.2.8v.1c-.1.3-.1.7-.1.9.1-.1.1.1.1.3v.4c0 .2.1.4.1.6.1.2.1.4.2.6.1.2.2.4.4.6.1.2.3.4.4.6.2.2.4.4.6.5.2.2.4.4.6.5.8.7 1 .9 2 1.5.2.1.3.2.5.3h.1v.2c0 .3.1.5.2.8.1.3.2.6.3.8l.3.6c0 .1.1.1.1.2.1.3.3.5.4.7.2.2.3.5.5.7l.6.6.6.6H8c.2.2.4.3.6.5.2.2.5.3.7.4.2.1.5.3.8.4.2.1.4.2.7.2 0 0 .1 0 .1.1.1 0 .3.1.4.1-.1 1.8-.1 3.5.1 4.1.3.7 1.8-1.4 3.2-3.7-.2 2.3-.3 5 0 5.8.4.8 2.3-1.8 4.1-4.6 23.4-5.4 44.8 10.8 47.1 33.7-.4-3.6-4.8-5.6-6.9-5.1-1 2.4-2.7 5.6-5.4 7.5.2-2.2.1-4.4-.3-6.6-.7 3-2.1 5.9-4.1 8.3-3.1.2-6.3-1.3-7.9-3.6-.1-.1-.2-.3-.3-.4-.1-.2-.2-.5-.3-.7-.1-.2-.2-.5-.2-.7v-.7-.5c0-.2.1-.5.2-.7.1-.2.1-.5.2-.7.1-.2.2-.5.4-.7.6-1.6.6-2.9-.5-3.6l-.6-.3c-.1 0-.3-.1-.4-.1-.1 0-.2-.1-.3-.1-.2-.1-.5-.1-.7-.2-.2-.1-.5-.1-.7-.1-.2 0-.5-.1-.7-.1h-.5c-.3 0-.5 0-.7.1-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2-.2.1-.4.2-.7.3l-.6.3c-7.7 5-3.1 16.8 2.1 20.2-2 .4-4 .8-4.6 1.2l-.1.1c1.4.9 2.9 1.6 4.5 2.2 2.1.7 4.4 1.3 5.4 1.6 2.7.6 5.5.8 8.3.6 14.6-1 26.6-12.2 28.8-26.8.1.3.1.6.2.9.1.6.2 1.2.3 1.9.1.3.1.6.1.9v.1c0 .3.1.6.1.9 0 .4.1.7.1 1.1V91.6c0 .3-.1.5-.1.8v.3c0 .3-.1.6-.1 1-.1.3-.1.6-.2.9v.1c-.1.3-.1.6-.2.9v.1c-.1.3-.1.6-.2.9v.1l-.3.9v.1c-.1.3-.2.7-.3 1-.1.3-.2.6-.4 1-.1.3-.2.7-.4 1-.1.3-.3.6-.4 1-.1.3-.3.6-.4.9 0 .1-.1.2-.1.2s0 .1-.1.1c-2.1 4.3-5.3 8.1-9.3 11.1-.3.2-.5.4-.8.6-.1.1-.2.1-.2.2-.2.2-.5.3-.7.5l.1.2c.5-.1.9-.1 1.4-.2.9-.1 1.7-.3 2.6-.5.2 0 .5-.1.7-.2.2 0 .3-.1.5-.1s.5-.1.7-.1c.2-.1.4-.1.6-.2 3.3-.8 6.5-1.9 9.6-3.2-5.3 7.2-12.3 13-20.5 16.8 3.8-.3 7.6-.9 11.3-2 13.3-3.9 24.5-12.9 31.2-25-1.4 7.6-4.4 14.9-8.9 21.3 3.2-2.1 6.1-4.6 8.8-7.3 7.4-7.7 12.3-17.6 13.9-28.1 1.1 5.2 1.5 10.6 1 15.9 23.9-33.3 2-67.8-7.2-76.9 0-.1-.1-.1-.1-.2v0c0 .4 0 .8-.1 1.2-.1.8-.2 1.5-.3 2.2-.2.7-.4 1.5-.6 2.2-.2.7-.5 1.4-.8 2.1-.3.7-.6 1.4-1 2-.4.6-.8 1.3-1.2 1.9-.4.6-.9 1.2-1.4 1.8-.5.6-1 1.1-1.6 1.7-.3.3-.6.6-1 .8-.3.2-.5.4-.8.7-.6.5-1.2.9-1.9 1.3-.6.4-1.3.8-2 1.1l-2.1.9c-.7.3-1.4.5-2.1.7-.7.2-1.5.4-2.2.5-.8.1-1.5.2-2.2.3-.5 0-1.1.1-1.6.1-.8 0-1.5-.1-2.2-.1-.8-.1-1.5-.2-2.2-.3-.8-.1-1.5-.3-2.2-.6.7-.1 1.5-.1 2.2-.3.8-.1 1.5-.3 2.2-.5.7-.2 1.5-.4 2.1-.7l2.1-.9c.7-.3 1.3-.7 2-1.1.6-.4 1.3-.9 1.9-1.3.6-.5 1.2-1 1.7-1.5.6-.5 1.1-1.1 1.6-1.6.5-.6 1-1.2 1.4-1.8.1-.1.1-.2.2-.3.3-.5.7-1.1 1-1.6.4-.7.7-1.3 1-2 .3-.7.6-1.4.8-2.1l.6-2.1c.1-.8.3-1.5.3-2.2.1-.8.1-1.5.1-2.2 0-.5 0-1.1-.1-1.6-.1-.8-.2-1.5-.3-2.2-.1-.8-.3-1.5-.5-2.2-.2-.7-.5-1.4-.7-2.1-.3-.7-.6-1.4-.9-2-.4-.7-.7-1.3-1.1-2-.4-.6-.9-1.2-1.3-1.8-.5-.6-1-1.1-1.5-1.7-.3-.3-.6-.6-.9-.8-1.5-1.2-3-2.2-4.6-3.2-.2-.1-.4-.2-.7-.3-1.3-1.1-2.3-1.4-3.3-1.8z"/></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 128">
<defs><linearGradient id="behance-gradient" x1="64" y1="2.16" x2="64" y2="125.84" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#005cff"></stop><stop offset="1" stop-color="#0047ad"></stop></linearGradient></defs><g id="original"><rect fill="url(#behance-gradient)" x="2.16" y="2.16" width="123.68" height="123.67" rx="14.59" ry="14.59"></rect><path fill="#fff" d="M52.63,60.28s10.5-.78,10.5-13.09S54.54,28.87,43.66,28.87H7.86v68.8h35.8s21.85.69,21.85-20.31C65.51,77.36,66.47,60.28,52.63,60.28Zm-29-19.18h20s4.87,0,4.87,7.16-2.86,8.2-6.11,8.2H23.64Zm19.1,44.34H23.64V67.06h20s7.25-.1,7.25,9.45C50.91,84.46,45.61,85.36,42.74,85.44Z"></path><path fill="#fff" d="M94.66,46.38c-26.46,0-26.43,26.43-26.43,26.43s-1.82,26.3,26.43,26.3c0,0,23.54,1.34,23.54-18.29H106.1s.4,7.4-11,7.4c0,0-12.11.81-12.11-12h35.65S122.51,46.38,94.66,46.38Zm10.76,20.68H82.82s1.48-10.6,12.11-10.6S105.42,67.06,105.42,67.06Z"></path><rect fill="#fff" x="79.86" y="32.93" width="28.38" height="8.47"></rect></g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#FF7043;" d="M498.944,198.08c-10.816-4.608-57.184,0.512-70.048-11.104c-9.088-8.384-9.664-23.552-13.216-43.776
c-5.952-33.888-8.416-41.568-14.592-54.912C378.592,40.736,324.704,0,275.744,0H162.24C72.96,0,0,72.864,0,161.824v188.672
C0,439.296,72.96,512,162.24,512h186.464c89.28,0,161.76-72.704,162.272-161.504L512,219.84C512,219.84,512,203.68,498.944,198.08z
M164.288,132.256h89.984c17.152,0,31.072,13.856,31.072,30.784c0,16.96-13.92,30.944-31.072,30.944h-89.984
c-17.152,0-31.072-14.016-31.072-30.944C133.216,146.08,147.136,132.256,164.288,132.256z M347.168,378.912h-182.88
c-17.152,0-31.072-14.016-31.072-30.784c0-16.928,13.92-30.784,31.072-30.784h182.88c16.992,0,30.912,13.856,30.912,30.784
C378.08,364.896,364.16,378.912,347.168,378.912z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Bold" enable-background="new 0 0 32 32" height="512" viewBox="0 0 32 32" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#e3f8fa"/><path d="m8.303 19.008 7.313 4.876c.249.153.516.155.768 0l7.313-4.876c.187-.125.303-.348.303-.571v-4.875c0-.223-.116-.447-.303-.571l-7.313-4.875c-.249-.153-.516-.155-.768 0l-7.313 4.875c-.187.124-.303.348-.303.571v4.875c0 .223.116.446.303.571zm7.01 3.019-5.384-3.589 2.402-1.607 2.982 1.991zm1.374 0v-3.205l2.982-1.991 2.402 1.607zm5.938-4.876-1.723-1.151 1.723-1.152zm-5.938-7.178 5.384 3.589-2.402 1.607-2.982-1.991zm-.687 4.401 2.429 1.625-2.429 1.626-2.429-1.625zm-.687-4.401v3.205l-2.982 1.991-2.402-1.607zm-5.938 4.876 1.724 1.151-1.723 1.152v-2.303z" fill="#26c6da"/></svg>

After

Width:  |  Height:  |  Size: 838 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.8 KiB

+1
View File
@@ -0,0 +1 @@
<svg viewBox="0 0 235 234" xmlns="http://www.w3.org/2000/svg" class="rainbow-logo" preserveAspectRatio="xMinYMin meet"><g fill="none" fill-rule="evenodd"><path fill="#88AEDC" d="m234.04 175.67-75.69 58.28h47.18L234.04 212z"/><path d="m234.04 140.06-121.93 93.89h.02l121.91-93.87zM133.25.95.04 103.51v.02L133.27.95z"/><path fill="#F58F8E" fill-rule="nonzero" d="M.04.95v30.16L39.21.95z"/><path fill="#FEE18A" fill-rule="nonzero" d="M39.21.95.04 31.11v35.9L85.84.95z"/><path fill="#F3F095" fill-rule="nonzero" d="M85.84.95.04 67.01v36.5L133.25.95z"/><path fill="#55C1AE" fill-rule="nonzero" d="M133.27.95.04 103.53v35.59L179.49.95z"/><path fill="#F7B3CE" fill-rule="nonzero" d="M234.04.95h-7.37L.04 175.45v35.93l234-180.18z"/><path fill="#88AEDC" fill-rule="nonzero" d="M179.49.95.04 139.12v36.33L226.67.95z"/><path fill="#F58F8E" fill-rule="nonzero" d="M234.04 31.2.04 211.38v22.57h18.03l215.97-166.3z"/><path fill="#FEE18A" fill-rule="nonzero" d="M234.04 67.65 18.07 233.95H64.7l169.34-130.39z"/><path fill="#F3F095" fill-rule="nonzero" d="M234.04 103.56 64.7 233.95h47.41l121.93-93.89z"/><path fill="#55C1AE" fill-rule="nonzero" d="m234.04 140.08-121.91 93.87h46.22l75.69-58.28z"/><path fill="#F7B3CE" fill-rule="nonzero" d="m234.04 212-28.51 21.95h28.51z"/><g fill="#FFF"><path d="M65.2372 77.75c4.5139.95 7.774 2.8 11.1343 6.3 3.0595 3.2 4.9653 6.85 5.7678 10.95.652 3.45.652 40.55 0 44.05-1.7052 9.1-9.4792 16.2-19.109 17.45-2.0062.25-8.7269.5-14.8458.5H37V77h12.4384c8.8272 0 13.3412.2 15.7988.75ZM51.5449 117v25.6l5.166-.2c4.4637-.15 5.4167-.35 7.4228-1.5 3.9121-2.3 3.9623-2.45 3.9623-24.2 0-21.2 0-21.2-3.6613-23.6-1.8056-1.2-2.558-1.35-7.473-1.55l-5.4168-.15V117ZM130.7895 84.25v7.25h-25.579v18h15.548V124h-15.548l.1003 9.1.1505 9.15 12.6892.15 12.639.1V157h-14.7957c-16.4508 0-19.0087-.3-21.6167-2.6-3.6613-3.2-3.4607-1.15-3.6112-36.3-.1003-21.9.0502-32.25.4013-33.65.7021-2.6 3.6613-5.8 6.2693-6.7 1.5548-.55 5.467-.7 17.7047-.75h15.6483v7.25ZM162.4372 105.1c3.7114 14.25 6.821 25.6 6.9213 25.25.1505-.35 3.3102-12.4 7.0718-26.85l6.8712-26.25 7.8242-.15c5.9183-.1 7.8743.05 7.8743.5s-17.3536 66.2-18.3567 69.5c-.7021 2.3-4.4637 7-6.5702 8.25-2.6582 1.5-6.5703 1.75-8.9777.5-2.1567-1.1-5.0155-4.4-6.47-7.5-.9028-1.9-15.6483-56-19.0588-70l-.3511-1.35h7.8241c7.6737 0 7.8743 0 8.2756 1.1.2006.65 3.4105 12.8 7.122 27Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 245 240"><style>.st0{fill:#7289DA;}</style><path class="st0" d="M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zM140.9 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z"/><path class="st0" d="M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3-18.5 12.8 11.9 12.1 11.2 21.5 19V40.6c0-11.4-9.2-20.6-20.5-20.6zm-38.6 130.6s-3.6-4.3-6.6-8.1c13.1-3.7 18.1-11.9 18.1-11.9-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.5-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.7-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.3-1.8-1-2.8-1.7-2.8-1.7s4.8 8 17.5 11.8c-3 3.8-6.7 8.3-6.7 8.3-22.1-.7-30.5-15.2-30.5-15.2 0-32.2 14.4-58.3 14.4-58.3 14.4-10.8 28.1-10.5 28.1-10.5l1 1.2c-18 5.2-26.3 13.1-26.3 13.1s2.2-1.2 5.9-2.9c10.7-4.7 19.2-6 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.6 0 0-7.9-7.5-24.9-12.7l1.4-1.6s13.7-.3 28.1 10.5c0 0 14.4 26.1 14.4 58.3 0 0-8.5 14.5-30.6 15.2z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+48
View File
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<circle style="fill:#EC407A;" cx="256" cy="254.272" r="240"/>
<path style="fill:#C2185B;" d="M256,0C114.848,0,0,114.848,0,256s114.848,256,256,256s256-114.848,256-256S397.152,0,256,0z
M479.904,257.92c-54.208-14.304-109.792-15.968-162.752-5.056c-7.232-18.048-15.04-35.808-23.424-53.344
c47.904-22.4,92.192-52.768,131.04-90.304C459.04,148.544,480,199.808,480,256C480,256.64,479.904,257.248,479.904,257.92z
M402.144,86.624c-36.288,35.04-77.568,63.584-122.304,84.448c-23.904-45.76-51.872-89.472-83.52-130.752
C215.36,35.04,235.296,32,256,32C311.84,32,362.88,52.672,402.144,86.624z M164.704,51.648
c32.48,41.344,60.992,85.376,85.28,131.488c-67.2,25.664-140.16,35.52-213.216,26.976C51.584,139.2,100.096,80.64,164.704,51.648z
M32,256c0-4.8,0.416-9.504,0.736-14.208c18.944,2.24,37.888,3.712,56.768,3.712c60.224,0,119.392-11.776,174.848-33.376
c7.68,16,14.912,32.224,21.6,48.672c-78.656,23.616-148.736,73.984-195.904,145.12C54.112,366.176,32,313.664,32,256z
M113.44,428.64c43.392-68.224,109.568-116.32,184.032-138.08c20.224,55.68,34.784,113.504,43.264,172.672
C314.592,473.984,285.984,480,256,480C201.888,480,152.192,460.704,113.44,428.64z M370.752,448
c-8.8-56.384-22.752-111.584-41.856-164.864c48.352-9.088,98.944-6.944,148.224,6.976C466.784,357.184,426.752,414.4,370.752,448z"
/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+43
View File
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<polygon style="fill:#1E88E5;" points="512,99.136 361.376,0 256,88.672 407.872,183.168 "/>
<polygon style="fill:#1E88E5;" points="150.624,0 0,99.104 104.16,183.168 256,88.672 "/>
<polygon style="fill:#1E88E5;" points="256,277.696 150.624,366.368 0,267.232 104.128,183.168 256,277.696 407.84,183.168
512,267.232 361.376,366.368 "/>
<path style="fill:#1E88E5;" d="M368.992,399.648c-2.656,1.76-5.728,2.624-8.768,2.624c-3.68,0-7.328-1.28-10.304-3.744L256,319.488
l-93.92,79.04c-5.408,4.544-13.184,4.992-19.104,1.12L96,368.736V416l160.32,96L416,416v-47.296L368.992,399.648z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511.992 511.992" style="enable-background:new 0 0 511.992 511.992;" xml:space="preserve">
<path style="fill:#7CB342;" d="M411.809,2.806c-18.304-8.992-111.168,1.28-178.112,65.504
C128.225,173.622,130.753,312.374,130.753,312.374s-3.488,14.272-18.336-6.432c-32.512-41.44-15.488-136.768-13.568-150.048
c2.688-18.72-9.248-19.264-14.208-13.088C-32.863,305.942,73.249,439.51,142.721,481.91c81.344,49.632,241.792,49.6,305.696-91.2
C528.033,215.382,434.753,14.038,411.809,2.806z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 936 B

+37
View File
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#1976D2;" d="M384,176h-96v-64c0-17.664,14.336-32,32-32h32V0h-64l0,0c-53.024,0-96,42.976-96,96v80h-64v80h64v256
h96V256h64L384,176z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 685 B

+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#1976D2;" d="M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64
C512,28.704,483.296,0,448,0z"/>
<path style="fill:#FAFAFA;" d="M432,256h-80v-64c0-17.664,14.336-16,32-16h32V96h-64l0,0c-53.024,0-96,42.976-96,96v64h-64v80h64
v176h96V336h48L432,256z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 846 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="76.533" height="39.026" viewBox="0 0 76.533 39.026" class="ready">
<path d="M2380.7,6597.866a12.252,12.252,0,0,0-.261-1.513l-30.726-.027a12.545,12.545,0,0,1,.908-3.443,12.337,12.337,0,0,1,2.739-4.044,12.151,12.151,0,0,1,4.018-2.581,12.634,12.634,0,0,1,14.3,3.051l4.852-4.748a18.176,18.176,0,0,0-6.131-4.331,20.037,20.037,0,0,0-8.112-1.564,20.25,20.25,0,0,0-7.671,1.459,19.158,19.158,0,0,0-6.261,4.07,19.584,19.584,0,0,0-4.226,6.184,18.7,18.7,0,0,0-1.487,5.947h-.2a18.674,18.674,0,0,0-1.489-5.947,19.544,19.544,0,0,0-4.226-6.184,19.133,19.133,0,0,0-6.261-4.07,21.354,21.354,0,0,0-15.783.1,18.2,18.2,0,0,0-6.131,4.331l4.853,4.748a13.264,13.264,0,0,1,14.3-3.051,12.131,12.131,0,0,1,4.017,2.581,12.323,12.323,0,0,1,2.74,4.044,12.527,12.527,0,0,1,.908,3.443l-30.726.027a12.256,12.256,0,0,0-.261,1.513,15,15,0,0,0-.1,1.773,20.713,20.713,0,0,0,1.1,6.783,15.709,15.709,0,0,0,3.443,5.686,17.309,17.309,0,0,0,6,4.123,20.587,20.587,0,0,0,7.983,1.46,20.226,20.226,0,0,0,7.669-1.46,19.086,19.086,0,0,0,6.261-4.07,19.506,19.506,0,0,0,4.226-6.184,18.163,18.163,0,0,0,1.153-3.629h.871a18.27,18.27,0,0,0,1.151,3.629,19.545,19.545,0,0,0,4.226,6.184,19.111,19.111,0,0,0,6.261,4.07,20.241,20.241,0,0,0,7.671,1.46,20.572,20.572,0,0,0,7.981-1.46,17.282,17.282,0,0,0,6-4.123,15.717,15.717,0,0,0,3.445-5.686,20.726,20.726,0,0,0,1.1-6.783A15.259,15.259,0,0,0,2380.7,6597.866Zm-46.245,5.608a12.1,12.1,0,0,1-2.766,4.043,12.467,12.467,0,0,1-4.043,2.583,14.378,14.378,0,0,1-9.939.052,11.776,11.776,0,0,1-3.522-2.218,8.459,8.459,0,0,1-1.8-2.374,13.476,13.476,0,0,1-1.173-3.208l23.658,0A11.487,11.487,0,0,1,2334.457,6603.475Zm38.236,2.086a8.466,8.466,0,0,1-1.8,2.374,11.771,11.771,0,0,1-3.522,2.218,14.378,14.378,0,0,1-9.939-.052,12.491,12.491,0,0,1-4.044-2.583,12.088,12.088,0,0,1-2.765-4.043,11.427,11.427,0,0,1-.415-1.126h11.92v0h11.739A13.509,13.509,0,0,1,2372.692,6605.561Z" transform="translate(-2304.273 -6578.666)" fill="#2f8d46"></path>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#5C6BC0;" d="M255.968,5.329C114.624,5.329,0,120.401,0,262.353c0,113.536,73.344,209.856,175.104,243.872
c12.8,2.368,17.472-5.568,17.472-12.384c0-6.112-0.224-22.272-0.352-43.712c-71.2,15.52-86.24-34.464-86.24-34.464
c-11.616-29.696-28.416-37.6-28.416-37.6c-23.264-15.936,1.728-15.616,1.728-15.616c25.696,1.824,39.2,26.496,39.2,26.496
c22.848,39.264,59.936,27.936,74.528,21.344c2.304-16.608,8.928-27.936,16.256-34.368c-56.832-6.496-116.608-28.544-116.608-127.008
c0-28.064,9.984-51.008,26.368-68.992c-2.656-6.496-11.424-32.64,2.496-68c0,0,21.504-6.912,70.4,26.336
c20.416-5.696,42.304-8.544,64.096-8.64c21.728,0.128,43.648,2.944,64.096,8.672c48.864-33.248,70.336-26.336,70.336-26.336
c13.952,35.392,5.184,61.504,2.56,68c16.416,17.984,26.304,40.928,26.304,68.992c0,98.72-59.84,120.448-116.864,126.816
c9.184,7.936,17.376,23.616,17.376,47.584c0,34.368-0.32,62.08-0.32,70.496c0,6.88,4.608,14.88,17.6,12.352
C438.72,472.145,512,375.857,512,262.353C512,120.401,397.376,5.329,255.968,5.329z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<polygon style="fill:#FFC107;" points="341.344,352 512,352 341.344,32 170.656,32 "/>
<polygon style="fill:#2196F3;" points="158.464,352 85.344,480 432,480 512,352 "/>
<polygon style="fill:#4CAF50;" points="170.656,32 0,330.656 85.344,480 253.056,186.496 "/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 791 B

+1
View File
@@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>HackerEarth icon</title><path d="M20.983.002H9.508v6.494h.11a3.629 3.629 0 0 1 3.557-1.332l-.023-.004c1.966.144 3.91 1.336 4.02 5.158v7.554a.299.299 0 0 1-.287.287h-2.11a.287.287 0 0 1-.287-.287V10.55c0-1.778-.585-3.114-2.341-3.114h-.038a2.606 2.606 0 0 0-2.6 2.78v-.008 7.665a.287.287 0 0 1-.287.287H7.124a.287.287 0 0 1-.287-.287V.004H3.193L3.126.003c-.823 0-1.493.652-1.523 1.468V22.458c.03.857.73 1.541 1.59 1.546h17.792a1.458 1.458 0 0 0 1.413-1.55v.004V1.474A1.38 1.38 0 0 0 21.021.005l-.038.001h.002zm-2.54 20.983H5.555V19.66h12.888z"/></svg>

After

Width:  |  Height:  |  Size: 629 B

+2
View File
@@ -0,0 +1,2 @@
<svg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 256 256' style='enable-background:new 0 0 256 256;' xml:space='preserve'><style type='text/css'> .st0{fill:#0E141E;} .st1{fill:#FFFFFF;} .st2{fill:#00EA64;}
</style><rect x='0' y='0' class='st0' width='256' height='256'/><g><path class='st1' d='M125.39,85.35h-19.26c-0.65,0-1.18,0.53-1.18,1.18v30.61H84.2V86.54c0-0.65-0.53-1.18-1.18-1.18H63.76 c-0.65,0-1.18,0.53-1.18,1.18v82.85c0,0.65,0.53,1.18,1.18,1.18h19.26c0.65,0,1.18-0.53,1.18-1.18v-30.61h20.75v30.61 c0,0.65,0.53,1.18,1.18,1.18h19.26c0.65,0,1.18-0.53,1.18-1.18V86.54C126.57,85.88,126.04,85.35,125.39,85.35z'/><path class='st2' d='M199.76,170.57h-61.64c-0.65,0-1.18-0.53-1.18-1.18V86.53c0-0.65,0.53-1.18,1.18-1.18h61.64 c0.65,0,1.18,0.53,1.18,1.18v82.85C200.94,170.04,200.41,170.57,199.76,170.57z'/></g></svg>

After

Width:  |  Height:  |  Size: 906 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 24 24"><title>Hashnode icon</title><path d="M3.84 0h16.32A3.84 3.84 0 0 1 24 3.84v16.32A3.84 3.84 0 0 1 20.16 24H3.84A3.84 3.84 0 0 1 0 20.16V3.84A3.84 3.84 0 0 1 3.84 0zm14.175 21.638l-.004-.001a2.577 2.577 0 0 0 .209-5.139l-4.917-8.682c-.719-1.292-2.108-1.236-2.609.598-.43 1.736-.319 3.372-.444 5.348-.001.013-.01.024-.023.027s-.026-.002-.033-.013l-4.39-8.751c.358-.281.568-.711.569-1.167a1.459 1.459 0 1 0-1.459 1.459c.069 0 .125-.014.18-.014 1.848 4.75 3.904 10.293 4.64 11.571.5 1.222 2.209.833 2.251-.486l.18-6.932c0-.042.055-.042.07-.014l3.526 8.389a2.573 2.573 0 0 0 2.254 3.806z"/></svg>

After

Width:  |  Height:  |  Size: 661 B

+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-46.0041" y1="634.1208" x2="-32.9334" y2="647.1917" gradientTransform="matrix(32 0 0 -32 1519 20757)">
<stop offset="0" style="stop-color:#FFC107"/>
<stop offset="0.507" style="stop-color:#F44336"/>
<stop offset="0.99" style="stop-color:#9C27B0"/>
</linearGradient>
<path style="fill:url(#SVGID_1_);" d="M352,0H160C71.648,0,0,71.648,0,160v192c0,88.352,71.648,160,160,160h192
c88.352,0,160-71.648,160-160V160C512,71.648,440.352,0,352,0z M464,352c0,61.76-50.24,112-112,112H160c-61.76,0-112-50.24-112-112
V160C48,98.24,98.24,48,160,48h192c61.76,0,112,50.24,112,112V352z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-42.2971" y1="637.8279" x2="-36.6404" y2="643.4846" gradientTransform="matrix(32 0 0 -32 1519 20757)">
<stop offset="0" style="stop-color:#FFC107"/>
<stop offset="0.507" style="stop-color:#F44336"/>
<stop offset="0.99" style="stop-color:#9C27B0"/>
</linearGradient>
<path style="fill:url(#SVGID_2_);" d="M256,128c-70.688,0-128,57.312-128,128s57.312,128,128,128s128-57.312,128-128
S326.688,128,256,128z M256,336c-44.096,0-80-35.904-80-80c0-44.128,35.904-80,80-80s80,35.872,80,80
C336,300.096,300.096,336,256,336z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-35.5456" y1="644.5793" x2="-34.7919" y2="645.3331" gradientTransform="matrix(32 0 0 -32 1519 20757)">
<stop offset="0" style="stop-color:#FFC107"/>
<stop offset="0.507" style="stop-color:#F44336"/>
<stop offset="0.99" style="stop-color:#9C27B0"/>
</linearGradient>
<circle style="fill:url(#SVGID_3_);" cx="393.6" cy="118.4" r="17.056"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M18.825 23.859c-.022.092-.117.141-.281.141h-3.139c-.187 0-.351-.082-.492-.248l-5.178-6.589l-1.448 1.374v5.111c0 .235-.117.352-.351.352H5.505c-.236 0-.354-.117-.354-.352V.353c0-.233.118-.353.354-.353h2.431c.234 0 .351.12.351.353v14.343l6.203-6.272c.165-.165.33-.246.495-.246h3.239c.144 0 .236.06.285.18c.046.149.034.255-.036.315l-6.555 6.344l6.836 8.507c.095.104.117.208.07.358" fill="#03A9F4"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>

After

Width:  |  Height:  |  Size: 739 B

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="94px" height="111px" viewBox="0 0 94 111" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->
<title>1_black</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="branding_-resource" transform="translate(-2093.000000, -290.000000)">
<g id="1_black" transform="translate(2093.000000, 290.000000)">
<path d="M67.5068339,83.0664138 C70.0005384,80.5763786 74.0371402,80.5828822 76.5228362,83.0809398 C79.0085322,85.5789975 79.00204,89.6226456 76.5083355,92.1126808 L65.4351451,103.169577 C55.2192332,113.370744 38.5604663,113.518673 28.1722578,103.513204 C28.112217,103.455678 23.486583,98.9201326 8.22702585,83.9570195 C-1.92478479,74.0028895 -2.93614945,58.0748736 6.61697549,47.8463644 L24.4286944,28.7745461 C33.9100043,18.6218594 51.3874487,17.5122246 62.2279907,26.2789232 L78.4052912,39.3620235 C81.1448956,41.5776292 81.5728103,45.5984975 79.3610655,48.3428842 C77.1493207,51.0872709 73.1354592,51.5159327 70.3958548,49.300327 L54.2186634,36.2173149 C48.5492813,31.6325105 38.631911,32.2621597 33.7398535,37.5006265 L15.9279056,56.5726899 C11.2772073,61.552182 11.7865613,69.5740156 17.1461283,74.8292186 C28.3515339,85.8169393 36.9874071,94.2846214 36.9973988,94.294225 C42.3981571,99.4959838 51.130862,99.418438 56.43358,94.1233737 L67.5068339,83.0664138 Z" id="path_3" fill="#FFA116" fill-rule="nonzero"></path>
<path d="M40.6069914,72.0014117 C37.086019,72.0014117 34.2317068,69.142117 34.2317068,65.6149982 C34.2317068,62.0878794 37.086019,59.2285847 40.6069914,59.2285847 L87.6247154,59.2285847 C91.1456879,59.2285847 94,62.0878794 94,65.6149982 C94,69.142117 91.1456879,72.0014117 87.6247154,72.0014117 L40.6069914,72.0014117 Z" id="path_2" fill="#B3B3B3"></path>
<path d="M49.4124315,2.02335002 C51.8178981,-0.552320454 55.852269,-0.686893945 58.4234511,1.72277172 C60.9946333,4.13243738 61.1289722,8.17385083 58.7235056,10.7495213 L15.9282277,56.5728697 C11.2773659,61.551984 11.7867168,69.5737689 17.1459309,74.8291832 L36.9094236,94.2091099 C39.4255514,96.6764051 39.4686234,100.719828 37.0056277,103.240348 C34.5426319,105.760868 30.5062548,105.804016 27.990127,103.33672 L8.22654289,83.9567041 C-1.92467414,74.0021005 -2.93603527,58.0741402 6.61751533,47.846311 L49.4124315,2.02335002 Z" id="path_1" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<rect y="160" style="fill:#1976D2;" width="114.496" height="352"/>
<path style="fill:#1976D2;" d="M426.368,164.128c-1.216-0.384-2.368-0.8-3.648-1.152c-1.536-0.352-3.072-0.64-4.64-0.896
c-6.08-1.216-12.736-2.08-20.544-2.08l0,0l0,0c-66.752,0-109.088,48.544-123.04,67.296V160H160v352h114.496V320
c0,0,86.528-120.512,123.04-32c0,79.008,0,224,0,224H512V274.464C512,221.28,475.552,176.96,426.368,164.128z"/>
<circle style="fill:#1976D2;" cx="56" cy="56" r="56"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1010 B

+3
View File
@@ -0,0 +1,3 @@
<svg viewBox="0 0 128 128">
<g id="original"><path fill="#0076b2" d="M116,3H12a8.91,8.91,0,0,0-9,8.8V116.22A8.91,8.91,0,0,0,12,125H116a8.93,8.93,0,0,0,9-8.81V11.77A8.93,8.93,0,0,0,116,3Z"></path><path fill="#fff" d="M21.06,48.73H39.17V107H21.06Zm9.06-29a10.5,10.5,0,1,1-10.5,10.49,10.5,10.5,0,0,1,10.5-10.49"></path><path fill="#fff" d="M50.53,48.73H67.89v8h.24c2.42-4.58,8.32-9.41,17.13-9.41C103.6,47.28,107,59.35,107,75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87,7.36-10.87,15V107H50.53Z"></path></g>
</svg>

After

Width:  |  Height:  |  Size: 516 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Bold" enable-background="new 0 0 32 32" height="512" viewBox="0 0 32 32" width="512"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#ffe6e2"/><path d="m22.723 11.155 1.277-1.221v-.267h-4.423l-3.152 7.845-3.585-7.845h-4.638v.268l1.492 1.795c.145.132.222.327.202.522v7.055c.046.254-.037.515-.215.7l-1.681 2.036v.264h4.763v-.268l-1.68-2.033c-.182-.185-.268-.442-.231-.7v-6.102l4.181 9.106h.486l3.595-9.106v7.254c0 .192 0 .231-.126.356l-1.294 1.251v.268h6.275v-.268l-1.247-1.221c-.109-.082-.166-.221-.143-.356v-8.977c-.021-.135.035-.274.144-.356z" fill="#fc573b"/></svg>

After

Width:  |  Height:  |  Size: 725 B

Some files were not shown because too many files have changed in this diff Show More