index.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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. <style>
  13. body {
  14. margin: unset;
  15. }
  16. .index_toolbar {
  17. position: unset;
  18. }
  19. .search_toolbar {
  20. height: initial;
  21. padding: 0.6em 1em 0.1em 1em;
  22. background-color: var(--tool-bg-color1);
  23. border-bottom: none;
  24. }
  25. .search_fixed {
  26. position: fixed;
  27. top: -500px;
  28. width: 100%;
  29. display: flex;
  30. padding: 0.5em 1em;
  31. }
  32. #dict_search_result {
  33. display: flex;
  34. }
  35. #dict_list {
  36. flex: 2;
  37. text-align: right;
  38. padding-right: 1em;
  39. border-right: 1px solid var(--border-line-color);
  40. }
  41. #dict_ref {
  42. flex: 6;
  43. padding: 0.5em 1.5em;
  44. }
  45. #dict_user {
  46. flex: 2;
  47. }
  48. .dict_word_card {
  49. border-bottom: 1px solid var(--border-line-color);
  50. padding: 5px 0;
  51. display: block;
  52. border-radius: unset;
  53. margin: 10px 0;
  54. transition: unset;
  55. box-shadow: unset;
  56. }
  57. .dict_word {
  58. border-left: none;
  59. border-right: none;
  60. border-top: none;
  61. border-bottom: 1px solid var(--border-line-color);
  62. padding: 5px 0;
  63. display: block;
  64. border-radius: unset;
  65. margin: 10px 0;
  66. transition: unset;
  67. box-shadow: unset;
  68. }
  69. .dict_word>.dict {
  70. font-size: 110%;
  71. color: var(--main-color);
  72. border-bottom: unset;
  73. padding-bottom: 10px;
  74. }
  75. .dict_word>.mean {
  76. font-size: unset;
  77. margin: 2px 0;
  78. line-height: 150%;
  79. font-weight: unset;
  80. display: block;
  81. }
  82. /*for word split part */
  83. .dropdown_ctl {
  84. display: inline-block;
  85. margin-right: 0.7em;
  86. }
  87. .dropdown_ctl>.content {
  88. display: flex;
  89. border: 1px solid var(--border-line-color);
  90. border-radius: 99px;
  91. }
  92. .dropdown_ctl>.menu {
  93. position: absolute;
  94. box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  95. display: none;
  96. }
  97. .dropdown_ctl>.menu {
  98. background-color: white;
  99. }
  100. .dropdown_ctl>.content>.main_view>part {
  101. margin: 0 0.5em;
  102. color: cornflowerblue;
  103. cursor: pointer;
  104. }
  105. .dropdown_ctl>.menu>.part_list {
  106. padding: 5px;
  107. cursor: pointer;
  108. }
  109. .dropdown_ctl>.menu>.part_list:hover {
  110. background-color: azure;
  111. }
  112. .dropdown_ctl>.content>.more_button {
  113. background-color: var(--btn-color);
  114. min-width: 1.4em;
  115. text-align: center;
  116. border-radius: 99px;
  117. cursor: pointer;
  118. }
  119. .pre_serach_block {
  120. border-bottom: 1px solid var(--shadow-color);
  121. padding: 5px 8px;
  122. }
  123. .pre_serach_block_title {
  124. display: flex;
  125. justify-content: space-between;
  126. }
  127. .pre_serach_content {
  128. padding: 4px 4px 4px 15px;
  129. }
  130. #footer_nav {
  131. display: none;
  132. }
  133. .right_tool_btn {
  134. position: fixed;
  135. right: 50px;
  136. top: 5em;
  137. background-color: unset;
  138. }
  139. .right_tool_btn .icon {
  140. height: 2em;
  141. width: 2em;
  142. }
  143. .right_tool_btn button:hover {
  144. background-color: var(--link-hover-color);
  145. border-color: var(--link-color);
  146. color: var(--btn-hover-color);
  147. height: 3em;
  148. width: 3em;
  149. padding: 0;
  150. }
  151. .right_tool_btn button {
  152. background-color: var(--link-color);
  153. border-color: var(--link-color);
  154. color: var(--btn-color);
  155. height: 3em;
  156. width: 3em;
  157. padding: 0;
  158. }
  159. button,
  160. input[type="button"],
  161. input[type="submit"] {
  162. font-weight: 500;
  163. font-size: 90%;
  164. background-color: none;
  165. border: 2px solid var(--btn-border-color);
  166. border-radius: 99px;
  167. margin: 2px;
  168. padding: 2px 12px;
  169. -webkit-transition-duration: 0.2s;
  170. -moz-transition-duration: 0.2s;
  171. transition-duration: 0.2s;
  172. cursor: pointer;
  173. display: -webkit-inline-flex;
  174. display: -moz-inline-flex;
  175. display: inline-flex;
  176. -webkit-align-items: center;
  177. -moz-align-items: center;
  178. align-items: center;
  179. -webkit-flex-wrap: nowrap;
  180. -moz-flex-wrap: nowrap;
  181. flex-wrap: nowrap;
  182. -webkit-justify-content: center;
  183. -moz-justify-content: center;
  184. justify-content: center;
  185. }
  186. .dict_find_gramma guide{
  187. color:unset;
  188. }
  189. #pre_search_result{
  190. background-color: var(--btn-color);
  191. z-index: 50;
  192. display:none;
  193. }
  194. #dt_title {
  195. border-bottom: 2px solid var(--link-hover-color);
  196. }
  197. </style>
  198. <link type="text/css" rel="stylesheet" href="./css/style.css" >
  199. <link type="text/css" rel="stylesheet" href="./css/style_mobile.css" media="screen and (max-width:800px)">
  200. <!-- tool bar begin-->
  201. <div id='search_toolbar' class="search_toolbar">
  202. <div style="display:flex;justify-content: space-between;">
  203. <div id="left_menu_button">
  204. <button id="left_toc" type="button" class="icon_btn" onclick="setNaviVisibility('table_of_content')" title="Dict List">
  205. <svg class="icon">
  206. <use xlink:href="./icon.svg#icon_toc"></use>
  207. </svg>
  208. <span class="icon_notify" id="icon_notify_table_of_content">
  209. </span>
  210. </button>
  211. </div>
  212. <div >
  213. <guide gid="dict_search_input"></guide>
  214. </div>
  215. <div style="flex:6;">
  216. <div>
  217. <div>
  218. <input id="dict_ref_search_input" type="input" placeholder="<?php echo $_local->gui->search; ?> 单词里面添加+ 预览拆词结果" onkeyup="dict_input_keyup(event,this)" style="" onfocus="dict_input_onfocus()" />
  219. </div>
  220. <div id="result_msg"></div>
  221. <div id="word_parts">
  222. <div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
  223. </div>
  224. </div>
  225. <div id="pre_search_result" >
  226. <div id="pre_search_word" class="pre_serach_block">
  227. <div id="pre_search_word_title" class="pre_serach_block_title">
  228. <div id="pre_search_word_title_left"><?php echo $_local->gui->vocabulary_list; ?></div>
  229. <div id="pre_search_word_title_right"></div>
  230. </div>
  231. <div id="pre_search_word_content" class="pre_serach_content">
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. <span style="display:flex;">
  237. <button id="trubo_split" onclick="trubo_split()" >
  238. <?php echo $_local->gui->turbo_split; /*强力拆分*/ ?>
  239. </button>
  240. <guide gid="comp_split"></guide>
  241. </span>
  242. <div></div>
  243. </div>
  244. <div style="display:block;z-index: 5;text-align:center;">
  245. </div>
  246. </div>
  247. <!--tool bar end -->
  248. <!-- tool bar fixed begin-->
  249. <div id='search_toolbar_1' class="search_toolbar search_fixed">
  250. <div style="display:flex;">
  251. <span>
  252. <?php echo $_local->gui->dictionary; ?>
  253. </span>
  254. <div>
  255. <div>
  256. <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()">
  257. </div>
  258. <div id="pre_search_result_1" style="position: absolute;max-width: 100%; width: 50em;background-color: var(--btn-color);z-index: 51;display: none;">
  259. <div class="pre_serach_block">
  260. <div class="pre_serach_block_title">
  261. <div id="pre_search_word_title_left_1"><?php echo $_local->gui->vocabulary_list; ?></div>
  262. <div id="pre_search_word_title_right_1"></div>
  263. </div>
  264. <div id="pre_search_word_content_1" class="pre_serach_content">
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. <div style="display:block;z-index: 5;">
  271. </div>
  272. </div>
  273. <!--tool bar fixed end -->
  274. <div id="tool_btn" class="right_tool_btn" style="display: none;">
  275. <button style="border: 2px solid var(--nocolor); background-color: unset;"><a href="#toc_root">
  276. <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">
  277. <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>
  278. <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>
  279. <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>
  280. <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>
  281. <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>
  282. </svg>
  283. </a>
  284. </button>
  285. </div>
  286. <div id="dict_search_result" style="background-color:white;color:black;">
  287. </div>
  288. <script>
  289. <?php
  290. if (isset($_GET["key"]) && !empty($_GET["key"])) {
  291. echo "var _key='{$_GET["key"]}';\n";
  292. echo "search_on_load(\"{$_GET["key"]}\")";
  293. }
  294. ?>
  295. window.addEventListener('scroll', winScroll);
  296. function winScroll(e) {
  297. if (GetPageScroll().y > 150) {
  298. $("#search_toolbar_1").css("top", 0);
  299. } else {
  300. $("#search_toolbar_1").css("top", GetPageScroll().y - 150);
  301. }
  302. if (GetPageScroll().y > $(window).height() * 0.9) {
  303. $("#tool_btn").show();
  304. } else {
  305. $("#tool_btn").hide();
  306. }
  307. }
  308. //滚动条位置
  309. function GetPageScroll() {
  310. var pos = new Object();
  311. var x, y;
  312. if (window.pageYOffset) { // all except IE
  313. y = window.pageYOffset;
  314. x = window.pageXOffset;
  315. } else if (document.documentElement && document.documentElement.scrollTop) { // IE 6 Strict
  316. y = document.documentElement.scrollTop;
  317. x = document.documentElement.scrollLeft;
  318. } else if (document.body) { // all other IE
  319. y = document.body.scrollTop;
  320. x = document.body.scrollLeft;
  321. }
  322. pos.x = x;
  323. pos.y = y;
  324. return (pos);
  325. }
  326. </script>
  327. <?php
  328. include "../pcdl/html_foot.php";
  329. ?>