udpate
This commit is contained in:
183
public/index.html
Normal file
183
public/index.html
Normal file
@@ -0,0 +1,183 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>地图距离计算工具 - 使用说明</title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Highlight.js -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 40px 0;
|
||||
}
|
||||
.card {
|
||||
border: none;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
||||
}
|
||||
.card-header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
border-radius: 16px 16px 0 0 !important;
|
||||
padding: 25px 30px;
|
||||
}
|
||||
.card-header h1 {
|
||||
margin: 0;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.card-body {
|
||||
padding: 30px;
|
||||
}
|
||||
#content {
|
||||
font-size: 1rem;
|
||||
line-height: 1.8;
|
||||
}
|
||||
#content h1 {
|
||||
color: #667eea;
|
||||
border-bottom: 2px solid #667eea;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
#content h2 {
|
||||
color: #764ba2;
|
||||
margin-top: 30px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
#content h3 {
|
||||
color: #555;
|
||||
margin-top: 20px;
|
||||
}
|
||||
#content h4 {
|
||||
color: #666;
|
||||
margin-top: 15px;
|
||||
}
|
||||
#content p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
#content ul, #content ol {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 25px;
|
||||
}
|
||||
#content li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
#content a {
|
||||
color: #667eea;
|
||||
text-decoration: none;
|
||||
}
|
||||
#content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#content pre {
|
||||
border-radius: 10px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
#content code:not(pre code) {
|
||||
background: #f3f4f6;
|
||||
color: #e91e63;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#content table {
|
||||
margin: 15px 0;
|
||||
width: 100%;
|
||||
}
|
||||
#content th, #content td {
|
||||
border: 1px solid #dee2e6;
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
#content th {
|
||||
background: #f8f9fa;
|
||||
font-weight: 600;
|
||||
}
|
||||
#content tr:hover {
|
||||
background: #f8f9fa;
|
||||
}
|
||||
#content blockquote {
|
||||
border-left: 4px solid #667eea;
|
||||
padding-left: 20px;
|
||||
margin: 15px 0;
|
||||
color: #666;
|
||||
background: #f8f9fa;
|
||||
padding: 15px 20px;
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
#content img {
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 50px;
|
||||
color: #666;
|
||||
}
|
||||
.spinner-border {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h1>地图距离计算工具 - 使用说明</h1>
|
||||
</div>
|
||||
<div class="card-body" id="content">
|
||||
<div class="loading">
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="visually-hidden">加载中...</span>
|
||||
</div>
|
||||
<p class="mt-3">文档加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap Bundle JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Marked JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<!-- Highlight.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
|
||||
<script>
|
||||
async function loadDocs() {
|
||||
try {
|
||||
const response = await fetch('./docs.md');
|
||||
if (!response.ok) {
|
||||
throw new Error('文档加载失败');
|
||||
}
|
||||
const markdown = await response.text();
|
||||
document.getElementById('content').innerHTML = marked.parse(markdown);
|
||||
|
||||
// 代码高亮
|
||||
document.querySelectorAll('pre code').forEach((block) => {
|
||||
hljs.highlightElement(block);
|
||||
});
|
||||
} catch (error) {
|
||||
document.getElementById('content').innerHTML = `
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h4 class="alert-heading">加载失败</h4>
|
||||
<p>${error.message}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
loadDocs();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user