index.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?PHP
  2. require_once "../pcdl/html_head.php";
  3. ?>
  4. <body>
  5. <a name="toc_root"></a>
  6. <?php
  7. if (!(isset($_GET["builtin"]) && $_GET["builtin"] == 'true')) {
  8. require_once "../pcdl/head_bar.php";
  9. }
  10. ?>
  11. <script language="javascript" src="./dict.js"></script>
  12. <link type="text/css" rel="stylesheet" href="./css/style.css" >
  13. <link type="text/css" rel="stylesheet" href="./css/style_mobile.css" media="screen and (max-width:800px)">
  14. <style>
  15. guide.grammar_tag {
  16. display: unset;
  17. background: unset;
  18. /*color: unset;*/
  19. background-color: var(--btn-color);
  20. padding: 0;
  21. border-radius: 3px;
  22. margin: 0;
  23. }
  24. guide.grammar_tag:hover {
  25. /*color: unset;*/
  26. text-decoration: underline;
  27. }
  28. .dict_word:hover guide.grammar_tag {
  29. /*text-decoration: underline;*/
  30. }
  31. </style>
  32. <!-- tool bar begin-->
  33. <div id='search_toolbar' class="search_toolbar">
  34. <div class='section_inner' style="display:flex;justify-content: space-between;">
  35. <div id="left_menu_button">
  36. <button id="left_toc" type="button" class="icon_btn" onclick="setNaviVisibility('table_of_content')" title="Dict List">
  37. <svg class="icon">
  38. <use xlink:href="./icon.svg#icon_toc"></use>
  39. </svg>
  40. <span class="icon_notify" id="icon_notify_table_of_content">
  41. </span>
  42. </button>
  43. </div>
  44. <div style="flex:6;">
  45. <div style="display:flex;">
  46. <div style="align-self: center;">
  47. <guide gid="dict_search_input"></guide>
  48. </div>
  49. <div style="width:90%;">
  50. <input id="dict_ref_search_input" type="text" autocomplete="off" placeholder="<?php echo $_local->gui->dict_searching_placehold; ?> " onkeyup="dict_input_keyup(event,this)" style="" onfocus="dict_input_onfocus()" />
  51. </div>
  52. </div>
  53. <div id="pre_search_result" >
  54. <div id="pre_search_word" class="pre_serach_block">
  55. <div id="pre_search_word_title" class="pre_serach_block_title">
  56. <div id="pre_search_word_title_left">
  57. <?php #echo $_local->gui->vocabulary_list; ?>
  58. </div>
  59. <div id="pre_search_word_title_right"></div>
  60. </div>
  61. <div id="pre_search_word_content" class="pre_serach_content">
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <span style="display:flex;">
  67. <!--
  68. <button id="trubo_split" onclick="trubo_split()" >
  69. <?php echo $_local->gui->turbo_split; /*强力拆分*/ ?>
  70. </button>
  71. <guide gid="comp_split"></guide>
  72. -->
  73. </span>
  74. <div></div>
  75. </div>
  76. <div id="manual_split"></div>
  77. <div id="result_msg"></div>
  78. <div style="display:block;z-index: 5;text-align:center;">
  79. </div>
  80. </div>
  81. <!--tool bar end -->
  82. <!-- tool bar fixed begin-->
  83. <div id='search_toolbar_1' class="search_toolbar search_fixed">
  84. <div style="display:flex;">
  85. <span>
  86. <?php echo $_local->gui->dictionary; ?>
  87. </span>
  88. <div>
  89. <div>
  90. <input id="dict_ref_search_input_1" type="input" placeholder="<?php echo $_local->gui->search; ?>" onkeyup="dict_input_keyup(event,this)" style="margin-left: 0.5em;width: 40em;max-width: 80%;font-size:140%;padding: 0.3em;color: var(--btn-hover-bg-color);background-color: var(--btn-color);" onfocus="dict_input_onfocus()">
  91. </div>
  92. <div id="pre_search_result_1" style="position: absolute;max-width: 100%; width: 50em;background-color: var(--btn-color);z-index: 51;display: none;">
  93. <div class="pre_serach_block">
  94. <div class="pre_serach_block_title">
  95. <div id="pre_search_word_title_left_1"><?php echo $_local->gui->vocabulary_list; ?></div>
  96. <div id="pre_search_word_title_right_1"></div>
  97. </div>
  98. <div id="pre_search_word_content_1" class="pre_serach_content">
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div style="display:block;z-index: 5;">
  105. </div>
  106. </div>
  107. <!--tool bar fixed end -->
  108. <div id="tool_btn" class="right_tool_btn" style="display: none;">
  109. <button style="border: 2px solid var(--nocolor); background-color: unset;"><a href="#toc_root">
  110. <svg t="1596888255722" class="icon" style="height: 3em; width: 3em;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4368" width="200" height="200">
  111. <path d="M510.4 514.2m-449.2 0a449.2 449.2 0 1 0 898.4 0 449.2 449.2 0 1 0-898.4 0Z" fill="#8a8a8a" p-id="4369"></path>
  112. <path d="M719.4 314.5h-416c-8.5 0-15.4-6.9-15.4-15.4v-4.8c0-8.5 6.9-15.4 15.4-15.4h416.1c8.5 0 15.4 6.9 15.4 15.4v4.8c-0.1 8.4-7 15.4-15.5 15.4z" fill="#ffffff" p-id="4370"></path>
  113. <path d="M494.1 735.1v-416c0-8.5 6.9-15.4 15.4-15.4h4.8c8.5 0 15.4 6.9 15.4 15.4v416.1c0 8.5-6.9 15.4-15.4 15.4h-4.8c-8.4-0.1-15.4-7-15.4-15.5z" fill="#ffffff" p-id="4371"></path>
  114. <path d="M672.5 503.1l-165-165c-6-6-6-15.8 0-21.7l3.4-3.4c6-6 15.8-6 21.7 0l165 165c6 6 6 15.8 0 21.7l-3.4 3.4c-6 6-15.7 6-21.7 0z" fill="#ffffff" p-id="4372"></path>
  115. <path d="M325.2 478l165-165c6-6 15.8-6 21.7 0l3.4 3.4c6 6 6 15.8 0 21.7l-165 165c-6 6-15.8 6-21.7 0l-3.4-3.4c-5.9-6-5.9-15.7 0-21.7z" fill="#ffffff" p-id="4373"></path>
  116. </svg>
  117. </a>
  118. </button>
  119. </div>
  120. <div style="position: fixed;max-height: calc(100vh - 89px - 3.6em);width:100vw;overflow: scroll;">
  121. <div id="main_view" class='section_inner' >
  122. <div id='dict_list_shell' style="display:none" onclick='setNaviVisibility()'>
  123. <div id='dict_list' class='dict_list_off'></div>
  124. </div>
  125. <div id="main_result">
  126. <div id="search_info">
  127. <div id='search_result_shell'></div>
  128. <div id="word_parts">
  129. <div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
  130. </div>
  131. </div>
  132. <div id="part_mean_shell">
  133. <div id="part_mean"></div>
  134. </div>
  135. <div id="dict_search_result"></div>
  136. </div>
  137. <div id="right_bar"></div>
  138. </div>
  139. </div>
  140. <script>
  141. <?php
  142. if (isset($_GET["key"]) && !empty($_GET["key"])) {
  143. echo "var _key='{$_GET["key"]}';\n";
  144. echo "search_on_load(\"{$_GET["key"]}\")";
  145. }
  146. ?>
  147. //window.addEventListener('scroll', winScroll);
  148. function winScroll(e) {
  149. if (GetPageScroll().y > 150) {
  150. $("#search_toolbar_1").css("top", 0);
  151. } else {
  152. $("#search_toolbar_1").css("top", GetPageScroll().y - 150);
  153. }
  154. if (GetPageScroll().y > $(window).height() * 0.9) {
  155. $("#tool_btn").show();
  156. } else {
  157. $("#tool_btn").hide();
  158. }
  159. }
  160. //滚动条位置
  161. function GetPageScroll() {
  162. var pos = new Object();
  163. var x, y;
  164. if (window.pageYOffset) { // all except IE
  165. y = window.pageYOffset;
  166. x = window.pageXOffset;
  167. } else if (document.documentElement && document.documentElement.scrollTop) { // IE 6 Strict
  168. y = document.documentElement.scrollTop;
  169. x = document.documentElement.scrollLeft;
  170. } else if (document.body) { // all other IE
  171. y = document.body.scrollTop;
  172. x = document.body.scrollLeft;
  173. }
  174. pos.x = x;
  175. pos.y = y;
  176. return (pos);
  177. }
  178. ntf_init(1);
  179. </script>
  180. <?php
  181. include "../pcdl/html_foot.php";
  182. ?>