Files
Ubuntu 32b43f85bd a
2026-07-03 16:58:28 +08:00

205 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{PROJECT_NAME}} 架构图</title>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'JetBrains Mono', monospace;
background: #020617;
min-height: 100vh;
padding: 2rem;
color: white;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
margin-bottom: 2rem;
}
.header-row {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 0.5rem;
}
.pulse-dot {
width: 12px;
height: 12px;
background: #22d3ee;
border-radius: 50%;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
h1 {
font-size: 1.5rem;
font-weight: 700;
letter-spacing: -0.025em;
}
.subtitle {
color: #94a3b8;
font-size: 0.875rem;
margin-left: 1.75rem;
}
.diagram-container {
background: rgba(15, 23, 42, 0.5);
border-radius: 1rem;
border: 1px solid #1e293b;
padding: 1.5rem;
overflow-x: auto;
}
svg {
width: 100%;
min-width: 900px;
display: block;
}
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
margin-top: 2rem;
}
.card {
background: rgba(15, 23, 42, 0.5);
border-radius: 0.75rem;
border: 1px solid #1e293b;
padding: 1.25rem;
}
.card-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
}
.card-dot {
width: 8px;
height: 8px;
border-radius: 50%;
}
.card-dot.frontend { background: #22d3ee; }
.card-dot.backend { background: #34d399; }
.card-dot.database { background: #a78bfa; }
.card h3 {
font-size: 0.875rem;
font-weight: 600;
color: #e2e8f0;
}
.card ul {
list-style: none;
font-size: 0.75rem;
color: #94a3b8;
line-height: 1.6;
}
.card li::before {
content: "• ";
color: #64748b;
}
.footer {
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid #1e293b;
font-size: 0.75rem;
color: #64748b;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="header-row">
<div class="pulse-dot"></div>
<h1>{{PROJECT_NAME}}</h1>
</div>
<div class="subtitle">系统架构图</div>
</div>
<div class="diagram-container">
<svg viewBox="0 0 1000 600" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1e293b" stroke-width="0.5"/>
</pattern>
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#64748b" />
</marker>
</defs>
<!-- 背景网格 -->
<rect width="1000" height="600" fill="url(#grid)"/>
<!-- 在此插入生成的 SVG 内容 -->
{{SVG_CONTENT}}
</svg>
</div>
<div class="cards">
<div class="card">
<div class="card-header">
<div class="card-dot frontend"></div>
<h3>前端组件</h3>
</div>
<ul>
{{FRONTEND_ITEMS}}
</ul>
</div>
<div class="card">
<div class="card-header">
<div class="card-dot backend"></div>
<h3>后端服务</h3>
</div>
<ul>
{{BACKEND_ITEMS}}
</ul>
</div>
<div class="card">
<div class="card-header">
<div class="card-dot database"></div>
<h3>数据存储</h3>
</div>
<ul>
{{DATABASE_ITEMS}}
</ul>
</div>
</div>
<div class="footer">
生成时间: {{TIMESTAMP}} | {{PROJECT_NAME}} Architecture Diagram
</div>
</div>
</body>
</html>