一些样式修改

This commit is contained in:
mofeng-git 2024-11-29 05:29:28 +00:00
parent ed68449274
commit 0dd117711d
9 changed files with 38 additions and 32 deletions

View File

@ -6,4 +6,9 @@
server: server:
host: localhost.localdomain host: localhost.localdomain
kvm: {} kvm: {
base_on: PiKVM,
app_name: One-KVM,
majaro_version: 241204,
author: SilentWind
}

View File

@ -25,7 +25,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>PiKVM IPMI Info</title> <title>One-KVM IPMI Info</title>
<link rel="apple-touch-icon" sizes="180x180" href="/share/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/share/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/share/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/share/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/share/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="/share/favicon-16x16.png">

View File

@ -1,7 +1,7 @@
extends ../start.pug extends ../start.pug
append vars append vars
- title = "PiKVM IPMI Info" - title = "One-KVM IPMI Info"
- main_js = "ipmi/main" - main_js = "ipmi/main"
- index_link = true - index_link = true

View File

@ -25,7 +25,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>PiKVM Session</title> <title>One-KVM Session</title>
<link rel="apple-touch-icon" sizes="180x180" href="/share/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/share/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/share/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/share/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/share/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="/share/favicon-16x16.png">
@ -2040,7 +2040,7 @@
</table><br> </table><br>
<div class="tabs-box"> <div class="tabs-box">
<input checked type="radio" name="about-tab-button" id="about-tab-meta-button"> <input checked type="radio" name="about-tab-button" id="about-tab-meta-button">
<label for="about-tab-meta-button">Meta</label> <label for="about-tab-meta-button" i18n="meta">Meta</label>
<div class="tab"> <div class="tab">
<div class="code" id="about-meta"> <div class="code" id="about-meta">
<div><span class="code-comment">// You can get this JSON using handle <a target="_blank" href="/api/info?fields=meta">/api/info?fields=meta</a><br> <div><span class="code-comment">// You can get this JSON using handle <a target="_blank" href="/api/info?fields=meta">/api/info?fields=meta</a><br>
@ -2050,20 +2050,20 @@
</div> </div>
</div> </div>
</div> </div>
<input checked="hardware" type="radio" name="about-tab-button" id="about-tab-hardware-button"> <input type="radio" name="about-tab-button" id="about-tab-hardware-button">
<label for="about-tab-hardware-button">Hardware</label> <label for="about-tab-hardware-button" i18n="hardware">Hardware</label>
<div class="tab"> <div class="tab">
<div class="code" id="about-hardware"><span class="code-comment">No data</span> <div class="code" id="about-hardware"><span class="code-comment">No data</span>
</div> </div>
</div> </div>
<input checked="version" type="radio" name="about-tab-button" id="about-tab-version-button"> <input type="radio" name="about-tab-button" id="about-tab-version-button">
<label for="about-tab-version-button">Version</label> <label for="about-tab-version-button" i18n="version">Version</label>
<div class="tab"> <div class="tab">
<div class="code" id="about-version"><span class="code-comment">No data</span> <div class="code" id="about-version"><span class="code-comment">No data</span>
</div> </div>
</div> </div>
<input checked="thanks" type="radio" name="about-tab-button" id="about-tab-thanks-button"> <input type="radio" name="about-tab-button" id="about-tab-thanks-button">
<label for="about-tab-thanks-button">Thanks</label> <label for="about-tab-thanks-button" i18n="thanks">Thanks</label>
<div class="tab"> <div class="tab">
<div class="code" id="about-thanks"><span class="code-comment" i18n="kvm_text2">// These kind people donated money to the PiKVM project<br> <div class="code" id="about-thanks"><span class="code-comment" i18n="kvm_text2">// These kind people donated money to the PiKVM project<br>
// and supported the work on it. We are very grateful<br> // and supported the work on it. We are very grateful<br>
@ -2708,7 +2708,7 @@
</div> </div>
</div> </div>
</div><br> </div><br>
<p class="text credits"><a target="_blank" href="https://pikvm.org">PiKVM Project</a>&nbsp; | &nbsp;<a target="_blank" href="https://docs.pikvm.org">Documentation</a>&nbsp; | &nbsp;<a target="_blank" href="https://pikvm.org/support">Support</a></p> <p class="text credits"><a target="_blank" href="https://pikvm.org" i18n="index_text_10">PiKVM Project</a>&nbsp; | &nbsp;<a target="_blank" href="https://docs.pikvm.org" i18n="index_text_11">Documentation</a>&nbsp; | &nbsp;<a target="_blank" href="https://github.com/mofeng-git/One-KVM" i18n="index_text_12">One-KVM Project</a>&nbsp; | &nbsp;<a target="_blank" href="https://one-kvm.mofeng.run" i18n="index_text_13">One-KVM Documentation</a></p>
</div> </div>
</div> </div>
<div class="window window-resizable" id="webterm-window" style="width: 640px; height: 480px"> <div class="window window-resizable" id="webterm-window" style="width: 640px; height: 480px">

View File

