Merge pull request #11 from anuraghazra/fix-10
fix: fix description edge case fixes #10
This commit is contained in:
commit
91523543e3
2 changed files with 8 additions and 8 deletions
|
@ -63,6 +63,7 @@ async function fetchRepo(username, reponame) {
|
||||||
const renderRepoCard = (repo) => {
|
const renderRepoCard = (repo) => {
|
||||||
const { name, description, primaryLanguage, stargazers, forkCount } = repo;
|
const { name, description, primaryLanguage, stargazers, forkCount } = repo;
|
||||||
const height = 120;
|
const height = 120;
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<svg width="400" height="${height}" viewBox="0 0 400 ${height}" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="400" height="${height}" viewBox="0 0 400 ${height}" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<style>
|
<style>
|
||||||
|
@ -79,10 +80,9 @@ const renderRepoCard = (repo) => {
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<text x="50" y="38" class="header">${name}</text>
|
<text x="50" y="38" class="header">${name}</text>
|
||||||
<text class="description" x="25" y="70">${description.slice(
|
<text class="description" x="25" y="70">${
|
||||||
0,
|
description ? description.slice(0, 60) : "No description provided"
|
||||||
60
|
}..</text>
|
||||||
)}..</text>
|
|
||||||
|
|
||||||
<circle cx="30" cy="95" r="6" fill="${primaryLanguage.color}" />
|
<circle cx="30" cy="95" r="6" fill="${primaryLanguage.color}" />
|
||||||
<svg x="120" y="88" viewBox="0 0 16 16" version="1.1" width="16" height="16" fill="#586069">
|
<svg x="120" y="88" viewBox="0 0 16 16" version="1.1" width="16" height="16" fill="#586069">
|
||||||
|
|
|
@ -67,12 +67,12 @@ Copy paste this code into your readme and change the links.
|
||||||
Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats`
|
Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats`
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
|
|
||||||
### Quick Tip (Align The Repo Cards)
|
### Quick Tip (Align The Repo Cards)
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ Normally you won't be able to layout the images side by side to do that you can
|
||||||
|
|
||||||
```md
|
```md
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats">
|
<a href="https://github.com/anuraghazra/github-readme-stats">
|
||||||
<img align="left" src="https://github-readme-stats.anuraghazra1.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
<img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/convoychat">
|
<a href="https://github.com/anuraghazra/convoychat">
|
||||||
<img align="left" src="https://github-readme-stats.anuraghazra1.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
<img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
||||||
</a>
|
</a>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue