index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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: 0 0.7em;
  86. }
  87. .dropdown_ctl>.content {
  88. display: flex;
  89. border: 1px solid var(--border-line-color);
  90. border-radius: 99px;
  91. line-height: 2em;
  92. }
  93. .dropdown_ctl>.menu {
  94. position: absolute;
  95. box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  96. display: none;
  97. }
  98. .dropdown_ctl>.menu {
  99. background-color: white;
  100. }
  101. .dropdown_ctl>.content>.main_view>part {
  102. margin: 0 0.5em;
  103. color: cornflowerblue;
  104. cursor: pointer;
  105. }
  106. .dropdown_ctl>.menu>.part_list {
  107. padding: 5px;
  108. cursor: pointer;
  109. }
  110. .dropdown_ctl>.menu>.part_list:hover {
  111. background-color: azure;
  112. }
  113. .dropdown_ctl>.content>.more_button {
  114. background-color: var(--btn-color);
  115. min-width: 1.4em;
  116. text-align: center;
  117. border-radius: 99px;
  118. cursor: pointer;
  119. }
  120. .pre_serach_block {
  121. border-bottom: 1px solid var(--shadow-color);
  122. padding: 5px 0;
  123. }
  124. .pre_serach_block_title {
  125. display: flex;
  126. justify-content: space-between;
  127. }
  128. .pre_serach_content {
  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(--bg-color);
  191. z-index: 50;
  192. display:none;
  193. }
  194. #dt_title {
  195. border-bottom: 2px solid var(--link-hover-color);
  196. }
  197. .dict_word_list .mean {
  198. overflow: hidden;
  199. text-overflow: ellipsis;
  200. display: -webkit-box;
  201. -webkit-box-orient: vertical;
  202. -webkit-line-clamp: 1;
  203. padding-left: 1em;
  204. color: var(--main-color1);
  205. }
  206. .dict_word_list{
  207. padding: 2px 10px 5px 10px;
  208. }
  209. .dict_word_list:hover{
  210. background-color: var(--link-color);
  211. color: var(--btn-hover-color);
  212. }
  213. .section_inner{
  214. max-width:1024px;
  215. margin: 0 auto;
  216. }
  217. .spell{
  218. font-size: 100%;
  219. font-weight: 500;
  220. }
  221. .pali_spell{
  222. font-size:200%;
  223. font-weight:700;
  224. margin-top:15px;
  225. padding-bottom:0
  226. }
  227. #main_view{
  228. display:flex;
  229. }
  230. #main_result{
  231. flex:7;
  232. }
  233. #right_bar{
  234. flex:3;
  235. }
  236. .auto_mean{
  237. display:flex;
  238. }
  239. .auto_mean>.spell{
  240. font-weight: 700;
  241. margin-right: 1em;
  242. }
  243. .auto_mean>.meaning{
  244. overflow: hidden;
  245. text-overflow: ellipsis;
  246. display: -webkit-box;
  247. -webkit-box-orient: vertical;
  248. -webkit-line-clamp: 2;
  249. color: var(--main-color1);
  250. }
  251. #word_parts{
  252. }
  253. #search_info{
  254. display:flex;
  255. justify-content: space-between;
  256. }
  257. #part_mean{
  258. margin: 1em;
  259. padding: 1em;
  260. border: 1px solid var(--border-line-color);
  261. background-color: var(--bg-color);
  262. box-shadow: 0 5px 7px rgb(0 0 0 / 5%);
  263. }
  264. #part_mean_shell{
  265. display:none;
  266. }
  267. </style>
  268. <link type="text/css" rel="stylesheet" href="./css/style.css" >
  269. <link type="text/css" rel="stylesheet" href="./css/style_mobile.css" media="screen and (max-width:800px)">
  270. <!-- tool bar begin-->
  271. <div id='search_toolbar' class="search_toolbar">
  272. <div class='section_inner' style="display:flex;justify-content: space-between;">
  273. <div id="left_menu_button">
  274. <button id="left_toc" type="button" class="icon_btn" onclick="setNaviVisibility('table_of_content')" title="Dict List">
  275. <svg class="icon">
  276. <use xlink:href="./icon.svg#icon_toc"></use>
  277. </svg>
  278. <span class="icon_notify" id="icon_notify_table_of_content">
  279. </span>
  280. </button>
  281. </div>
  282. <div >
  283. <guide gid="dict_search_input"></guide>
  284. </div>
  285. <div style="flex:6;">
  286. <div>
  287. <div>
  288. <input id="dict_ref_search_input" type="text" autocomplete="off" placeholder="<?php echo $_local->gui->search; ?> 单词里面添加 '+' 预览拆词结果" onkeyup="dict_input_keyup(event,this)" style="" onfocus="dict_input_onfocus()" />
  289. </div>
  290. <div id="result_msg"></div>
  291. <div id="manual_split"></div>
  292. </div>
  293. <div id="pre_search_result" >
  294. <div id="pre_search_word" class="pre_serach_block">
  295. <div id="pre_search_word_title" class="pre_serach_block_title">
  296. <div id="pre_search_word_title_left"><?php echo $_local->gui->vocabulary_list; ?></div>
  297. <div id="pre_search_word_title_right"></div>
  298. </div>
  299. <div id="pre_search_word_content" class="pre_serach_content">
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <span style="display:flex;">
  305. <button id="trubo_split" onclick="trubo_split()" >
  306. <?php echo $_local->gui->turbo_split; /*强力拆分*/ ?>
  307. </button>
  308. <guide gid="comp_split"></guide>
  309. </span>
  310. <div></div>
  311. </div>
  312. <div style="display:block;z-index: 5;text-align:center;">
  313. </div>
  314. </div>
  315. <!--tool bar end -->
  316. <!-- tool bar fixed begin-->
  317. <div id='search_toolbar_1' class="search_toolbar search_fixed">
  318. <div style="display:flex;">
  319. <span>
  320. <?php echo $_local->gui->dictionary; ?>
  321. </span>
  322. <div>
  323. <div>
  324. <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()">
  325. </div>
  326. <div id="pre_search_result_1" style="position: absolute;max-width: 100%; width: 50em;background-color: var(--btn-color);z-index: 51;display: none;">
  327. <div class="pre_serach_block">
  328. <div class="pre_serach_block_title">
  329. <div id="pre_search_word_title_left_1"><?php echo $_local->gui->vocabulary_list; ?></div>
  330. <div id="pre_search_word_title_right_1"></div>
  331. </div>
  332. <div id="pre_search_word_content_1" class="pre_serach_content">
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. <div style="display:block;z-index: 5;">
  339. </div>
  340. </div>
  341. <!--tool bar fixed end -->
  342. <div id="tool_btn" class="right_tool_btn" style="display: none;">
  343. <button style="border: 2px solid var(--nocolor); background-color: unset;"><a href="#toc_root">
  344. <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">
  345. <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>
  346. <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>
  347. <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>
  348. <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>
  349. <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>
  350. </svg>
  351. </a>
  352. </button>
  353. </div>
  354. <div>
  355. <div id="main_view" class='section_inner' style="background-color:white;color:black;">
  356. <div id='dict_list_shell' style="display:none" onclick='setNaviVisibility()'>
  357. <div id='dict_list' class='dict_list_off'></div>
  358. </div>
  359. <div id="main_result">
  360. <div id="search_info">
  361. <div id='search_result_shell'></div>
  362. <div id="word_parts">
  363. <div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
  364. </div>
  365. </div>
  366. <div id="part_mean_shell">
  367. <div id="part_mean"></div>
  368. </div>
  369. <div id="dict_search_result"></div>
  370. </div>
  371. <div id="right_bar"></div>
  372. </div>
  373. </div>
  374. <script>
  375. <?php
  376. if (isset($_GET["key"]) && !empty($_GET["key"])) {
  377. echo "var _key='{$_GET["key"]}';\n";
  378. echo "search_on_load(\"{$_GET["key"]}\")";
  379. }
  380. ?>
  381. window.addEventListener('scroll', winScroll);
  382. function winScroll(e) {
  383. if (GetPageScroll().y > 150) {
  384. $("#search_toolbar_1").css("top", 0);
  385. } else {
  386. $("#search_toolbar_1").css("top", GetPageScroll().y - 150);
  387. }
  388. if (GetPageScroll().y > $(window).height() * 0.9) {
  389. $("#tool_btn").show();
  390. } else {
  391. $("#tool_btn").hide();
  392. }
  393. }
  394. //滚动条位置
  395. function GetPageScroll() {
  396. var pos = new Object();
  397. var x, y;
  398. if (window.pageYOffset) { // all except IE
  399. y = window.pageYOffset;
  400. x = window.pageXOffset;
  401. } else if (document.documentElement && document.documentElement.scrollTop) { // IE 6 Strict
  402. y = document.documentElement.scrollTop;
  403. x = document.documentElement.scrollLeft;
  404. } else if (document.body) { // all other IE
  405. y = document.body.scrollTop;
  406. x = document.body.scrollLeft;
  407. }
  408. pos.x = x;
  409. pos.y = y;
  410. return (pos);
  411. }
  412. </script>
  413. <?php
  414. include "../pcdl/html_foot.php";
  415. ?>