diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..602f5638 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Misode + +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 NONINFRINGEMENT. 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. diff --git a/custom.css b/custom.css index 294eeb6f..bb6c5143 100644 --- a/custom.css +++ b/custom.css @@ -23,7 +23,7 @@ background-color: #eee !important; } -.card.term, .card.terms { +.card.bg-info .card.bg-info { background-color: #7cb6bf !important; } diff --git a/i18n.js b/i18n.js new file mode 100644 index 00000000..8646686b --- /dev/null +++ b/i18n.js @@ -0,0 +1,26 @@ +const lngs = [ + ['en', 'English'], + ['ru', 'Русский'], + ['zh-CN', '简体中文'] +] + +lngs.forEach(v => $('#lngList').append(`${v[1]}`)) + +i18next + .use(i18nextBrowserLanguageDetector) + .use(i18nextXHRBackend) + .init({ + backend: { loadPath: 'locales/{{lng}}.json' }, + fallbackLng: 'en', + whitelist: lngs.map(v => v[0]) + }) + .then(() => { + jqueryI18next.init(i18next, $, { parseDefaultValueFromContent: false }) + $('html').localize() + }) + +function changeLng(code) { + i18next.changeLanguage(code).then(() => { + $('html').localize() + }) +} diff --git a/index.html b/index.html index c3ab726c..854fd8f6 100644 --- a/index.html +++ b/index.html @@ -1,497 +1,495 @@ - + - Loot Table Generator + -