-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathterms.html
More file actions
176 lines (153 loc) · 9.03 KB
/
terms.html
File metadata and controls
176 lines (153 loc) · 9.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title data-i18n="termsTitle">使用条款 - MD2HTML</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- 直接内联导航栏 -->
<nav class="navbar">
<div class="navbar-container">
<div class="brand">
<img src="images/logo.png" alt="MD2HTML Logo" class="logo-image" width="24" height="24">
<a href="/" class="logo">MD2HTML</a>
</div>
<div class="navbar-controls">
<button class="theme-switch" onclick="toggleTheme()" aria-label="切换主题">
<span class="theme-icon">🌙</span>
</button>
<button class="lang-switch" onclick="toggleLanguage()">English</button>
</div>
</div>
</nav>
<!-- 页面主要内容 -->
<div class="main-content policy-content">
<h1 data-i18n="termsTitle">使用条款</h1>
<section class="policy-section">
<h2 data-i18n="termsIntroTitle">服务说明</h2>
<p data-i18n="termsIntroText">MD2HTML 提供在线 Markdown 和 HTML 格式转换服务。本工具完全免费,采用纯前端技术实现,所有转换都在用户浏览器本地完成。</p>
</section>
<section class="policy-section">
<h2 data-i18n="usageTitle">使用规范</h2>
<p data-i18n="usageText">您可以自由使用本工具进行任何合法内容的格式转换。我们不对用户输入的内容进行审查或存储,但请确保您的使用符合相关法律法规。</p>
</section>
<section class="policy-section">
<h2 data-i18n="openSourceTitle">开源协议</h2>
<p data-i18n="openSourceText">MD2HTML 是一个开源项目,您可以在 GitHub 上查看源代码。在遵守开源协议的前提下,您可以自由使用、修改和分发本工具。</p>
</section>
<section class="policy-section">
<h2 data-i18n="disclaimerTitle">免责声明</h2>
<p data-i18n="disclaimerText">本工具按"现状"提供,我们不对转换结果的准确性做出保证。请在使用转换后的内容前自行检查。我们不对使用本工具造成的任何直接或间接损失负责。</p>
</section>
<section class="policy-section">
<h2 data-i18n="updatesTitle">条款更新</h2>
<p data-i18n="updatesText">我们保留随时更新这些条款的权利。重大变更会通过网站公告通知用户。继续使用本工具即表示您同意接受新的条款内容。</p>
</section>
</div>
<!-- 直接内联 Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3 data-i18n="footerAboutTitle">关于 MD2HTML</h3>
<p data-i18n="footerAboutText">MD2HTML 是一个免费的在线工具,帮助用户在 Markdown 和 HTML 格式之间轻松转换。产品开源,欢迎反馈任何需求到 <a href="mailto:hi@md2html.com">hi@md2html.com</a></p>
</div>
<div class="footer-section">
<h3 data-i18n="footerAgreementTitle">用户协议</h3>
<ul>
<li><a href="/privacy.html" data-i18n="footerPrivacyPolicy">隐私政策</a></li>
<li><a href="/terms.html" data-i18n="footerTerms">使用条款</a></li>
</ul>
</div>
<div class="footer-section">
<h3 data-i18n="footerContactTitle">联我们</h3>
<div class="social-links">
<a href="https://github.com/pdmaker/Markdown-to-html" target="_blank" rel="noopener" aria-label="GitHub">
<svg class="social-icon" viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
</svg>
</a>
<a href="https://x.com/pdmake" target="_blank" rel="noopener" aria-label="Twitter">
<svg class="social-icon" viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M23.643 4.937c-.835.37-1.732.62-2.675.733.962-.576 1.7-1.49 2.048-2.578-.9.534-1.897.922-2.958 1.13-.85-.904-2.06-1.47-3.4-1.47-2.572 0-4.658 2.086-4.658 4.66 0 .364.042.718.12 1.06-3.873-.195-7.304-2.05-9.602-4.868-.4.69-.63 1.49-.63 2.342 0 1.616.823 3.043 2.072 3.878-.764-.025-1.482-.234-2.11-.583v.06c0 2.257 1.605 4.14 3.737 4.568-.392.106-.803.162-1.227.162-.3 0-.593-.028-.877-.082.593 1.85 2.313 3.198 4.352 3.234-1.595 1.25-3.604 1.995-5.786 1.995-.376 0-.747-.022-1.112-.065 2.062 1.323 4.51 2.093 7.14 2.093 8.57 0 13.255-7.098 13.255-13.254 0-.2-.005-.402-.014-.602.91-.658 1.7-1.477 2.323-2.41z"/>
</svg>
</a>
</div>
</div>
</div>
<div class="footer-bottom">
<p data-i18n="footerCopyright">© 2024 MD2HTML. 保留所有权利。</p>
</div>
</footer>
<script type="module">
import i18n from './i18n.js';
let currentLang = 'zh';
// 初始化语言和翻译
function initializeLanguage() {
// 检查当前 URL 是否包含 /en
const isEnglish = window.location.pathname.includes('/en');
currentLang = isEnglish ? 'en' : 'zh';
// 设置 HTML 语言属性
document.documentElement.lang = currentLang === 'zh' ? 'zh-CN' : 'en';
// 翻译所有带有 data-i18n 属性的元素
updatePageLanguage();
// 更新语言切换按钮文本
const langSwitch = document.querySelector('.lang-switch');
if (langSwitch) {
langSwitch.textContent = currentLang === 'zh' ? 'English' : '中文';
}
}
// 更新页面语言
function updatePageLanguage() {
document.querySelectorAll('[data-i18n]').forEach(element => {
const key = element.getAttribute('data-i18n');
const translation = i18n[currentLang][key];
if (translation) {
element.innerHTML = translation;
}
});
// 更新页面标题
document.title = i18n[currentLang].termsTitle;
}
// 切换主题函数
window.toggleTheme = function() {
const currentTheme = document.documentElement.getAttribute('data-theme') || 'light';
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
const themeIcon = document.querySelector('.theme-icon');
if (themeIcon) {
themeIcon.textContent = newTheme === 'dark' ? '☀️' : '🌙';
}
};
// 切换语言函数
window.toggleLanguage = function() {
currentLang = currentLang === 'zh' ? 'en' : 'zh';
const newPath = currentLang === 'en' ? '/en/terms.html' : '/terms.html';
window.history.pushState({}, '', newPath);
document.documentElement.lang = currentLang === 'zh' ? 'zh-CN' : 'en';
updatePageLanguage();
// 更新语言切换按钮文本
const langSwitch = document.querySelector('.lang-switch');
if (langSwitch) {
langSwitch.textContent = currentLang === 'zh' ? 'English' : '中文';
}
};
// 初始化
document.addEventListener('DOMContentLoaded', () => {
// 设置保存的主题
const savedTheme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', savedTheme);
// 更新主题图标
const themeIcon = document.querySelector('.theme-icon');
if (themeIcon) {
themeIcon.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
}
// 初始化语言
initializeLanguage();
});
</script>
<div class="toast" id="toast"></div>
</body>
</html>