@@ -113,34 +113,7 @@ require_once "../pcdl/html_head.php";
border-radius: 99px;
cursor: pointer;
}
- guide{
- position: relative;
- display:inline-block;
- width:1.4em;
- height:1.4em;
- cursor: pointer;
- background-color:gray;
- }
- guide:hover .guide_contence{
- .guide_contence {
- position: absolute;
- top:100%;
- width:18em;
- min-height:30em;
- padding:10px;
- background-color:white;
- box-shadow: 0 0 10px rgba(0,0,0,0.15);
- font-size:10pt;
- text-align:left;
- display:none;
- .guide_contence h1{
- font-size:1.5em;
- font-weight:700;
</style>
<!-- tool bar begin-->
<div id='search_toolbar' class="search_toolbar">
@@ -149,7 +122,7 @@ require_once "../pcdl/html_head.php";
<div>
- <guide gid="comp_split"></guide><input id="dict_ref_search_input" type="input" placeholder="<?php echo $_local->gui->search;?>" onkeyup="dict_input_keyup(event,this)" style=" margin-left: 0.5em;width: 40em;max-width: 100%;font-size:140%;padding: 0.6em;color: var(--btn-hover-bg-color);background-color: var(--btn-color);" onfocus="dict_input_onfocus()" />
+ <guide gid="dict_search_input"></guide><input id="dict_ref_search_input" type="input" placeholder="<?php echo $_local->gui->search;?>" onkeyup="dict_input_keyup(event,this)" style=" margin-left: 0.5em;width: 40em;max-width: 100%;font-size:140%;padding: 0.6em;color: var(--btn-hover-bg-color);background-color: var(--btn-color);" onfocus="dict_input_onfocus()" />
</div>
<div id="word_parts">
<div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
@@ -253,38 +226,7 @@ function GetPageScroll()
?>
- <script>
- $("guide").each(function(){
- if($(this).offset().left<$(document.body).width()/2){
- $(this).append('<div class="guide_contence" style="left: 0;"></div>');
- else{
- $(this).append('<div class="guide_contence" style="right: 0;"></div>');
- });
- $("guide").mouseenter(function(){
- if($(this).children(".guide_contence").first().html().length>0){
- return;
- let gid = $(this).attr("gid");
- let guideObj = $(this);
- $.get("../guide/get.php",
- {
- id:gid
- },
- function(data,status){
- try{
- let jsonGuide = JSON.parse(data);
- $("guide[gid='"+jsonGuide.id+"']").find(".guide_contence").html(marked(jsonGuide.data));
- catch(e){
- console.error(e);
-
- </script>
<?php
include "../pcdl/html_foot.php";
@@ -1,9 +1,33 @@
require_once "../path.php";
-$filename = _DIR_USERS_GUIDE_."/en/".$_GET["id"].".md";
-$output["data"] = file_get_contents($filename) ;
-$output["id"] =$_GET["id"];
+//获取用户界面语言
+if(isset($_COOKIE["language"])){
+ $lang = $_COOKIE["language"];
+}
+else{
+ $lang = "en";
+//查找用户界面语言对应的文件
+$filename = _DIR_USERS_GUIDE_."/{$lang}/".$_GET["id"].".md";
+if(file_exists($filename)){
+ $output["data"] = file_get_contents($filename) ;
+ $output["id"] =$_GET["id"];
+ //如果用户界面不是英语,尝试使用英语文件
+ $filename = _DIR_USERS_GUIDE_."/en/".$_GET["id"].".md";
+ if($lang != "en" && file_exists($filename)){
+ }
+ else{
+ //尝试使用英语文件不成功,报错
+ $output["data"] = "Error: Can't Find Item In Server. Item Id:{$_GET["id"]} Language:{$lang}";
+
echo json_encode($output,JSON_UNESCAPED_UNICODE);
@@ -0,0 +1,43 @@
+guide{
+ position: relative;
+ display:inline-block;
+ width:14px;
+ height:14px;
+ cursor: pointer;
+ background: url(guide_icon.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+ margin: 0 6px;
+guide:hover .guide_contence{
+.guide_contence {
+ position: absolute;
+ top:100%;
+ width:18em;
+ min-height:30em;
+ padding:10px;
+ background-color:white;
+ box-shadow: 0 0 10px rgba(0,0,0,0.15);
+ font-size:10pt;
+ text-align:left;
+ display:none;
+.guide_contence h1{
+ font-size:1.5em;
+ font-weight:700;
+.guide_contence h2{
+ font-size:1.3em;
+.guide_contence h3{
+ font-size:1.1em;
+.guide_contence h4{
+ font-size:1em;
@@ -1,3 +1,32 @@
function guide_init() {
+ $("guide").each(function () {
+ if ($(this).offset().left < $(document.body).width() / 2) {
+ $(this).append('<div class="guide_contence" style="left: 0;"></div>');
+ else {
+ $(this).append('<div class="guide_contence" style="right: 0;"></div>');
+ });
+ $("guide").mouseenter(function () {
+ if ($(this).children(".guide_contence").first().html().length > 0) {
+ return;
+ let gid = $(this).attr("gid");
+ let guideObj = $(this);
+ $.get("../guide/get.php",
+ {
+ id: gid
+ },
+ function (data, status) {
+ try {
+ let jsonGuide = JSON.parse(data);
+ $("guide[gid='" + jsonGuide.id + "']").find(".guide_contence").html(marked(jsonGuide.data));
+ catch (e) {
+ console.error(e);
@@ -5,34 +5,4 @@
width="14px" height="14px" viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve">
<path d="M7,0C3.134,0,0,3.134,0,7s3.134,7,7,7s7-3.134,7-7S10.866,0,7,0z M7,2c0.552,0,1,0.447,1,1S7.552,4,7,4S6,3.553,6,3
S6.448,2,7,2z M9,11H5v-1h1V6H5V5h3v5h1V11z"/>
-<g>
-</g>
</svg>
@@ -48,7 +48,12 @@
</div>S
<div class="foot_div">
-wikipali @2020
+ <div>wikipali @2020</div>
+ <div>Powered by PCD Suite</div>
+<script>
+ guide_init();
+</script>
</body>
</html>
@@ -27,11 +27,16 @@ else{
<link type="text/css" rel="stylesheet" href="../pcdl/css/basic_style.css"/>
<link type="text/css" rel="stylesheet" href="../pcdl/css/color_day.css" id="colorchange" />
<link type="text/css" rel="stylesheet" href="../pcdl/css/style_mobile.css" media="screen and (max-width:767px)">
+ <link type="text/css" rel="stylesheet" href="../guide/guide.css"/>
<title>圣典</title>
<script src="../public/js/jquery.js"></script>
<script src="../public/js/comm.js"></script>
<script src="../studio/js/fixedsticky.js"></script>
+ <script src="../guide/guide.js"></script>
<script >
<?php require_once '../public/load_lang_js.php';?>
</script>
@@ -31,10 +31,11 @@
text-align:right;
#user_bar{
- border: 2px solid var(--btn-border-color);
+ border: 1px solid var(--btn-border-color);
color: var(--btn-color);
padding: 2px 2px 2px 15px;
+ height: min-content;
<div style="margin:auto;" class="dropdown" onmouseover="switchMenu(this,'user_info')" onmouseout="hideMenu()">
@@ -1,2 +1,3 @@
-# 强力复合词拆分
-这是基于语料库的复合词自动拆分程序。点击数字选择更多选项。
+# 强大的复合词拆分
+这是基于语料库的复合词自动拆分程序。程序会进行深度切分和搜索,给出可能性比较高的一些可能。点击组分后面的数字选择其他的可能。
@@ -0,0 +1,6 @@
+## Smart Dictionary
+You can put the plus(+)between parts in the compone word, and than click one part(under the search input) lookup dictionary.
+### Example:
+citta+kamma
@@ -0,0 +1,3 @@
+## 聪明的单词搜索
+您可以在输入框中的复合词中加入加号(+)用以分隔单词的各个组成部分。利用搜索框下方的组分列表查询组分的意思。
+### 例如:
+您可以在输入的复合词中加入加号(+)。利用搜索框下方的组分列表查询组分的意思。