Fixed rounding errors in GitHub stars

This commit is contained in:
squidfunk 2020-04-13 16:12:26 +02:00
parent 24f0c45dce
commit a96fa1c3aa
7 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.b90b6d1d.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.7af7e239.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.b90b6d1d.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.7af7e239.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.606193c2.min.js", "assets/javascripts/vendor.js": "assets/javascripts/vendor.606193c2.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.606193c2.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.606193c2.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.7f7c8775.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.7f7c8775.min.js",

View File

@ -29,7 +29,7 @@
<meta name="author" content="{{ config.site_author }}"> <meta name="author" content="{{ config.site_author }}">
{% endif %} {% endif %}
<link rel="shortcut icon" href="{{ config.theme.favicon | url }}"> <link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-5.0.2"> <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-5.1.0">
{% endblock %} {% endblock %}
{% block htmltitle %} {% block htmltitle %}
{% if page and page.meta and page.meta.title %} {% if page and page.meta and page.meta.title %}
@ -179,7 +179,7 @@
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.606193c2.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/vendor.606193c2.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.b90b6d1d.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.7af7e239.min.js' | url }}"></script>
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

@ -115,7 +115,7 @@ export function truncate(value: string, n: number): string {
export function round(value: number): string { export function round(value: number): string {
if (value > 999) { if (value > 999) {
const digits = +((value - 950) % 1000 > 99) const digits = +((value - 950) % 1000 > 99)
return `${((value + 1) / 1000).toFixed(digits)}k` return `${((value + 0.000001) / 1000).toFixed(digits)}k`
} else { } else {
return value.toString() return value.toString()
} }