Browse Source

Merge branch 'master' of https://github.com/visuddhinanda/mint

visuddhinanda 5 years ago
parent
commit
daf97a087a

+ 21 - 5
app/palicanon/index.php

@@ -36,10 +36,16 @@ include "../pcdl/html_head.php";
         border-bottom: 2px solid var(--link-color);
     }
     tag{
-        background-color: var(--btn-color);
+    background-color: var(--btn-color);
     margin: 0 0.5em;
-    padding: 3px 10px;
+    padding: 3px 5px;
     border-radius: 4px;
+    display:inline-flex;
+    border: 1.5px solid;
+    border-color: #707070;
+    }
+    tag .icon:hover{
+        background-color: silver;
     }
 </style>
 <?php
@@ -57,8 +63,13 @@ echo "<div class='index_inner '>";
 echo "<div style='font-size:140%'>";
 echo "</div>";
 echo '<div id="main_tag"  style="">';
-echo '<span tag="sutta">Sutta</span><span tag="vinaya">Vinaya</span><span tag="abhidhamma">Abhidhamma</span>';
-echo '<span tag="mula">Mula</span><span tag="atthakatha">Aṭṭhakathā</span><span tag="tika">ṭīkā</span><span tag="anna">anna</span>';
+echo '<span tag="sutta">Sutta</span>';
+echo '<span tag="vinaya">Vinaya</span>';
+echo '<span tag="abhidhamma">Abhidhamma</span>';
+echo '<span tag="mūla">Mūla</span>';
+echo '<span tag="aṭṭhakathā">Aṭṭhakathā</span>';
+echo '<span tag="ṭīkā">ṭīkā</span>';
+echo '<span tag="añña">añña</span>';
 echo '</div>';
 echo '<div id="tag_selected" class="summary"  style="padding-bottom:5px;margin:0.5em 0;"></div>';
 echo '<div id="tag_others" class="summary"  style="padding-bottom:5px;"></div>';
@@ -181,7 +192,12 @@ $("#tag_input").keypress(function(){
   function render_tag_list(){
     let strListTag = "已经选择:";
       for (const iterator of list_tag) {
-        strListTag +="<tag>"+iterator+"<span onclick =\"tag_remove('"+iterator+"')\">X</span></tag>";
+        strListTag +="<tag><span style='margin-right: 5px; font-weight: bold;'>"+iterator+"</span>";
+        strListTag +="<span style='display: contents;' onclick =\"tag_remove('"+iterator+"')\">";
+        strListTag +="<svg t= '1598638386903' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1223' width='16' height='16'>";
+        strListTag += "<path fill='#707070' p-id='1224' d='M512 620.544l253.3376 253.3376a76.6976 76.6976 0 1 0 108.544-108.544L620.6464 512l253.2352-253.3376a76.6976 76.6976 0 1 0-108.544-108.544L512 403.3536 258.6624 150.1184a76.6976 76.6976 0 1 0-108.544 108.544L403.3536 512 150.1184 765.3376a76.6976 76.6976 0 1 0 108.544 108.544L512 620.6464z' >";
+        strListTag +="</path></svg>";
+        strListTag +="</span></tag>";
       }
       strListTag += "<div style='display:inline-block;width:20em;'><input id='tag_input' type='input' placeholder='tag' size='20'  /></div>";
       $("#tag_selected").html(strListTag);

+ 1 - 0
app/public/lang/default.json

@@ -463,6 +463,7 @@
 		"optional": "optional",
 		"comment": "comments",
 		"my_term": "my term",
+		"scan_in_reader": "scan in reader",
 		"": ""
 	},
 	"grammastr": [

+ 1 - 0
app/public/lang/en.json

@@ -462,6 +462,7 @@
 		"optional": "optional",
 		"comment": "comments",
 		"my_term": "my term",
+		"scan_in_reader": "scan in reader",
 		"": ""
 	},
 	"grammastr": [

+ 1 - 0
app/public/lang/my.json

@@ -462,6 +462,7 @@
 		"optional": "optional",
 		"comment": "comments",
 		"my_term": "my term",
+		"scan_in_reader": "scan in reader",
 		"": "",
 		"": ""
 	},

+ 1 - 0
app/public/lang/si.json

@@ -467,6 +467,7 @@
 		"optional": "optional",
 		"comment": "comments",
 		"my_term": "my term",
+		"scan_in_reader": "scan in reader",
 		"": "",
 		"": ""
 	},

+ 1 - 0
app/public/lang/zh-cn.json

@@ -465,6 +465,7 @@
 		"optional": "选填",
 		"comment": "评论",
 		"my_term": "我的术语",
+		"scan_in_reader": "去藏经阁中阅览",
 		"": ""
 	},
 	"grammastr": [

+ 1 - 0
app/public/lang/zh-tw.json

@@ -464,6 +464,7 @@
 		"optional": "選填",
 		"comment": "評論",
 		"my_term": "我的術語",
+		"scan_in_reader": "去藏經閣中閱覽",
 		"": ""
 	},
 	"grammastr": [

+ 50 - 32
app/studio/js/render.js

@@ -429,7 +429,7 @@ function updataHeadingBlockInHtml(book, par) {
   }
 }
 
