From 93448819b51a7899d33b847bd4f99108bfc8d24b Mon Sep 17 00:00:00 2001 From: lingbopro Date: Sun, 23 Jun 2024 11:16:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20Performance=20&=20Respon?= =?UTF-8?q?sive=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使计分UI成为响应式 - 改进了加载性能 - 一点细节 Issue #16 --- CONTRIBUTING.md | 2 +- assets/css/styles.css | 10 ++++++++++ assets/js/ui.js | 2 +- docs/CONTRIBUTING.zh-CN.md | 8 ++++---- index.html | 17 +++++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98aa1ee..e91f52e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ The subject contains a brief description of the change. #### footer Footer. -The footer should contain any information about major changes and is also the location to reference the GitHub Issue that this commit closes. +The footer should contain information about major changes and is also the location to reference the GitHub Issue that this commit closes. ## Hint - Use [Prettier](https://prettier.io) to format your code. diff --git a/assets/css/styles.css b/assets/css/styles.css index 78b6dc1..73959df 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -68,6 +68,9 @@ s-text-field { display: block; } +#playerListTitle { + margin: 10px; +} .player-list ul, #playerScoreList, #matchOrderList, #historyList { list-style: none; padding: 0; @@ -114,6 +117,13 @@ label { .game-board:not(.active) { display: none; } + +@media screen and (max-width: 700px) { + .game-board { + flex-direction: column; + } +} + .game-board>div { flex: 1; display: flex; diff --git a/assets/js/ui.js b/assets/js/ui.js index 554c3d2..84f44d1 100644 --- a/assets/js/ui.js +++ b/assets/js/ui.js @@ -1,6 +1,5 @@ document.addEventListener('DOMContentLoaded', () => { // 虽然但是,onclick:? - e_toggleTheme(readConfig('theme', 'auto')); setTimeout(function () { // 等Sober执行完 document.getElementById('main').style.visibility = 'visible'; document.getElementById('top-bar').style.visibility = 'visible'; @@ -8,6 +7,7 @@ document.addEventListener('DOMContentLoaded', () => { // 虽然但是,onclick }, 500); currentLanguage = readConfig('language', 'en-US'); document.documentElement.lang = currentLanguage; + e_toggleTheme(readConfig('theme', 'auto')); let langList = getLanguageList(); let languageMenuEl = document.getElementById('language-menu'); langList.forEach(function(currentValue) { diff --git a/docs/CONTRIBUTING.zh-CN.md b/docs/CONTRIBUTING.zh-CN.md index 2fbe7fd..672507a 100644 --- a/docs/CONTRIBUTING.zh-CN.md +++ b/docs/CONTRIBUTING.zh-CN.md @@ -46,14 +46,14 @@ Fork 存储库。 | 🐳 chore | 改变构建流程、或者增加依赖库、工具等 | | ↩ revert | 回滚到上一个版本 | -#### 主题 -主题。 -该主题包含对更改的简明描述。 +#### 标题 +标题。 +该标题包含对更改的简明描述。 #### 页脚 **可选。** 页脚。 -页脚应包含有关重大更改的任何信息,并且也是引用此提交关闭的 GitHub Issue 的位置。 +页脚应包含有关重大更改的信息,并且也是引用此提交关闭的 GitHub Issue 的位置。 ## 提示 - 使用 [Prettier](https://prettier.cn) 格式化您的代码。 diff --git a/index.html b/index.html index 9ae0537..2e466b8 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,14 @@ Table Tennis Counter + + + + + + + + @@ -75,7 +83,7 @@
-

+

    @@ -119,12 +127,5 @@

    - - - - - - -