|
6 | 6 | display: block; |
7 | 7 | fill: #8b849e; |
8 | 8 | } |
| 9 | + .repo-color { |
| 10 | + animation: fadeInAnimation 0.8s ease-in-out forwards; |
| 11 | + } |
9 | 12 | .header { |
10 | 13 | font: 600 18px 'Segoe UI', Ubuntu, Sans-Serif; |
11 | 14 | fill: #2f80ed; |
|
57 | 60 | transform: translate(-5px, 5px) scale(1); |
58 | 61 | } |
59 | 62 | } |
60 | | - @keyframes fadeInAnimation { |
61 | | - from { |
62 | | - opacity: 0; |
63 | | - } |
64 | | - to { |
65 | | - opacity: 1; |
66 | | - } |
67 | | - } |
68 | 63 | @keyframes rankAnimation { |
69 | 64 | from { |
70 | 65 | stroke-dashoffset: 251.32741228718345; |
|
91 | 86 | } |
92 | 87 | </style> |
93 | 88 | <rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="#fffefe" stroke-opacity="1"/> |
94 | | - <g data-testid="card-title" transform="translate(25, 35)"><g transform="translate(0, 0)"><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/<%- repo %>/"><%- username %> / <%- repo %></a></text></g></g> |
95 | | - <g data-testid="main-card-body" transform="translate(0, 55)"><svg x="0" y="0"> |
| 89 | + <g data-testid="card-title" transform="translate(40, 35)"><g transform="translate(0, 0)"><circle class="repo-color" cx="-10" cy="-5" r="5" fill="<%- color %>"/><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/<%- repo %>/"><%- username %> / <%- repo %></a></text></g></g> |
| 90 | + <g data-testid="main-card-info" transform="translate(0, 55)"><svg x="0" y="0"> |
96 | 91 | <g transform="translate(0, 0)"> |
97 | 92 | <g class="stagger" style="animation-delay: 450ms" transform="translate(25, 0)"> |
98 | 93 | <svg xmlns="http://www.w3.org/2000/svg" data-testid="icon" class="icon" viewBox="0 0 16 16" version="1.1" width="16" height="16"> |
|
138 | 133 | </g> |
139 | 134 | </svg></g> |
140 | 135 | <line x1="290" y1="40" x2="290" y2="186" stroke="#eeecec"></line> |
141 | | - <g xmlns="http://www.w3.org/2000/svg" transform="translate(300, 55)" data-testid="main-card-body"> |
| 136 | + <g xmlns="http://www.w3.org/2000/svg" transform="translate(300, 55)" data-testid="main-card-progress"> |
142 | 137 |
|
143 | 138 | <svg data-testid="lang-items" x="25"> |
144 | 139 | <mask id="rect-mask"> |
145 | 140 | <rect x="0" y="0" width="300" height="8" fill="white" rx="5"/> |
146 | 141 | </mask> |
147 | 142 |
|
148 | | - <rect mask="url(#rect-mask)" data-testid="lang-progress" x="0" y="0" width="230.36" height="8" fill="#f1e05a"/> |
149 | | - |
150 | | - <rect mask="url(#rect-mask)" data-testid="lang-progress" x="230.36" y="0" width="30.53" height="8" fill="#e34c26"/> |
151 | | - |
152 | | - <rect mask="url(#rect-mask)" data-testid="lang-progress" x="260.89" y="0" width="29.67" height="8" fill="#3178c6"/> |
153 | | - |
154 | | - <rect mask="url(#rect-mask)" data-testid="lang-progress" x="290.56" y="0" width="18.08" height="8" fill="#563d7c"/> |
155 | | - |
156 | | - <rect mask="url(#rect-mask)" data-testid="lang-progress" x="298.64" y="0" width="11.370000000000001" height="8" fill="#5686a5"/> |
| 143 | + <% langs.forEach(function(lang){ %> |
| 144 | + <rect mask="url(#rect-mask)" data-testid="lang-progress" x="<%- lang.cursor * 300 %>" y="0" width="<%- lang.ratio * 300 %>" height="8" fill="<%- lang.color %>"/> |
| 145 | + <% }); %> |
157 | 146 |
|
158 | 147 |
|
159 | 148 | <g transform="translate(0, 25)"> |
|
0 commit comments