Skip to content

Commit b939c35

Browse files
committed
add margin to language progress bar item
1 parent 25a5e34 commit b939c35

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

generate_images.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ async def generate_languages(s: Stats) -> None:
6464
for i, (lang, data) in enumerate(sorted_languages):
6565
color = data.get("color")
6666
color = color if color is not None else "#000000"
67+
ratio = [.98, .02]
68+
if i == len(sorted_languages) - 1:
69+
ratio = [1, 0]
6770
progress += (f'<span style="background-color: {color};'
68-
f'width: {data.get("prop", 0):0.3f}%;" '
71+
f'width: {(ratio[0] * data.get("prop", 0)):0.3f}%;'
72+
f'margin-right: {(ratio[1] * data.get("prop", 0)):0.3f}%;" '
6973
f'class="progress-item"></span>')
7074
lang_list += f"""
7175
<li style="animation-delay: {i * delay_between}ms;">

templates/languages.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)