Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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&region=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
Expand Down
5 changes: 2 additions & 3 deletions public/assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,6 @@ <h3 data-i18n="footProjTitle">The project</h3>
</dialog>

<script src="data/movements.js"></script>
<script src="assets/app.js?v=7133f81a07"></script>
<script src="assets/app.js?v=4f5417c027"></script>
</body>
</html>
Loading