Compare commits
176 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 471d5449e2 | |||
| 888aff31e1 | |||
| f4b2f5cf88 | |||
| c83a129e01 | |||
| 3461a5b865 | |||
| c919601f7e | |||
| 5e0cd2e639 | |||
| 9b24ae64c9 | |||
| 71d1fafbd6 | |||
| 8947cb3641 | |||
| 7898e38f8e | |||
| b23cab5944 | |||
| 8899046e5e | |||
| a0e34df02d | |||
| 9ba8ccff66 | |||
| 004401a8d1 | |||
| fb6389f569 | |||
| d33d139590 | |||
| 1bffabd8bb | |||
| 6ff29bcf87 | |||
| 8c84e917c9 | |||
| f04dc760e2 | |||
| 938a8a9d43 | |||
| 2109192d72 | |||
| 793513dc21 | |||
| bf62cec45f | |||
| 646c0804b9 | |||
| b406f4d181 | |||
| ededb4b8a5 | |||
| 63347fc8b5 | |||
| 1c7bcb7d6b | |||
| edbaa47c40 | |||
| e084c9e775 | |||
| 91bdf52f58 | |||
| 0823cd43ce | |||
| 7a93ebeae1 | |||
| 46d3751b91 | |||
| 6a7a6575b7 | |||
| 61b8362a55 | |||
| 68bfa23dff | |||
| f0a9d02f26 | |||
| 20b47a9c3d | |||
| 9432f7d88d | |||
| 15c63a347a | |||
| fc1ecf5ab6 | |||
| 0194c38eb6 | |||
| be0234927d | |||
| 0253d1b5bb | |||
| c7fc859f0c | |||
| f21bbf2af7 | |||
| bbf6cf6018 | |||
| ccdd09db3f | |||
| 9eb2ab1260 | |||
| 36076a1fe9 | |||
| e92300198d | |||
| 25a970c5aa | |||
| 0038d17908 | |||
| 742a7d5d53 | |||
| 45f8ca0c9b | |||
| 131f4b00bf | |||
| f8b2c5d9d4 | |||
| e0c08558d8 | |||
| 70d473ca91 | |||
| 3d2510ac71 | |||
| fe35dcea9a | |||
| 22064237dc | |||
| 704df3681f | |||
| d8139bc7e2 | |||
| 6253936f99 | |||
| a5389b6646 | |||
| 4a1846e7df | |||
| 13829db4cb | |||
| c4becd7949 | |||
| 9e323b9157 | |||
| 29a0db0aad | |||
| e53c7321b6 | |||
| b7b1fd0a42 | |||
| 04ce080957 | |||
| 49552b7c42 | |||
| fb1b92b0a2 | |||
| 83af4c1839 | |||
| d36431ed29 | |||
| 9cb1b35ac2 | |||
| 2c2cdb30a5 | |||
| db23c74d4f | |||
| ebbb1dab5a | |||
| 7603bf41b6 | |||
| bbf0836509 | |||
| 901802b9d2 | |||
| 1e338f58f1 | |||
| 9b21412a1a | |||
| c8b8036477 | |||
| 5723c38dc9 | |||
| ec78c6ba05 | |||
| d9469f4eda | |||
| c7c7e1c357 | |||
| 4ffebfb792 | |||
| 779ba7827e | |||
| 5d542208ca | |||
| 96037f3ff5 | |||
| f11ef643bc | |||
| b3e4a1a0a9 | |||
| fbbb95f61f | |||
| 1d672fe879 | |||
| ac15f4ae45 | |||
| 55951c9ef5 | |||
| e29ddc1637 | |||
| a18dc59933 | |||
| 1c259a84ac | |||
| a93d958944 | |||
| 07b18b4c8a | |||
| 050d0b3a04 | |||
| 12315be78b | |||
| 63a94a3737 | |||
| 8480ef160d | |||
| 30675c7c6d | |||
| 3d296812e8 | |||
| d82a367616 | |||
| b243675abd | |||
| 1ca5906aa9 | |||
| d13c451cc0 | |||
| 12279914f1 | |||
| 25a1bf4110 | |||
| 444c84407c | |||
| 318b577765 | |||
| b98fecf05a | |||
| 40ccef24fd | |||
| a7ee36dad0 | |||
| a1bbb7f887 | |||
| a7680fb353 | |||
| d7bf06c7be | |||
| 2652aea305 | |||
| 0df590a045 | |||
| d259921b2e | |||
| f3ca29df8b | |||
| 705ca572f5 | |||
| 5803097e9d | |||
| 7a612901e3 | |||
| d81fa46e75 | |||
| eafa964cb9 | |||
| bca0f7a18c | |||
| 3c1e4fee34 | |||
| e5791fc0ec | |||
| e32acb6db3 | |||
| a933180d34 | |||
| 723cf48bb5 | |||
| 4ac9861096 | |||
| 8a1f60f4a4 | |||
| 7091c94801 | |||
| ddb17bc0de | |||
| c5f50a1a3c | |||
| 94b00fb72e | |||
| d220e82ed1 | |||
| 865321f39d | |||
| b0ad615680 | |||
| d333ce375a | |||
| 66561ce2a1 | |||
| 18709444c4 | |||
| c8aec7006c | |||
| 2d5ce3bf77 | |||
| 649ae8f797 | |||
| 6759486a5d | |||
| 784710be47 | |||
| a4ea5ac9e9 | |||
| 1c45d54dff | |||
| e81e39e799 | |||
| 42ada6734b | |||
| 5492605e18 | |||
| ded717ab76 | |||
| ba7af8cf3f | |||
| 4831ee47fe | |||
| 1f5b37ce0d | |||
| ca8da23ddc | |||
| dc0f39105a | |||
| bf7cd6999f | |||
| 9ac50e9ea7 |
@@ -0,0 +1 @@
|
||||
node_modules/**
|
||||
@@ -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"]
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ""
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ""
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
@@ -40,4 +40,9 @@ If applicable, add screenshots to help explain your problem.
|
||||
Add any other context about the problem here.
|
||||
|
||||
Join the **Discord Server** for further discussions.
|
||||
|
||||
<a href="https://discord.gg/HHMs7Eg">
|
||||
<img src="https://discord.com/assets/e4923594e694a21542a489471ecffa50.svg" alt="GPRG Discord Server Link" width="300px"/>
|
||||
</a>
|
||||
|
||||
Server Link: https://discord.gg/HHMs7Eg
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: Feature/Enhancement request
|
||||
about: Suggest an idea for this project
|
||||
title: ""
|
||||
labels: enhancement
|
||||
assignees: ""
|
||||
title: ''
|
||||
labels: enhancement, hacktoberfest
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
@@ -20,4 +20,8 @@ Add any other context or screenshots about the feature request here.
|
||||
|
||||
Join the **Discord Server** for further discussions.
|
||||
|
||||
<a href="https://discord.gg/HHMs7Eg">
|
||||
<img src="https://discord.com/assets/e4923594e694a21542a489471ecffa50.svg" alt="GPRG Discord Server Link" width="300px"/>
|
||||
</a>
|
||||
|
||||
Server Link: https://discord.gg/HHMs7Eg
|
||||
|
||||
@@ -40,4 +40,3 @@ as any relevant images for UI changes._
|
||||
## Added to documentation?
|
||||
|
||||
- [ ] readme
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"semi": false
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"printWidth": 120,
|
||||
"trailingComma": "all",
|
||||
"semi": true,
|
||||
"exclude": ["node_modules", "codepipeline"]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "14"
|
||||
cache:
|
||||
directories:
|
||||
- "node_modules"
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# Coding Style
|
||||
|
||||
## File Layout (`src/components/*.js`)
|
||||
|
||||
1. Imports
|
||||
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 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;
|
||||
```
|
||||
|
||||
|
||||
//Same for destructuring props:
|
||||
//good
|
||||
const BeautifulComponent = ({ prop1, prop2 }) => {}
|
||||
|
||||
//bad
|
||||
const UglyComponent = ({prop1, prop2}) => {}
|
||||
```
|
||||
|
||||
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} />
|
||||
|
||||
//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}
|
||||
/>
|
||||
|
||||
//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.
|
||||
|
||||
### 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`.
|
||||
- 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.
|
||||
@@ -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>
|
||||
@@ -76,6 +76,8 @@ Just fill in the details such as `Name`, `Tagline`, `Dev Platforms Username`, `C
|
||||
|
||||
- **GitHub Top Skills**
|
||||
|
||||
- **GitHub Streak Stats**
|
||||
|
||||
- **Dynamic Dev(.)to Blogs** (GitHub Action)
|
||||
|
||||
- **Dynamic Medium Blogs** (GitHub Action)
|
||||
@@ -84,6 +86,8 @@ Just fill in the details such as `Name`, `Tagline`, `Dev Platforms Username`, `C
|
||||
|
||||
- **Wakatime Stats** [contribute](https://github.com/rahuldkjain/github-profile-readme-generator/issues/115)
|
||||
|
||||
- **Buy Me A Coffee button**
|
||||
|
||||
Click on `Generate README` to get your README in `markdown`.
|
||||
You can preview the README too.
|
||||
|
||||
@@ -122,22 +126,26 @@ 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)
|
||||
- [Anton Komarev](https://github.com/antonkomarev) for super cool [github-profile-views-counter](https://github.com/antonkomarev/github-profile-views-counter)
|
||||
- [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
|
||||
|
||||
- [Scott C Wilson](https://github.com/scottcwilson) donated the first-ever grant to this tool. A big thanks to him.
|
||||
- [Max Schmitt](https://github.com/mxschmitt) loved the tool and showed support with his donation. Thanks a lot.
|
||||
- [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
|
||||
|
||||
@@ -155,33 +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>
|
||||
|
||||
## Contributors ✨
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/sarbikbetal"><img src="https://avatars2.githubusercontent.com/u/41508422?v=4" width="100px;" alt=""/><br /><sub><b>Sarbik Betal</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=sarbikbetal" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/Hardik0307"><img src="https://avatars3.githubusercontent.com/u/41434099?v=4" width="100px;" alt=""/><br /><sub><b>Hardik Bagada</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=Hardik0307" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://komarev.com"><img src="https://avatars0.githubusercontent.com/u/1849174?v=4" width="100px;" alt=""/><br /><sub><b>Anton Komarev</b></sub></a><br /><a href="#plugin-antonkomarev" title="Plugin/utility libraries">🔌</a></td>
|
||||
<td align="center"><a href="https://kkvanonymous.github.io/"><img src="https://avatars3.githubusercontent.com/u/58628586?v=4" width="100px;" alt=""/><br /><sub><b>Kunal Kumar Verma</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=KKVANONYMOUS" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://jaideepghosh.blogspot.com"><img src="https://avatars2.githubusercontent.com/u/3909648?v=4" width="100px;" alt=""/><br /><sub><b>Jaideep Ghosh</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=jaideepghosh" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://yashkandalkar.github.io"><img src="https://avatars0.githubusercontent.com/u/35102959?v=4" width="100px;" alt=""/><br /><sub><b>yash</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=YashKandalkar" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/abhijit-hota"><img src="https://avatars0.githubusercontent.com/u/8116174?v=4" width="100px;" alt=""/><br /><sub><b>Abhijit Hota</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=abhijit-hota" title="Code">💻</a> <a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=abhijit-hota" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://maddoxx88.github.io/"><img src="https://avatars1.githubusercontent.com/u/34238672?v=4" width="100px;" alt=""/><br /><sub><b>Sunit Shirke</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=Maddoxx88" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://www.gsavitha.in"><img src="https://avatars0.githubusercontent.com/u/31612459?v=4" width="100px;" alt=""/><br /><sub><b>Savitha Gollamudi</b></sub></a><br /><a href="https://github.com/rahuldkjain/github-profile-readme-generator/commits?author=g-savitha" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
<hr>
|
||||
<p align="center">
|
||||
Developed with ❤️ in India 🇮🇳
|
||||
|
||||
@@ -1 +1 @@
|
||||
module.exports = "test-file-stub"
|
||||
module.exports = 'test-file-stub';
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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`,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
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__: ``,
|
||||
},
|
||||
setupFiles: [`<rootDir>/loadershim.js`],
|
||||
}
|
||||
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
|
||||
snapshotSerializers: ['enzyme-to-json/serializer'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 0,
|
||||
functions: 75,
|
||||
lines: 68,
|
||||
statements: 68,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
global.___loader = {
|
||||
enqueue: jest.fn(),
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
{
|
||||
"name": "gh-profile-reamde-generator",
|
||||
"name": "github-profile-readme-generator",
|
||||
"private": true,
|
||||
"description": "A simple react app to generate beautiful github profile readme in md(markdown)",
|
||||
"version": "0.1.0",
|
||||
"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",
|
||||
"gatsby": "^2.23.12",
|
||||
"gatsby-image": "^2.4.9",
|
||||
"gatsby-plugin-google-analytics": "^2.3.11",
|
||||
@@ -18,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",
|
||||
@@ -27,15 +47,24 @@
|
||||
"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",
|
||||
"react-test-renderer": "16.13.1",
|
||||
"tailwindcss": "^1.7.6"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -49,14 +78,14 @@
|
||||
"start": "npm run develop",
|
||||
"serve": "gatsby serve",
|
||||
"clean": "gatsby clean",
|
||||
"test": "jest",
|
||||
"test": "jest -i -u --coverage",
|
||||
"deploy": "gatsby build --prefix-paths && gh-pages -d public -b master"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rahuldkjain/gh-profile-readme-generator"
|
||||
"url": "https://github.com/rahuldkjain/github-profile-readme-generator"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/rahuldkjain/gh-profile-readme-generator/issues"
|
||||
"url": "https://github.com/rahuldkjain/github-profile-readme-generator/issues"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { configure } from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
@@ -0,0 +1,101 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Donate renders correctly 1`] = `
|
||||
<Fragment>
|
||||
<div
|
||||
className="text-center text-4xl my-2"
|
||||
>
|
||||
Support
|
||||
<span
|
||||
aria-label="praying hand emoji"
|
||||
role="img"
|
||||
>
|
||||
🙏
|
||||
</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
|
||||
alt="tweet github profile readme generator"
|
||||
className="w-20"
|
||||
src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-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
|
||||
aria-label="Dollar medal"
|
||||
role="img"
|
||||
>
|
||||
💰
|
||||
</span>
|
||||
</span>
|
||||
<a
|
||||
className="flex items-center justify-evenly bg-red-500 text-white py-2 px-4 my-2"
|
||||
href="https://ko-fi.com/A0A81XXSX"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Buy ko-fi for rahuldkjain"
|
||||
className="w-6 h-6 mr-2"
|
||||
src="https://www.vectorlogo.zone/logos/ko-fi/ko-fi-icon.svg"
|
||||
/>
|
||||
Buy me a ko-fi
|
||||
</a>
|
||||
<a
|
||||
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-32 h-4"
|
||||
src="https://cdn.worldvectorlogo.com/logos/paypal-2.svg"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center justify-evenly bg-orange-500 text-white py-2 px-4 my-2"
|
||||
href="https://www.buymeacoffee.com/rahuldkjain"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Buy rahuldkjain A Coffee"
|
||||
className="w-6 h-6 mr-2"
|
||||
src="https://www.vectorlogo.zone/logos/buymeacoffee/buymeacoffee-icon.svg"
|
||||
/>
|
||||
Buy me a coffee
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
`;
|
||||
@@ -0,0 +1,189 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Footer component renders correctly 1`] = `
|
||||
<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
|
||||
alt="github profile markdown generator logo"
|
||||
className="hidden sm:block h-24"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
<div
|
||||
className="mr-2 sm:mr-0"
|
||||
>
|
||||
GitHub Profile
|
||||
<img
|
||||
alt="github profile markdown generator logo"
|
||||
className="inline sm:hidden h-12"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
<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"
|
||||
>
|
||||
<mockConstructor
|
||||
activeStyle={
|
||||
Object {
|
||||
"color": "#002ead",
|
||||
}
|
||||
}
|
||||
to="/addons"
|
||||
>
|
||||
Addons
|
||||
</mockConstructor>
|
||||
</div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<mockConstructor
|
||||
activeStyle={
|
||||
Object {
|
||||
"color": "#002ead",
|
||||
}
|
||||
}
|
||||
to="/support"
|
||||
>
|
||||
Support
|
||||
</mockConstructor>
|
||||
</div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<mockConstructor
|
||||
activeStyle={
|
||||
Object {
|
||||
"color": "#002ead",
|
||||
}
|
||||
}
|
||||
to="/about"
|
||||
>
|
||||
About
|
||||
</mockConstructor>
|
||||
</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
|
||||
aria-label="Github rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator"
|
||||
target="blank"
|
||||
>
|
||||
Github
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Releases on Github rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/releases"
|
||||
target="blank"
|
||||
>
|
||||
Releases
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/issues"
|
||||
target="blank"
|
||||
>
|
||||
Issues
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/pulls"
|
||||
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
|
||||
aria-label="Discord of the community"
|
||||
href="https://discord.gg/HHMs7Eg"
|
||||
target="blank"
|
||||
>
|
||||
<img
|
||||
alt="Discord of the community"
|
||||
className="h-12"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="py-2 mt-2"
|
||||
>
|
||||
Developed in India
|
||||
|
||||
<span
|
||||
aria-label="india"
|
||||
role="img"
|
||||
>
|
||||
|
||||
🇮🇳
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,73 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Header renders correctly 1`] = `
|
||||
<div
|
||||
className="shadow flex items-center justify-center flex-col mb-2 py-2"
|
||||
>
|
||||
<mockConstructor
|
||||
to="/"
|
||||
>
|
||||
<h1
|
||||
className="text-base font-bold font-title sm:text-2xl font-medium text-blue-800 flex justify-center items-center flex-col"
|
||||
>
|
||||
<img
|
||||
alt="github profile markdown generator logo"
|
||||
className="w-12 h-12"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
<div>
|
||||
heading
|
||||
</div>
|
||||
</h1>
|
||||
</mockConstructor>
|
||||
<div
|
||||
className="flex justify-center items-center"
|
||||
>
|
||||
<a
|
||||
aria-label="Star rahuldkjain/github-profile-readme-generator on GitHub"
|
||||
className="mr-2"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator"
|
||||
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"
|
||||
>
|
||||
<StarIcon
|
||||
className="px-1 w-6 star"
|
||||
id="star-icon"
|
||||
size={16}
|
||||
verticalAlign="text-bottom"
|
||||
/>
|
||||
Star this repo
|
||||
<span
|
||||
className="github-count px-1 sm:px-2"
|
||||
>
|
||||
0
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<a
|
||||
aria-label="Fork rahuldkjain/github-profile-readme-generator on GitHub"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/fork"
|
||||
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
|
||||
className="px-1 w-6 fork"
|
||||
id="fork-icon"
|
||||
size={16}
|
||||
verticalAlign="text-bottom"
|
||||
/>
|
||||
Fork on GitHub
|
||||
<span
|
||||
className="github-count px-1 sm:px-2"
|
||||
>
|
||||
0
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,23 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Loader renders correctly 1`] = `
|
||||
<div
|
||||
className="loader"
|
||||
>
|
||||
<span>
|
||||
↓
|
||||
</span>
|
||||
<span>
|
||||
↓
|
||||
</span>
|
||||
<span>
|
||||
↓
|
||||
</span>
|
||||
<span>
|
||||
↓
|
||||
</span>
|
||||
<span>
|
||||
↓
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,601 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DisplaySocial Preview renders correctly 1`] = `
|
||||
<a
|
||||
className="no-underline text-blue-700 m-2"
|
||||
href="https://codepen.io/dummy"
|
||||
target="blank"
|
||||
>
|
||||
<img
|
||||
alt="username"
|
||||
className="w-6 h-6"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
|
||||
/>
|
||||
</a>
|
||||
`;
|
||||
|
||||
exports[`DisplaySocial Preview renders correctly with no username 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<a
|
||||
className="no-underline text-blue-700"
|
||||
href="https://dummy.com"
|
||||
target="blank"
|
||||
>
|
||||
readme-generator
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no link 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<b>
|
||||
readme-generator
|
||||
</b>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix and link 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix, link and project 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<a
|
||||
className="no-underline text-blue-700"
|
||||
href="https://dummy.com"
|
||||
target="blank"
|
||||
>
|
||||
https://dummy.com
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project and link 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project and prefix 1`] = `""`;
|
||||
|
||||
exports[`GitHubStats Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`GitHubStats Preview renders correctly 2`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-readme-stats.vercel.app/api?username=&show_icons=true&locale=en"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`GithubProfileTrophy Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`GithubProfileTrophy Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<a
|
||||
href="https://github.com/ryo-ma/github-profile-trophy"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-profile-trophy.vercel.app/?username="
|
||||
/>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown Preview renders correctly 1`] = `
|
||||
<div
|
||||
id="markdown-preview"
|
||||
>
|
||||
<TitlePreview
|
||||
prefix="Hi 👋, I'm"
|
||||
title="dummy"
|
||||
/>
|
||||
<SubTitlePreview
|
||||
subtitle="A passionate frontend developer from India"
|
||||
/>
|
||||
<VisitorsBadgePreview
|
||||
badgeOptions={
|
||||
Object {
|
||||
"badgeColor": "0e75b6",
|
||||
"badgeLabel": "Profile%20views",
|
||||
"badgeStyle": "flat",
|
||||
}
|
||||
}
|
||||
github=""
|
||||
show={false}
|
||||
/>
|
||||
<GithubProfileTrophyPreview
|
||||
github=""
|
||||
show={false}
|
||||
/>
|
||||
<TwitterBadgePreview
|
||||
show={false}
|
||||
twitter=""
|
||||
/>
|
||||
<WorkPreview
|
||||
work={
|
||||
Object {
|
||||
"data": Object {
|
||||
"ama": "",
|
||||
"badgeColor": "0e75b6",
|
||||
"badgeLabel": "Profile views",
|
||||
"badgeStyle": "flat",
|
||||
"collaborateOn": "",
|
||||
"contact": "",
|
||||
"currentLearn": "",
|
||||
"currentWork": "readme-generator",
|
||||
"devDynamicBlogs": false,
|
||||
"funFact": "",
|
||||
"githubProfileTrophy": false,
|
||||
"githubStats": false,
|
||||
"githubStatsOptions": Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
},
|
||||
"helpWith": "",
|
||||
"mediumDynamicBlogs": false,
|
||||
"rssDynamicBlogs": false,
|
||||
"subtitle": "A passionate frontend developer from India",
|
||||
"title": "dummy",
|
||||
"topLanguages": false,
|
||||
"topLanguagesOptions": Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
},
|
||||
"twitterBadge": false,
|
||||
"visitorsBadge": false,
|
||||
},
|
||||
"link": Object {
|
||||
"blog": "",
|
||||
"collaborateOn": "",
|
||||
"currentWork": "https://dummy.com",
|
||||
"helpWith": "",
|
||||
"portfolio": "",
|
||||
"resume": "",
|
||||
},
|
||||
"prefix": Object {
|
||||
"ama": "💬 Ask me about",
|
||||
"blog": "📝 I regularly write articles on",
|
||||
"collaborateOn": "👯 I’m looking to collaborate on",
|
||||
"contact": "📫 How to reach me",
|
||||
"currentLearn": "🌱 I’m currently learning",
|
||||
"currentWork": "🔭 I’m currently working on",
|
||||
"funFact": "⚡ Fun fact",
|
||||
"helpWith": "🤝 I’m looking for help with",
|
||||
"portfolio": "👨💻 All of my projects are available at",
|
||||
"resume": "📄 Know about my experiences",
|
||||
"title": "Hi 👋, I'm",
|
||||
},
|
||||
"skills": Object {},
|
||||
"social": Object {
|
||||
"behance": "",
|
||||
"codechef": "",
|
||||
"codeforces": "",
|
||||
"codepen": "dummy",
|
||||
"codesandbox": "",
|
||||
"dev": "",
|
||||
"discord": "",
|
||||
"dribbble": "",
|
||||
"fb": "",
|
||||
"geeks_for_geeks": "",
|
||||
"github": "",
|
||||
"hackerearth": "",
|
||||
"hackerrank": "",
|
||||
"instagram": "",
|
||||
"kaggle": "",
|
||||
"leetcode": "",
|
||||
"linkedin": "",
|
||||
"medium": "",
|
||||
"rssurl": "",
|
||||
"stackoverflow": "",
|
||||
"topcoder": "",
|
||||
"twitter": "",
|
||||
"youtube": "",
|
||||
},
|
||||
"support": Object {
|
||||
"buyMeACoffee": "",
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
<SocialPreview
|
||||
social={
|
||||
Object {
|
||||
"behance": "",
|
||||
"codechef": "",
|
||||
"codeforces": "",
|
||||
"codepen": "dummy",
|
||||
"codesandbox": "",
|
||||
"dev": "",
|
||||
"discord": "",
|
||||
"dribbble": "",
|
||||
"fb": "",
|
||||
"geeks_for_geeks": "",
|
||||
"github": "",
|
||||
"hackerearth": "",
|
||||
"hackerrank": "",
|
||||
"instagram": "",
|
||||
"kaggle": "",
|
||||
"leetcode": "",
|
||||
"linkedin": "",
|
||||
"medium": "",
|
||||
"rssurl": "",
|
||||
"stackoverflow": "",
|
||||
"topcoder": "",
|
||||
"twitter": "",
|
||||
"youtube": "",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<SkillsPreview
|
||||
skills={Object {}}
|
||||
/>
|
||||
<SupportPreview
|
||||
support={
|
||||
Object {
|
||||
"buyMeACoffee": "",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<div
|
||||
className="block sm:flex sm:justify-center sm:items-start"
|
||||
>
|
||||
<TopLanguagesPreview
|
||||
github=""
|
||||
options={
|
||||
Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
}
|
||||
}
|
||||
show={false}
|
||||
/>
|
||||
<GitHubStatsPreview
|
||||
github=""
|
||||
options={
|
||||
Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
}
|
||||
}
|
||||
show={false}
|
||||
/>
|
||||
<StreakStatsPreview
|
||||
github=""
|
||||
options={Object {}}
|
||||
show={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly 1`] = `
|
||||
<h3
|
||||
className="w-full text-lg sm:text-xl"
|
||||
>
|
||||
dummy
|
||||
</h3>
|
||||
`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly with no label 1`] = `""`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly with visible false 1`] = `""`;
|
||||
|
||||
exports[`Skills Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="flex flex-wrap justify-start items-center"
|
||||
>
|
||||
<SectionTitle
|
||||
label="Languages and Tools:"
|
||||
visible={true}
|
||||
/>
|
||||
<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"
|
||||
src="https://www.vectorlogo.zone/logos/unity3d/unity3d-icon.svg"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Skills Preview renders correctly with no skills 1`] = `""`;
|
||||
|
||||
exports[`Social Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="flex justify-start items-end flex-wrap"
|
||||
>
|
||||
<SectionTitle
|
||||
label="Connect with me:"
|
||||
visible={true}
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://codepen.io"
|
||||
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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/devto.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://twitter.com"
|
||||
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://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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/stack-overflow.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://codesandbox.com"
|
||||
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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/kaggle.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://fb.com"
|
||||
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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/instagram.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://dribbble.com"
|
||||
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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/behance.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://medium.com"
|
||||
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://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.1.0/icons/codechef.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.hackerrank.com"
|
||||
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/hackerrank.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
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://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://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/discord.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base=""
|
||||
icon="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/rss.svg"
|
||||
username=""
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`SubTitle Preview renders correctly 1`] = `
|
||||
<h3
|
||||
className="text-center font-medium"
|
||||
>
|
||||
A passionate frontend developer from India
|
||||
</h3>
|
||||
`;
|
||||
|
||||
exports[`SubTitle Preview renders correctly with no subtitle 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly 1`] = `
|
||||
<h1
|
||||
className="text-center text-xl font-bold"
|
||||
>
|
||||
Hi 👋, I'm dummy
|
||||
</h1>
|
||||
`;
|
||||
|
||||
exports[`Title Preview renders correctly with no prefix 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly with no title 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly with no title and prefix 1`] = `""`;
|
||||
|
||||
exports[`TopLanguages Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`TopLanguages Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-readme-stats.vercel.app/api/top-langs?username=&show_icons=true&locale=en&layout=compact"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`TwitterBadgePreview Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<a
|
||||
href="https://twitter.com/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
className="h-4 sm:h-6"
|
||||
src="https://img.shields.io/twitter/follow/?logo=twitter&style=for-the-badge"
|
||||
/>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`VisitorsBadge Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`VisitorsBadge Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<img
|
||||
alt=""
|
||||
className="h-4 sm:h-6"
|
||||
src="https://komarev.com/ghpvc/?username=&label=Profile%20views&color=0e75b6&style=flat"
|
||||
/>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Work Preview renders correctly 1`] = `
|
||||
<Fragment>
|
||||
<DisplayWork
|
||||
link="https://dummy.com"
|
||||
prefix="🔭 I’m currently working on"
|
||||
project="readme-generator"
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="🌱 I’m currently learning"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="🤝 I’m looking for help with"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="👯 I’m looking to collaborate on"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="💬 Ask me about"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="👨💻 All of my projects are available at"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
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=""
|
||||
/>
|
||||
</Fragment>
|
||||
`;
|
||||
@@ -0,0 +1,156 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Skills renders correctly 1`] = `
|
||||
<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
|
||||
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"
|
||||
onChange={[Function]}
|
||||
placeholder="Search Skills"
|
||||
type="text"
|
||||
/>
|
||||
<span
|
||||
className="absolute"
|
||||
style={
|
||||
Object {
|
||||
"right": "10px",
|
||||
}
|
||||
}
|
||||
>
|
||||
<SearchIcon
|
||||
className="mb-1 transform scale-100 md:scale-125"
|
||||
size={16}
|
||||
verticalAlign="text-bottom"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="divide-y divide-gray-500"
|
||||
key="language"
|
||||
>
|
||||
<div
|
||||
className="text-sm sm:text-xl text-gray-900 text-left py-1"
|
||||
>
|
||||
Programming Languages
|
||||
</div>
|
||||
<div
|
||||
className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10"
|
||||
>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="javascript"
|
||||
>
|
||||
<label
|
||||
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"
|
||||
src="javascript.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
javascript
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="divide-y divide-gray-500"
|
||||
key="frontend_dev"
|
||||
>
|
||||
<div
|
||||
className="text-sm sm:text-xl text-gray-900 text-left py-1"
|
||||
>
|
||||
Frontend Development
|
||||
</div>
|
||||
<div
|
||||
className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10"
|
||||
>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="react"
|
||||
>
|
||||
<label
|
||||
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"
|
||||
src="react.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
react
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="svelte"
|
||||
>
|
||||
<label
|
||||
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"
|
||||
src="svelte.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
svelte
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
className="flex justify-center text-gray-900"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,383 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Social renders correctly 1`] = `
|
||||
<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="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
|
||||
alt="github"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="github"
|
||||
onChange={[Function]}
|
||||
placeholder="github username"
|
||||
value="github "
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="twitter"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/twitter.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="twitter"
|
||||
onChange={[Function]}
|
||||
placeholder="twitter username"
|
||||
value="twitter"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="dev.to"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="dev"
|
||||
onChange={[Function]}
|
||||
placeholder="dev.to username"
|
||||
value="dev"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codepen"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="codepen"
|
||||
onChange={[Function]}
|
||||
placeholder="codepen username"
|
||||
value="codepen"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codesandbox"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="codesandbox"
|
||||
onChange={[Function]}
|
||||
placeholder="codesandbox username"
|
||||
value="codesandbodx"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="stackoverflow"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="stackoverflow"
|
||||
onChange={[Function]}
|
||||
placeholder="stackoverflow user ID"
|
||||
value="stackoverflow"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="linkedin"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="linkedin"
|
||||
onChange={[Function]}
|
||||
placeholder="linkedin username"
|
||||
value="linkedin"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="kaggle"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="kaggle"
|
||||
onChange={[Function]}
|
||||
placeholder="kaggle username"
|
||||
value="kaggle"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="facebook"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="fb"
|
||||
onChange={[Function]}
|
||||
placeholder="facebook username"
|
||||
value="fb"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="instagram"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="instagram"
|
||||
onChange={[Function]}
|
||||
placeholder="instagram username"
|
||||
value="instagram"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="dribbble"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/dribbble.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="dribbble"
|
||||
onChange={[Function]}
|
||||
placeholder="dribbble username"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="behance"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/behance.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="behance"
|
||||
onChange={[Function]}
|
||||
placeholder="behance username"
|
||||
value="behance"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="medium"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/medium.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="medium"
|
||||
onChange={[Function]}
|
||||
placeholder="medium username (with @)"
|
||||
value="medium"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="youtube"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/youtube.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="youtube"
|
||||
onChange={[Function]}
|
||||
placeholder="youtube channel name"
|
||||
value="youtube"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codechef"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="codechef"
|
||||
onChange={[Function]}
|
||||
placeholder="codechef username"
|
||||
value="codechef"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="hackerrank"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/hackerrank.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="hackerrank"
|
||||
onChange={[Function]}
|
||||
placeholder="hackerrank username"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codeforces"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codeforces.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="codeforces"
|
||||
onChange={[Function]}
|
||||
placeholder="codeforces username"
|
||||
value="codeforces"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="leetcode"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/leetcode.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="leetcode"
|
||||
onChange={[Function]}
|
||||
placeholder="leetcode username"
|
||||
value="leetcode"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="topcoder"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/topcoder.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="topcoder"
|
||||
onChange={[Function]}
|
||||
placeholder="topcoder username"
|
||||
value="topcoder"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="hackerearth"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/hackerearth.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="hackerearth"
|
||||
onChange={[Function]}
|
||||
placeholder="hackerearth user (with @)"
|
||||
value="@hackerearth"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="geeksforgeeks"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/geeksforgeeks.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="geeksforgeeks"
|
||||
onChange={[Function]}
|
||||
placeholder="GFG (<username>/profile)"
|
||||
value="geeks_for_geeks"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="discord"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/discord.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="discord"
|
||||
onChange={[Function]}
|
||||
placeholder="discord invite (only code)"
|
||||
value="discord"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="rssfeed"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/rss.svg"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="rssurl"
|
||||
onChange={[Function]}
|
||||
placeholder="RSS feed URL"
|
||||
value="rssurl"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,19 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Subtitle renders correctly 1`] = `
|
||||
<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
|
||||
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"
|
||||
id="subtitle"
|
||||
onChange={[Function]}
|
||||
value="A frontend developer"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Title renders correctly 1`] = `
|
||||
exports[`Title renders title component correctly 1`] = `
|
||||
<div
|
||||
className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10"
|
||||
>
|
||||
@@ -16,14 +16,14 @@ exports[`Title renders correctly 1`] = `
|
||||
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"
|
||||
id="title-prefix"
|
||||
onChange={[Function]}
|
||||
value="Hi 👋, I'm"
|
||||
value="test_title"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="title-name"
|
||||
onChange={[Function]}
|
||||
placeholder="name"
|
||||
value=""
|
||||
value="test_data"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Work renders work component correctly 1`] = `
|
||||
<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-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
|
||||
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"
|
||||
id="currentWork-prefix"
|
||||
onChange={[Function]}
|
||||
placeholder="Hi, I'm "
|
||||
value="test_currentwork"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="currentWork"
|
||||
onChange={[Function]}
|
||||
placeholder="project name"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="currentWork-link"
|
||||
onChange={[Function]}
|
||||
placeholder="project link"
|
||||
value="test_currentwork"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="collaborateOn-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="collaborateOn"
|
||||
onChange={[Function]}
|
||||
placeholder="project name"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="collaborateOn-link"
|
||||
onChange={[Function]}
|
||||
placeholder="project link"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="helpWith-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="helpWith"
|
||||
onChange={[Function]}
|
||||
placeholder="project name"
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="helpWith-link"
|
||||
onChange={[Function]}
|
||||
placeholder="project link"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="currentLearn-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="currentLearn"
|
||||
onChange={[Function]}
|
||||
placeholder="Frameworks, courses etc."
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="ama-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="ama"
|
||||
onChange={[Function]}
|
||||
placeholder="react, vue and gsap"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="contact-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="contact"
|
||||
onChange={[Function]}
|
||||
placeholder="example@gmail.com"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="portfolio-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="portfolio"
|
||||
onChange={[Function]}
|
||||
placeholder="portfolio link"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="blog-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="blog"
|
||||
onChange={[Function]}
|
||||
placeholder="blog link"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="resume-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="resume"
|
||||
onChange={[Function]}
|
||||
placeholder="resume link"
|
||||
/>
|
||||
</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
|
||||
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"
|
||||
id="funFact-prefix"
|
||||
onChange={[Function]}
|
||||
/>
|
||||
<input
|
||||
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"
|
||||
id="funFact"
|
||||
onChange={[Function]}
|
||||
placeholder="I think I am funny"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,806 @@
|
||||
import React from 'react';
|
||||
import toJson from 'enzyme-to-json';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
|
||||
import Addons from '../addons';
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
describe('Addons', () => {
|
||||
const dataInput = {
|
||||
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',
|
||||
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 socialInput = {
|
||||
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: '',
|
||||
};
|
||||
|
||||
let mockHandleCheckChange;
|
||||
let mockHandleDataChange;
|
||||
beforeEach(() => {
|
||||
mockHandleCheckChange = jest.fn();
|
||||
mockHandleDataChange = jest.fn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const addOnComponent = shallow(
|
||||
<Addons
|
||||
data={dataInput}
|
||||
social={socialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(toJson(addOnComponent)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render Customize Badges', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should handle data change when badge style is changed', () => {
|
||||
const mockEvent = { target: { value: 'style-new' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'title-abcd',
|
||||
textColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#badge-style').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeStyle', { target: { value: 'style-new' } });
|
||||
});
|
||||
|
||||
it('should handle data change when badge color is changed', () => {
|
||||
const mockEvent = { target: { value: 'new-color-abcd' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#badge-color').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeColor', { target: { value: 'new-color-abcd' } });
|
||||
});
|
||||
|
||||
it('should handle data change when badge-label-text is changed', () => {
|
||||
const mockEvent = { target: { value: 'label-abcd-random' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#badge-label-text').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeLabel', { target: { value: 'label-abcd-random' } });
|
||||
});
|
||||
|
||||
it('should render Customize Github stats card', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should handle data change when stats theme is changed', () => {
|
||||
const mockEvent = { target: { value: 'new-theme-for-stats' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
titleColor: 'title-abcd',
|
||||
textColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-theme').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'title-abcd',
|
||||
textColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats title color is changed', () => {
|
||||
const mockEvent = { target: { value: 'red-color' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
textColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-title-color').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'red-color',
|
||||
textColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats bg color is changed', () => {
|
||||
const mockEvent = { target: { value: 'random-color' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-bg-color').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats cache seconds is changed', () => {
|
||||
const mockEvent = { target: { value: 1900 } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-cache-seconds').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: 1900,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats text color is changed', () => {
|
||||
const mockEvent = { target: { value: 'black-color' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-text-color').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'black-color',
|
||||
bgColor: 'abcd',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats local is changed', () => {
|
||||
const mockEvent = { target: { value: 'uk' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-locale').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'uk',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle data change when stats local is changed', () => {
|
||||
const mockEvent = { target: { checked: true } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
githubStatsOptions: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#stats-hide-border').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-1',
|
||||
titleColor: 'some-color',
|
||||
textColor: 'abcd',
|
||||
bgColor: 'random-color',
|
||||
hideBorder: true,
|
||||
cacheSeconds: null,
|
||||
theme: 'new-theme-for-stats',
|
||||
locale: 'en',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should render Customize Top Skills Card', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#top-languages-open-btn').simulate('click', {});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should handle data change when top skills theme is changed', () => {
|
||||
const mockEvent = { target: { value: 'theme-xyz' } };
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
topLanguagesOptions: {
|
||||
theme: 'theme-2',
|
||||
titleColor: 'title-abcd-new',
|
||||
textColor: 'random-some-color',
|
||||
bgColor: '1234',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'theme-xyz',
|
||||
locale: 'us',
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#top-languages-open-btn').simulate('click', {});
|
||||
addOnComponent.find('#top-lang-theme').simulate('change', mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('topLanguagesOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: 'theme-2',
|
||||
titleColor: 'title-abcd-new',
|
||||
textColor: 'random-some-color',
|
||||
bgColor: '1234',
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: 'theme-xyz',
|
||||
locale: 'us',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle check change when add on item inputs are changed', () => {
|
||||
const mockEvent = { target: { value: 'This is a mock event' } };
|
||||
|
||||
const addOnComponent = mount(
|
||||
<Addons
|
||||
data={dataInput}
|
||||
social={socialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#visitors-count').simulate('change', mockEvent);
|
||||
addOnComponent.find('#github-profile-trophy').simulate('change', mockEvent);
|
||||
addOnComponent.find('#github-stats').simulate('change', mockEvent);
|
||||
addOnComponent.find('#top-languages').simulate('change', mockEvent);
|
||||
addOnComponent.find('#twitter-badge').simulate('change', mockEvent);
|
||||
addOnComponent.find('#dev-dynamic-blogs').simulate('change', mockEvent);
|
||||
addOnComponent.find('#rss-dynamic-blogs').simulate('change', mockEvent);
|
||||
addOnComponent.find('#medium-dynamic-blogs').simulate('change', mockEvent);
|
||||
|
||||
expect(mockHandleCheckChange).toHaveBeenCalledTimes(8);
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(1, 'visitorsBadge');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(2, 'githubProfileTrophy');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(3, 'githubStats');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(4, 'topLanguages');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(5, 'twitterBadge');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(6, 'devDynamicBlogs');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(7, 'rssDynamicBlogs');
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(8, 'mediumDynamicBlogs');
|
||||
});
|
||||
|
||||
it('should display workflow details if devDynamicBlogs and dev social data are available', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
devDynamicBlogs: 'some-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
dev: 'some-value-123',
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
const workflowElement = addOnComponent.find('.workflow');
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should display workflow details if rssDynamicBlogs and rss url data are available', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
rssDynamicBlogs: 'some-rss-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
rssurl: 'url-random',
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
const workflowElement = addOnComponent.find('.workflow');
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should display workflow details if mediumDynamicBlogs, medium social data are available', () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
const workflowElement = addOnComponent.find('.workflow');
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should call document create element when blog post workflow is clicked', () => {
|
||||
let someElement = document.createElement('abcd');
|
||||
document.createElement = jest.fn().mockReturnValueOnce(someElement);
|
||||
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: 'some-medium-blogs-value',
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: '@abcd',
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(
|
||||
<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>,
|
||||
);
|
||||
|
||||
addOnComponent.find('#blog-post-worklow-span').simulate('click', {});
|
||||
expect(document.createElement).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import toJson from 'enzyme-to-json';
|
||||
import { shallow } from 'enzyme';
|
||||
import Donate from '../donate';
|
||||
|
||||
describe('Donate', () => {
|
||||
it('renders correctly', () => {
|
||||
const component = shallow(<Donate />);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Footer from '../footer';
|
||||
|
||||
describe('Footer component', () => {
|
||||
const component = shallow(<Footer />);
|
||||
|
||||
it('renders correctly', () => {
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Header from '../header';
|
||||
|
||||
describe('Header', () => {
|
||||
const component = shallow(<Header heading="heading" />);
|
||||
|
||||
it('renders correctly', () => {
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Loader from '../loader';
|
||||
|
||||
describe('Loader', () => {
|
||||
const component = shallow(<Loader />);
|
||||
|
||||
it('renders correctly', () => {
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,214 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Markdown from '../markdown';
|
||||
|
||||
describe('Markdown', () => {
|
||||
const props = {
|
||||
data: {
|
||||
ama: '',
|
||||
badgeColor: '0e75b6',
|
||||
badgeLabel: 'Profile views',
|
||||
badgeStyle: 'flat',
|
||||
collaborateOn: '',
|
||||
contact: '',
|
||||
currentLearn: '',
|
||||
currentWork: 'currentWork',
|
||||
devDynamicBlogs: false,
|
||||
funFact: '',
|
||||
githubProfileTrophy: false,
|
||||
githubStats: false,
|
||||
githubStatsOptions: {
|
||||
bgColor: '',
|
||||
cacheSeconds: null,
|
||||
hideBorder: false,
|
||||
locale: 'en',
|
||||
textColor: '',
|
||||
theme: '',
|
||||
titleColor: '',
|
||||
},
|
||||
helpWith: '',
|
||||
mediumDynamicBlogs: false,
|
||||
rssDynamicBlogs: false,
|
||||
subtitle: 'A passionate frontend developer from India',
|
||||
title: 'title',
|
||||
topLanguages: false,
|
||||
topLanguagesOptions: {
|
||||
bgColor: '',
|
||||
cacheSeconds: null,
|
||||
hideBorder: false,
|
||||
locale: 'en',
|
||||
textColor: '',
|
||||
theme: '',
|
||||
titleColor: '',
|
||||
},
|
||||
twitterBadge: false,
|
||||
visitorsBadge: false,
|
||||
},
|
||||
link: {
|
||||
blog: 'blog',
|
||||
collaborateOn: 'collaborateOn',
|
||||
currentWork: 'currentWork',
|
||||
helpWith: 'helpWith',
|
||||
portfolio: 'portfolio',
|
||||
resume: 'resume',
|
||||
},
|
||||
prefix: {
|
||||
ama: '💬 Ask me about',
|
||||
blog: '📝 I regularly write articles on',
|
||||
collaborateOn: '👯 I’m looking to collaborate on',
|
||||
contact: '📫 How to reach me',
|
||||
currentLearn: '🌱 I’m currently learning',
|
||||
currentWork: '🔭 I’m currently working on',
|
||||
funFact: '⚡ Fun fact',
|
||||
helpWith: '🤝 I’m looking for help with',
|
||||
portfolio: '👨💻 All of my projects are available at',
|
||||
resume: '📄 Know about my experiences',
|
||||
title: "Hi 👋, I'm",
|
||||
},
|
||||
skills: {
|
||||
javascript: true,
|
||||
express: false,
|
||||
},
|
||||
social: {
|
||||
dev: 'dev',
|
||||
codechef: '',
|
||||
},
|
||||
};
|
||||
|
||||
it('renders without subtitle', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
subtitle: '',
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
|
||||
it('renders topLanguages is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
topLanguages: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
|
||||
it('renders devDynamicBlogs is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
devDynamicBlogs: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders without link.currentWork', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
link={{
|
||||
...props.data,
|
||||
currentWork: '',
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders visitorsBadge is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
visitorsBadge: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders twitterBadge is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
twitterBadge: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders githubProfileTrophy is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
githubProfileTrophy: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders githubProfileTrophy is true', () => {
|
||||
const component = shallow(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
githubProfileTrophy: true,
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,404 @@
|
||||
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';
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
|
||||
const DEFAULT_PREFIX = {
|
||||
title: "Hi 👋, I'm",
|
||||
currentWork: '🔭 I’m currently working on',
|
||||
currentLearn: '🌱 I’m currently learning',
|
||||
collaborateOn: '👯 I’m looking to collaborate on',
|
||||
helpWith: '🤝 I’m 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,
|
||||
};
|
||||
|
||||
const DEFAULT_LINK = {
|
||||
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: '',
|
||||
};
|
||||
|
||||
const DUMMY_SKILLS = {
|
||||
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();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Skills from '../skills';
|
||||
|
||||
jest.mock('../../constants/skills', () => ({
|
||||
__esModule: true,
|
||||
categorizedSkills: {
|
||||
language: {
|
||||
title: 'Programming Languages',
|
||||
skills: ['javascript'],
|
||||
},
|
||||
frontend_dev: {
|
||||
title: 'Frontend Development',
|
||||
skills: ['react', 'svelte'],
|
||||
},
|
||||
},
|
||||
icons: {
|
||||
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();
|
||||
});
|
||||
|
||||
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');
|
||||
|
||||
expect(mockFn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Social from '../social';
|
||||
|
||||
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',
|
||||
},
|
||||
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);
|
||||
}
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Subtitle from '../subtitle';
|
||||
|
||||
describe('Subtitle', () => {
|
||||
const mockEvent = { target: { value: 'This is a mock event' } };
|
||||
const props = {
|
||||
data: {
|
||||
subtitle: 'A frontend developer',
|
||||
},
|
||||
handleDataChange: jest.fn().mockReturnValue({}),
|
||||
};
|
||||
|
||||
const component = shallow(<Subtitle {...props} />);
|
||||
|
||||
it('renders correctly', () => {
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('calls onChange', () => {
|
||||
component.find('input').at(0).simulate('change', mockEvent);
|
||||
expect(props.handleDataChange).toBeCalledWith('subtitle', mockEvent);
|
||||
});
|
||||
});
|
||||
@@ -1,13 +1,27 @@
|
||||
import React from "react"
|
||||
import renderer from "react-test-renderer"
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Title from "../title"
|
||||
import Title from '../title';
|
||||
|
||||
describe("Title", () => {
|
||||
it("renders correctly", () => {
|
||||
const tree = renderer
|
||||
.create(<Title prefix={{ title: "Hi 👋, I'm" }} data={{ title: "" }} />)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
describe('Title', () => {
|
||||
const mockEvent = { target: { value: 'This is a mock event' } };
|
||||
const props = {
|
||||
prefix: {
|
||||
title: 'test_title',
|
||||
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();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
import Work from '../work';
|
||||
|
||||
describe('Work', () => {
|
||||
const mockEvent = { target: { value: 'This is a mock event' } };
|
||||
const props = {
|
||||
prefix: {
|
||||
title: 'test_title',
|
||||
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);
|
||||
}
|
||||
expect(toJson(component)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -1,401 +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
|
||||
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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
{
|
||||
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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<input
|
||||
id={`${prefix}-locale`}
|
||||
type="text"
|
||||
placeholder="en"
|
||||
defaultValue={options.locale}
|
||||
onChange={(e) => onUpdate('locale', e.target.value)}
|
||||
size="2"
|
||||
/>
|
||||
</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 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}})
|
||||
}
|
||||
|
||||
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="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
|
||||
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
|
||||
@@ -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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
{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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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:
|
||||
<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,
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
import React from "react"
|
||||
const Donate = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="text-center text-4xl my-2">Support
|
||||
<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
|
||||
@@ -0,0 +1,88 @@
|
||||
import React from 'react';
|
||||
|
||||
const Donate = () => (
|
||||
<>
|
||||
<div className="text-center text-4xl my-2">
|
||||
Support
|
||||
<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;
|
||||
@@ -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="ml-2 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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -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,
|
||||
};
|
||||
@@ -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
|
||||
@@ -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,
|
||||
};
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -1,502 +0,0 @@
|
||||
import React from "react"
|
||||
import { isMediumUsernameValid } from "../utils/validation"
|
||||
import { icons, skills, skillWebsites } from "../constants/skills"
|
||||
import { githubStatsLinkGenerator, topLanguagesLinkGenerator } from "../utils/link-generators"
|
||||
|
||||
const Markdown = props => {
|
||||
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> <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.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 ""
|
||||
}
|
||||
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=""
|
||||
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} />
|
||||
</>
|
||||
<>
|
||||
<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}
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Markdown
|
||||
@@ -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> <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: {},
|
||||
};
|
||||
@@ -1,364 +0,0 @@
|
||||
import React from "react"
|
||||
import { icons, skills, skillWebsites } from "../constants/skills"
|
||||
import { githubStatsLinkGenerator, topLanguagesLinkGenerator } from "../utils/link-generators"
|
||||
|
||||
const MarkdownPreview = props => {
|
||||
const TitlePreview = props => {
|
||||
if (props.prefix && props.title) {
|
||||
return (
|
||||
<h1 className="text-center text-xl font-bold">
|
||||
{props.prefix + " " + props.title}
|
||||
</h1>
|
||||
)
|
||||
}
|
||||
return null
|
||||
}
|
||||
const SubTitlePreview = props => {
|
||||
if (props.subtitle) {
|
||||
return <h3 className="text-center font-medium">{props.subtitle}</h3>
|
||||
}
|
||||
return null
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
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
|
||||
}
|
||||
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=""
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/rss.svg"
|
||||
username={props.social.rssurl}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
const TopLanguagesPreview = ({github, options, show})=> {
|
||||
if (show) {
|
||||
return (
|
||||
<div className="text-center mx-4 mb-4">
|
||||
<img src={topLanguagesLinkGenerator({github, options})} alt={props.github} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return <div className="text-center mx-4 mb-4"> </div>
|
||||
}
|
||||
const SkillsPreview = props => {
|
||||
var listSkills = []
|
||||
skills.forEach(skill => {
|
||||
if (props.skills[skill]) {
|
||||
listSkills.push(
|
||||
<a href={skillWebsites[skill]} target="_blank" rel="noreferrer">
|
||||
<img
|
||||
className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10"
|
||||
key={skill}
|
||||
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>
|
||||
) : (
|
||||
""
|
||||
)
|
||||
}
|
||||
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} />
|
||||
<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}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default MarkdownPreview
|
||||
@@ -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"> </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;
|
||||
@@ -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
|
||||
@@ -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,22 @@ 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">
|
||||
<img
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/discord.svg"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
alt="discord"
|
||||
/>
|
||||
<input
|
||||
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={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">
|
||||
@@ -313,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,
|
||||
};
|
||||
@@ -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
|
||||
@@ -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,
|
||||
};
|
||||
@@ -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,
|
||||
};
|
||||
@@ -0,0 +1,97 @@
|
||||
export const DEFAULT_PREFIX = {
|
||||
title: "Hi 👋, I'm",
|
||||
currentWork: '🔭 I’m currently working on',
|
||||
currentLearn: '🌱 I’m currently learning',
|
||||
collaborateOn: '👯 I’m looking to collaborate on',
|
||||
helpWith: '🤝 I’m 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: '',
|
||||
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',
|
||||
},
|
||||
streakStats: false,
|
||||
streakStatsOptions: {
|
||||
theme: '',
|
||||
},
|
||||
devDynamicBlogs: false,
|
||||
mediumDynamicBlogs: false,
|
||||
rssDynamicBlogs: false,
|
||||
};
|
||||
|
||||
export const DEFAULT_LINK = {
|
||||
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: '',
|
||||
};
|
||||
|
||||
export const DEFAULT_SUPPORT = {
|
||||
buyMeACoffee: '',
|
||||
};
|
||||
@@ -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;
|
||||
|
||||
|
Before Width: | Height: | Size: 395 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 968 KiB |
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
@@ -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 |
|
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 |
@@ -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 |
@@ -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 |
|
After Width: | Height: | Size: 8.2 KiB |
@@ -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 |
|
After Width: | Height: | Size: 6.8 KiB |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |