wiki.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. <?php
  2. require_once "../public/load_lang.php";
  3. require_once "../config.php";
  4. require_once "../pcdl/html_head.php";
  5. if(isset($_GET["id"])){
  6. $_get_id=$_GET["id"];
  7. }
  8. if(isset($_GET["word"])){
  9. $_get_word=$_GET["word"];
  10. }
  11. if(isset($_GET["author"])){
  12. $_get_author=$_GET["author"];
  13. }
  14. else{
  15. $_get_author="";
  16. }
  17. if(isset($_GET["active"])){
  18. $_get_active=$_GET["active"];
  19. }
  20. else{
  21. $_get_active="read";
  22. }
  23. ?>
  24. <body style="margin: 0;padding: 0;" class="reader_body" >
  25. <script src="../term/term.js"></script>
  26. <script src="../term/note.js"></script>
  27. <script src="wiki.js"></script>
  28. <script>
  29. <?php
  30. if(isset($_GET["id"])){
  31. $_get_id=$_GET["id"];
  32. echo "_id='".$_GET["id"]."';";
  33. }
  34. if(isset($_GET["word"])){
  35. echo "_word='".$_GET["word"]."';";
  36. }
  37. if(isset($_GET["channel"])){
  38. echo "_channel='".$_GET["channel"]."';";
  39. }
  40. if(isset($_GET["lang"])){
  41. echo "_lang='".$_GET["lang"]."';";
  42. }
  43. if(isset($_GET["author"])){
  44. echo "_author='".$_GET["author"]."';";
  45. }
  46. if(isset($_GET["active"])){
  47. echo "_active='".$_GET["active"]."';";
  48. }
  49. ?>
  50. </script>
  51. <style>
  52. .term_link,.term_link_new{
  53. color: blue;
  54. padding-left: 2px;
  55. padding-right: 2px;
  56. }
  57. .term_link_new{
  58. color:red;
  59. }
  60. #search_result{
  61. position: absolute;
  62. background: var(--bg-color);
  63. box-shadow: 8px 8px 20px var(--border-shadow);
  64. max-width: 95%;
  65. width: 24em;
  66. z-index: 20;
  67. }
  68. note:hover chapter{
  69. display:inline;
  70. }
  71. .ref>chapter:first-child{
  72. display:inline;
  73. }
  74. chapter{
  75. display:none;
  76. color: var(--box-bg-color1);
  77. text-decoration: none;
  78. cursor: pointer;
  79. }
  80. chapter:hover{
  81. color: var(--link-color);
  82. text-decoration: underline;
  83. }
  84. para{
  85. background-color: var(--drop-bg-color);
  86. padding: 2px 8px;
  87. text-decoration: none;
  88. cursor: pointer;
  89. color: var(--btn-border-color);
  90. border-radius: 5px;
  91. }
  92. para:hover{
  93. text-decoration: underline;
  94. }
  95. .icon{
  96. width: 15px;
  97. height: 15px;
  98. }
  99. .submenu_title{
  100. font-size: 120%;
  101. font-weight: 700;
  102. }
  103. .term_word_head_pali {
  104. text-transform: capitalize;
  105. font-size: 200%;
  106. margin: 0.5em 0;
  107. }
  108. .term_word_head{
  109. border-bottom: 1px solid #cecece;
  110. padding: 5px 0;
  111. }
  112. .term_block{
  113. border-bottom: 1px solid #cecece;
  114. padding: 5px 0;
  115. }
  116. .term_word_head_authors a{
  117. color: blue;
  118. margin: 0 3px;
  119. }
  120. .term_word_head_authors a:hover{
  121. text-decoration: underline;
  122. cursor: pointer;
  123. }
  124. note .ref{
  125. text-align: right;
  126. padding: 5px;
  127. font-size: 75%;
  128. margin-top: 8px;
  129. }
  130. note{
  131. background-color: #80808014;
  132. padding: 0.5em 0.8em;
  133. margin-bottom: 0.4em;
  134. border-radius: 5px;
  135. display:block;
  136. }
  137. note>.tran{
  138. color: #5c5c5c;
  139. padding-left: 1em;
  140. }
  141. note>.palitext{
  142. font-family: Noto serif;
  143. line-height: 1.5em;
  144. color: #9f3a01;
  145. font-weight: 500;
  146. }
  147. note>.palitext>note{
  148. display:inline;
  149. color:blue;
  150. background-color: unset;
  151. padding: unset;
  152. margin-bottom: unset;
  153. border-radius: unset;
  154. }
  155. .term_block_bar {
  156. display: flex;
  157. justify-content: space-between;
  158. }
  159. #head_bar{
  160. display: flex;
  161. justify-content: space-between;
  162. /*height: 5em;*/
  163. background-color: var(--bookx);
  164. border-bottom: 1px solid var(--tool-line-color);
  165. margin-top: 50px;
  166. }
  167. .term_block_bar_left{
  168. display: flex;
  169. }
  170. .term_block_bar_left_icon{
  171. display: inline-block;
  172. width: 1.5em;
  173. text-align: center;
  174. height: 1.5em;
  175. background-color: gray;
  176. font-size: 180%;
  177. color: white;
  178. border-radius: 99px;
  179. }
  180. .term_block_bar_left_info{
  181. padding-left: 8px;
  182. display:flex;
  183. }
  184. .term_meaning{
  185. font-weight: 700;
  186. }
  187. .term_author{
  188. font-size: 80%;
  189. color: var(--main-color1);
  190. padding: 0 10px 0 5px;
  191. }
  192. .term_tag{
  193. font-size: 80%;
  194. font-weight: 500;
  195. margin: 0 8px;
  196. }
  197. .term_link {
  198. cursor: pointer;
  199. }
  200. #wiki_contents{
  201. padding: 0 1em;
  202. max-width: 960px;
  203. margin-left: auto;
  204. margin-right: auto;
  205. }
  206. #term_list_right{
  207. width: 25em;
  208. }
  209. #term_list{
  210. width: 100%;
  211. padding: 0.5em;
  212. }
  213. #term_list_div{
  214. display: flex;
  215. justify-content: space-between;
  216. }
  217. .fun_frame {
  218. border-bottom: 1px solid gray;
  219. margin-right: 10px;
  220. margin-bottom: 10px;
  221. }
  222. .fun_frame>.title{
  223. padding:6px;
  224. font-weight: 700;
  225. }
  226. .fun_frame>.content{
  227. padding:6px;
  228. max-height:6em;
  229. overflow-y: scroll;
  230. }
  231. .fixed{
  232. position:fixed;
  233. right: 0;
  234. top: 0;
  235. }
  236. .when_right_fixed{
  237. padding-right:20em;
  238. }
  239. .bg_color_1{
  240. background-color:#ebebeb66;
  241. }
  242. .bg_color_2{
  243. background:linear-gradient(to right, #6afdb033, #ebebeb66);
  244. }
  245. .bg_color_3{
  246. background:linear-gradient(to right, #6a95fd26, #ebebeb66);
  247. }
  248. .bg_color_4{
  249. background:linear-gradient(to right, #f9e7911c, #ebebeb66);
  250. }
  251. .bg_color_5{
  252. background:linear-gradient(to right, #fe99b91c, #ebebeb66);
  253. }
  254. pre {
  255. white-space: pre-line;
  256. font-family: auto;
  257. border-left: 3px solid var(--border-shadow);
  258. margin-left: 1em;
  259. padding-left: 0.5em;
  260. }
  261. #wiki_head{
  262. min-height:100px;
  263. }
  264. #form_term ul li{
  265. display:flex;
  266. }
  267. #form_term ul .field{
  268. flex:1;
  269. }
  270. #form_term ul .input{
  271. flex:8;
  272. }
  273. input[type="text"], input[type="input"], textarea{
  274. border:1px solid var(--border-line-color);
  275. }
  276. .wiki_search_list li{
  277. padding:0 1em;
  278. line-height:1.8em;
  279. }
  280. .wiki_search_list li:hover {
  281. background-color: beige;
  282. }
  283. .note_shell{
  284. display:none;
  285. }
  286. </style>
  287. <style media="screen and (max-width:800px)">
  288. #term_list_right{
  289. display:none;
  290. }
  291. .when_right_fixed{
  292. padding-right:0;
  293. }
  294. </style>
  295. <script>
  296. term_word_link_fun("wiki_goto_word");
  297. </script>
  298. <style>
  299. .index_toolbar{
  300. position:unset;
  301. }
  302. #pali_pedia{
  303. margin-top: auto;
  304. margin-bottom: auto;
  305. padding-left: 0.5em;
  306. }
  307. </style>
  308. <?php
  309. require_once("../pcdl/head_bar.php");
  310. ?>
  311. <div id="head_bar" >
  312. <div id="pali_pedia" style="display:flex;width: 100%;">
  313. <span style="margin: auto 1em auto 0;"><?php echo $_local->gui->wiki_term; ?></span>
  314. <span id="wiki_search" style="width:35vw;margin: auto 0em;">
  315. <span style="display:block;">
  316. <input id="wiki_search_input" type="input" placeholder=<?php echo $_local->gui->search; ?> style="width:30vw;background-color: var(--btn-color);border: 1px solid var(--btn-border-color);border-radius: 99px;padding: 3px 15px;" onkeyup="wiki_search_keyup(event,this)"/>
  317. </span>
  318. <span id="search_result">
  319. </span>
  320. </span>
  321. <span style="font-size: medium; margin: auto 1em auto auto;">
  322. <button class="icon_btn"><a href="#"><?php echo $_local->gui->setting; ?></a></button>
  323. <button class="icon_btn"><a href="wiki.php?word=&active=new"><?php echo $_local->gui->new_technic_term; ?></a></button>
  324. <button class="icon_btn"><a href="#"><?php echo $_local->gui->help; ?></a></button>
  325. </span>
  326. </div>
  327. </div>
  328. <div id="wiki_contents" >
  329. <div id="wiki_head"></div>
  330. <div id="wiki_body" style="display:flex;">
  331. <div id="wiki_body_left" style="flex:7;padding: 0 1em;">
  332. <?php echo $_local->gui->loading; ?>...
  333. </div>
  334. <div id="wiki_body_right" style="flex:3">
  335. <div id='term_list_right' >
  336. <div class="fun_frame">
  337. <div class="title"><?php echo $_local->gui->language; ?></div>
  338. <div class="content" style="max-height:10em;">
  339. <div><a href=""><?php echo $_local->gui->all; ?></a></div>
  340. </div>
  341. </div>
  342. <div class="fun_frame">
  343. <div class="title"><?php echo $_local->gui->translation; ?></div>
  344. <div id="channal_list" class="content" style="max-height:10em;">
  345. <div><a href=""><?php echo $_local->gui->all; ?></a></div>
  346. </div>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. <script>
  353. window.addEventListener('scroll',winScroll);
  354. <?php
  355. if(isset($_get_id)){
  356. echo "window.addEventListener('load',wiki_load_id('{$_get_id}'))";
  357. }
  358. else if(isset($_get_word)){
  359. echo "window.addEventListener('load',wiki_load_word('{$_get_word}'))";
  360. }
  361. ?>
  362. function winScroll(e){
  363. if(GetPageScroll().y>220){
  364. }
  365. else{
  366. }
  367. }
  368. //滚动条位置
  369. function GetPageScroll()
  370. {
  371. var pos=new Object();
  372. var x, y;
  373. if(window.pageYOffset)
  374. { // all except IE
  375. y = window.pageYOffset;
  376. x = window.pageXOffset;
  377. } else if(document.documentElement && document.documentElement.scrollTop)
  378. { // IE 6 Strict
  379. y = document.documentElement.scrollTop;
  380. x = document.documentElement.scrollLeft;
  381. } else if(document.body) { // all other IE
  382. y = document.body.scrollTop;
  383. x = document.body.scrollLeft;
  384. }
  385. pos.x=x;
  386. pos.y=y;
  387. return(pos);
  388. }
  389. </script>
  390. </body>
  391. </html>