wiki.php 7.7 KB

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