Parcourir la source

译文markdown语法介绍

Bhikkhu-Kosalla il y a 5 ans
Parent
commit
d85da9374c

+ 59 - 60
app/guide/guide.css

@@ -1,89 +1,88 @@
 guide {
-  position: relative;
-  display: inline-block;
-  width: auto;
-  min-width: 14px;
-  height: auto;
-  min-height: 14px;
-  cursor: pointer;
-  background: url(guide_icon.svg);
-  background-repeat: no-repeat;
-  background-size: contain;
-  margin: 0 6px;
-  color: var(--tool-color);
+	position: relative;
+	display: inline-block;
+	width: auto;
+	min-width: 14px;
+	height: auto;
+	min-height: 14px;
+	cursor: pointer;
+	background: url(guide_icon.svg);
+	background-repeat: no-repeat;
+	background-size: contain;
+	margin: 0 6px;
+	color: var(--tool-color);
 }
 guide:hover .guide_contence {
-  display: inline-block;
+	display: inline-block;
 }
 guide ul {
-  list-style-type: disc;
-  padding-left: 20px;
+	list-style-type: disc;
+	padding-left: 20px;
 }
 guide ol {
-  list-style-type: decimal;
-  padding-left: 20px;
+	list-style-type: decimal;
+	padding-left: 20px;
 }
 .guide_contence {
-  border-top: 7px;
-  position: absolute;
-  border: 1px solid var(--border-line-color);
-  border-radius: 5px;
-  top: 100%;
-  width: max-content;
-  min-width: 18em;
-  max-width: max(25vw, 100%);
-  min-height: 15em;
-  padding: 10px;
-  background-color: var(--drop-bg-color);
-  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-  font-size: 10pt;
-  text-align: left;
-  display: none;
+	border-top: 7px;
+	position: absolute;
+	border: 1px solid var(--border-line-color);
+	border-radius: 5px;
+	top: 100%;
+	width: max-content;
+	min-width: 18em;
+	max-width: max(25vw, 100%);
+	min-height: 15em;
+	padding: 10px;
+	background-color: var(--drop-bg-color);
+	box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
+	font-size: 10pt;
+	text-align: left;
+	display: none;
 
-  margin: 0.3em;
-  margin: -1px 0px;
-  box-shadow: 0px 3px 13px 0px var(--shadow-color);
-  color: var(--main-color);
-  z-index: 200;
+	margin: 0.3em;
+	margin: -1px 0px;
+	box-shadow: 0px 3px 13px 0px var(--shadow-color);
+	color: var(--main-color);
+	z-index: 200;
 }
 
 .guide_contence:after {
-  content: "\00a0";
-  width: 0;
-  height: 0;
-  display: block;
-  border-style: solid;
-  border-width: 10px;
-  border-color: transparent transparent var(--drop-bg-color) transparent;
-  position: absolute;
-  top: -20px;
+	content: "\00a0";
+	width: 0;
+	height: 0;
+	display: block;
+	border-style: solid;
+	border-width: 10px;
+	border-color: transparent transparent var(--drop-bg-color) transparent;
+	position: absolute;
+	top: -20px;
 }
 
 .guide_contence h1 {
-  font-size: 1.5em;
-  font-weight: 700;
+	font-size: 1.5em;
+	font-weight: 700;
 }
 .guide_contence h2 {
-  font-size: 1.3em;
-  font-weight: 700;
+	font-size: 1.3em;
+	font-weight: 700;
 }
 .guide_contence h3 {
-  font-size: 1.1em;
-  font-weight: 700;
+	font-size: 1.1em;
+	font-weight: 700;
 }
 .guide_contence h4 {
-  font-size: 1em;
-  font-weight: 700;
+	font-size: 1em;
+	font-weight: 700;
 }
 .guide_contence li {
-  white-space: normal;
-  word-break: normal;
+	white-space: normal;
+	word-break: normal;
 }
 .guide_contence pre {
-  background-color: rgba(0, 0, 0, 0.1);
+	background-color: rgba(0, 0, 0, 0.1);
 }
 .guide_contence code {
-  white-space: normal;
-  word-break: normal;
-  font-family: arial;
+	word-break: normal;
+	font-family: arial;
 }

