💡 Update docs
This commit is contained in:
1 parent
737f83cd5f
commit
80c8ecb4cf
16 files changed
+230
-69
No files matched your search
+10
-10
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
<!-- 主卡片 -->
|
<!-- 主卡片 -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h1 class="card-title" data-en="VoidRaft Changelog" data-zh="VoidRaft 更新日志">VoidRaft 更新日志</h1>
|
<h1 class="card-title" data-en="VoidRaft Changelog" data-zh="VoidRaft 更新日志">VoidRaft Changelog</h1>
|
||||||
<div class="card-controls">
|
<div class="card-controls">
|
||||||
<button id="theme-toggle" class="btn btn-secondary" title="切换主题">
|
<button id="theme-toggle" class="btn btn-secondary" title="切换主题">
|
||||||
<i class="fas fa-sun"></i> 主题
|
<i class="fas fa-sun"></i> <span data-en="Theme" data-zh="主题">Theme</span>
|
||||||
</button>
|
</button>
|
||||||
<button id="lang-toggle" class="btn btn-secondary">
|
<button id="lang-toggle" class="btn btn-secondary">
|
||||||
<i class="fas fa-language"></i> 中/EN
|
<i class="fas fa-language"></i> 中/EN
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
<!-- 导航区域 -->
|
<!-- 导航区域 -->
|
||||||
<div class="nav-links">
|
<div class="nav-links">
|
||||||
<a href="index.html" class="btn btn-secondary">
|
<a href="index.html" class="btn btn-secondary">
|
||||||
<i class="fas fa-home"></i> <span data-en="Home" data-zh="首页">首页</span>
|
<i class="fas fa-home"></i> <span data-en="Home" data-zh="首页">Home</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft" class="btn btn-secondary">
|
<a href="https://github.com/landaiqing/voidraft" class="btn btn-secondary">
|
||||||
<i class="fab fa-github"></i> <span data-en="Source Code" data-zh="源代码">源代码</span>
|
<i class="fab fa-github"></i> <span data-en="Source Code" data-zh="源代码">Source Code</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 加载中提示 -->
|
<!-- 加载中提示 -->
|
||||||
<div id="loading" class="loading-container">
|
<div id="loading" class="loading-container">
|
||||||
<div class="loading-spinner"></div>
|
<div class="loading-spinner"></div>
|
||||||
<p data-en="Loading releases..." data-zh="正在加载版本信息...">正在加载版本信息...</p>
|
<p data-en="Loading releases..." data-zh="正在加载版本信息...">Loading releases...</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 更新日志内容 -->
|
<!-- 更新日志内容 -->
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
<div id="error-message" class="error-container" style="display: none;">
|
<div id="error-message" class="error-container" style="display: none;">
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
<i class="fas fa-exclamation-triangle"></i>
|
||||||
<p data-en="Failed to load release information. Please try again later."
|
<p data-en="Failed to load release information. Please try again later."
|
||||||
data-zh="加载版本信息失败,请稍后再试。">加载版本信息失败,请稍后再试。</p>
|
data-zh="加载版本信息失败,请稍后再试。">Failed to load release information. Please try again later.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 页脚 -->
|
<!-- 页脚 -->
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<p class="footer-text" data-en="© 2023-2024 VoidRaft - An elegant text snippet recording tool designed for developers" data-zh="© 2023-2024 VoidRaft - 专为开发者打造的优雅文本片段记录工具">© 2023-2024 VoidRaft - 专为开发者打造的优雅文本片段记录工具</p>
|
<p class="footer-text" data-en="© 2025 VoidRaft - An elegant text snippet recording tool designed for developers" data-zh="© 2025 VoidRaft - 专为开发者打造的优雅文本片段记录工具">© 2023-2024 VoidRaft - An elegant text snippet recording tool designed for developers</p>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<a href="https://github.com/landaiqing/voidraft" target="_blank" class="footer-link">GitHub</a>
|
<a href="https://github.com/landaiqing/voidraft" target="_blank" class="footer-link">GitHub</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft/issues" target="_blank" class="footer-link" data-en="Issues" data-zh="问题反馈">问题反馈</a>
|
<a href="https://github.com/landaiqing/voidraft/issues" target="_blank" class="footer-link" data-en="Issues" data-zh="问题反馈">Issues</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft/releases" target="_blank" class="footer-link" data-en="Releases" data-zh="版本发布">版本发布</a>
|
<a href="https://github.com/landaiqing/voidraft/releases" target="_blank" class="footer-link" data-en="Releases" data-zh="版本发布">Releases</a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+36
-1
@@ -179,7 +179,27 @@
|
|||||||
.markdown-content ul,
|
.markdown-content ul,
|
||||||
.markdown-content ol {
|
.markdown-content ol {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
margin-bottom: 15px;
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-content li {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-content li:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-content hr {
|
||||||
|
border: none;
|
||||||
|
border-top: 2px dashed var(--border-color);
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-content br {
|
||||||
|
display: block;
|
||||||
|
content: "";
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content code {
|
.markdown-content code {
|
||||||
@@ -232,6 +252,21 @@
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Markdown内容样式增强 */
|
||||||
|
.markdown-content blockquote {
|
||||||
|
border-left: 4px solid var(--primary-color);
|
||||||
|
padding: 10px 15px;
|
||||||
|
margin: 15px 0;
|
||||||
|
background-color: rgba(var(--light-bg-rgb), 0.5);
|
||||||
|
border-radius: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-content ul,
|
||||||
|
.markdown-content ol {
|
||||||
|
padding-left: 20px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* 移动设备响应式优化 */
|
/* 移动设备响应式优化 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.release-header {
|
.release-header {
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* cyrillic-ext */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'IBM Plex Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/ibm-plex-mono/-F63fjptAgt5VM-kVkqdyU8n1iIq129k.woff2) format('woff2');
|
||||||
|
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||||
|
}
|
||||||
|
/* cyrillic */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'IBM Plex Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/ibm-plex-mono/-F63fjptAgt5VM-kVkqdyU8n1isq129k.woff2) format('woff2');
|
||||||
|
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||||
|
}
|
||||||
|
/* vietnamese */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'IBM Plex Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/ibm-plex-mono/-F63fjptAgt5VM-kVkqdyU8n1iAq129k.woff2) format('woff2');
|
||||||
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||||
|
}
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'IBM Plex Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/ibm-plex-mono/-F63fjptAgt5VM-kVkqdyU8n1iEq129k.woff2) format('woff2');
|
||||||
|
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'IBM Plex Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/ibm-plex-mono/-F63fjptAgt5VM-kVkqdyU8n1i8q1w.woff2) format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/* vietnamese */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Space Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/space-mono/i7dPIFZifjKcF5UAWdDRYE58RWq7.woff2) format('woff2');
|
||||||
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||||
|
}
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Space Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/space-mono/i7dPIFZifjKcF5UAWdDRYE98RWq7.woff2) format('woff2');
|
||||||
|
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Space Mono';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url(../font/space-mono/i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2) format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono&display=swap');
|
@import url('./space-mono-font.css');
|
||||||
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap');
|
@import url('./ibm-plex-mono-font.css');
|
||||||
|
|
||||||
/* 浅色主题 */
|
/* 浅色主题 */
|
||||||
:root {
|
:root {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+29
-31
@@ -6,8 +6,6 @@
|
|||||||
<title>VoidRaft - An elegant text snippet recording tool designed for developers.</title>
|
<title>VoidRaft - An elegant text snippet recording tool designed for developers.</title>
|
||||||
<link rel="stylesheet" href="./css/styles.css">
|
<link rel="stylesheet" href="./css/styles.css">
|
||||||
<link rel="icon" href="./img/favicon.ico" type="image/x-icon">
|
<link rel="icon" href="./img/favicon.ico" type="image/x-icon">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Space+Mono&display=swap" rel="stylesheet">
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-dark">
|
<body class="theme-dark">
|
||||||
@@ -18,7 +16,7 @@
|
|||||||
<h1 class="card-title">VoidRaft</h1>
|
<h1 class="card-title">VoidRaft</h1>
|
||||||
<div class="card-controls">
|
<div class="card-controls">
|
||||||
<button id="theme-toggle" class="btn btn-secondary" title="切换主题">
|
<button id="theme-toggle" class="btn btn-secondary" title="切换主题">
|
||||||
<i class="fas fa-sun"></i> 主题
|
<i class="fas fa-sun"></i> <span data-en="Theme" data-zh="主题">Theme</span>
|
||||||
</button>
|
</button>
|
||||||
<button id="lang-toggle" class="btn btn-secondary">
|
<button id="lang-toggle" class="btn btn-secondary">
|
||||||
<i class="fas fa-language"></i> 中/EN
|
<i class="fas fa-language"></i> 中/EN
|
||||||
@@ -33,80 +31,80 @@
|
|||||||
<img src="img/logo.png" alt="VoidRaft Logo" class="logo-image">
|
<img src="img/logo.png" alt="VoidRaft Logo" class="logo-image">
|
||||||
</div>
|
</div>
|
||||||
<h2 class="logo-text" data-en="VoidRaft" data-zh="VoidRaft">VoidRaft</h2>
|
<h2 class="logo-text" data-en="VoidRaft" data-zh="VoidRaft">VoidRaft</h2>
|
||||||
<p class="tagline" data-en="An elegant text snippet recording tool" data-zh="优雅的文本片段记录工具">优雅的文本片段记录工具</p>
|
<p class="tagline" data-en="An elegant text snippet recording tool" data-zh="优雅的文本片段记录工具">An elegant text snippet recording tool</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="intro-box">
|
<div class="intro-box">
|
||||||
<p class="intro-text" data-en="Designed for developers to record, organize, and manage various text snippets anytime, anywhere." data-zh="专为开发者打造,随时随地记录、整理和管理各种文本片段。">专为开发者打造,随时随地记录、整理和管理各种文本片段。</p>
|
<p class="intro-text" data-en="Designed for developers to record, organize, and manage various text snippets anytime, anywhere." data-zh="专为开发者打造,随时随地记录、整理和管理各种文本片段。">Designed for developers to record, organize, and manage various text snippets anytime, anywhere.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<a href="https://github.com/landaiqing/voidraft/releases" class="btn" data-en="Download" data-zh="下载">
|
<a href="https://github.com/landaiqing/voidraft/releases" class="btn" data-en="Download" data-zh="下载">
|
||||||
<i class="fas fa-download"></i> 下载
|
<i class="fas fa-download"></i> Download
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft" class="btn btn-secondary" data-en="Source Code" data-zh="源代码">
|
<a href="https://github.com/landaiqing/voidraft" class="btn btn-secondary" data-en="Source Code" data-zh="源代码">
|
||||||
<i class="fab fa-github"></i> 源代码
|
<i class="fab fa-github"></i> Source Code
|
||||||
</a>
|
</a>
|
||||||
<a href="changelog.html" class="btn btn-secondary" data-en="Changelog" data-zh="更新日志">
|
<a href="changelog.html" class="btn btn-secondary" data-en="Changelog" data-zh="更新日志">
|
||||||
<i class="fas fa-history"></i> 更新日志
|
<i class="fas fa-history"></i> Changelog
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 特性部分 -->
|
<!-- 特性部分 -->
|
||||||
<h2 data-en="Core Features" data-zh="核心特性">核心特性</h2>
|
<h2 data-en="Core Features" data-zh="核心特性">Core Features</h2>
|
||||||
|
|
||||||
<div class="features-grid">
|
<div class="features-grid">
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-code"></i>
|
<i class="fas fa-code"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Developer-Friendly" data-zh="开发者友好">开发者友好</h3>
|
<h3 class="feature-title" data-en="Developer-Friendly" data-zh="开发者友好">Developer-Friendly</h3>
|
||||||
<p class="feature-desc" data-en="Multi-language code blocks with syntax highlighting for 30+ programming languages" data-zh="多语言代码块支持,为30+种编程语言提供语法高亮">多语言代码块支持,为30+种编程语言提供语法高亮</p>
|
<p class="feature-desc" data-en="Multi-language code blocks with syntax highlighting for 30+ programming languages" data-zh="多语言代码块支持,为30+种编程语言提供语法高亮">Multi-language code blocks with syntax highlighting for 30+ programming languages</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-magic"></i>
|
<i class="fas fa-magic"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Code Formatting" data-zh="代码格式化">代码格式化</h3>
|
<h3 class="feature-title" data-en="Code Formatting" data-zh="代码格式化">Code Formatting</h3>
|
||||||
<p class="feature-desc" data-en="Built-in Prettier support for one-click code beautification" data-zh="内置Prettier支持,一键美化代码">内置Prettier支持,一键美化代码</p>
|
<p class="feature-desc" data-en="Built-in Prettier support for one-click code beautification" data-zh="内置Prettier支持,一键美化代码">Built-in Prettier support for one-click code beautification</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-palette"></i>
|
<i class="fas fa-palette"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Custom Themes" data-zh="自定义主题">自定义主题</h3>
|
<h3 class="feature-title" data-en="Custom Themes" data-zh="自定义主题">Custom Themes</h3>
|
||||||
<p class="feature-desc" data-en="Dark/Light themes with full customization options" data-zh="深色/浅色主题,支持完全自定义">深色/浅色主题,支持完全自定义</p>
|
<p class="feature-desc" data-en="Dark/Light themes with full customization options" data-zh="深色/浅色主题,支持完全自定义">Dark/Light themes with full customization options</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-clone"></i>
|
<i class="fas fa-clone"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Multi-Window" data-zh="多窗口支持">多窗口支持</h3>
|
<h3 class="feature-title" data-en="Multi-Window" data-zh="多窗口支持">Multi-Window</h3>
|
||||||
<p class="feature-desc" data-en="Edit multiple documents simultaneously" data-zh="同时编辑多个文档">同时编辑多个文档</p>
|
<p class="feature-desc" data-en="Edit multiple documents simultaneously" data-zh="同时编辑多个文档">Edit multiple documents simultaneously</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-layer-group"></i>
|
<i class="fas fa-layer-group"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Block Editing" data-zh="块状编辑">块状编辑</h3>
|
<h3 class="feature-title" data-en="Block Editing" data-zh="块状编辑">Block Editing</h3>
|
||||||
<p class="feature-desc" data-en="Split content into independent code blocks with different language settings" data-zh="将内容分割为独立的代码块,每个块可设置不同语言">将内容分割为独立的代码块,每个块可设置不同语言</p>
|
<p class="feature-desc" data-en="Split content into independent code blocks with different language settings" data-zh="将内容分割为独立的代码块,每个块可设置不同语言">Split content into independent code blocks with different language settings</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="feature-icon">
|
<div class="feature-icon">
|
||||||
<i class="fas fa-puzzle-piece"></i>
|
<i class="fas fa-puzzle-piece"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="feature-title" data-en="Extensions" data-zh="丰富扩展">丰富扩展</h3>
|
<h3 class="feature-title" data-en="Extensions" data-zh="丰富扩展">Extensions</h3>
|
||||||
<p class="feature-desc" data-en="Rainbow brackets, VSCode-style search, color picker, translation tool, and more" data-zh="彩虹括号、VSCode风格搜索、颜色选择器、翻译工具等多种扩展">彩虹括号、VSCode风格搜索、颜色选择器、翻译工具等多种扩展</p>
|
<p class="feature-desc" data-en="Rainbow brackets, VSCode-style search, color picker, translation tool, and more" data-zh="彩虹括号、VSCode风格搜索、颜色选择器、翻译工具等多种扩展">Rainbow brackets, VSCode-style search, color picker, translation tool, and more</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 预览部分 -->
|
<!-- 预览部分 -->
|
||||||
<h2 data-en="Preview" data-zh="预览">预览</h2>
|
<h2 data-en="Preview" data-zh="预览">Preview</h2>
|
||||||
|
|
||||||
<div class="preview-container">
|
<div class="preview-container">
|
||||||
<div class="preview-window">
|
<div class="preview-window">
|
||||||
@@ -157,44 +155,44 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 技术栈部分 -->
|
<!-- 技术栈部分 -->
|
||||||
<h2 data-en="Technical Stack" data-zh="技术栈">技术栈</h2>
|
<h2 data-en="Technical Stack" data-zh="技术栈">Technical Stack</h2>
|
||||||
|
|
||||||
<ul class="tech-list">
|
<ul class="tech-list">
|
||||||
<li class="tech-item">
|
<li class="tech-item">
|
||||||
<div class="tech-icon"><i class="fas fa-desktop"></i></div>
|
<div class="tech-icon"><i class="fas fa-desktop"></i></div>
|
||||||
<span class="tech-name">Wails3</span>
|
<span class="tech-name">Wails3</span>
|
||||||
<span class="tech-desc" data-en="Cross-platform desktop application framework" data-zh="跨平台桌面应用框架">跨平台桌面应用框架</span>
|
<span class="tech-desc" data-en="Cross-platform desktop application framework" data-zh="跨平台桌面应用框架">Cross-platform desktop application framework</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="tech-item">
|
<li class="tech-item">
|
||||||
<div class="tech-icon"><i class="fas fa-cogs"></i></div>
|
<div class="tech-icon"><i class="fas fa-cogs"></i></div>
|
||||||
<span class="tech-name">Go 1.21+</span>
|
<span class="tech-name">Go 1.21+</span>
|
||||||
<span class="tech-desc" data-en="Fast and efficient backend language" data-zh="快速高效的后端语言">快速高效的后端语言</span>
|
<span class="tech-desc" data-en="Fast and efficient backend language" data-zh="快速高效的后端语言">Fast and efficient backend language</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="tech-item">
|
<li class="tech-item">
|
||||||
<div class="tech-icon"><i class="fab fa-vuejs"></i></div>
|
<div class="tech-icon"><i class="fab fa-vuejs"></i></div>
|
||||||
<span class="tech-name">Vue 3 + TypeScript</span>
|
<span class="tech-name">Vue 3 + TypeScript</span>
|
||||||
<span class="tech-desc" data-en="Modern frontend framework" data-zh="现代化前端框架">现代化前端框架</span>
|
<span class="tech-desc" data-en="Modern frontend framework" data-zh="现代化前端框架">Modern frontend framework</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="tech-item">
|
<li class="tech-item">
|
||||||
<div class="tech-icon"><i class="fas fa-edit"></i></div>
|
<div class="tech-icon"><i class="fas fa-edit"></i></div>
|
||||||
<span class="tech-name">CodeMirror 6</span>
|
<span class="tech-name">CodeMirror 6</span>
|
||||||
<span class="tech-desc" data-en="Modern code editor with extension support" data-zh="支持扩展的现代化代码编辑器">支持扩展的现代化代码编辑器</span>
|
<span class="tech-desc" data-en="Modern code editor with extension support" data-zh="支持扩展的现代化代码编辑器">Modern code editor with extension support</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="tech-item">
|
<li class="tech-item">
|
||||||
<div class="tech-icon"><i class="fas fa-database"></i></div>
|
<div class="tech-icon"><i class="fas fa-database"></i></div>
|
||||||
<span class="tech-name">SQLite</span>
|
<span class="tech-name">SQLite</span>
|
||||||
<span class="tech-desc" data-en="Lightweight database for document storage" data-zh="轻量级文档存储数据库">轻量级文档存储数据库</span>
|
<span class="tech-desc" data-en="Lightweight database for document storage" data-zh="轻量级文档存储数据库">Lightweight database for document storage</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 页脚 -->
|
<!-- 页脚 -->
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<p class="footer-text" data-en="© 2023-2024 VoidRaft - An elegant text snippet recording tool designed for developers" data-zh="© 2023-2024 VoidRaft - 专为开发者打造的优雅文本片段记录工具">© 2023-2024 VoidRaft - 专为开发者打造的优雅文本片段记录工具</p>
|
<p class="footer-text" data-en="© 2025 VoidRaft - An elegant text snippet recording tool designed for developers" data-zh="© 2025 VoidRaft - 专为开发者打造的优雅文本片段记录工具">© 2025 VoidRaft - An elegant text snippet recording tool designed for developers</p>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<a href="https://github.com/landaiqing/voidraft" target="_blank" class="footer-link">GitHub</a>
|
<a href="https://github.com/landaiqing/voidraft" target="_blank" class="footer-link">GitHub</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft/issues" target="_blank" class="footer-link" data-en="Issues" data-zh="问题反馈">问题反馈</a>
|
<a href="https://github.com/landaiqing/voidraft/issues" target="_blank" class="footer-link" data-en="Issues" data-zh="问题反馈">Issues</a>
|
||||||
<a href="https://github.com/landaiqing/voidraft/releases" target="_blank" class="footer-link" data-en="Releases" data-zh="版本发布">版本发布</a>
|
<a href="https://github.com/landaiqing/voidraft/releases" target="_blank" class="footer-link" data-en="Releases" data-zh="版本发布">Releases</a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+79
-21
@@ -433,43 +433,101 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
function parseMarkdown(markdown) {
|
function parseMarkdown(markdown) {
|
||||||
if (!markdown) return '';
|
if (!markdown) return '';
|
||||||
|
|
||||||
// Links - [text](url)
|
// 预处理:保留原始换行符,用特殊标记替换
|
||||||
|
const preservedLineBreaks = '___LINE_BREAK___';
|
||||||
|
markdown = markdown.replace(/\n/g, preservedLineBreaks);
|
||||||
|
|
||||||
|
// 引用块 - > text
|
||||||
|
markdown = markdown.replace(/>\s*(.*?)(?=>|$)/g, '<blockquote>$1</blockquote>');
|
||||||
|
markdown = markdown.replace(/>\s*(.*?)(?=>|$)/g, '<blockquote>$1</blockquote>');
|
||||||
|
|
||||||
|
// 链接 - [text](url)
|
||||||
markdown = markdown.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
|
markdown = markdown.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
|
||||||
|
|
||||||
// Headings - # Heading
|
// 标题 - # Heading
|
||||||
markdown = markdown.replace(/^### (.*$)/gm, '<h3>$1</h3>');
|
markdown = markdown.replace(/^### (.*?)(?=___LINE_BREAK___|$)/gm, '<h3>$1</h3>');
|
||||||
markdown = markdown.replace(/^## (.*$)/gm, '<h2>$1</h2>');
|
markdown = markdown.replace(/^## (.*?)(?=___LINE_BREAK___|$)/gm, '<h2>$1</h2>');
|
||||||
markdown = markdown.replace(/^# (.*$)/gm, '<h1>$1</h1>');
|
markdown = markdown.replace(/^# (.*?)(?=___LINE_BREAK___|$)/gm, '<h1>$1</h1>');
|
||||||
|
|
||||||
// Bold - **text**
|
// 粗体 - **text**
|
||||||
markdown = markdown.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
markdown = markdown.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
||||||
|
|
||||||
// Italic - *text*
|
// 斜体 - *text*
|
||||||
markdown = markdown.replace(/\*(.*?)\*/g, '<em>$1</em>');
|
markdown = markdown.replace(/\*(.*?)\*/g, '<em>$1</em>');
|
||||||
|
|
||||||
// Code blocks - ```code```
|
// 代码块 - ```code```
|
||||||
markdown = markdown.replace(/```([\s\S]*?)```/g, '<pre><code>$1</code></pre>');
|
markdown = markdown.replace(/```([\s\S]*?)```/g, '<pre><code>$1</code></pre>');
|
||||||
|
|
||||||
// Inline code - `code`
|
// 行内代码 - `code`
|
||||||
markdown = markdown.replace(/`([^`]+)`/g, '<code>$1</code>');
|
markdown = markdown.replace(/`([^`]+)`/g, '<code>$1</code>');
|
||||||
|
|
||||||
// Lists - * item
|
// 处理列表项
|
||||||
markdown = markdown.replace(/^\* (.*$)/gm, '<ul><li>$1</li></ul>');
|
// 先将每个列表项转换为HTML
|
||||||
|
markdown = markdown.replace(/- (.*?)(?=___LINE_BREAK___- |___LINE_BREAK___$|$)/g, '<li>$1</li>');
|
||||||
|
markdown = markdown.replace(/\* (.*?)(?=___LINE_BREAK___\* |___LINE_BREAK___$|$)/g, '<li>$1</li>');
|
||||||
|
markdown = markdown.replace(/\d+\. (.*?)(?=___LINE_BREAK___\d+\. |___LINE_BREAK___$|$)/g, '<li>$1</li>');
|
||||||
|
|
||||||
// Lists - 1. item
|
// 然后将连续的列表项包装在ul或ol中
|
||||||
markdown = markdown.replace(/^\d+\. (.*$)/gm, '<ol><li>$1</li></ol>');
|
const listItemRegex = /<li>.*?<\/li>/g;
|
||||||
|
const listItems = markdown.match(listItemRegex) || [];
|
||||||
|
|
||||||
// Merge adjacent list items
|
if (listItems.length > 0) {
|
||||||
markdown = markdown.replace(/<\/ul>\s*<ul>/g, '');
|
// 将连续的列表项组合在一起
|
||||||
markdown = markdown.replace(/<\/ol>\s*<ol>/g, '');
|
let lastIndex = 0;
|
||||||
|
let result = '';
|
||||||
|
let inList = false;
|
||||||
|
|
||||||
|
listItems.forEach(item => {
|
||||||
|
const itemIndex = markdown.indexOf(item, lastIndex);
|
||||||
|
|
||||||
|
// 添加列表项之前的内容
|
||||||
|
if (itemIndex > lastIndex) {
|
||||||
|
result += markdown.substring(lastIndex, itemIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果不在列表中,开始一个新列表
|
||||||
|
if (!inList) {
|
||||||
|
result += '<ul>';
|
||||||
|
inList = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加列表项
|
||||||
|
result += item;
|
||||||
|
|
||||||
|
// 更新lastIndex
|
||||||
|
lastIndex = itemIndex + item.length;
|
||||||
|
|
||||||
|
// 检查下一个内容是否是列表项
|
||||||
|
const nextItemIndex = markdown.indexOf('<li>', lastIndex);
|
||||||
|
if (nextItemIndex === -1 || nextItemIndex > lastIndex + 20) { // 如果下一个列表项不紧邻
|
||||||
|
result += '</ul>';
|
||||||
|
inList = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加剩余内容
|
||||||
|
if (lastIndex < markdown.length) {
|
||||||
|
result += markdown.substring(lastIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
markdown = result;
|
||||||
|
}
|
||||||
|
|
||||||
// Paragraphs - blank line
|
// 处理水平分隔线
|
||||||
markdown = markdown.replace(/\n\n/g, '</p><p>');
|
markdown = markdown.replace(/---/g, '<hr>');
|
||||||
|
|
||||||
// Line breaks - two spaces at end of line
|
// 恢复换行符
|
||||||
markdown = markdown.replace(/ \n/g, '<br>');
|
markdown = markdown.replace(/___LINE_BREAK___/g, '<br>');
|
||||||
|
|
||||||
return `<p>${markdown}</p>`;
|
// 处理段落
|
||||||
|
markdown = markdown.replace(/<br><br>/g, '</p><p>');
|
||||||
|
|
||||||
|
// 包装在段落标签中
|
||||||
|
if (!markdown.startsWith('<p>')) {
|
||||||
|
markdown = `<p>${markdown}</p>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return markdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update translations when language changes
|
// Update translations when language changes
|
||||||
|
|||||||
+2
-4
@@ -70,11 +70,9 @@ function initLanguageToggle() {
|
|||||||
const langToggle = document.getElementById('lang-toggle');
|
const langToggle = document.getElementById('lang-toggle');
|
||||||
if (!langToggle) return;
|
if (!langToggle) return;
|
||||||
|
|
||||||
// Get initial language from local storage or browser preference
|
// Get initial language from local storage or default to English
|
||||||
const savedLang = localStorage.getItem('lang');
|
const savedLang = localStorage.getItem('lang');
|
||||||
const userLang = navigator.language || navigator.userLanguage;
|
const lang = savedLang || 'en';
|
||||||
const defaultLang = userLang.includes('zh') ? 'zh' : 'en';
|
|
||||||
const lang = savedLang || defaultLang;
|
|
||||||
|
|
||||||
// Set current language and apply it
|
// Set current language and apply it
|
||||||
window.currentLang = lang;
|
window.currentLang = lang;
|
||||||
|
|||||||
Reference in new issue
Block a user