diff --git a/index.html b/index.html index 40ffdba..32c8bec 100644 --- a/index.html +++ b/index.html @@ -26,14 +26,14 @@
-

Add keys

- +

Add keys

+
-

Start pressing!

+

Start pressing!


@@ -42,24 +42,24 @@

-

Customisation

+

Customise

-
Active: +
Active:
-
Inactive: +
Inactive:
-
Accent: +
Accent:
-
Key Background: +
Key Background:
-
Key Opacity: +
Key Opacity:
-
Background: +
Background:
@@ -67,19 +67,19 @@

Customisation


-
Accessiblity mode: +
Accessiblity mode:
-
Round progress: +
Round progress:
-
Instant transitions: +
Instant transitions:
-

Presets

+

Presets

- - - + + +
-

Saved

+

Saved


-

Wooting layouts

+

Wooting layouts

- Community presets + Community presets
-

Lan Connection

-

Connect to external client.
Press connect and wait ~3 seconds.

+

Lan Connection

+

Connect to external client.
Press connect and wait ~3 seconds.

- + +
+ +
+

Language

+ +
- add_circleAdd - keys + add_circle + Add keys settingsCustomise + class="infoField" data-i18n="menus.customise.title">Customise bookmarksPresets + class="infoField" data-i18n="menus.presets.title">Presets magic_tetherLAN connection + class="infoField" data-i18n="menus.lanconnection.title">LAN connection visibilityToggle info + class="infoField" data-i18n="menus.extrainfo.title">Toggle info + translateLanguage
- Rename: + Rename: - Fill dir. + Fill dir. @@ -162,7 +170,7 @@

Lan Connection

🡦
- Remove + Remove
@@ -186,4 +194,8 @@

Lan Connection

+ + + + \ No newline at end of file diff --git a/pages/globaldefault/data/languages.js b/pages/globaldefault/data/languages.js new file mode 100644 index 0000000..fdf7419 --- /dev/null +++ b/pages/globaldefault/data/languages.js @@ -0,0 +1,125 @@ +var english = { + menus: { + // addkeys + addkeys: { + title: "Add Keys", + }, + // customise + customise: { + title: "Customise", + active: "Active", + inactive: "Inactive", + accent: "Accent", + keybackground: "Key Background", + keyopacity: "Key Opacity", + background: "Background", + accessiblitymode: "Accessiblity Mode", + roundprogress: "Rounded Progress", + instanttransitions: "Instant Transitions", + }, + // presets + presets: { + title: "Presets", + save: "Save", + loadclipboard: "Load from Clipboard", + copytoclipboard: "Copy to Clipboard", + saved: "Saved", + wootinglayouts: "Wooting Layouts", + communitypresets: "Community Presets", + }, + // lanconnection + lanconnection: { + title: "LAN Connection", + desc: "Connect to an external client.
Please connect and wait ~3 seconds.", + connect: "Connect", + }, + //extra info + extrainfo: { + title: "Toggle Info", + initialhint: "Start typing!", + acitvekeys: "Active Keys", + }, + // edit right click + edit: { + rename: "Rename", + filldir: "Fill dir.", + remove: "Remove", + }, + // language + language: { + title: "Language", + } + } + +} + +var chinese = { + menus: { + addkeys: { + title: "添加键", + }, + // customise + customise: { + title: "定制", + active: "积极的", + inactive: "不活跃", + accent: "口音", + keybackground: "主要背景", + keyopacity: "键不透明度", + background: "背景", + accessiblitymode: "无障碍模式", + roundprogress: "全面进展", + instanttransitions: "即时转换", + }, + // presets + presets: { + title: "预设", + save: "保存", + loadclipboard: "从剪贴板加载", + copytoclipboard: "复制到剪贴板", + saved: "保存的布局", + wootinglayouts: "Wooting 布局", + communitypresets: "社区布局", + }, + // lanconnection + lanconnection: { + title: "LAN 联系", + desc: "连接到外部客户端。
请连接并等待约 3 秒", + connect: "连接", + }, + //extra info + extrainfo: { + title: "切换信息", + initialhint: "开始打字!", + acitvekeys: "活动键", + }, + // edit right click + edit: { + rename: "重命名", + filldir: "填充方向", + remove: "消除", + }, + // language + language: { + title: "改变语言", + } + } +} + +var translator = new Translator({ + defaultLanguage: 'en', + detectLanguage: true, + persist : true, + persistKey: 'userLanguage', +}); +translator.add('en', english); +translator.add('zh', chinese); + +// translate the page to the detected language +translator.translatePageTo(); + +for (let button of document.querySelectorAll('button')) { + button.addEventListener('click', (evt) => { + translator.translatePageTo(evt.target.dataset.lang); + }); + } diff --git a/pages/globaldefault/styles.css b/pages/globaldefault/styles.css index 75ff5cb..d8e5028 100644 --- a/pages/globaldefault/styles.css +++ b/pages/globaldefault/styles.css @@ -13,7 +13,7 @@ --app-bg: #181818; --elem-prim-bg: #212121b3; --elem-prim-border: #353b44; - --elem-sec-bg: #212121; + --elem-sec-bg: rgba(33, 33, 33, 0.98); --elem-sec-border: #555555; --elem-tert-bg: #4d4d4d; @@ -32,7 +32,8 @@ body { background-color: var(--app-bg); color: white; - font-family: monospace; + /* find monospace sans serif font famil */ + font-family: Consolas, monospace; -webkit-user-select: none; /* Safari */ -ms-user-select: none; @@ -44,7 +45,7 @@ body { /* Universal */ * { - transition: color 0.5s, background-color 0.5s; + transition: background-color 0.5s; color: var(--fg-color); } @@ -150,10 +151,12 @@ h2, h3 { display: flex; flex-direction: column; gap: 1em; + + overflow: auto; } #presets, -#lanSettings { +#lanSettings, #languages { visibility: hidden; background-color: var(--elem-sec-bg); border: 1px solid var(--elem-sec-border); @@ -172,6 +175,8 @@ h2, h3 { display: flex; flex-direction: column; gap: 0.5em; + + overflow: auto } #savedPresets{ @@ -213,6 +218,7 @@ textarea { flex-shrink: 1; max-width: 100%; min-width: 0; + transition: color 0s; } input[type="text"] { @@ -277,10 +283,10 @@ hr { #keyPool { /* width: 28vw; */ width: min(420px, 32vw); - height: 90vh; + height: 94vh; position: fixed; - top: 5vmin; - right: 5vmin; + top: 3vh; + right: 3vh; background-color: var(--elem-prim-bg); border: 1px solid var(--elem-sec-border); backdrop-filter: blur(12px); @@ -366,6 +372,7 @@ hr { .label { z-index: 0; text-shadow: 2px 2px 6px #1312123c; + transition: color 0.5s; } /* Pressure progress on keys */