Selaa lähdekoodia

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

visuddhinanda 5 vuotta sitten
vanhempi
sitoutus
0b2c9fb8df

+ 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;
 }

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

@@ -573,7 +573,7 @@
 		"disable_note": "disable & invisible to anyone including myself",
 		"not_found": "not found",
 		"progress_curve": "progress curve",
-		"day_EXP": "Day EXP",
+		"day_EXP": "Daily EXP",
 		"Jan": "Jan",
 		"Feb": "Feb",
 		"Mar": "Mar",
@@ -586,6 +586,9 @@
 		"Oct": "Oct",
 		"Nov": "Nov",
 		"Dec": "Dec",
+		"EXP_in_total": "EXP in total",
+		"day_action": "Daily Action",
+		"action": "Actions",
 		"": ""
 	},
 	"grammastr": [

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

@@ -572,7 +572,7 @@
 		"disable_note": "disable & invisible to anyone including myself",
 		"not_found": "not found",
 		"progress_curve": "progress curve",
-		"day_EXP": "Day EXP",
+		"day_EXP": "Daily EXP",
 		"Jan": "Jan",
 		"Feb": "Feb",
 		"Mar": "Mar",
@@ -585,6 +585,9 @@
 		"Oct": "Oct",
 		"Nov": "Nov",
 		"Dec": "Dec",
+		"EXP_in_total": "EXP in total",
+		"day_action": "Daily Action",
+		"action": "Actions",
 		"": ""
 	},
 	"grammastr": [

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

@@ -572,7 +572,7 @@
 		"disable_note": "disable & invisible to anyone including myself",
 		"not_found": "not found",
 		"progress_curve": "progress curve",
-		"day_EXP": "Day EXP",
+		"day_EXP": "Daily EXP",
 		"Jan": "Jan",
 		"Feb": "Feb",
 		"Mar": "Mar",
@@ -585,6 +585,9 @@
 		"Oct": "Oct",
 		"Nov": "Nov",
 		"Dec": "Dec",
+		"EXP_in_total": "EXP in total",
+		"day_action": "Daily Action",
+		"action": "Actions",
 		"": "",
 		"": ""
 	},

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

@@ -577,7 +577,7 @@
 		"disable_note": "disable & invisible to anyone including myself",
 		"not_found": "not found",
 		"progress_curve": "progress curve",
-		"day_EXP": "Day EXP",
+		"day_EXP": "Daily EXP",
 		"Jan": "Jan",
 		"Feb": "Feb",
 		"Mar": "Mar",
@@ -590,6 +590,9 @@
 		"Oct": "Oct",
 		"Nov": "Nov",
 		"Dec": "Dec",
+		"EXP_in_total": "EXP in total",
+		"day_action": "Daily Action",
+		"action": "Actions",
 		"": "",
 		"": ""
 	},

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

@@ -588,7 +588,9 @@
 		"Oct": "十月",
 		"Nov": "十一月",
 		"Dec": "十二月",
