Skip to content

Commit c695320

Browse files
committed
next closes matches
1 parent d97cb78 commit c695320

22 files changed

+2727
-684
lines changed

LeftValues Results_files/.DS_Store

8 KB
Binary file not shown.

LeftValues Results_files/LeftValues Results.html

+991
Large diffs are not rendered by default.

LeftValues Results_files/central.png

5.65 KB
Loading
5.76 KB
Loading

LeftValues Results_files/css.css

+232
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
/* cyrillic-ext */
2+
@font-face {
3+
font-family: 'Montserrat';
4+
font-style: normal;
5+
font-weight: 300;
6+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD3gTD_u50.woff2) format('woff2');
7+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
8+
}
9+
/* cyrillic */
10+
@font-face {
11+
font-family: 'Montserrat';
12+
font-style: normal;
13+
font-weight: 300;
14+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD3g3D_u50.woff2) format('woff2');
15+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
16+
}
17+
/* vietnamese */
18+
@font-face {
19+
font-family: 'Montserrat';
20+
font-style: normal;
21+
font-weight: 300;
22+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD3gbD_u50.woff2) format('woff2');
23+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
24+
}
25+
/* latin-ext */
26+
@font-face {
27+
font-family: 'Montserrat';
28+
font-style: normal;
29+
font-weight: 300;
30+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD3gfD_u50.woff2) format('woff2');
31+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
32+
}
33+
/* latin */
34+
@font-face {
35+
font-family: 'Montserrat';
36+
font-style: normal;
37+
font-weight: 300;
38+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD3gnD_g.woff2) format('woff2');
39+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
40+
}
41+
/* cyrillic-ext */
42+
@font-face {
43+
font-family: 'Montserrat';
44+
font-style: normal;
45+
font-weight: 400;
46+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2) format('woff2');
47+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
48+
}
49+
/* cyrillic */
50+
@font-face {
51+
font-family: 'Montserrat';
52+
font-style: normal;
53+
font-weight: 400;
54+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2) format('woff2');
55+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
56+
}
57+
/* vietnamese */
58+
@font-face {
59+
font-family: 'Montserrat';
60+
font-style: normal;
61+
font-weight: 400;
62+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2) format('woff2');
63+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
64+
}
65+
/* latin-ext */
66+
@font-face {
67+
font-family: 'Montserrat';
68+
font-style: normal;
69+
font-weight: 400;
70+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format('woff2');
71+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
72+
}
73+
/* latin */
74+
@font-face {
75+
font-family: 'Montserrat';
76+
font-style: normal;
77+
font-weight: 400;
78+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format('woff2');
79+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
80+
}
81+
/* cyrillic-ext */
82+
@font-face {
83+
font-family: 'Montserrat';
84+
font-style: normal;
85+
font-weight: 700;
86+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gTD_u50.woff2) format('woff2');
87+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
88+
}
89+
/* cyrillic */
90+
@font-face {
91+
font-family: 'Montserrat';
92+
font-style: normal;
93+
font-weight: 700;
94+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3g3D_u50.woff2) format('woff2');
95+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
96+
}
97+
/* vietnamese */
98+
@font-face {
99+
font-family: 'Montserrat';
100+
font-style: normal;
101+
font-weight: 700;
102+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gbD_u50.woff2) format('woff2');
103+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
104+
}
105+
/* latin-ext */
106+
@font-face {
107+
font-family: 'Montserrat';
108+
font-style: normal;
109+
font-weight: 700;
110+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gfD_u50.woff2) format('woff2');
111+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
112+
}
113+
/* latin */
114+
@font-face {
115+
font-family: 'Montserrat';
116+
font-style: normal;
117+
font-weight: 700;
118+
src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gnD_g.woff2) format('woff2');
119+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
120+
}
121+
/* cyrillic-ext */
122+
@font-face {
123+
font-family: 'Roboto';
124+
font-style: normal;
125+
font-weight: 400;
126+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
127+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
128+
}
129+
/* cyrillic */
130+
@font-face {
131+
font-family: 'Roboto';
132+
font-style: normal;
133+
font-weight: 400;
134+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
135+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
136+
}
137+
/* greek-ext */
138+
@font-face {
139+
font-family: 'Roboto';
140+
font-style: normal;
141+
font-weight: 400;
142+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
143+
unicode-range: U+1F00-1FFF;
144+
}
145+
/* greek */
146+
@font-face {
147+
font-family: 'Roboto';
148+
font-style: normal;
149+
font-weight: 400;
150+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
151+
unicode-range: U+0370-03FF;
152+
}
153+
/* vietnamese */
154+
@font-face {
155+
font-family: 'Roboto';
156+
font-style: normal;
157+
font-weight: 400;
158+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
159+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
160+
}
161+
/* latin-ext */
162+
@font-face {
163+
font-family: 'Roboto';
164+
font-style: normal;
165+
font-weight: 400;
166+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
167+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
168+
}
169+
/* latin */
170+
@font-face {
171+
font-family: 'Roboto';
172+
font-style: normal;
173+
font-weight: 400;
174+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
175+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
176+
}
177+
/* cyrillic-ext */
178+
@font-face {
179+
font-family: 'Roboto';
180+
font-style: normal;
181+
font-weight: 700;
182+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2) format('woff2');
183+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
184+
}
185+
/* cyrillic */
186+
@font-face {
187+
font-family: 'Roboto';
188+
font-style: normal;
189+
font-weight: 700;
190+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2) format('woff2');
191+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
192+
}
193+
/* greek-ext */
194+
@font-face {
195+
font-family: 'Roboto';
196+
font-style: normal;
197+
font-weight: 700;
198+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2) format('woff2');
199+
unicode-range: U+1F00-1FFF;
200+
}
201+
/* greek */
202+
@font-face {
203+
font-family: 'Roboto';
204+
font-style: normal;
205+
font-weight: 700;
206+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2) format('woff2');
207+
unicode-range: U+0370-03FF;
208+
}
209+
/* vietnamese */
210+
@font-face {
211+
font-family: 'Roboto';
212+
font-style: normal;
213+
font-weight: 700;
214+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2) format('woff2');
215+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
216+
}
217+
/* latin-ext */
218+
@font-face {
219+
font-family: 'Roboto';
220+
font-style: normal;
221+
font-weight: 700;
222+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2) format('woff2');
223+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
224+
}
225+
/* latin */
226+
@font-face {
227+
font-family: 'Roboto';
228+
font-style: normal;
229+
font-weight: 700;
230+
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2');
231+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
232+
}
6.92 KB
Loading

