wiki.php 3.3 KB

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