Skip to content

Commit c6aa2e4

Browse files
authored
Preparations
Version 0.2.0 is Coming. 1. Optimize details.
1 parent 0116ebf commit c6aa2e4

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _🦌 网页小游戏 🥛_
1414

1515
小游戏:吃掉蔡徐坤
1616

17-
最新版本号:[0.1.0](https://github.com/OneSitos/EatKun/tree/0.1.0)
17+
最新版本号:[0.2.0](https://github.com/OneSitos/EatKun/tree/0.2.0)
1818

1919
[English](README_EN.md)
2020
|
@@ -80,7 +80,7 @@ _🦌 网页小游戏 🥛_
8080

8181
你可以随意更改右侧文字,就可以显示你想要的内容,**不要删掉双引号**
8282

83-
3. 找到`static/image`文件夹,点击前显示的图片是`ClickBefore.png`, 点击后的图片是`ClickAfter.png`,网站显示的图标为`ProgressiveWebApps.png`,把他们改成你想要的即可。
83+
3. 找到`static/image`文件夹,点击前显示的图片是`ClickBefore.png`, 点击后的图片是`ClickAfter.png`,网站显示的图标为`ProgressiveWebApps.png`(比例必须为 1:1),把他们改成你想要的即可。
8484

8585
**注意文件格式,需要是png**
8686

README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _🦌 Web Game 🥛_
1414

1515
A web game: EatKun
1616

17-
Latest version: [0.1.0](https://github.com/OneSitos/EatKun/tree/0.1.0)
17+
Latest version: [0.2.0](https://github.com/OneSitos/EatKun/tree/0.2.0)
1818

1919
[简体中文](README.md)
2020
|
@@ -78,7 +78,7 @@ Follow these steps to change the text displayed to what you want.
7878

7979
You can change the text on the right side. **Note that don't remove quotes(i.e. `"`)**
8080

81-
3. Go to directory `static/image`. The image shown before clicking is `ClickBefore.png`, after is `ClickAfter.png`, and the icon displayed on the website is `ProgressiveWebApps.png`.
81+
3. Go to directory `static/image`. The image shown before clicking is `ClickBefore.png`, after is `ClickAfter.png`, and the icon displayed on the website is `ProgressiveWebApps.png` (ratio must be 1:1).
8282

8383
**The file type must be png**
8484

README_HANT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _🦌 網頁小遊戲 🥛_
1414

1515
小遊戲:吃掉蔡徐坤
1616

17-
最新版本號:[0.1.0](https://github.com/OneSitos/EatKun/tree/0.1.0)
17+
最新版本號:[0.2.0](https://github.com/OneSitos/EatKun/tree/0.2.0)
1818

1919
[English](README_EN.md)
2020
|
@@ -80,7 +80,7 @@ _🦌 網頁小遊戲 🥛_
8080

8181
你可以隨意更改右側文字,就可以顯示你想要的內容,**不要刪掉雙引號**
8282

83-
3. 找到`static/image`資料夾,點擊前顯示的圖片是`ClickBefore.png`,點擊後的圖片是`ClickAfter.png`,網站顯示的圖示為`ProgressiveWebApps.png`,把它們改成你想要的即可。
83+
3. 找到`static/image`資料夾,點擊前顯示的圖片是`ClickBefore.png`,點擊後的圖片是`ClickAfter.png`,網站顯示的圖示為`ProgressiveWebApps.png`(比例必須為 1:1),把它們改成你想要的即可。
8484

8585
**注意檔案格式,需要是png**
8686

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<span data-i18n="game-intro4">GAME-INTRO4-I18N</span><br />
5858
</div>
5959
<div id="version" style="display: none;font-size:2.2em; color:#fff; line-height:1.5em;">
60-
<span data-i18n="version">VERSION-I18N</span><a href="javascript: void(0);" onclick="openWebpage('https://github.com/OneSitos/EatKun/tree/0.1.0')">0.1.0</a><br />
60+
<span data-i18n="version">VERSION-I18N</span><a href="javascript: void(0);" onclick="openWebpage('https://github.com/OneSitos/EatKun/tree/0.2.0')">0.2.0</a><br />
6161
</div>
6262
</div>
6363
<div id="btn_group" class="container text-nowrap">

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<span data-i18n="game-intro4">GAME-INTRO4-I18N</span><br />
6464
</div>
6565
<div id="version" style="display: none;font-size:2.2em; color:#fff; line-height:1.5em;">
66-
<span data-i18n="version">VERSION-I18N</span><a href="javascript: void(0);" onclick="openWebpage('https://github.com/OneSitos/EatKun/tree/0.1.0')">0.1.0</a><br />
66+
<span data-i18n="version">VERSION-I18N</span><a href="javascript: void(0);" onclick="openWebpage('https://github.com/OneSitos/EatKun/tree/0.2.0')">0.2.0</a><br />
6767
</div>
6868
</div>
6969
<div id="btn_group" class="container text-nowrap">

static/javascript/LanguageDetection.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@
3434
}).responseJSON
3535
}
3636

37+
const I18N = getJsonI18N()
38+
39+
$('[data-i18n]').each(function() {
40+
const content = I18N[this.dataset.i18n];
41+
$(this).text(content);
42+
});
43+
44+
$('[data-placeholder-i18n]').each(function() {
45+
$(this).attr('placeholder', I18N[this.dataset.placeholderI18n]);
46+
});
47+
48+
$('html').attr('lang', I18N['lang']);
49+
3750
function setupLocalizedManifest() {
3851
const LANG_TO_MANIFEST = [
3952
{ regex: /^zh-TW\b/i, file: 'manifest_zht.webmanifest' },
@@ -56,19 +69,6 @@
5669
document.head.appendChild(linkEl);
5770
}
5871

59-
const I18N = getJsonI18N()
60-
61-
$('[data-i18n]').each(function() {
62-
const content = I18N[this.dataset.i18n];
63-
$(this).text(content);
64-
});
65-
66-
$('[data-placeholder-i18n]').each(function() {
67-
$(this).attr('placeholder', I18N[this.dataset.placeholderI18n]);
68-
});
69-
70-
$('html').attr('lang', I18N['lang']);
71-
7272
w.init = function() {
7373
setupLocalizedManifest();
7474
if ('serviceWorker' in navigator) {

0 commit comments

Comments
 (0)