diff --git a/README.md b/README.md index 4dc9064..208d81a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

- +

GitHub Readme StackOverflow

Show your StackOverflow profile status on your READMEs!

@@ -15,18 +15,26 @@ Copy paste following markdown into your markdown content, and that's it. Easy Ea Change the `?userID=` value to your StackOverflow's userID. ```md -[![Omid Nikrah StackOverflow](https://github-readme-stackoverflow.vercel.app/?userID=6558042)](https://stackoverflow.com/users/6558042/omid-nikrah) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209)](https://stackoverflow.com/users/4034209/kashif-anwaar ``` -[![Omid Nikrah StackOverflow](https://github-readme-stackoverflow.vercel.app/?userID=6558042)](https://stackoverflow.com/users/6558042/omid-nikrah) -[![Omid Nikrah StackOverflow](https://github-readme-stackoverflow.vercel.app/?userID=6558042&theme=dark)](https://stackoverflow.com/users/6558042/omid-nikrah) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209)](https://stackoverflow.com/users/4034209/kashif-anwaar) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209&theme=dark)](https://stackoverflow.com/users/4034209/kashif-anwaar) #### Compact Layout If you want to have a compact layout, just you need to add `layout=compact` as a parameter. Check out the options. -[![Omid Nikrah StackOverflow](https://github-readme-stackoverflow.vercel.app/?userID=6558042&layout=compact)](https://stackoverflow.com/users/6558042/omid-nikrah) -[![Omid Nikrah StackOverflow](https://github-readme-stackoverflow.vercel.app/?userID=6558042&layout=compact&theme=dark)](https://stackoverflow.com/users/6558042/omid-nikrah) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209&layout=compact)](https://stackoverflow.com/users/4034209/kashif-anwaar) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209&layout=compact&theme=dark)](https://stackoverflow.com/users/4034209/kashif-anwaar) + + +#### Full Layout + +If you want to show upvotes and answers count as well, just you need to add `layout=full` as a parameter. Check out the options. + +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209&layout=full)](https://stackoverflow.com/users/4034209/kashif-anwaar) +[![Kashif's StackOverflow](https://github-readme-stackoverflow-kashifo.vercel.app/?userID=4034209&layout=full&theme=dark)](https://stackoverflow.com/users/4034209/kashif-anwaar)
@@ -36,15 +44,16 @@ If you want to have a compact layout, just you need to add `layout=compact` as a | ---------- | ------------------------------- | -------------------------- | | userID | Your StackOverflow userID | REQUIRED | | theme | Theme of the StackOverflow card (light or dark) | light | -| layout | Layout of the StackOverflow card (compact or default) | default | +| layout | Layout of the StackOverflow card (compact or full or default) | default |
## Contributors - [Omid Nikrah](https://github.com/omidnikrah) - [Soroush Chehresa](https://github.com/soroushchehresa) +- [Kashif Anwaar](https://github.com/kashifo)
## Deploy your own -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https://github.com/omidnikrah/github-readme-stackoverflow) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https://github.com/kashifo/github-readme-stackoverflow) diff --git a/src/StackOverflowCard.js b/src/StackOverflowCard.js index b981250..4130521 100644 --- a/src/StackOverflowCard.js +++ b/src/StackOverflowCard.js @@ -37,6 +37,82 @@ const StackOverflowCard = async (data, theme, layout) => { `; + } else if (layout === 'full') { + return ` + + + + + + + + + + ${data.display_name} + + + ${data.reputation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')} + + + Reputation + + + + ${data.up_vote_count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')} + + + Upvotes + + + ${data.answer_count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')} + + + Answers + + + + + + ${data.badge_counts.gold} + + + + + + ${data.badge_counts.silver} + + + + + + ${data.badge_counts.bronze} + + + + `; } return ` diff --git a/vercel.json b/vercel.json index 33d8629..49125ff 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,8 @@ { - "builds": [{ - "src": "index.js", - "use": "@now/node-server" - }] -} + "builds": [ + { + "src": "index.js", + "use": "@vercel/node" + } + ] +} \ No newline at end of file