wiki.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php
  2. require_once "../public/_pdo.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. <style>
  32. .term_link,.term_link_new{
  33. color: blue;
  34. padding-left: 2px;
  35. padding-right: 2px;
  36. }
  37. .term_link_new{
  38. color:red;
  39. }
  40. #search_result{
  41. position: absolute;
  42. background: wheat;
  43. max-width: 95%;
  44. width: 24em;
  45. }
  46. chapter{
  47. color: blue;
  48. text-decoration: none;
  49. cursor: pointer;
  50. }
  51. chapter:hover{
  52. color: blue;
  53. text-decoration: underline;
  54. }
  55. para{
  56. background-color: #959595;
  57. padding: 2px 8px;
  58. text-decoration: none;
  59. cursor: pointer;
  60. color: white;
  61. border-radius: 5px;
  62. }
  63. para:hover{
  64. text-decoration: underline;
  65. }
  66. .icon{
  67. width: 15px;
  68. height: 15px;
  69. }
  70. .submenu_title{
  71. font-size: 120%;
  72. font-weight: 700;
  73. }
  74. .term_word_head_pali {
  75. text-transform: capitalize;
  76. font-size: 200%;
  77. margin: 0.5em 0;
  78. }
  79. .term_word_head{
  80. border-bottom: 1px solid #cecece;
  81. padding: 5px 0;
  82. }
  83. .term_block{
  84. border-bottom: 1px solid #cecece;
  85. padding: 5px 0;
  86. }
  87. .term_word_head_authors a{
  88. color: blue;
  89. margin: 0 3px;
  90. }
  91. .term_word_head_authors a:hover{
  92. text-decoration: underline;
  93. cursor: pointer;
  94. }
  95. note{
  96. display: block;
  97. background-color: #80808029;
  98. padding: 0.5em;
  99. }
  100. note .ref{
  101. text-align: right;
  102. padding: 5px;
  103. font-size: 80%;
  104. }
  105. .term_block_bar {
  106. display: flex;
  107. justify-content: space-between;
  108. }
  109. #head_bar{
  110. display: flex;
  111. justify-content: space-between;
  112. height: 5em;
  113. background-color: var(--bookx);
  114. border-bottom: 1px solid var(--tool-line-color);
  115. }
  116. .term_block_bar_left{
  117. display: flex;
  118. }
  119. .term_block_bar_left_icon{
  120. display: inline-block;
  121. width: 1.5em;
  122. text-align: center;
  123. height: 1.5em;
  124. background-color: gray;
  125. font-size: 180%;
  126. color: white;
  127. border-radius: 99px;
  128. }
  129. .term_block_bar_left_info{
  130. padding-left: 8px;
  131. }
  132. .term_meaning{
  133. font-weight: 700;
  134. }
  135. .term_author{
  136. font-size: 80%;
  137. color: gray;
  138. }
  139. .term_tag{
  140. font-size: 80%;
  141. font-weight: 500;
  142. margin: 0 8px;
  143. }
  144. .term_link {
  145. cursor: pointer;
  146. }
  147. }
  148. </style>
  149. <script>
  150. term_word_link_fun("wiki_goto_word");
  151. </script>
  152. <style>
  153. .index_toolbar{
  154. position:unset;
  155. }
  156. #pali_pedia{
  157. font-size: 200%;
  158. margin-top: auto;
  159. margin-bottom: auto;
  160. padding-left: 0.5em;
  161. }
  162. </style>
  163. <?php
  164. require_once("../pcdl/head_bar.php");
  165. ?>
  166. <div id="head_bar" >
  167. <div id="pali_pedia" style="display:flex;">
  168. <span>圣典百科</span>
  169. <span id="wiki_search" style="width:25em;">
  170. <span style="display:block;">
  171. <input id="wiki_search_input" type="input" placeholder="search" style="width:30em;background-color: var(--btn-color);" onkeyup="wiki_search_keyup(event,this)"/>
  172. </span>
  173. <span id="search_result">
  174. </span>
  175. </span>
  176. </div>
  177. <div>
  178. <span>
  179. <a href="#">[设置]</a>
  180. <a href="#">[建立词条]</a>
  181. <a href="#">[帮助]</a>
  182. </span>
  183. </div>
  184. </div>
  185. <div id="wiki_contents" style="padding: 0 1em;">
  186. loading...
  187. </div>
  188. <button onclick="run()">run</button>
  189. </body>
  190. </html>