wiki.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <?php
  2. require_once "../public/load_lang.php";
  3. require_once "../path.php";
  4. if(isset($_GET["id"])){
  5. $_get_id=$_GET["id"];
  6. }
  7. if(isset($_GET["word"])){
  8. $_get_word=$_GET["word"];
  9. }
  10. if(isset($_GET["author"])){
  11. $_get_author=$_GET["author"];
  12. }
  13. else{
  14. $_get_author="";
  15. }
  16. ?>
  17. <?PHP
  18. include "../pcdl/html_head.php";
  19. ?>
  20. <body style="margin: 0;padding: 0;" class="reader_body" onload="<?php
  21. if(isset($_get_id)){
  22. echo "wiki_load_id('{$_get_id}')";
  23. }
  24. else if(isset($_get_word)){
  25. echo "wiki_load_word('{$_get_word}')";
  26. }
  27. ?>">
  28. <script src="../term/term.js"></script>
  29. <script src="../term/note.js"></script>
  30. <script src="wiki.js"></script>
  31. <script>
  32. <?php
  33. if(isset($_GET["word"])){
  34. echo "_word='".$_GET["word"]."';";
  35. }
  36. if(isset($_GET["channal"])){
  37. echo "_channal='".$_GET["channal"]."';";
  38. }
  39. if(isset($_GET["lang"])){
  40. echo "_lang='".$_GET["lang"]."';";
  41. }
  42. if(isset($_GET["author"])){
  43. echo "_author='".$_GET["author"]."';";
  44. }
  45. ?>
  46. </script>
  47. <style>
  48. .term_link,.term_link_new{
  49. color: blue;
  50. padding-left: 2px;
  51. padding-right: 2px;
  52. }
  53. .term_link_new{
  54. color:red;
  55. }
  56. #search_result{
  57. position: absolute;
  58. background: wheat;
  59. max-width: 95%;
  60. width: 24em;
  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. }
  160. .term_block_bar_left{
  161. display: flex;
  162. }
  163. .term_block_bar_left_icon{
  164. display: inline-block;
  165. width: 1.5em;
  166. text-align: center;
  167. height: 1.5em;
  168. background-color: gray;
  169. font-size: 180%;
  170. color: white;
  171. border-radius: 99px;
  172. }
  173. .term_block_bar_left_info{
  174. padding-left: 8px;
  175. }
  176. .term_meaning{
  177. font-weight: 700;
  178. }
  179. .term_author{
  180. font-size: 80%;
  181. color: gray;
  182. }
  183. .term_tag{
  184. font-size: 80%;
  185. font-weight: 500;
  186. margin: 0 8px;
  187. }
  188. .term_link {
  189. cursor: pointer;
  190. }
  191. #wiki_contents{
  192. padding: 0 1em;
  193. max-width: 1280px;
  194. margin-left: auto;
  195. margin-right: auto;
  196. }
  197. #term_list_right{
  198. width: 25em;
  199. }
  200. #term_list{
  201. width: 100%;
  202. padding: 0.5em;
  203. }
  204. #term_list_div{
  205. display: flex;
  206. justify-content: space-between;
  207. }
  208. .fun_frame {
  209. border-bottom: 1px solid gray;
  210. margin-right: 10px;
  211. margin-bottom: 10px;
  212. }
  213. .fun_frame>.title{
  214. padding:6px;
  215. font-weight: 700;
  216. }
  217. .fun_frame>.content{
  218. padding:6px;
  219. max-height:6em;
  220. overflow-y: scroll;
  221. }
  222. .fixed{
  223. position:fixed;
  224. right: 0;
  225. top: 0;
  226. }
  227. .when_right_fixed{
  228. padding-right:20em;
  229. }
  230. .bg_color_1{
  231. background-color:#ebebeb66;
  232. }
  233. .bg_color_2{
  234. background:linear-gradient(to right, #6afdb033, #ebebeb66);
  235. }
  236. .bg_color_3{
  237. background:linear-gradient(to right, #6a95fd26, #ebebeb66);
  238. }
  239. .bg_color_4{
  240. background:linear-gradient(to right, #f9e7911c, #ebebeb66);
  241. }
  242. .bg_color_5{
  243. background:linear-gradient(to right, #fe99b91c, #ebebeb66);
  244. }
  245. pre {
  246. white-space: pre-line;
  247. font-family: auto;
  248. border-left: 3px solid var(--border-shadow);
  249. margin-left: 1em;
  250. padding-left: 0.5em;
  251. }
  252. </style>
  253. <style media="screen and (max-width:767px)">
  254. #term_list_right{
  255. display:none;
  256. }
  257. .when_right_fixed{
  258. padding-right:0;
  259. }
  260. </style>
  261. <script>
  262. term_word_link_fun("wiki_goto_word");
  263. </script>
  264. <style>
  265. .index_toolbar{
  266. position:unset;
  267. }
  268. #pali_pedia{
  269. font-size: 200%;
  270. margin-top: auto;
  271. margin-bottom: auto;
  272. padding-left: 0.5em;
  273. }
  274. </style>
  275. <?php
  276. require_once("../pcdl/head_bar.php");
  277. ?>
  278. <div id="head_bar" >
  279. <div id="pali_pedia" style="display:flex;">
  280. <span>圣典百科</span>
  281. <span id="wiki_search" style="width:25em;">
  282. <span style="display:block;">
  283. <input id="wiki_search_input" type="input" placeholder="search" style="width:30em;background-color: var(--btn-color);" onkeyup="wiki_search_keyup(event,this)"/>
  284. </span>
  285. <span id="search_result">
  286. </span>
  287. </span>
  288. </div>
  289. <div>
  290. <span>
  291. <a href="#">[设置]</a>
  292. <a href="#">[建立词条]</a>
  293. <a href="#">[帮助]</a>
  294. </span>
  295. </div>
  296. </div>
  297. <div id="wiki_contents" style="padding: 0 1em;">
  298. loading...
  299. </div>
  300. <script>
  301. window.addEventListener('scroll',winScroll);
  302. function winScroll(e){
  303. if(GetPageScroll().y>220){
  304. }
  305. else{
  306. }
  307. }
  308. //滚动条位置
  309. function GetPageScroll()
  310. {
  311. var pos=new Object();
  312. var x, y;
  313. if(window.pageYOffset)
  314. { // all except IE
  315. y = window.pageYOffset;
  316. x = window.pageXOffset;
  317. } else if(document.documentElement && document.documentElement.scrollTop)
  318. { // IE 6 Strict
  319. y = document.documentElement.scrollTop;
  320. x = document.documentElement.scrollLeft;
  321. } else if(document.body) { // all other IE
  322. y = document.body.scrollTop;
  323. x = document.body.scrollLeft;
  324. }
  325. pos.x=x;
  326. pos.y=y;
  327. return(pos);
  328. }
  329. </script>
  330. </body>
  331. </html>