-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepo_user.liquid
More file actions
34 lines (30 loc) · 1.38 KB
/
repo_user.liquid
File metadata and controls
34 lines (30 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% assign lang = site.lang | split: '-' | first %}
{% case lang %}
{% when 'pt' %}
{% assign lang = site.lang %}
{% when 'zh' %}
{% assign lang_last = site.lang | split: '-' | last %}
{% case lang_last %}
{% when 'cn', 'sg', 'my', 'hans' %}
{% assign lang = 'cn' %}
{% when 'tw', 'hk', 'mo', 'hant' %}
{% assign lang = 'zh-tw' %}
{% endcase %}
{% comment %} Add a new language using when... if needed {% endcomment %}
{% comment %} If you still encounter language-display issues, check the available locale codes in github-readme-stats (different from ISO-639 standard used in your website) {% endcomment %}
{% comment %} https://github.com/anuraghazra/github-readme-stats?tab=readme-ov-file#available-locales {% endcomment %}
{% endcase %}
<div class="repo p-2 text-center">
<a href="https://github.com/{{ include.username }}">
<img
class="only-light w-100"
alt="{{ include.username }}"
src="{{ site.external_services.github_readme_stats_url }}/api/?username={{ include.username }}&theme={{ site.repo_theme_light }}&locale={{ lang }}&show_icons=true"
>
<img
class="only-dark w-100"
alt="{{ include.username }}"
src="{{ site.external_services.github_readme_stats_url }}/api/?username={{ include.username }}&theme={{ site.repo_theme_dark }}&locale={{ lang }}&show_icons=true"
>
</a>
</div>