Compare commits

...
Author SHA1 Message Date
Anurag 40b95880ae chore: update 2023-01-28 23:32:46 +05:30
Anurag 382d7c2512 chore: add svg snapshots 2023-01-28 23:31:20 +05:30
18 changed files with 2548 additions and 14 deletions
+2 -1
View File
@@ -45,11 +45,12 @@
"husky": "^8.0.0",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"jest-svg-snapshot": "^0.1.0",
"js-yaml": "^4.1.0",
"lint-staged": "^13.0.3",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.7.0",
"prettier": "^2.1.2"
"prettier": "^2.8.3"
},
"dependencies": {
"axios": "^0.24.0",
+5 -1
View File
@@ -177,7 +177,11 @@ class Card {
}
${this.css}
${process.env.NODE_ENV === "test" ? "" : getAnimations()}
${
process.env.NODE_ENV === "test" || this.animations === false
? ""
: getAnimations()
}
${
this.animations === false
? `* { animation-duration: 0s !important; animation-delay: 0s !important; }`
+6 -4
View File
@@ -43,6 +43,11 @@ const getProgressAnimation = ({ progress }) => {
const getAnimations = () => {
return `
/* Animations */
.stagger {
opacity: 0;
animation: fadeInAnimation 0.3s ease-in-out forwards;
}
@keyframes scaleInAnimation {
from {
transform: translate(-5px, 5px) scale(0);
@@ -89,10 +94,7 @@ const getStyles = ({
/* Selector detects Firefox */
.stat { font-size:12px; }
}
.stagger {
opacity: 0;
animation: fadeInAnimation 0.3s ease-in-out forwards;
}
.rank-text {
font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor};
animation: scaleInAnimation 0.3s ease-in-out forwards;
@@ -34,10 +34,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
/* Selector detects Firefox */
.stat { font-size:12px; }
}
.stagger {
opacity: 0;
animation: fadeInAnimation 0.3s ease-in-out forwards;
}
.rank-text {
font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
@@ -192,10 +189,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout w
/* Selector detects Firefox */
.stat { font-size:12px; }
}
.stagger {
opacity: 0;
animation: fadeInAnimation 0.3s ease-in-out forwards;
}
.rank-text {
font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
@@ -0,0 +1,177 @@
<svg
width="800"
height="195"
viewBox="0 0 800 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="799"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(715, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -0,0 +1,249 @@
<svg
width="467"
height="195"
viewBox="0 0 467 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #abd200;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #68b587;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #68b587;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #b7d364;
display: block;
}
.rank-circle-rim {
stroke: #abd200;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #abd200;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#0044ff"
width="466"
fill="#0a0f0b"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(390.5, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total PRs:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Issues:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">
Contributed to (last year):
</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.5 KiB

@@ -0,0 +1,179 @@
<svg
width="450"
height="195"
viewBox="0 0 450 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">
Hello world, this is a very very very very very long title, Rank: A+
</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Hello world, this is a very very very very very long title
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -0,0 +1,164 @@
<svg
width="524.375"
height="195"
viewBox="0 0 524.375 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">
Hello world, this is a very very very very very long title, Rank: A+
</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="523.375"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Hello world, this is a very very very very very long title
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,164 @@
<svg
width="524.375"
height="195"
viewBox="0 0 524.375 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">
Hello world, this is a very very very very very long title, Rank: A+
</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="523.375"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Hello world, this is a very very very very very long title
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,152 @@
<svg
width="450"
height="150"
viewBox="0 0 450 150"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total PRs: 1, Total Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 25)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -0,0 +1,177 @@
<svg
width="450"
height="195"
viewBox="0 0 450 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="0"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -0,0 +1,162 @@
<svg
width="370.1875000000001"
height="195"
viewBox="0 0 370.1875000000001 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="369.1875000000001"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,169 @@
<svg
width="450"
height="165"
viewBox="0 0 450 165"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="main-card-body" transform="translate(0, 25)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,249 @@
<svg
width="467"
height="645"
viewBox="0 0 467 645"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: block;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="466"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(390.5, 272.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 200)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total PRs:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 300)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">Total Issues:</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 400)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<svg
data-testid="icon"
class="icon"
viewBox="0 0 16 16"
version="1.1"
width="16"
height="16"
>
<path
fill-rule="evenodd"
d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"
/>
</svg>
<text class="stat bold" x="25" y="12.5">
Contributed to (last year):
</text>
<text class="stat bold" x="219.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.5 KiB

@@ -0,0 +1,185 @@
<svg
width="450"
height="195"
viewBox="0 0 450 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">
&#1057;&#1090;&#1072;&#1090;&#1080;&#1089;&#1090;&#1080;&#1082;&#1072;
GitHub
&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;
Cateline Mnemosyne, Rank: A+
</title>
<desc id="descId">
Всего звезд: 1, Всего коммитов in 2023 : 1, Всего pull request`ов: 1, Всего
issue: 1, Внёс вклад в (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
&#1057;&#1090;&#1072;&#1090;&#1080;&#1089;&#1090;&#1080;&#1082;&#1072;
GitHub
&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;
Cateline Mnemosyne
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Всего звезд:</text>
<text class="stat bold" x="249.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Всего коммитов (2023):</text>
<text class="stat bold" x="249.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Всего pull request`ов:</text>
<text class="stat bold" x="249.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Всего issue:</text>
<text class="stat bold" x="249.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Внёс вклад в (last year):</text>
<text class="stat bold" x="249.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -0,0 +1,177 @@
<svg
width="450"
height="195"
viewBox="0 0 450 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #fe428e;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #a9fef7;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #a9fef7;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #f8d847;
display: none;
}
.rank-circle-rim {
stroke: #fe428e;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #fe428e;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#141321"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -0,0 +1,177 @@
<svg
width="450"
height="195"
viewBox="0 0 450 195"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-labelledby="descId"
>
<title id="titleId">Cateline Mnemosyne's GitHub Stats, Rank: A+</title>
<desc id="descId">
Total Stars Earned: 1, Total Commits in 2023 : 1, Total PRs: 1, Total
Issues: 1, Contributed to (last year): 1
</desc>
<style>
.header {
font: 600 18px "Segoe UI", Ubuntu, Sans-Serif;
fill: #2f80ed;
animation: fadeInAnimation 0.8s ease-in-out forwards;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.header {
font-size: 15.5px;
}
}
.stat {
font: 600 14px "Segoe UI", Ubuntu, "Helvetica Neue", Sans-Serif;
fill: #434d58;
}
@supports (-moz-appearance: auto) {
/* Selector detects Firefox */
.stat {
font-size: 12px;
}
}
.rank-text {
font: 800 24px "Segoe UI", Ubuntu, Sans-Serif;
fill: #434d58;
animation: scaleInAnimation 0.3s ease-in-out forwards;
}
.not_bold {
font-weight: 400;
}
.bold {
font-weight: 700;
}
.icon {
fill: #4c71f2;
display: none;
}
.rank-circle-rim {
stroke: #2f80ed;
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: #2f80ed;
stroke-dasharray: 250;
fill: none;
stroke-width: 6;
stroke-linecap: round;
opacity: 0.8;
transform-origin: -10px 8px;
transform: rotate(-90deg);
animation: rankAnimation 1s forwards ease-in-out;
}
* {
animation-duration: 0s !important;
animation-delay: 0s !important;
}
</style>
<rect
data-testid="card-bg"
x="0.5"
y="0.5"
rx="4.5"
height="99%"
stroke="#e4e2e2"
width="449"
fill="#fffefe"
stroke-opacity="1"
/>
<g data-testid="card-title" transform="translate(25, 35)">
<g transform="translate(0, 0)">
<text x="0" y="0" class="header" data-testid="header">
Cateline Mnemosyne's GitHub Stats
</text>
</g>
</g>
<g data-testid="main-card-body" transform="translate(0, 55)">
<g data-testid="rank-circle" transform="translate(365, 47.5)">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<g class="rank-text">
<text
x="-5"
y="3"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
A+
</text>
</g>
</g>
<svg x="0" y="0">
<g transform="translate(0, 0)">
<g
class="stagger"
style="animation-delay: 450ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Stars Earned:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="stars">
1
</text>
</g>
</g>
<g transform="translate(0, 25)">
<g
class="stagger"
style="animation-delay: 600ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Commits (2023):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="commits">
7
</text>
</g>
</g>
<g transform="translate(0, 50)">
<g
class="stagger"
style="animation-delay: 750ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total PRs:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="prs">1</text>
</g>
</g>
<g transform="translate(0, 75)">
<g
class="stagger"
style="animation-delay: 900ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Total Issues:</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="issues">
1
</text>
</g>
</g>
<g transform="translate(0, 100)">
<g
class="stagger"
style="animation-delay: 1050ms"
transform="translate(25, 0)"
>
<text class="stat bold" y="12.5">Contributed to (last year):</text>
<text class="stat bold" x="199.01" y="12.5" data-testid="contribs">
1
</text>
</g>
</g>
</svg>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

+152
View File
@@ -0,0 +1,152 @@
import "jest-svg-snapshot";
import "@testing-library/jest-dom";
import renderStatsCard from "../../src/cards/stats-card";
import prettier from "prettier";
const STATS_DATA = {
name: "Cateline Mnemosyne",
totalPRs: 1,
totalCommits: 7,
totalIssues: 1,
totalStars: 1,
contributedTo: 1,
rank: {
level: "A+",
score: 50.893750297869225,
},
};
const format = (svg) => prettier.format(svg, { parser: "html" });
describe("statsCard", () => {
it("should match default stat card", () => {
const svg = format(
renderStatsCard(STATS_DATA, { disable_animations: true }),
);
expect(svg).toMatchSVGSnapshot();
});
it("option hide", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
hide: ["commits", "stars"],
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option hide_border", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
hide_border: true,
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option hide_title", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
hide_title: true,
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option hide_rank", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
hide_rank: true,
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option theme", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
theme: "radical",
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option card_width", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
card_width: 800,
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option custom_title", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
custom_title:
"Hello world, this is a very very very very very long title",
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option custom_title hideRank", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
hide_rank: true,
custom_title:
"Hello world, this is a very very very very very long title",
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option custom_title hideRank card_width", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
card_width: 300,
hide_rank: true,
custom_title:
"Hello world, this is a very very very very very long title",
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option line_height show_icons", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
line_height: 100,
show_icons: true,
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option locale", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
locale: "ru",
}),
);
expect(svg).toMatchSVGSnapshot();
});
it("option colors", () => {
const svg = format(
renderStatsCard(STATS_DATA, {
disable_animations: true,
border_color: "0044ff",
title_color: "abd200",
icon_color: "b7d364",
text_color: "68b587",
bg_color: "0a0f0b",
show_icons: true,
}),
);
expect(svg).toMatchSVGSnapshot();
});
});