297 lines
8.3 KiB
HTML
297 lines
8.3 KiB
HTML
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet" media="print" onload="this.media='all'">
|
|
<script src="https://cdn.gvsds.com/marked.js/src/marked.min.js"></script>
|
|
<link rel="stylesheet" href="https://cdn.gvsds.com/highlight.js/styles/github.min.css" media="print" onload="this.media='all'">
|
|
<script src="https://cdn.gvsds.com/highlight.js/highlight.min.js"></script>
|
|
|
|
<!--script src="https://cdn.gvsds.com/KaTeX/0.16.9/katex.min.js"></script>
|
|
<link rel="stylesheet" href="https://cdn.gvsds.com/KaTeX/0.16.9/katex.min.css">
|
|
<script src="https://cdn.gvsds.com/mermaid/11.5.0/mermaid.min.js"></script>
|
|
<script defer src="https://cdn.gvsds.com/KaTeX/0.16.9/contrib/auto-render.min.js"></script-->
|
|
|
|
<!-- 自定义工具类 -->
|
|
<style type="text/tailwindcss">
|
|
@layer utilities {
|
|
.content-auto {
|
|
content-visibility: auto;
|
|
}
|
|
|
|
.sidebar-shadow {
|
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.article-shadow {
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.transition-all-300 {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.markdown-content h2 {
|
|
@apply text-2xl font-bold text-gray-800 mt-8 mb-4 border-b border-gray-200 pb-2;
|
|
}
|
|
|
|
.markdown-content h3 {
|
|
@apply text-xl font-bold text-gray-800 mt-6 mb-3;
|
|
}
|
|
|
|
.markdown-content p {
|
|
@apply text-gray-700 mb-4 leading-relaxed;
|
|
}
|
|
|
|
.markdown-content a {
|
|
@apply text-primary hover:underline;
|
|
}
|
|
|
|
.markdown-content pre {
|
|
@apply bg-gray-50 rounded-lg p-4 my-4 overflow-x-auto relative border border-gray-200;
|
|
}
|
|
|
|
.markdown-content pre::before {
|
|
content: '';
|
|
}
|
|
|
|
.code-title {
|
|
position: relative;
|
|
top: 0;
|
|
left: 0;
|
|
font-size: 0.8rem;
|
|
color: #999;
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
padding: 0.1rem 0.3rem;
|
|
border-radius: 0.2rem 0.2rem 0 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.markdown-content code {
|
|
@apply font-mono text-sm;
|
|
}
|
|
|
|
.markdown-content ul {
|
|
@apply list-disc pl-5 mb-4 text-gray-700;
|
|
}
|
|
|
|
.markdown-content ol {
|
|
@apply list-decimal pl-5 mb-4 text-gray-700;
|
|
}
|
|
|
|
.markdown-content blockquote {
|
|
@apply border-l-4 border-primary pl-4 italic my-4 text-gray-600;
|
|
}
|
|
|
|
.scrollbar-thin {
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
.scrollbar-thin::-webkit-scrollbar {
|
|
width: 5px;
|
|
}
|
|
|
|
.scrollbar-thin::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
background-color: rgba(156, 163, 175, 0.5);
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.copy-btn,
|
|
.demo-btn {
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
padding: 0.1rem 0.3rem;
|
|
border-radius: 0.2rem;
|
|
cursor: pointer;
|
|
margin-left: 0.2rem;
|
|
}
|
|
|
|
.loading-spinner {
|
|
border: 4px solid rgba(0, 0, 0, 0.1);
|
|
border-left-color: #165DFF;
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
animation: spin 1s linear infinite;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* 表格边框样式 */
|
|
.markdown-content table {
|
|
@apply border-collapse border border-gray-300 w-full;
|
|
}
|
|
|
|
.markdown-content th,
|
|
.markdown-content td {
|
|
@apply border border-gray-300 p-2;
|
|
}
|
|
|
|
/* 更多内嵌HTML卡片样式 */
|
|
.html-card {
|
|
@apply bg-gray-100 p-4 rounded-md mb-4 shadow-md;
|
|
}
|
|
|
|
.html-card-blue {
|
|
@apply bg-blue-100 p-4 rounded-md mb-4 shadow-md;
|
|
}
|
|
|
|
.html-card-green {
|
|
@apply bg-green-100 p-4 rounded-md mb-4 shadow-md;
|
|
}
|
|
}
|
|
</style>
|
|
<style>
|
|
.progress-bar {
|
|
width: 100%;
|
|
background-color: #f3f3f3;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress {
|
|
width: 0%;
|
|
height: 30px;
|
|
background-color: #4CAF50;
|
|
text-align: center;
|
|
line-height: 30px;
|
|
color: white;
|
|
}
|
|
|
|
/* 加载动画样式 */
|
|
.loading-spinner {
|
|
width: 60px;
|
|
height: 60px;
|
|
position: relative;
|
|
}
|
|
|
|
.spinner {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: 3px solid #f3f3f3;
|
|
border-radius: 50%;
|
|
border-top: 3px solid #3498db;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* 搜索结果样式 */
|
|
.search-result-item {
|
|
background-color: white;
|
|
border-color: #e2e8f0;
|
|
}
|
|
|
|
/* 代码块样式 */
|
|
.code-title {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background-color: #f8fafc;
|
|
color: #475569;
|
|
padding: 4px 10px;
|
|
border-radius: 4px 4px 0 0;
|
|
font-family: monospace;
|
|
font-size: 0.9rem;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.copy-btn, .demo-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: #64748b;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.copy-btn:hover, .demo-btn:hover {
|
|
color: #3b82f6;
|
|
}
|
|
|
|
pre {
|
|
margin-top: 0 !important;
|
|
border-radius: 0 0 4px 4px !important;
|
|
}
|
|
|
|
.iframe-content {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
color: #333;
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
|
|
<div class="font-inter bg-white text-gray-800 min-h-screen flex flex-col transition-all duration-300">
|
|
|
|
<header class="bg-white border-b border-gray-200 shadow-sm sticky z-30 transition-all duration-300 w-full top-0" style="position: fixed;">
|
|
<div class="container mx-auto px-4 py-3 flex items-center justify-between">
|
|
<div class="flex items-center space-x-2">
|
|
<button id="sidebar-toggle" class="lg:hidden p-2 rounded-md hover:bg-gray-100 transition-all-300">
|
|
<i class="fa fa-bars text-lg"></i>
|
|
</button>
|
|
<h1 class="text-xl font-bold text-primary flex items-center">
|
|
<i class="fa fa-book mr-2"></i><span id="header-title">平滑阅读</span>
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-4">
|
|
<div class="relative hidden md:block">
|
|
<input id="global-search" type="text" placeholder="全局搜索..."
|
|
class="bg-gray-100 rounded-full py-1.5 pl-10 pr-4 w-64 focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all-300">
|
|
<i class="fa fa-search absolute left-3 top-2 text-gray-400"></i>
|
|
<button id="search-button" class="absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 transition-all-300">
|
|
<i class="fa fa-search text-gray-400"></i>
|
|
</button>
|
|
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-100 transition-all-300">
|
|
<i class="fa fa-moon dark:hidden text-lg"></i>
|
|
<i class="fa fa-sun hidden dark:inline-block text-lg"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="flex flex-1 h-[calc(100vh-3.5rem)]">
|
|
<!-- 侧边栏 -->
|
|
<aside id="sidebar" class="w-64 bg-white border-r border-gray-200 sidebar-shadow fixed h-[calc(100vh-3.5rem)] left-0 top-[3.5rem] z-20 transform -translate-x-full lg:translate-x-0 transition-transform duration-300 ease-in-out overflow-y-auto scrollbar-thin">
|
|
<div class="p-4">
|
|
<!-- 侧边栏搜索 -->
|
|
<div class="relative mb-6">
|
|
<input id="sidebar-search" type="text" placeholder="搜索章节..."
|
|
class="bg-gray-100 rounded-lg py-2 pl-10 pr-4 w-full focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all-300 mt-7">
|
|
<i class="fa fa-search absolute left-3 top-2.5 text-gray-400 mt-7"></i>
|
|
</div>
|
|
|
|
<!-- 章节列表 -->
|
|
<nav id="sidebar-nav" class="space-y-1"></nav>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- 遮罩层 -->
|
|
<div id="overlay" class="fixed inset-0 bg-black bg-opacity-50 z-10 lg:hidden hidden transition-opacity duration-300"></div>
|
|
|
|
<!-- 主内容区 -->
|
|
<main class="flex-1 lg:ml-64 overflow-y-auto scrollbar-thin">
|
|
<div class="max-w-5xl mx-auto p-6 md:p-8">
|
|
<div id="article-container" class="markdown-content bg-white rounded-xl article-shadow p-6 md:p-8 transition-all duration-300">
|
|
<div class="flex flex-col items-center justify-center h-64 text-gray-500">
|
|
<i class="fa fa-file-text-o text-5xl mb-4"></i>
|
|
<p>点选章节以开始阅读</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script src="/lib/script.js"></script>
|
|
{{ NoFooter }} |