476 lines
13 KiB
HTML
Executable File
476 lines
13 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
|
/>
|
|
<title>帮助页面</title>
|
|
<link
|
|
rel="apple-touch-icon"
|
|
sizes="180x180"
|
|
href="{{ url_for('static', filename='images/webapp/apple-touch-icon.png') }}"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
sizes="32x32"
|
|
href="{{ url_for('static', filename='images/webapp/favicon-32x32.png') }}"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
sizes="16x16"
|
|
href="{{ url_for('static', filename='images/webapp/favicon-16x16.png') }}"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/ico"
|
|
href="{{ url_for('static', filename='images/webapp/favicon.ico') }}"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
href="{{ url_for('static', filename='css/all.min.css') }}?v={{ time }}"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
href="{{ url_for('static', filename='css/volume.css') }}?v={{ time }}"
|
|
/>
|
|
<script src="{{ url_for('static', filename='js/socketio/socket.io.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/marked/marked.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='css/github-markdown.min.css') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/md2html.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/i18n/jquery-3.7.1.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/i18n/jquery.i18n.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/i18n/setting-lang.js') }}"></script>
|
|
|
|
<!-- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> -->
|
|
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.min.css"> -->
|
|
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
/* background-color: #4a0e8f; */
|
|
background-image: url("../static/images/background.jpg");
|
|
/* Change 'path/to/your/background.jpg' to the path of your actual image */
|
|
background-size: cover;
|
|
/* Cover the entire page */
|
|
background-position: center;
|
|
/* Center the background image */
|
|
background-attachment: fixed;
|
|
/* Optional: Fix the background image during scrolling */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
width: 100vw;
|
|
margin: 0;
|
|
}
|
|
|
|
.top-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 20px;
|
|
position: fixed;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 40px;
|
|
z-index: 1000;
|
|
background-color: rgba(255, 255, 255, 0.288);
|
|
backdrop-filter: blur(5px);
|
|
/* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); */
|
|
/* 添加阴影 */
|
|
}
|
|
|
|
.logo {
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
color: #ffffffcc;
|
|
position: absolute;
|
|
left: 10px;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.logo img {
|
|
width: 32px;
|
|
margin-left: 20px;
|
|
}
|
|
|
|
.logo span {
|
|
margin-left: 10px;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.date-time-container {
|
|
/* display: grid;
|
|
grid-template-rows: 1fr 1fr;
|
|
grid-template-columns: 1fr 2fr; */
|
|
font-size: 16px;
|
|
color: white;
|
|
text-align: center;
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.weekday {
|
|
text-align: center;
|
|
/* grid-row: 1 / 2;
|
|
grid-column: 1 / 2; */
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.date {
|
|
text-align: center;
|
|
/* grid-row: 2 / 3;
|
|
grid-column: 1 / 2; */
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.time {
|
|
margin-left: 10px;
|
|
text-align: center;
|
|
/* grid-row: 1 / 3;
|
|
grid-column: 2 / 3; */
|
|
font-size: 32px;
|
|
/* 更大的字体大小 */
|
|
font-weight: bold;
|
|
}
|
|
|
|
.right-section {
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
right: 10px;
|
|
padding-right: 20px;
|
|
}
|
|
|
|
.status {
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.status span {
|
|
margin-left: 10px;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.status img {
|
|
width: 32px;
|
|
}
|
|
|
|
.shutdown {
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shutdown img {
|
|
width: 36px;
|
|
opacity: 0.75;
|
|
}
|
|
|
|
/* 弹窗的背景遮罩 */
|
|
.popup-modal {
|
|
display: none; /* 默认隐藏 */
|
|
position: fixed;
|
|
z-index: 1000; /* 确保弹窗在最顶层 */
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5); /* 背景透明 */
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 弹窗的内容 */
|
|
.popup-content {
|
|
background-color: rgba(255, 255, 255, 0.7); /* 背景透明度 */
|
|
backdrop-filter: blur(5px); /* 背景模糊效果 */
|
|
padding: 20px;
|
|
border-radius: 15px;
|
|
text-align: center;
|
|
width: 300px;
|
|
box-shadow: 0px 0px 24px rgba(255, 255, 255, 0.65); /* 与其他元素一致的阴影效果 */
|
|
}
|
|
|
|
/* 按钮样式 */
|
|
#popup-buttons button {
|
|
margin: 5px;
|
|
padding: 10px 25px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
background: linear-gradient(
|
|
to right bottom,
|
|
rgb(212, 96, 241),
|
|
rgba(145, 66, 197, 0.5)
|
|
); /* 紫色渐变 */
|
|
color: white;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
#popup-buttons button:active {
|
|
background: linear-gradient(
|
|
to right bottom,
|
|
rgba(145, 66, 197, 1),
|
|
rgb(212, 96, 241)
|
|
); /* 悬停时加深渐变 */
|
|
}
|
|
|
|
.container {
|
|
width: 90%;
|
|
height: 90%;
|
|
transform: translateY(2.5%);
|
|
}
|
|
|
|
#help-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
padding: 20px;
|
|
margin-top: 15px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 15px;
|
|
box-shadow: 0 0 24px rgba(145, 66, 197, 0.5);
|
|
width: 95%; /* 模仿 iPad 的宽度设置 */
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
overflow-wrap: break-word;
|
|
text-wrap: wrap;
|
|
min-height: 90%;
|
|
}
|
|
|
|
#markdown-section {
|
|
background-color: #ffffff;
|
|
/* background: rgba(255, 255, 255, 0.55); */
|
|
border-radius: 10px;
|
|
padding: 40px 60px;
|
|
box-shadow: 0 0 10px rgba(145, 66, 197, 0.3);
|
|
transition: all 0.3s ease;
|
|
flex: 1;
|
|
}
|
|
|
|
.language-markdown {
|
|
overflow-wrap: break-word;
|
|
text-wrap: wrap;
|
|
}
|
|
|
|
#markdown-section h1 {
|
|
position: relative;
|
|
}
|
|
#markdown-section h1:before {
|
|
position: absolute;
|
|
content: "";
|
|
width: 100%;
|
|
height: 2px;
|
|
background-color: #000;
|
|
left: 0;
|
|
bottom: -10px;
|
|
}
|
|
|
|
#markdown-content img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
#markdown-section table {
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
#markdown-section table th,
|
|
#markdown-section table td {
|
|
padding: 10px 0;
|
|
margin: 0;
|
|
}
|
|
|
|
#markdown-section table tbody tr {
|
|
position: relative;
|
|
}
|
|
|
|
#markdown-section table tbody tr:after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 1px;
|
|
background-color: #000;
|
|
}
|
|
#markdown-section pre {
|
|
margin: 4px auto;
|
|
padding: 24px;
|
|
background-color: #f5f5f5;
|
|
border: 1px solid #b3b3b3;
|
|
border-radius: 4px;
|
|
overflow-wrap: break-word;
|
|
text-wrap: wrap;
|
|
}
|
|
|
|
.custom-image {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.contact-box ul li {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.contact-box .jsfb-logo {
|
|
height: 60px;
|
|
border-radius: 10px;
|
|
margin: 0 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="top-bar">
|
|
<a href="{{ url_for('home') }}" class="logo">
|
|
<img
|
|
src="{{ url_for('static', filename='images/common/首页.svg') }}"
|
|
alt="首页"
|
|
/>
|
|
</a>
|
|
|
|
<div class="volume-control" id="volume-control">
|
|
<!-- 背景 -->
|
|
<div class="volume-background"></div>
|
|
<!-- 音量值显示 -->
|
|
<div class="volume-value" id="volume-value">50</div>
|
|
<!-- 可调节的白色底色 -->
|
|
<div class="volume-progress" id="volume-progress"></div>
|
|
<div class="volume-icon-box">
|
|
<img
|
|
id="volume-icon"
|
|
src="/static/images/volume/vol-med.png"
|
|
alt="音量"
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="date-time-container">
|
|
<div class="date-box">
|
|
<div class="weekday"></div>
|
|
<div class="date"></div>
|
|
</div>
|
|
<div class="time"></div>
|
|
</div>
|
|
<div class="right-section">
|
|
<div class="status" onclick="toggleConnection()">
|
|
<img
|
|
src="static/images/common/disconnected.svg"
|
|
id="status-icon"
|
|
alt="Connection Status"
|
|
/>
|
|
<span id="status-text"></span>
|
|
</div>
|
|
<div class="shutdown" onclick="shutdownSystem()">
|
|
<img
|
|
src="static/images/common/shutdown.svg"
|
|
id="shutdown-icon"
|
|
alt="Shutdown"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div id="help-container">
|
|
<div class="markdown-body" id="markdown-section"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Popup Modal -->
|
|
<div id="popup-modal" class="popup-modal">
|
|
<div class="popup-content">
|
|
<p id="popup-message">这里是消息内容</p>
|
|
<div id="popup-buttons">
|
|
<button
|
|
id="confirm-btn"
|
|
onclick="confirmAction()"
|
|
i18n="popup.confirm_btn"
|
|
>
|
|
确认
|
|
</button>
|
|
<button
|
|
id="cancel-btn"
|
|
onclick="cancelAction()"
|
|
i18n="popup.cancel_btn"
|
|
>
|
|
取消
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="../static/js/common.js"></script>
|
|
<script src="{{ url_for('static', filename='js/set_volume.js') }}?v={{ time }}"></script>
|
|
|
|
<script>
|
|
const startTunnel = function () {
|
|
fetch("/start_tunnel")
|
|
.then((response) => response.json())
|
|
.then((data) => {
|
|
console.log("start_tunnel running");
|
|
})
|
|
.catch((err) => {
|
|
console.log("error message:" + err);
|
|
});
|
|
};
|
|
const stopTunnel = function () {
|
|
fetch("/stop_tunnel")
|
|
.then((response) => response.json())
|
|
.then((data) => {
|
|
console.log("stop_tunnel running");
|
|
})
|
|
.catch((err) => {
|
|
console.log("error message:" + err);
|
|
});
|
|
};
|
|
|
|
// showPopup = function (message) {
|
|
// return new Promise((resolve) => {
|
|
// document.getElementById("popup-message").innerHTML = message;
|
|
// document.getElementById("popup-modal").style.display = "flex";
|
|
// document.getElementById("confirm-btn").onclick = () => {
|
|
// resolve(true);
|
|
// document.getElementById("popup-modal").style.display = "none";
|
|
// };
|
|
// document.getElementById("cancel-btn").onclick = () => {
|
|
// resolve(false);
|
|
// document.getElementById("popup-modal").style.display = "none";
|
|
// };
|
|
// });
|
|
// };
|
|
|
|
let mdName = `help_${lang}`;
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
console.log("help_page begin");
|
|
startTunnel();
|
|
loadMarkdown(mdName);
|
|
}); // 页面加载后执行
|
|
|
|
// 页面卸载前执行
|
|
window.addEventListener("beforeunload", function (event) {
|
|
console.log("help_page unload");
|
|
stopTunnel();
|
|
// 在这里放置你需要执行的代码
|
|
// 注意:`beforeunload`事件中对页面的更改或请求可能会被浏览器阻止
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|