-function renderBlock() {}
+function renderBlock() { }
 /*
 重绘翻译数据块
 */
@@ -634,7 +634,7 @@ function renderTranslateParBlockInner(elementBlock) {
   return output;
 }
 
-function renderTranslateParBlockInnerPreview(strText) {}
+function renderTranslateParBlockInnerPreview(strText) { }
 function updateTranslationPreview_a(blockId, text) {
   var out = "";
   var newText = text;
@@ -1281,6 +1281,13 @@ function render_sent_tool_bar(elementBlock, begin) {
   output += "<div class='sent_wbw_trans_bar'>";
   let sentIdString = abook + "-" + aparagraph + "-" + iBegin + "-" + iEnd;
   let sentIdStringLink = "{{" + sentIdString + "}}";
+  let sentReaderLink = "";
+  if (_display_sbs == 0) {//逐段模式
+    sentReaderLink = "https://www.wikipali.org/app/pcdl/reader.php?view=para&book=" + abook + "&para=" + aparagraph;
+  }
+  else {//逐句模式
+    sentReaderLink = "https://www.wikipali.org/app/pcdl/reader.php?view=sent&book=" + abook + "&para=" + aparagraph + "&begin=" + iBegin + "&end=" + iEnd;
+  }
   output +=
     "<span>" +
     sentIdString +
@@ -1290,6 +1297,14 @@ function render_sent_tool_bar(elementBlock, begin) {
   output += gLocal.gui.copy_to_clipboard;
   output += "]</a></span>";
   //	output += "<span>"+abook+"-"+aparagraph+"-"+iBegin+"-"+iEnd+"</span>";
+  if (_display_sbs == 0) {//逐段模式
+    output += "<a href='../pcdl/reader.php?view=para&book=" + abook + "&para=" + aparagraph + "' target='_blank'>";
+  }
+  else {//逐句模式
+    output += "<a href='../pcdl/reader.php?view=sent&book=" + abook + "&para=" + aparagraph + "&begin=" + iBegin + "&end=" + iEnd + "' target='_blank'>";
+  }
+  output += "[" + gLocal.gui.scan_in_reader + "]";
+  output += "</a>";
   output += "<guide gid='sent_func' style='margin:unset;'></guide>";
   output += "</div>";
   return output;
@@ -1529,6 +1544,9 @@ function renderWordParBlockInner(elementBlock) {
           "')\">[";
         output += gLocal.gui.copy_to_clipboard;
         output += "]</a></span>";
+        output += "<a href='../pcdl/reader.php?view=sent&book=" + book + "&para=" + paragraph + "&begin=" + nextBegin + "&end=" + nextEnd + "' target='_blank'>";
+        output += "[" + gLocal.gui.scan_in_reader + "]";
+        output += "</a>";
         output += "<guide gid='sent_func' style='margin:unset;'></guide>";
         output += "</div>";
 
@@ -2325,12 +2343,12 @@ function renderWordDetailByElement(xmlElement) {
             ) {
               arrMeaning.push(
                 g_DictWordList[iDict].dictID +
-                  "$" +
-                  arrMeaning.length +
-                  "$$" +
-                  arrMean[i] +
-                  "$" +
-                  g_DictWordList[iDict].Language
+                "$" +
+                arrMeaning.length +
+                "$$" +
+                arrMean[i] +
+                "$" +
+                g_DictWordList[iDict].Language
               );
             }
           }
@@ -2380,12 +2398,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
-                    "$" +
-                    arrMeaning.length +
-                    "$*$" +
-                    getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
-                    "$" +
-                    g_DictWordList[iDict].Language
+                  "$" +
+                  arrMeaning.length +
+                  "$*$" +
+                  getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
+                  "$" +
+                  g_DictWordList[iDict].Language
                 );
               }
             }