@ -1,7 +1,7 @@
extends ../base.pug extends ../base.pug
append vars append vars
- title = "PiKVM Session" - title = "One-KVM Session"
- main_js = "kvm/main" - main_js = "kvm/main"
- body_class = "body-no-select" - body_class = "body-no-select"
- css_list = css_list.concat(["navbar", "window", "modal", "led", "slider", "switch", "radio", "progress", "keypad", "tabs"]) - css_list = css_list.concat(["navbar", "window", "modal", "led", "slider", "switch", "radio", "progress", "keypad", "tabs"])

View File

@ -1,4 +1,4 @@
mixin about_tab(name, title, checked=false, i18nid) mixin about_tab(name, title, i18nid, checked=false)
- let button_id = `about-tab-${name}-button` - let button_id = `about-tab-${name}-button`
input(checked=checked type="radio" name="about-tab-button", id=button_id) input(checked=checked type="radio" name="about-tab-button", id=button_id)
label(for=button_id i18n=i18nid) #{title} label(for=button_id i18n=i18nid) #{title}
@ -27,7 +27,7 @@ div(id="about-window" class="window")
| Copyright &copy; 2018-2024 #[a(target="_blank" href="mailto:mdevaev@gmail.com") Maxim Devaev] | Copyright &copy; 2018-2024 #[a(target="_blank" href="mailto:mdevaev@gmail.com") Maxim Devaev]
br br
div(class="tabs-box") div(class="tabs-box")
+about_tab("meta", "Meta", true) +about_tab("meta", "Meta", "meta", true)
div div
span(class="code-comment") span(class="code-comment")
| // You can get this JSON using handle #[a(target="_blank" href="/api/info?fields=meta") /api/info?fields=meta]#[br] | // You can get this JSON using handle #[a(target="_blank" href="/api/info?fields=meta") /api/info?fields=meta]#[br]
@ -683,8 +683,10 @@ div(id="about-window" class="window")
li Zsombor Vari li Zsombor Vari
br br
p(class="text credits") p(class="text credits")
a(target="_blank" href="https://pikvm.org") PiKVM Project a(target="_blank" href="https://pikvm.org" i18n="index_text_10") PiKVM Project
| &nbsp; | &nbsp; | &nbsp; | &nbsp;
a(target="_blank" href="https://docs.pikvm.org") Documentation a(target="_blank" href="https://docs.pikvm.org" i18n="index_text_11") Documentation
| &nbsp; | &nbsp; | &nbsp; | &nbsp;
a(target="_blank" href="https://pikvm.org/support") Support a(target="_blank" href="https://github.com/mofeng-git/One-KVM" i18n="index_text_12") One-KVM Project
| &nbsp; | &nbsp;
a(target="_blank" href="https://one-kvm.mofeng.run" i18n="index_text_13") One-KVM Documentation

View File

@ -29,7 +29,7 @@
"ipmi_text3":"<b>NEVER</b> use the same passwords for KVMD and IPMI users. And even better not to use IPMI. Instead, you can directly use KVMD API via curl. Here some examples:", "ipmi_text3":"<b>NEVER</b> use the same passwords for KVMD and IPMI users. And even better not to use IPMI. Instead, you can directly use KVMD API via curl. Here some examples:",
"kvm_text1":"About", "kvm_text1":"About",
"kvm_text2":"// These <a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">kind people</a> donated money to the PiKVM project<br>// and supported the work on it. We are very grateful<br>// for their help, and memorializing their names<br>// is the least we can do in gratitude.<br>// If you also want to support this project,<br>// you can donate on <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> or <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> Paypal</a>.", "kvm_text2":"// These <a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">kind people</a> donated money to the PiKVM project and supported the work on it. <br>// If you also want to support this project, you can donate on <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> or <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> Paypal</a>.<br><br>// These <a href=\"https://one-kvm.mofeng.run/thanks/#_2\">kind people</a> donated money to the One-KVM project and supported the work on it. <br>// If you also want to support this project, you can donate on <a target=\"_blank\" href=\"https://afdian.com/a/silentwind\"> afdian </a>.",
"kvm_text3":"System", "kvm_text3":"System",
"kvm_text4":"Runtime settings &amp; tools", "kvm_text4":"Runtime settings &amp; tools",
"kvm_text5":"Term", "kvm_text5":"Term",

View File

