diff --git a/README.md b/README.md index fc7dacd..a6e5c45 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A sibling of [Worldlines](https://worldlines.geekplux.org/), a Mondrian-style at - **One timeline** for 45,000 years. The scale is compressed for older periods, and thick rules mark where it changes. Hover over a style to light up what it grew from and what it led to. - **Filters** by era and region in a bar that stays on screen while you browse the styles. They also dim the timeline, and a filtered view can be shared as a link, e.g. `?era=avant,post®ion=west`. - **Real images**: 92 freely licensed files from Wikimedia Commons, hosted with the site and credited with author and licence ([CREDITS.md](CREDITS.md)). Works still in copyright are linked, not reproduced. -- **English and Chinese** throughout, switchable on the page. The English view shows no Chinese, and the Chinese view keeps each style's English name beside it. The choice is remembered, Chinese is the default for Chinese-language browsers, and `?lang=en` or `?lang=zh` in a link opens that language. +- **English and Chinese** throughout, switchable on the page. The English view shows no Chinese, and the Chinese view keeps each style's English name beside it. English is the default; the choice is remembered, and `?lang=en` or `?lang=zh` in a link opens that language. - **No build step.** Plain HTML, CSS and JavaScript. All content lives in one data file. ## Run it locally diff --git a/public/assets/app.js b/public/assets/app.js index 4fb438d..94de8c4 100644 --- a/public/assets/app.js +++ b/public/assets/app.js @@ -93,11 +93,10 @@ get(k) { try { return localStorage.getItem(k); } catch (e) { return null; } }, set(k, v) { try { localStorage.setItem(k, v); } catch (e) { /* storage blocked */ } } }; - /* Language: ?lang=en|zh (shareable links) wins, then the saved choice, then the browser's language. */ + /* Language: ?lang=en|zh (shareable links) wins, then the visitor's saved choice; otherwise English. */ const LANGS = ["en", "zh"]; - const browserZh = (navigator.language || "").toLowerCase().startsWith("zh"); const urlLang = new URLSearchParams(location.search).get("lang"); - let lang = LANGS.includes(urlLang) ? urlLang : store.get("art-isms-lang") || (browserZh ? "zh" : "en"); + let lang = LANGS.includes(urlLang) ? urlLang : store.get("art-isms-lang") || "en"; if (!LANGS.includes(lang)) lang = "en"; /* Update one query parameter without reloading or touching the hash. */ function setParam(key, value) { diff --git a/public/index.html b/public/index.html index ac16f05..4fbebf7 100644 --- a/public/index.html +++ b/public/index.html @@ -426,6 +426,6 @@

The project

- +