index.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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 3px;
  21. border-radius: 3px;
  22. }
  23. .dict_word:hover guide.grammar_tag {
  24. text-decoration: underline;
  25. }
  26. </style>
  27. <!-- tool bar begin-->
  28. <div id='search_toolbar' class="search_toolbar">
  29. <div class='section_inner' style="display:flex;justify-content: space-between;">
  30. <div id="left_menu_button">
  31. <button id="left_toc" type="button" class="icon_btn" onclick="setNaviVisibility('table_of_content')" title="Dict List">
  32. <svg class="icon">
  33. <use xlink:href="./icon.svg#icon_toc"></use>
  34. </svg>
  35. <span class="icon_notify" id="icon_notify_table_of_content">
  36. </span>
  37. </button>
  38. </div>
  39. <div >
  40. <guide gid="dict_search_input"></guide>
  41. </div>
  42. <div style="flex:6;">
  43. <div>
  44. <div>
  45. <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()" />
  46. </div>
  47. <div id="result_msg"></div>
  48. <div id="manual_split"></div>
  49. </div>
  50. <div id="pre_search_result" >
  51. <div id="pre_search_word" class="pre_serach_block">
  52. <div id="pre_search_word_title" class="pre_serach_block_title">
  53. <div id="pre_search_word_title_left">
  54. <?php #echo $_local->gui->vocabulary_list; ?>
  55. </div>
  56. <div id="pre_search_word_title_right"></div>
  57. </div>
  58. <div id="pre_search_word_content" class="pre_serach_content">
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <span style="display:flex;">
  64. <!--
  65. <button id="trubo_split" onclick="trubo_split()" >
  66. <?php echo $_local->gui->turbo_split; /*强力拆分*/ ?>
  67. </button>
  68. <guide gid="comp_split"></guide>
  69. -->
  70. </span>
  71. <div></div>
  72. </div>
  73. <div style="display:block;z-index: 5;text-align:center;">
  74. </div>
  75. </div>
  76. <!--tool bar end -->
  77. <!-- tool bar fixed begin-->
  78. <div id='search_toolbar_1' class="search_toolbar search_fixed">
  79. <div style="display:flex;">
  80. <span>
  81. <?php echo $_local->gui->dictionary; ?>
  82. </span>
  83. <div>
  84. <div>
  85. <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()">
  86. </div>
  87. <div id="pre_search_result_1" style="position: absolute;max-width: 100%; width: 50em;background-color: var(--btn-color);z-index: 51;display: none;">
  88. <div class="pre_serach_block">
  89. <div class="pre_serach_block_title">
  90. <div id="pre_search_word_title_left_1"><?php echo $_local->gui->vocabulary_list; ?></div>
  91. <div id="pre_search_word_title_right_1"></div>
  92. </div>
  93. <div id="pre_search_word_content_1" class="pre_serach_content">
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div style="display:block;z-index: 5;">
  100. </div>
  101. </div>
  102. <!--tool bar fixed end -->
  103. <div id="tool_btn" class="right_tool_btn" style="display: none;">
  104. <button style="border: 2px solid var(--nocolor); background-color: unset;"><a href="#toc_root">
  105. <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">
  106. <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>
  107. <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>
  108. <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>
  109. <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>
  110. <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>
  111. </svg>
  112. </a>
  113. </button>
  114. </div>
  115. <div>
  116. <div id="main_view" class='section_inner' >
  117. <div id='dict_list_shell' style="display:none" onclick='setNaviVisibility()'>
  118. <div id='dict_list' class='dict_list_off'></div>
  119. </div>
  120. <div id="main_result">
  121. <div id="search_info">
  122. <div id='search_result_shell'></div>
  123. <div id="word_parts">
  124. <div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
  125. </div>
  126. </div>
  127. <div id="part_mean_shell">
  128. <div id="part_mean"></div>
  129. </div>
  130. <div id="dict_search_result"></div>
  131. </div>
  132. <div id="right_bar"></div>
  133. </div>
  134. </div>
  135. <script>
  136. <?php
  137. if (isset($_GET["key"]) && !empty($_GET["key"])) {
  138. echo "var _key='{$_GET["key"]}';\n";
  139. echo "search_on_load(\"{$_GET["key"]}\")";
  140. }
  141. ?>
  142. //window.addEventListener('scroll', winScroll);
  143. function winScroll(e) {
  144. if (GetPageScroll().y > 150) {
  145. $("#search_toolbar_1").css("top", 0);
  146. } else {
  147. $("#search_toolbar_1").css("top", GetPageScroll().y - 150);
  148. }
  149. if (GetPageScroll().y > $(window).height() * 0.9) {
  150. $("#tool_btn").show();
  151. } else {
  152. $("#tool_btn").hide();
  153. }
  154. }
  155. //滚动条位置
  156. function GetPageScroll() {
  157. var pos = new Object();
  158. var x, y;
  159. if (window.pageYOffset) { // all except IE
  160. y = window.pageYOffset;
  161. x = window.pageXOffset;
  162. } else if (document.documentElement && document.documentElement.scrollTop) { // IE 6 Strict
  163. y = document.documentElement.scrollTop;
  164. x = document.documentElement.scrollLeft;
  165. } else if (document.body) { // all other IE
  166. y = document.body.scrollTop;
  167. x = document.body.scrollLeft;
  168. }
  169. pos.x = x;
  170. pos.y = y;
  171. return (pos);
  172. }
  173. ntf_init(1);
  174. </script>
  175. <?php
  176. include "../pcdl/html_foot.php";
  177. ?>