index.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 8px;
  123. }
  124. .pre_serach_block_title {
  125. display: flex;
  126. justify-content: space-between;
  127. }
  128. .pre_serach_content {
  129. padding: 4px 4px 4px 15px;
  130. }
  131. #footer_nav {
  132. display: none;
  133. }
  134. .right_tool_btn {
  135. position: fixed;
  136. right: 50px;
  137. top: 5em;
  138. background-color: unset;
  139. }
  140. .right_tool_btn .icon {
  141. height: 2em;
  142. width: 2em;
  143. }
  144. .right_tool_btn button:hover {
  145. background-color: var(--link-hover-color);
  146. border-color: var(--link-color);
  147. color: var(--btn-hover-color);
  148. height: 3em;
  149. width: 3em;
  150. padding: 0;
  151. }
  152. .right_tool_btn button {
  153. background-color: var(--link-color);
  154. border-color: var(--link-color);
  155. color: var(--btn-color);
  156. height: 3em;
  157. width: 3em;
  158. padding: 0;
  159. }
  160. button,
  161. input[type="button"],
  162. input[type="submit"] {
  163. font-weight: 500;
  164. font-size: 90%;
  165. background-color: none;
  166. border: 2px solid var(--btn-border-color);
  167. border-radius: 99px;
  168. margin: 2px;
  169. padding: 2px 12px;
  170. -webkit-transition-duration: 0.2s;
  171. -moz-transition-duration: 0.2s;
  172. transition-duration: 0.2s;
  173. cursor: pointer;
  174. display: -webkit-inline-flex;
  175. display: -moz-inline-flex;
  176. display: inline-flex;
  177. -webkit-align-items: center;
  178. -moz-align-items: center;
  179. align-items: center;
  180. -webkit-flex-wrap: nowrap;
  181. -moz-flex-wrap: nowrap;
  182. flex-wrap: nowrap;
  183. -webkit-justify-content: center;
  184. -moz-justify-content: center;
  185. justify-content: center;
  186. }
  187. .dict_find_gramma guide{
  188. color:unset;
  189. }
  190. #pre_search_result{
  191. background-color: var(--btn-color);
  192. z-index: 50;
  193. display:none;
  194. }
  195. #dt_title {
  196. border-bottom: 2px solid var(--link-hover-color);
  197. }
  198. .dict_word_list .mean {
  199. overflow: hidden;
  200. text-overflow: ellipsis;
  201. display: -webkit-box;
  202. -webkit-box-orient: vertical;
  203. -webkit-line-clamp: 1;
  204. padding-left: 1em;
  205. }
  206. .section_inner{
  207. max-width:1024px;
  208. margin: 0 auto;
  209. }
  210. .spell{
  211. font-size: 110%;
  212. font-weight: 700;
  213. }
  214. .dict_word_list:hover{
  215. color: var(--link-hover-color);
  216. }
  217. .pali_spell{
  218. font-size:200%;
  219. font-weight:700;
  220. margin-top:15px;
  221. padding-bottom:0
  222. }
  223. </style>
  224. <link type="text/css" rel="stylesheet" href="./css/style.css" >
  225. <link type="text/css" rel="stylesheet" href="./css/style_mobile.css" media="screen and (max-width:800px)">
  226. <!-- tool bar begin-->
  227. <div id='search_toolbar' class="search_toolbar">
  228. <div class='section_inner' style="display:flex;justify-content: space-between;">
  229. <div id="left_menu_button">
  230. <button id="left_toc" type="button" class="icon_btn" onclick="setNaviVisibility('table_of_content')" title="Dict List">
  231. <svg class="icon">
  232. <use xlink:href="./icon.svg#icon_toc"></use>
  233. </svg>
  234. <span class="icon_notify" id="icon_notify_table_of_content">
  235. </span>
  236. </button>
  237. </div>
  238. <div >
  239. <guide gid="dict_search_input"></guide>
  240. </div>
  241. <div style="flex:6;">
  242. <div>
  243. <div>
  244. <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()" />
  245. </div>
  246. <div id="result_msg"></div>
  247. <div id="word_parts">
  248. <div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
  249. </div>
  250. </div>
  251. <div id="pre_search_result" >
  252. <div id="pre_search_word" class="pre_serach_block">
  253. <div id="pre_search_word_title" class="pre_serach_block_title">
  254. <div id="pre_search_word_title_left"><?php echo $_local->gui->vocabulary_list; ?></div>
  255. <div id="pre_search_word_title_right"></div>
  256. </div>
  257. <div id="pre_search_word_content" class="pre_serach_content">
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <span style="display:flex;">
  263. <button id="trubo_split" onclick="trubo_split()" >
  264. <?php echo $_local->gui->turbo_split; /*强力拆分*/ ?>
  265. </button>
  266. <guide gid="comp_split"></guide>
  267. </span>
  268. <div></div>
  269. </div>
  270. <div style="display:block;z-index: 5;text-align:center;">
  271. </div>
  272. </div>
  273. <!--tool bar end -->
  274. <!-- tool bar fixed begin-->
  275. <div id='search_toolbar_1' class="search_toolbar search_fixed">
  276. <div style="display:flex;">
  277. <span>
  278. <?php echo $_local->gui->dictionary; ?>
  279. </span>
  280. <div>
  281. <div>
  282. <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()">
  283. </div>
  284. <div id="pre_search_result_1" style="position: absolute;max-width: 100%; width: 50em;background-color: var(--btn-color);z-index: 51;display: none;">
  285. <div class="pre_serach_block">
  286. <div class="pre_serach_block_title">
  287. <div id="pre_search_word_title_left_1"><?php echo $_local->gui->vocabulary_list; ?></div>
  288. <div id="pre_search_word_title_right_1"></div>
  289. </div>
  290. <div id="pre_search_word_content_1" class="pre_serach_content">
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. <div style="display:block;z-index: 5;">
  297. </div>
  298. </div>
  299. <!--tool bar fixed end -->
  300. <div id="tool_btn" class="right_tool_btn" style="display: none;">
  301. <button style="border: 2px solid var(--nocolor); background-color: unset;"><a href="#toc_root">
  302. <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">
  303. <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>
  304. <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>
  305. <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>
  306. <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>
  307. <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>
  308. </svg>
  309. </a>
  310. </button>
  311. </div>
  312. <div>
  313. <div class='section_inner' id="dict_search_result" style="background-color:white;color:black;">
  314. </div>
  315. </div>
  316. <script>
  317. <?php
  318. if (isset($_GET["key"]) && !empty($_GET["key"])) {
  319. echo "var _key='{$_GET["key"]}';\n";
  320. echo "search_on_load(\"{$_GET["key"]}\")";
  321. }
  322. ?>
  323. window.addEventListener('scroll', winScroll);
  324. function winScroll(e) {
  325. if (GetPageScroll().y > 150) {
  326. $("#search_toolbar_1").css("top", 0);
  327. } else {
  328. $("#search_toolbar_1").css("top", GetPageScroll().y - 150);
  329. }
  330. if (GetPageScroll().y > $(window).height() * 0.9) {
  331. $("#tool_btn").show();
  332. } else {
  333. $("#tool_btn").hide();
  334. }
  335. }
  336. //滚动条位置
  337. function GetPageScroll() {
  338. var pos = new Object();
  339. var x, y;
  340. if (window.pageYOffset) { // all except IE
  341. y = window.pageYOffset;
  342. x = window.pageXOffset;
  343. } else if (document.documentElement && document.documentElement.scrollTop) { // IE 6 Strict
  344. y = document.documentElement.scrollTop;
  345. x = document.documentElement.scrollLeft;
  346. } else if (document.body) { // all other IE
  347. y = document.body.scrollTop;
  348. x = document.body.scrollLeft;
  349. }
  350. pos.x = x;
  351. pos.y = y;
  352. return (pos);
  353. }
  354. </script>
  355. <?php
  356. include "../pcdl/html_foot.php";
  357. ?>