mirror of
https://github.com/justhtmls/html-tools.git
synced 2026-08-31 02:03:51 +08:00
168 lines
4.4 KiB
HTML
168 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<link rel="icon" href="../../favicon.svg">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SQL 格式化工具 - JustHTMLs</title>
|
|
<link rel="canonical" href="https://www.htmls.dev/tools/sql-formatter/">
|
|
<style>
|
|
:root {
|
|
--accent: #10b981;
|
|
--accent-soft: #10b98133;
|
|
--bg: #0f172a;
|
|
--text: #0f172a;
|
|
--text-muted: #475569;
|
|
--border: #e2e8f0;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: linear-gradient(135deg, #10b981 0%, #0f172a 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.container {
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
color: white;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 2.3rem;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.card {
|
|
background: rgba(255, 255, 255, 0.96);
|
|
border-radius: 18px;
|
|
padding: 30px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.card h2 {
|
|
color: #1f2937;
|
|
margin-bottom: 16px;
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.card p {
|
|
color: var(--text-muted);
|
|
line-height: 1.8;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.features {
|
|
list-style: none;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.features li {
|
|
padding: 8px 0;
|
|
color: #334155;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.features li:before {
|
|
content: "✓";
|
|
color: var(--accent);
|
|
font-weight: bold;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 12px 26px;
|
|
background: var(--accent);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 10px;
|
|
font-weight: 600;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
margin: 6px 10px 6px 0;
|
|
}
|
|
|
|
.btn:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #64748b;
|
|
}
|
|
|
|
.preview {
|
|
background: #f8fafc;
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.preview iframe {
|
|
width: 100%;
|
|
height: 420px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>SQL 格式化工具</h1>
|
|
<p>格式化 SQL 语句,提升可读性</p>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2>关于这个工具</h2>
|
|
<p>SQL 格式化工具可以将复杂的 SQL 查询语句自动排版,突出关键字与层级结构。</p>
|
|
|
|
<h2>功能特点</h2>
|
|
<ul class="features">
|
|
<li>SQL 自动排版</li>
|
|
<li>支持常见数据库语法</li>
|
|
<li>快速复制结果</li>
|
|
<li>纯前端处理</li>
|
|
</ul>
|
|
|
|
<h2>使用场景</h2>
|
|
<ul class="features">
|
|
<li>阅读复杂 SQL</li>
|
|
<li>整理数据库脚本</li>
|
|
<li>代码审查</li>
|
|
<li>教学示例</li>
|
|
</ul>
|
|
|
|
<div style="margin-top: 24px;">
|
|
<a href="app.html" class="btn">开始使用</a>
|
|
<a href="https://github.com/justhtmls/html-tools/tree/main/tools/sql-formatter" target="_blank" class="btn btn-secondary">查看源码</a>
|
|
<a href="../../index.html" class="btn btn-secondary">返回首页</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2>快速预览</h2>
|
|
<div class="preview">
|
|
<iframe src="app.html" loading="lazy"></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="../../assets/clicks.js" defer></script>
|
|
</body>
|
|
</html>
|
|
|