-
+		"EXP_in_total": "总经验",
+		"day_action": "每日操作",
+		"action": "操作",
 		"": ""
 	},
 	"grammastr": [

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

@@ -587,6 +587,9 @@
 		"Oct": "十月",
 		"Nov": "十一月",
 		"Dec": "十二月",
+		"EXP_in_total": "總經驗",
+		"day_action": "每日操作",
+		"action": "操作",
 		"": ""
 	},
 	"grammastr": [

+ 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;

+ 1 - 1
app/ucenter/active_get.php

@@ -23,7 +23,7 @@ if(isset($userid)){
 	$last = 0;
 	while($row = $sth->fetch(PDO::FETCH_ASSOC)){
 		$curr = $last+$row["duration"]/3600000;
-		$output[]=array($row["date"],number_format($last,3,".",""),number_format($curr,3,".",""),number_format($last,3,".",""),number_format($curr,3,".",""));
+		$output[]=array($row["date"],number_format($last,3,".",""),number_format($curr,3,".",""),number_format($last,3,".",""),number_format($curr,3,".",""),$row["hit"]);
 		$last = $curr;
 	}
 

+ 80 - 9
app/uhome/foot_step.php

@@ -78,6 +78,34 @@ Highcharts.setOptions({
 });
 
   Highcharts.getJSON('../ucenter/active_get.php', function (data) {
+    var ohlc = [],
+        volume = [],
+        dataLength = data.length,
+        // set the allowed units for data grouping
+        groupingUnits = [[
+            'week',                         // unit name
+            [1]                             // allowed multiples
+        ], [
+            'month',
+            [1, 2, 3, 4, 6]
+        ]],
+
+        i = 0;
+
+    for (i; i < dataLength; i += 1) {
+        ohlc.push([
+            data[i][0], // the date
+            data[i][1], // open
+            data[i][2], // high
+            data[i][3], // low
+            data[i][4] // close
+        ]);
+
+        volume.push([
+            data[i][0], // the date
+            data[i][5] // the volume
+        ]);
+    }
 
   // create the chart
   Highcharts.stockChart('container', {
@@ -90,20 +118,55 @@ Highcharts.setOptions({
     title: {
       text: gLocal.gui.progress_curve
     },
+        yAxis: [{
+            labels: {
+                align: 'right',
+                x: -3
+            },
+            title: {
+                text: gLocal.gui.EXP
+            },
+            height: '60%',
+            lineWidth: 2,
+            resize: {
+                enabled: true
+            }
+        }, {
+            labels: {
+                align: 'right',
+                x: -3
+            },
+            title: {
+                text: gLocal.gui.action
+            },
+            top: '65%',
+            height: '35%',
+            offset: 0,
+            lineWidth: 2
+        }],
+
 	tooltip: {
-			shared: true,
+			shared: false,
 			useHTML: true,
-			headerFormat: '<small>{point.key}</small><table>',
-			pointFormat: '<tr><td style="color: {series.color}">{series.name}: </td>' +
-				'<td style="text-align: right"><b>{point.y} '+gLocal.gui.h+'</b></td></tr>',
-			footerFormat: '</table>',
-			valueDecimals: 2
+			pointFormatter: function() {
+				if(this.high){
+					return '<b><a href="../">'+this.series.name + ' : ' + this.high + '&nbsp;' +gLocal.gui.h+ '</a><br><a href="../">' +gLocal.gui.day_EXP + ' : ' + Math.round((this.high - this.low)*100)/100 + '&nbsp;' +gLocal.gui.h+'</a></b><br/>'; 
+				}
+				else{
+					return '<b><a href="../">'+this.series.name + ' : ' + this.y + '&nbsp;' +gLocal.gui.times+'</a><span style="display:none;">'+this.x+'</span></b>'; 
+					
+				}
+
+			},
+			valueDecimals: 2,//保留两位小數
+            split: true
+
 		},
 
     series: [{
       type: 'ohlc',
-      name: gLocal.gui.day_EXP,
-      data: data,
+      name: gLocal.gui.EXP_in_total,
+      data: ohlc,
       dataGrouping: {
         units: [[
           'week', // unit name
@@ -113,7 +176,15 @@ Highcharts.setOptions({
           [1, 2, 3, 4, 6]
         ]]
       }
-    }]
+        }, {
+            type: 'column',
+            name: gLocal.gui.day_action,
+            data: volume,
+            yAxis: 1,
+            dataGrouping: {
+                units: groupingUnits
+            }
+        }]
   });
   });
 </script>

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

@@ -0,0 +1,42 @@
+# Translation Guide for **Typing**
+[Syntax in detail](https://www.markdownguide.org/basic-syntax/)
+## 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>

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

@@ -0,0 +1,44 @@
+# 译文输入范例指南
+[详细范例](https://www.markdownguide.org/basic-syntax/)
+## 文本样式
+|输入|显示|
+|-|-|
+|`[[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>

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

@@ -0,0 +1,42 @@
+# 譯文輸入範例指南
+## 文字樣式
+|輸入|顯示|
+|-|-|
+|`[[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>