@@ -2435,12 +2453,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
-                    "$" +
-                    arrMeaning.length +
-                    "$**$" +
-                    getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
-                    "$" +
-                    g_DictWordList[iDict].Language
+                  "$" +
+                  arrMeaning.length +
+                  "$**$" +
+                  getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
+                  "$" +
+                  g_DictWordList[iDict].Language
                 );
               }
             }
@@ -2915,7 +2933,7 @@ function renderWordDetailByElement(xmlElement) {
   return _txtOutDetail;
 }
 
-function renderWordNoteDivByParaNo(book, paragraph) {}
+function renderWordNoteDivByParaNo(book, paragraph) { }
 /*
 paragraph word note
 */
@@ -3115,7 +3133,7 @@ function updateWordNote(element) {
   }
 }
 
-function updateWordCommentary(element) {}
+function updateWordCommentary(element) { }
 
 //根据xmlDocument 对象中的单词序号修改单词块的显示(不含Pali)
 //返回 无
@@ -3238,13 +3256,13 @@ function prev_page() {
   gVisibleParEndOld = gVisibleParEnd;
   if (
     g_allparlen_array[gVisibleParEnd - 1] -
-      g_allparlen_array[gVisibleParBegin - 1] <=
+    g_allparlen_array[gVisibleParBegin - 1] <=
     gDisplayCapacity
   ) {
     gVisibleParBegin -= 1;
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
-      g_allparlen_array[gVisibleParBegin - 1] >
+    g_allparlen_array[gVisibleParBegin - 1] >
     gDisplayCapacity
   ) {
     gVisibleParBegin -= 1;
@@ -3271,13 +3289,13 @@ function next_page() {
 
   if (
     g_allparlen_array[gVisibleParEnd + 1] -
-      g_allparlen_array[gVisibleParBegin + 1] <=
+    g_allparlen_array[gVisibleParBegin + 1] <=
     gDisplayCapacity
   ) {
     gVisibleParEnd += 1;
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
-      g_allparlen_array[gVisibleParBegin + 1] >
+    g_allparlen_array[gVisibleParBegin + 1] >
     gDisplayCapacity
   ) {
     gVisibleParBegin += 1;
@@ -3714,12 +3732,12 @@ function refreshNoteNumber() {
     let id = $(this).attr("wid");
     $(this).html(
       "<a href='#word_note_root_" +
-        id +
-        "' name=\"word_note_" +
-        id +
-        '">[' +
-        (index + 1) +
-        "]</a>"
+      id +
+      "' name=\"word_note_" +
+      id +
+      '">[' +
+      (index + 1) +
+      "]</a>"
     );
   });
 

+ 5 - 1
documents/users_guide/zh-cn/SUMMARY.md

@@ -28,4 +28,8 @@
   * [衍生原型](studio_parent2.md)
   * [协作消息](studio_message.md)
   * [句子编号](sent_func.md)
-* [圣书院](academy.md)
+* [圣书院](academy.md)
+
+## 下载页
+如果字体不正常可以下载此开源字体包:
+百度网盘:[链接](https://pan.baidu.com/s/1LXJ1Tc5IaiaAeJwLm5gajg)   提取码:pali