1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-09-24 19:38:27 +02:00

Fixed incorrect rounding of amount of GitHub stars

This commit is contained in:
squidfunk 2018-02-12 21:37:30 +01:00 committed by Martin Donath
parent bf9b652eca
commit 165218646d
9 changed files with 77 additions and 12 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

@ -48,9 +48,9 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.a315b664.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.9b572555.css">
{% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.792431c1.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.6079476c.css">
{% endif %}
{% endblock %}
{% block libs %}
@ -172,7 +172,7 @@
{% endblock %}
</div>
{% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application.f5cd6d8a.js"></script>
<script src="{{ base_url }}/assets/javascripts/application.a46cbbdf.js"></script>
{% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "ar",
"direction": "rtl",
"clipboard.copy": "نسخ إلى الحافظة",
"clipboard.copied": "تم النسخ الى الحافظة",
"edit.link.title": "عدل الصفحة",
"footer.previous": "السابقة",
"footer.next": "التالية",
"meta.comments": "التعليقات",
"meta.source": "المصدر",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "بحث",
"search.result.placeholder": "اكتب لبدء البحث",
"search.result.none": "لا توجد نتائج",
"search.result.one": "نتائج البحث مستند واحد",
"search.result.other": "نتائج البحث # مستندات",
"skip.link.title": "انتقل إلى المحتوى",
"source.link.title": "اذهب إلى المصدر",
"toc.title": "جدول المحتويات"
}[key] }}{% endmacro %}

View File

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

View File

@ -0,0 +1,45 @@
<!--
Copyright (c) 2016-2018 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- Translations: Arabic -->
{% macro t(key) %}{{ {
"language": "ar",
"direction": "rtl",
"clipboard.copy": "نسخ إلى الحافظة",
"clipboard.copied": "تم النسخ الى الحافظة",
"edit.link.title": "عدل الصفحة",
"footer.previous": "السابقة",
"footer.next": "التالية",
"meta.comments": "التعليقات",
"meta.source": "المصدر",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "بحث",
"search.result.placeholder": "اكتب لبدء البحث",
"search.result.none": "لا توجد نتائج",
"search.result.one": "نتائج البحث مستند واحد",
"search.result.other": "نتائج البحث # مستندات",
"skip.link.title": "انتقل إلى المحتوى",
"source.link.title": "اذهب إلى المصدر",
"toc.title": "جدول المحتويات"
}[key] }}{% endmacro %}