+ 2 - 1
app/term/note.js

@@ -41,8 +41,9 @@ function note_create() {
 }
 function note_sent_edit_dlg_init() {
 	$("body").append(
-		'<div id="note_sent_edit_dlg" title="' + gLocal.gui.edit + '"><div id="edit_dialog_content"></div></div>'
+		'<div id="note_sent_edit_dlg" title="' + gLocal.gui.edit + '"><guide gid="markdown_guide"></guide><div id="edit_dialog_content"></div></div>'
 	);
+guide_init();
 	$("#note_sent_edit_dlg").dialog({
 		autoOpen: false,
 		width: 550,

+ 1 - 1
app/term/popup_note.css

@@ -1,4 +1,4 @@
-code {
+note code {
 	position: relative;
 	display: inline-block;
 	width: auto;

+ 43 - 0
documents/users_guide/en/markdown_guide.md

@@ -0,0 +1,43 @@
+# Translation Guide for **Typing**
+
+## Font Style
+
+|typing in|display|
+|-|-|
+|`[[pāḷi]]`|[term<sub>1</sub>]()(pāḷi, term<sub>2</sub>)|
+|`**bold**`|**bold**|
+|`*italic*`|*italic*|
+|`***bold Italic***`|***bold Italic***|
+|`~~strikethrough~~`|~~strikethrough~~|
+|`[link to wikipali](www.wikipali.org)`|[link to wikipali](www.wikipali.org)|
+---
+## paragraph style
+
+
+<div style="display:flex;">
+
+<div style="flex:1;margin-right:1em;">
+
+### **typing**
+```
+single enter no wrap
+double enter 
+
+wrap
+
+---
+before Horizontal Rules--- need empty line
+```
+</div>
+<div style="flex:1;">
+
+### **display**
+
+single enter no wrap
+double enter 
+
+wrap
+
+---
+before Horizontal Rules--- need empty line
+</div></div>

+ 43 - 0
documents/users_guide/zh-cn/markdown_guide.md

@@ -0,0 +1,43 @@
+# 译文输入范例指南
+## 文本样式
+|输入|显示|
+|-|-|
+|`[[pāḷi]]`|[术语<sub>1</sub>]()(pāḷi, 术语<sub>1</sub>)|
+|`**粗体**`|**粗体**|
+|`*斜体*`|*斜体*|
+|`***粗斜体***`|***粗斜体***|
+|`~~校对删除~~`|~~校对删除~~|
+|`[链接标题](www.wikipali.org)`|[链接标题](www.wikipali.org)|
+
+## 段落样式
+
+
+<div style="display:flex;">
+
+<div style="flex:1;margin-right:1em;">
+
+### **输入**
+
+
+```
+单回车不折行
+双回车
+
+真换行
+
+---
+分割线---前需要双回车
+```
+</div>
+<div style="flex:1;">
+
+### **显示**
+
+单回车不折行
+双回车
+
+真换行
+
+---
+分割线---前需要双回车
+</div></div>

+ 41 - 0
documents/users_guide/zh-tw/markdown_guide.md

@@ -0,0 +1,41 @@
+# 譯文輸入範例指南
+## 文字樣式
+|輸入|顯示|
+|-|-|
+|`[[pāḷi]]`|[術語<sub>1</sub>]()(pāḷi, 術語<sub>2</sub>)|
+|`**粗體**`|**粗體**|
+|`*斜體*`|*斜體*|
+|`***粗斜體***`|***粗斜體***|
+|`~~校對刪除~~`|~~校對刪除~~|
+|`[連結標題](www.wikipali.org)`|[連結標題](www.wikipali.org)|
+
+## 段落樣式
+
+
+<div style="display:flex;">
+
+<div style="flex:1;margin-right:1em;">
+
+### **輸入**
+```
+單回車不折行
+雙回車
+
+真換行
+
+---
+分割線---前需要雙回車
+```
+</div>
+<div style="flex:1;">
+
+### **顯示**
+
+單回車不折行
+雙回車
+
+真換行
+
+---
+分割線---前需要雙回車
+</div></div>