|
143 | 143 | <% langs.forEach(function(lang){ %> |
144 | 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 | 145 | <% }); %> |
146 | | - |
147 | | - |
148 | 146 | <g transform="translate(0, 25)"> |
149 | | - <g transform="translate(0, 0)"><g transform="translate(0, 0)"> |
150 | | - <g class="stagger" style="animation-delay: 450ms"> |
151 | | - <circle cx="5" cy="6" r="5" fill="#f1e05a"/> |
152 | | - <text data-testid="lang-name" x="15" y="10" class="lang-name"> |
153 | | - JavaScript 76.79% |
154 | | - </text> |
155 | | - </g> |
156 | | - </g><g transform="translate(0, 25)"> |
157 | | - <g class="stagger" style="animation-delay: 600ms"> |
158 | | - <circle cx="5" cy="6" r="5" fill="#e34c26"/> |
159 | | - <text data-testid="lang-name" x="15" y="10" class="lang-name"> |
160 | | - HTML 10.18% |
161 | | - </text> |
162 | | - </g> |
163 | | - </g><g transform="translate(0, 50)"> |
164 | | - <g class="stagger" style="animation-delay: 750ms"> |
165 | | - <circle cx="5" cy="6" r="5" fill="#3178c6"/> |
166 | | - <text data-testid="lang-name" x="15" y="10" class="lang-name"> |
167 | | - TypeScript 9.89% |
168 | | - </text> |
| 147 | + <% const left = Math.ceil(langs.length / 2) %> |
| 148 | + <g transform="translate(0, 0)"> |
| 149 | + <% langs.splice(0, left).forEach(function (lang, idx) { %> |
| 150 | + <g transform="translate(0, <%- idx * 25 %>)"> |
| 151 | + <g class="stagger" style="animation-delay: <%- 450 + (idx * 150) %>ms"> |
| 152 | + <circle cx="5" cy="6" r="5" fill="<%- lang.color %>"/> |
| 153 | + <text data-testid="lang-name" x="15" y="10" class="lang-name"><%- lang.text %></text> |
| 154 | + </g> |
169 | 155 | </g> |
170 | | - </g></g><g transform="translate(150, 0)"><g transform="translate(0, 0)"> |
171 | | - <g class="stagger" style="animation-delay: 450ms"> |
172 | | - <circle cx="5" cy="6" r="5" fill="#563d7c"/> |
173 | | - <text data-testid="lang-name" x="15" y="10" class="lang-name"> |
174 | | - CSS 2.69% |
175 | | - </text> |
176 | | - </g> |
177 | | - </g><g transform="translate(0, 25)"> |
178 | | - <g class="stagger" style="animation-delay: 600ms"> |
179 | | - <circle cx="5" cy="6" r="5" fill="#5686a5"/> |
180 | | - <text data-testid="lang-name" x="15" y="10" class="lang-name"> |
181 | | - GLSL 0.46% |
182 | | - </text> |
| 156 | + <% });%> |
| 157 | + </g> |
| 158 | + <g transform="translate(150, 0)"> |
| 159 | + <% langs.splice(0, left).forEach(function (lang, idx) { %> |
| 160 | + <g transform="translate(0, <%- idx * 25 %>)"> |
| 161 | + <g class="stagger" style="animation-delay: <%- 450 + (idx * 150) %>ms"> |
| 162 | + <circle cx="5" cy="6" r="5" fill="<%- lang.color %>"/> |
| 163 | + <text data-testid="lang-name" x="15" y="10" class="lang-name"><%- lang.text %></text> |
| 164 | + </g> |
183 | 165 | </g> |
184 | | - </g></g> |
| 166 | + <% });%> |
| 167 | + </g> |
185 | 168 | </g> |
186 | 169 | </svg> |
187 | 170 | </g> |
|
0 commit comments