@ -11,8 +11,8 @@
"index": " One-KVM 导航 ", "index": " One-KVM 导航 ",
"copyright": "版权所有 &copy; 2018-2024 Maxim Devaev | 由 SilentWind 二次开发", "copyright": "版权所有 &copy; 2018-2024 Maxim Devaev | 由 SilentWind 二次开发",
"index_text_1": "请注意,在使用 KVM 会话或其他可捕获键盘的应用程序时,您无法使用某些快捷键,如 Ctrl+Alt+Del这会被操作系统捕获或 Ctrl+W这会被浏览器捕获。", "index_text_1": "请注意,在使用 KVM 会话或其他可捕获键盘的应用程序时,您可能无法使用某些快捷键,如 Ctrl+Alt+Del这会被操作系统捕获或 Ctrl+W这会被浏览器捕获。",
"index_text_2": "要突破这一限制,您可以在应用程序模式下使用 Google Chrome 浏览器。", "index_text_2": "要突破这一限制,您可以使用 Google Chrome 浏览器。",
"serve_name": "主机名:", "serve_name": "主机名:",
"index_text_10":"PiKVM 项目", "index_text_10":"PiKVM 项目",
"index_text_11":"PiKVM 文档", "index_text_11":"PiKVM 文档",
@ -29,7 +29,7 @@
"ipmi_text3":"<b>不建议</b>为 KVMD 和 IPMI 用户使用相同的密码,或者直接关闭 IPMI。如有需要可以通过 curl 直接使用 KVMD API。下面是一些示例", "ipmi_text3":"<b>不建议</b>为 KVMD 和 IPMI 用户使用相同的密码,或者直接关闭 IPMI。如有需要可以通过 curl 直接使用 KVMD API。下面是一些示例",
"kvm_text1":"关于", "kvm_text1":"关于",
"kvm_text2":"//<a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">这些人</a>向 PiKVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 PiKVM ,可以在 <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> 或 <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> PayPal 上捐款</a>。<br><br>//<a href=\"https://one-kvm.mofeng.run/thanks/#_2\">这些人</a>向 One-KVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 One-KVM ,可以在 <a target=\"_blank\" href=\"https://afdian.com/a/silentwind\"> 爱发电 </a>上捐款</a>。", "kvm_text2":"//<a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">这些人</a>向 PiKVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 PiKVM ,可以在 <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> 或 <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> PayPal 上捐款</a>。<br><br>//<a href=\"https://one-kvm.mofeng.run/thanks/#_2\">这些人</a>向 One-KVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 One-KVM ,可以在 <a target=\"_blank\" href=\"https://afdian.com/a/silentwind\"> 爱发电 </a>上捐款</a>。",
"kvm_text3":"系统", "kvm_text3":"系统",
"kvm_text4":"运行设置 &amp; 工具", "kvm_text4":"运行设置 &amp; 工具",
"kvm_text5":"终端", "kvm_text5":"终端",
@ -149,7 +149,7 @@
"msd-message-image-broken":"当前镜像已损坏!", "msd-message-image-broken":"当前镜像已损坏!",
"msd-message-too-big-for-cdrom":"当前 CD-ROM 格式镜像大小超出限制!", "msd-message-too-big-for-cdrom":"当前 CD-ROM 格式镜像大小超出限制!",
"msd-message-out-of-storage":"当前镜像大小超出存储空间", "msd-message-out-of-storage":"当前镜像大小超出存储空间",
"msd-message-rw-enabled":"读写模式启用", "msd-message-rw-enabled":"读写模式启用",
"msd-message-downloads":"正在从 One-KVM 下载镜像", "msd-message-downloads":"正在从 One-KVM 下载镜像",
"msd-message-another-user-uploads":"另一个用户正在上传镜像", "msd-message-another-user-uploads":"另一个用户正在上传镜像",
"page-full-tab-stream-switch":"自动全屏视频窗口" "page-full-tab-stream-switch":"自动全屏视频窗口"

View File

@ -1,15 +1,10 @@
/* cookie存储用户选取的值 */
function setCookie (name, value) function setCookie (name, value)
{ {
/* 设置名称为name,值为value的Cookie */
var expdate = new Date(); var expdate = new Date();
/* 计算时间,30天后过期 */
expdate.setTime(expdate.getTime() + 30 * 24 * 60 * 60 * 1000); expdate.setTime(expdate.getTime() + 30 * 24 * 60 * 60 * 1000);
document.cookie = name + "=" + value + "; expires=" + expdate.toGMTString() + "; path=/" + ";SameSite=Lax"; document.cookie = name + "=" + value + "; expires=" + expdate.toGMTString() + "; path=/" + ";SameSite=Lax";
/* 即document.cookie= name+"="+value+";path=/"; 时间可以不要,但路径(path)必须要填写因为JS的默认路径是当前页如果不填此cookie只在当前页面生效 */
} }
/* 获取cookie */
function getCookie(name) function getCookie(name)
{ {
if (document.cookie.length > 0) if (document.cookie.length > 0)
@ -26,15 +21,19 @@ function getCookie(name)
return "" return ""
} }
/**
* 设置语言类型 默认为中文
*/
var i18nLanguage = "zh"; var i18nLanguage = "zh";
$(document).ready(function() { $(document).ready(function() {
/* 首先获取用户选择过的语言 */
if (getCookie('userLanguage')) { if (getCookie('userLanguage')) {
i18nLanguage = getCookie('userLanguage'); i18nLanguage = getCookie('userLanguage');
if (i18nLanguage == "zh") {
no = 0;
}else if (i18nLanguage == "en") {
no = 1;
}
$("#selectLanguage").each(function(){
$(this).find("option").eq(no).prop("selected",true)
});
} }
$("[i18n]").i18n({ $("[i18n]").i18n({