1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Reverted GitHub stars rounding method

This commit is contained in:
squidfunk 2018-02-21 21:12:04 +01:00
parent 3f61b651a6
commit 323f83808a
4 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
mkdocs-material-2.x.x (2018-02-xx)
* Replaced package manager yarn with npm 5.6
* Reverted GitHub stars rounding method
mkdocs-material-2.6.3 (2018-02-18) mkdocs-material-2.6.3 (2018-02-18)
* Added Vietnamese translations * Added Vietnamese translations

View File

@ -172,7 +172,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application.5e40439f.js"></script> <script src="{{ base_url }}/assets/javascripts/application.e437c97b.js"></script>
{% if lang.t("search.language") != "en" %} {% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %} {% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %} {% if languages | length and languages[0] != "" %}

View File

@ -90,8 +90,10 @@ export default class Abstract {
* @return {string} Formatted number * @return {string} Formatted number
*/ */
format_(number) { format_(number) {
if (number >= 1000) if (number > 10000)
return `${(number / 1000).toFixed(number % 1000 > 99)}k` return `${(number / 1000).toFixed(0)}k`
else if (number > 1000)
return `${(number / 1000).toFixed(1)}k`
return `${number}` return `${number}`
} }