-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
305 lines (280 loc) · 14 KB
/
index.html
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!--
Copyright 2024 Pardn Ltd 帕登國際有限公司.
Created by Pardn Chiu 邱敬幃.
Email: dev@pardn.io
-->
<!DOCTYPE html>
<html lang="zh-Hant-TW">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#ffffff">
<meta name="robots" content="index, follow">
<!-- SEO 標題與描述 -->
<title>NanoMD - Markdown 編輯器與即時渲染工具 - 邱敬幃 Pardn Chiu</title>
<meta name="title" content="NanoMD - Markdown 編輯器與即時渲染工具 - 邱敬幃 Pardn Chiu">
<meta name="description" content="NanoMD 是一款基於 JavaScript 與原生 APIs 開發的輕量級 Markdown 編輯器與解析器,提供即時渲染、分屏預覽與代碼高亮功能,是理想的 Markdown 工具。">
<meta name="keywords" content="markdown, markdown-editor, markdown-viewer, markdown-parser, javascript-library, markdown 即時渲染, Markdown 工具, Markdown 免費工具, Markdown 分屏預覽, 邱敬幃">
<meta name="author" content="邱敬幃 Pardn Chiu">
<link rel="author" href="https://pardn.io/">
<link rel="canonical" href="https://nanomd.pardn.io/">
<!-- Favicon -->
<link rel="icon" href="https://nanomd.pardn.io/static/image/logo.png" type="image/x-icon">
<!-- Open Graph -->
<meta property="og:title" content="NanoMD - Markdown 編輯器與即時渲染工具 - 邱敬幃 Pardn Chiu">
<meta property="og:description" content="NanoMD 是一款基於 JavaScript 與原生 APIs 開發輕量級 Markdown 編輯器與解析器,提供即時渲染、分屏預覽與代碼高亮功能,是理想的 Markdown 工具。">
<meta property="og:image" content="https://nanomd.pardn.io/static/image/website.jpg">
<meta property="og:url" content="https://nanomd.pardn.io/">
<meta property="og:site_name" content="NanoMD">
<meta property="og:type" content="website">
<meta property="og:locale" content="zh_TW">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="NanoMD - Markdown 編輯器與即時渲染工具 - 邱敬幃 Pardn Chiu">
<meta property="twitter:description" content="NanoMD 是一款基於 JavaScript 與原生 APIs 開發的輕量級 Markdown 編輯器與解析器,提供即時渲染、分屏預覽與代碼高亮功能,是理想的 Markdown 工具。">
<meta property="twitter:image" content="https://nanomd.pardn.io/static/image/website.jpg">
<meta property="twitter:url" content="https://nanomd.pardn.io/">
<!-- Google Verification -->
<meta name="google-site-verification" content="YQQ2f6AchR8dcb55Az2BYd_mw4TrP0J1RApD-v2v65Y">
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L5VYEZPVXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-L5VYEZPVXX');
</script>
<!-- Preload and Preconnect -->
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css" as="style">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@pardnchiu/quickui@0.6.2/dist/QuickUI.js" as="script">
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/quickui@0.6.2/dist/QuickUI.js" copyright="Pardn Ltd"></script>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Saira+Stencil+One&display=swaps" as="style">
<link href="https://fonts.googleapis.com/css2?family=Saira+Stencil+One&display=swap" rel="stylesheet">
<!-- Local Resources -->
<link rel="stylesheet" href="/static/css/index.css">
<!-- JSON-LD Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"datePublished": "2024-11-29",
"dateModified": "2024-12-20",
"inLanguage": "zh-TW",
"name": {
"@language": "zh-TW",
"@value": "NanoMD - Markdown 編輯器與即時渲染工具 - 邱敬幃 Pardn Chiu"
},
"alternateName": {
"@language": "en",
"@value": "NanoMD - Markdown Editor & Real-time Rendering Tool - Pardn Chiu"
},
"description": {
"@language": "zh-TW",
"@value": "NanoMD 是一款基於純 JavaScript 與原生 APIs 的輕量級 Markdown 編輯器,支持即時渲染、分屏預覽、代碼高亮與導出功能,是理想的 Markdown 工具。"
},
"alternateDescription": {
"@language": "en",
"@value": "NanoMD is a lightweight Markdown editor based on pure JavaScript and native APIs, supporting real-time rendering, split-screen preview, code highlighting and export functions, making it an ideal Markdown tool."
},
"url": [
"https://nanomd.pardn.io/",
"https://nanomd.pardn.io/?lang=zh",
"https://nanomd.pardn.io/?lang=en"
],
"creator": {
"@type": "Person",
"name": [
{
"@language": "zh-TW",
"@value": "邱敬幃"
},
{
"@language": "en",
"@value": "Pardn Chiu"
}
],
"url": "https://pardn.io/",
"sameAs": [
"https://github.com/pardnchiu"
],
"email": "dev@pardn.io"
},
"image": "https://nanomd.pardn.io/static/image/website.jpg"
}
</script>
</head>
<body id="app" class="home" :animation="fade-in">
<!-- -->
<nav>
<section>
<!-- -->
<section>
<a>
<img src="/static/image/logo.svg" alt="">
</a>
</section>
<!-- -->
<section class="center" data-index="0">
<a>
<i class="fa-solid fa-house"></i>
HOME
</a>
<a :href="/page/doc.html?lang={{ lang }}">
<i class="fa-brands fa-readme"></i>
DOC
</a>
<a href="https://github.com/pardnchiu/NanoMD/releases">
<i class="fa-solid fa-code-branch"></i>
VERSION
</a>
</section>
<!-- -->
<section></section>
</section>
</nav>
<!-- -->
<header>
<section>
<section class="logo">
<img src="/static//image/logo.svg" alt="">
<strong>NanoMD<span>{{ i18n.title }}</span></strong>
</section>
<section :display="flex" :margin-top="-2rem" :gap="0.5rem">
<img src="https://img.shields.io/badge/tag-JavaScript%20Library-bb4444" alt="">
<img src="https://img.shields.io/github/size/pardnchiu/NanoMD/dist%2FNanoMD.js" alt="">
</section>
<section :display="flex" :margin-top="-2rem" :gap="0.5rem">
<a href="https://www.npmjs.com/package/@pardnchiu/nanomd" target="_blank" :text-decoration="none">
<img src="https://img.shields.io/npm/v/@pardnchiu/nanomd" alt="npm版本">
</a>
<a href="https://www.jsdelivr.com/package/npm/@pardnchiu/nanomd" target="_blank" :text-decoration="none">
<img src="https://img.shields.io/jsdelivr/npm/hm/@pardnchiu/nanomd" alt="npm版本">
</a>
</section>
<section class="button">
<a href="https://github.com/pardnchiu/NanoMD" title="GitHub" target="_blank">
<i class="fa-brands fa-github"></i>
GitHub
</a>
<a href="https://www.npmjs.com/package/@pardnchiu/nanomd" title="npm" target="_blank">
<i class="fa-brands fa-npm"></i>
npm
</a>
<span></span>
<a href="https://github.com/pardnchiu/NanoMD/releases/tag/mac-0.2.0" title="Mac application" target="_blank">
<i class="fa-brands fa-apple"></i>
Mac (v0.2.0)
</a>
<span></span>
<a :href="/page/agreement.html?lang={{ lang }}">
<i class="fa-solid fa-scale-balanced"></i>
LICENSE
</a>
</section>
<img :src="i18n.cover" alt="">
<a :href="/page/live.html?lang={{ lang }}" title="前往體驗 NanoMD">
<i class="fa-brands fa-markdown"></i>
Online Editor
<i class="fa-solid fa-angles-right"></i>
</a>
</section>
</header>
<!-- -->
<section class="home-quote">
<section>
<i class="fa-solid fa-quote-left"></i>
<p :html="i18n.quote"></p>
<i class="fa-solid fa-quote-right"></i>
</section>
</section>
<!-- -->
<section class="home-intro">
<section>
<i class="fa-solid fa-hashtag"></i>
<strong>{{ i18n.intro }}</strong>
<!-- 需修正 PDQuickUI 的差異算法 -->
<section id="intro-block">
<strong>{{ intro.title }}</strong>
<p :html="{{ intro.description }}"></p>
<a :href="{{ intro.href }}">{{ i18n.more }}<i class="fa-solid fa-angles-right"></i></a>
<figure>
<img src="" alt="">
<figcaption>{{ i18n.photo }}</figcaption>
</figure>
<section data-index="0">
<button @click="changeIntro">{{ i18n.button_0 }}</button>
<button @click="changeIntro">{{ i18n.button_1 }}</button>
<button @click="changeIntro">{{ i18n.button_2 }}</button>
<button @click="changeIntro">{{ i18n.button_3 }}</button>
<button @click="changeIntro">{{ i18n.button_4 }}</button>
</section>
</section>
</section>
</section>
<!-- -->
<footer>
<p>Created by <a href="https://github.com/pardnchiu" target="_blank">邱敬幃</a></p>
<p><a href="https://github.com/pardnchiu/NanoMD" target="_blank">NanoMD</a> on GitHub</p>
<p>Render by <a href="https://quickui.pardn.io" target="_blank">QuickUI</a></p>
<p>© 2024</p>
</footer>
<!-- -->
<a :href="/index.html?lang={{ change }}" class="lang">
<i class="fa-solid fa-globe"></i>
<span>{{ change }}</span>
</a>
<!-- -->
<script>
document.addEventListener("DOMContentLoaded", async _ => {
const url = new URL(location.href);
const currentLanguage = navigator.language || navigator.userLanguage;
let lang = url.searchParams.get("lang");
let isZh = /^zh/i.test(currentLanguage);
if (lang != null) {
isZh = /^zh/i.test(lang);
};
lang = isZh ? "zh" : "en";
let intro;
await fetch("/static/json/" + lang + "/intro.json")
.then(response => response.text())
.then(data => {
intro = JSON.parse(data);
})
.catch(error => {
console.error(error);
});
const app = new QUI({
id: "app",
i18n: {
zh: "/static/i18n/index/zh.json",
en: "/static/i18n/index/en.json",
},
i18nLang: lang,
event: {
changeIntro: e => {
const _this = e.target;
const parent = _this.parentElement;
const index = Array.prototype.indexOf.call(parent.children, _this);
parent.dataset.index = index;
const data = intro[Object.keys(intro)[index]];
const dom = document.getElementById("intro-block");
dom.children[0].innerText = data.title;
dom.children[1].innerHTML = data.description;
dom.children[2].href = data.href;
}
},
data: {
intro: intro[Object.keys(intro)[0]],
lang: lang,
change: isZh ? "en" : "zh"
}
});
});
</script>
</body>
</html>