LeftValues Results_files/ecology.png

5.71 KB
Loading

LeftValues Results_files/i18n.js

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
// LANGUAGE SETTINGS
2+
function getCookie (name) {
3+
const value = '; ' + document.cookie
4+
const parts = value.split('; ' + name + '=')
5+
if (parts.length === 2) return parts.pop().split(';').shift()
6+
}
7+
function setCookie (cname, cvalue, exhours) {
8+
const d = new Date()
9+
d.setTime(Date.now() + (exhours * 60 * 60 * 1000))
10+
const expires = 'expires=' + d.toUTCString()
11+
document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/'
12+
}
13+
function setBodyClassUserLang (userLang) {
14+
document.getElementsByTagName('body')[0].classList.add(`__i18n-${userLang}`)
15+
}
16+
17+
const langElements = document.querySelectorAll('[data-i18n]')
18+
const userLang = getCookie('lang') || navigator.language || navigator.userLanguage
19+
setBodyClassUserLang(userLang)
20+
21+
const langPicker = document.getElementById('langPicker')
22+
23+
var REPLACEMENTS = {
24+
colors: {
25+
rev: '#890000',
26+
sci: '#88232B',
27+
cent: '#560000',
28+
int: '#782F52',
29+
party: '#963B33',
30+
prod: '#804E00',
31+
cons: '#27577A',
32+
ref: '#FC5959',
33+
uto: '#7F0037',
34+
dec: '#000000',
35+
nat: '#7F3300',
36+
syn: '#7F333B',
37+
eco: '#586808',
38+
prog: '#C4A717'
39+
}
40+
}
41+
42+
const replace = (string, values = null) => {
43+
if (values) {
44+
Object.getOwnPropertyNames(values).forEach((val, idx, array) => {
45+
REPLACEMENTS[val] = values[val]
46+
})
47+
}
48+
const re = /{{([\w\.]+)}}/
49+
50+
let m
51+
do {
52+
m = re.exec(string)
53+
if (m) {
54+
const x = m[1].split('.')
55+
switch (x.length) {
56+
case 1:
57+
string = string.replace(m[0], REPLACEMENTS[x[0]])
58+
break
59+
case 2:
60+
string = string.replace(m[0], REPLACEMENTS[x[0]][x[1]])
61+
break
62+
case 3:
63+
string = string.replace(m[0], REPLACEMENTS[x[0]][x[1]][x[2]])
64+
break
65+
default:
66+
console.error('nested replacements only allowed up to 3 levels')
67+
break
68+
}
69+
}
70+
} while (m)
71+
72+
return string
73+
}
74+
75+
const i18n = {
76+
getString (name, parameters = null) {
77+
if (userLang in i18n.l10n && name in i18n.l10n[userLang]) {
78+
if (parameters) {
79+
return replace(i18n.l10n[userLang][name], parameters)
80+
}
81+
return replace(i18n.l10n[userLang][name])
82+
}
83+
console.log(`using fallback for ${name}`)
84+
if (parameters) {
85+
return replace(i18n.l10n.en[name], parameters)
86+
}
87+
return replace(i18n.l10n.en[name])
88+
},
89+
lang: userLang,
90+
l10n: {}
91+
}
92+
93+
const addLanguage = (code, properties) => {
94+
i18n.l10n[code] = properties
95+
// Language picker
96+
if (langPicker) {
97+
const option = document.createElement('option')
98+
option.text = i18n.l10n[code].language_name
99+
option.value = code
100+
101+
if (option in langPicker.options) {
102+
} else {
103+
langPicker.add(option)
104+
}
105+
if (option.value === userLang) {
106+
langPicker.value = userLang
107+
}
108+
}
109+
}
110+
111+
const getl10n = async (code) => {
112+
const url = `/lang/lang_${code}.json`
113+
await window.fetch(url)
114+
.then(res => res.json())
115+
.then(out => addLanguage(code, out))
116+
.catch(err => { throw err })
117+
}
118+
119+
async function loadTranslation () { // eslint-disable-line no-unused-vars
120+
return Promise.all([
121+
getl10n('en'),
122+
getl10n('es'),
123+
getl10n('de'),
124+
getl10n('cn'),
125+
getl10n('ko'),
126+
getl10n('pt'),
127+
getl10n('ru'),
128+
getl10n('sh'),
129+
getl10n('pl'),
130+
getl10n('fr')
131+
]).then(() => {
132+
console.log(i18n)
133+
134+
langElements.forEach((element) => {
135+
const value = element.getAttribute('data-i18n')
136+
element.innerHTML = i18n.getString(value)
137+
})
138+
if (langPicker) {
139+
langPicker.onchange = function () {
140+
const language = langPicker.options[langPicker.selectedIndex].value
141+
setCookie('lang', language, 5)
142+
window.location.reload()
143+
}
144+
}
145+
})
146+
}
147+
148+
function delayPromise (duration) { // eslint-disable-line no-unused-vars
149+
return function (...args) {
150+
return new Promise((resolve, reject) => {
151+
setTimeout(() => {
152+
resolve(...args)
153+
}, duration)
154+
})
155+
}
156+
}

0 commit comments

Comments
 (0)